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"...