Partially due to Bitcoin, I've been looking into methods of storing encrypted data, and one particularly amusing one came to mind:
Is there a simple way to encrypt a directory in such a way that its contents are encrypted (both data and metadata, including file/directory structure), but files can be written without a key? I know about asymmetric cryptography, so it's certainly possible - a single file can be encrypted this way using a public key, so it would be trivial to encrypt individual files with the key and plop them in a directory, but what if you wanted to encrypt file names and directory structure in this manner as well? Furthermore, what if you wanted to append encrypted data to the end of an encrypted file without decrypting the file? What if you wanted to delete a specific file from an encrypted volume without decrypting any of it first, perhaps denying it even existed before you tried to delete it?
I'm wondering if an implementation of (most of) this already exists (maybe some flags I missed in the encryptfs man pages). I know it's possible at least in theory - perhaps by creating an asymetrically encrypted log of all requested activity on the encrypted volume, which would be postponed until it was decrypted with the private key. If not, it might make for an interesting shell script.
