4

What I am looking for:

I would like to have something like a 'file-level' encrypted file-system but working in the reverse: The files would be stored in clear on the disk but when accessed via a 'mounted' folder, they would be encrypted on access. I would need this on Linux, or maybe a *BSD variant.

Why I am looking for something like this:

I have lots of files I would like to save to a cloud backup service, but I would want them to be encrypted at the source and being the only one with the key. The cloud service I plan to use does offer encryption but as it is closed source, I would prefer not to trust it with the 'clear' version of my files. (There could be a backdoor, either voluntary or not, or the encryption key could be shared with a third party even though they say they do not do it, etc.).

So the plan I came up with is to put the cloud backup program in a virtual machine which would only have access to the encrypted version of my files (via a shared folder). The problem is, all the solutions I have found only work by encrypting on write and decrypting on read, not the reverse (which is logical since they protect against the leakage of information in case of disk theft).

In my case, some of these solutions may work but I would have to encrypt all my files, share these to the virtual machines, and access them via the 'decrypted' mount point of the file-system. That would mean I would take a performance hit on file access (to encrypt or decrypt) instead of the backup program taking that hit. It would also mean I would lose all my files if I misplaced the decryption key... (compared with only losing the backup of these files)

So, is there anything that would satisfy my needs or am I looking at the problem from a wrong angle?


Edit: I didn't want to mention the name of the cloud service to avoid a 'threadjack' on which is the best backup service for home users, but I see how naming it would help understand the workflow and why I'm here now!

So the backup program is Crashplan, and it handles everything automatically. It works a little bit like 'rsync', maintaining the backup server in sync with the local (backed-up) directories and the remote site maintains an history for each file, so that you cannot lose your backup by syncing an empty dir. If the cloud backup program and protocols weren't proprietary, I'm sure I could have built something out of existing solutions and some scripts, but seeing how it's made, the only solution I've come up with is 'feeding' the program with a regular directory containing the encrypted version of my files. Not wanting to have the data stored twice locally (once in clear and once encrypted), I am looking for an 'on the fly encryption' that would still present itself as a 'regular' directory to programs, that's why I talked about an "encryption file-system"...

  • 1
    How does the cloud backup program work? Does it handle incremental backups for you? A simple solution would be to use your own software to generate archives, encrypt them, and upload the result. You'll find plenty of open-source software for that, it's a very common workflow. – Gilles Nov 11 '14 at 15:21
  • The backup program is Crashplan, I've edited the original question to make the workflow clearer. I would like to leave Crashplan handle all the parts of what to backup and when, but feeding it encrypted data instead of trusting it with the encryption key. – Nawak Nov 11 '14 at 22:19
  • Ok, thanks for the clarification. There's an important consequence of doing things your way: when you encrypt the same file twice, the ciphertext is different, so the backup program will think that all files have changed unless you arrange to store the previous encrypted version, which is a significant constraint on your scheme. You can avoid that by imposing deterministic encryption, but it also weakens the security (an attacker with two different versions of the same file may be able to recover its content). – Gilles Nov 11 '14 at 22:35
  • So, what you need is not just a way to encrypt files on the fly, but also to do part of the job of the backup program, which is to detect which files have been modified since the last backup. My recommendation would be to change your workflow and use some software to generate encrypted archives, then use Crashplan to upload these archives, but if you really want to use Crashplan and you're aware of the security/performance/reliability compromises, I think you can make it work. – Gilles Nov 11 '14 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.