I have an encrypted share folder on my synology NAS DS413 (which uses ecryptfs). I can manually mount the encrypted folder and read the decrypted files without issue, using synologies GUI. For some reason, I have never been able to mount the encrypted folder using my passphrase . But I can always do it by using the private key generated during ecryptfs setup.

So I have since been doing some research on decrypting the encrypted files without a synology (for example if this thing catches fire or is stolen and I need to restore from backup). I've read several threads and howto's on decrypting synology/ecryptfs encrypted shares using linux and encryptfs-utils. But the howto always tells you to provide the passphrase and never mention the use of the key for decryption. So my question is how do I decrypt using the key (which works to mount and decrypt with synology's software)? The key I have is 80 bytes and is binary. The first 16 bytes are integers only and the remaining bytes appear to be random hex.

Thanks for any tips!

share|improve this question
1  
I'd be far more concerned about disk failure & power surges, or accidental overwrite, than I would be about fire & theft. And what's synologies & just wondering what system are you running, Ubuntu, Arch, Debian, etc? – Xen2050 Jan 14 '15 at 1:52
    
raid 5 and ecryptfs backup to amazon glacier – kevincw01 Jan 14 '15 at 14:23

See by "How To Recover Synology encrypted folders in Linux" by Robert Castle. Summary:

MOUNTOPTIONS=""
for option in                           \
  "key=passphrase"                      \
  "ecryptfs_cipher=aes"                 \
  "ecryptfs_key_bytes=32"               \
  "ecryptfs_passthrough=no"             \
  "ecryptfs_enable_filename_crypto=yes" \
; do
  MOUNTOPTIONS="${MOUNTOPTIONS}${MOUNTOPTIONS:+,}$option"
done
sudo mount -t ecryptfs -o $MOUNTOPTIONS,passwd=$PASSWORD $CRYPTDIR $TARGET
share|improve this answer
    
Sorry, you're using the passphrase and not the key. – kevincw01 Dec 8 '16 at 14:09
    
@kevincw01: Read the linked article, not just my summary. You can mount the filesystem by first adding the key to the keyring. – AlexP Dec 8 '16 at 15:24
2  
I did read it. In fact that's the article I originally read before I posted this question. I reread it just now to make sure and I don't see anything that talks about how to use the key file instead of the passphrase. – kevincw01 Dec 8 '16 at 19:09
1  
@kevincw01: What exactly is "the private key generated during ecryptfs setup"? It is something else than the eCryptfs wrapped passphrase? – AlexP Dec 8 '16 at 21:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.