I wonder could anyone suggest a tool (ideally Linux command line) for decrypting Duplicati's .zip.aes archive files please? I'm just trying to do a little "due diligence" before committing to Duplicati, and would like to verify both that the backups are correctly encrypted, and that in a worst case situation I could still (albeit extremely laboriously) obtain data from the encrypted backups even without Duplicati. Looking at the white paper and elsewhere, I couldn't find obvious documentation of the default encryption mechanism, and playing around with a sample backup using a few tools to decrypt AES-256 (openssl, aespipe, gpg) I didn't have much luck: openssl and gpg both expected the encrypted files to have more structure (magic number, etc.) and I could easily believe that the garbage aespipe produced was down to my failure to invoke it correctly.
Hmm, making progress on this: the developer documentation mentions AESCrypt, which looks as if it's Windows-originated (not available as part of Debian stretch, anyway), but source code is available here. Giving that a try, will report back.
Ok, solved: obtained AESCrypt as above and decrypted successfully. Not entirely trivial, as aescrypt itself wants keyfiles to be in UTF-16LE format for some reason, but it comes with a utility to help with that. Here are the necessary incantations:
aescrypt_keygen -p 'PASSWORD' KEYFILE
aescrypt -d -k KEYFILE DUPLICATI-FILE.zip.aes
The first command stores your password in KEYFILE using the correct format; the second command decrypts DUPLICATI-FILE.zip.aes to DUPLICATI-FILE.zip.
AESCrypt was trivial to build: after downloading and extracting, I just cd'ed to the source directory and typed make.
Alternatively, you can use SharpAESCrypt.exe, located in the Duplicati program folder.
Duplicati.CommandLine.RecoveryTool.exe can be used to download all remote files to a local folder and decrypt the files.
Thanks @kees-z - in the spirit of "Trust No One", I wanted to decrypt using something not from Duplicati itself!
Awesome that you got it working. I chose to use AESCrypt because there was an open source implementation, such that there is a good chance you can recover even if Duplicati stops to exist.
Since you are looking at the "restore without Duplicati", you may want to try this as well: https://github.com/duplicati/duplicati/tree/master/Tools/Commandline/RestoreFromPython
Most helpful comment
Awesome that you got it working. I chose to use AESCrypt because there was an open source implementation, such that there is a good chance you can recover even if Duplicati stops to exist.
Since you are looking at the "restore without Duplicati", you may want to try this as well: https://github.com/duplicati/duplicati/tree/master/Tools/Commandline/RestoreFromPython