could you tell me please, what I need to do to decrypt the data on a Linux Machine?
Do I need a special program for the decryption?
I was glad to see that encryption was supported in the recent synology firmware. But as I perform offsite backups to a non-synology server via rsync, I wanted to be sure that I could unencrypt my data, in case my synology box failed.
Synology shared folder encryption is based on ecryptfs. This provides an encryption layer over the existing file system. Recent linux kernels have support built-in. These are the steps I used to confirm that I could unencrypt data on a linux machine.
1) Prepare a linux machine, running a kernel that supports ecryptfs. I used Ubuntu 9.10.
2) Install support for ecryptfs. Default ubuntu install did not have it.
- Code: Select all
apt-get install ecryptfs-utils
3) Copy the encrypted data from the synology box (synobox) to the linux machine...
- Code: Select all
cd /home/steve
rsync -a synobox:/volume1/@crypttest@ .
4) Create a directory to act as a mount point for the decrypted data...
- Code: Select all
mkdir /home/steve/crypttest
5) Mount the encrypted data...
- Code: Select all
sudo mount -t ecryptfs /home/steve/@crypttest@ /home/steve/crypttest
(enter your passphrase - the one you entered when creating the shared folder on the synology box)
(select cipher 1=aes)
(select key bytes 2=32)
(select enable plaintext passthrough = n)
(select enable filename encryption = y)
(accept default FNEK Signature by pressing ENTER at prompt)
(choose 'yes' when asked if you would like to proceed with the mount)
(choose 'no' when asked if you would like to append signature to the cache file)
6) Change to your decrypted mount point to access your data...
- Code: Select all
cd /home/steve/crypttest
ls -l
You can automate the mount by supplying the interactive choices as command line options, e.g.
- Code: Select all
sudo mount -t ecryptfs /home/steve/@crypttest@ /home/steve/crypttest -o \
key=passphrase:passphrase_passwd=blahblah,ecryptfs_sig=6c6e2b8b7d94ce23, \
ecryptfs_fnek_sig=6c6e2b8b7d94ce23,ecryptfs_cipher=aes,ecryptfs_key_bytes=32, \
ecryptfs_passthrough=n,no_sig_cache,ecryptfs_enable_filename_crypto=y
(Put in all on one line without the \ characters if you like. I found that this forum system truncated the line, so I've split it up here.)
This is assuming a passphrase of 'blahblah'. The signature values for your mount command can be found by typing 'mount' at the command line after your first successful interactive mount. Look for the relevant entry and copy the signature strings from there. You will only have the same signature strings as me (6c6e2b8b7d94ce23) if you choose 'blahblah' as your passphrase!
Hope this helps someone.
I spent ages trying to get this working on older versions of linux. It's not worth the pain, in my opinion. But you will need CONFIG_KEYS enabled in your kernel build if you go down that route.
Steve