I would like to encrypt a file as it gets uploaded, generally what happens is that it gets written to disk and then you can encrypt it from there, I would like to encrypt it before that happens.
Is there any module for a http server or for an application framework that would allow me to do that, I don’t want to spend a lot of time working on writing the software for this, but if needs must I’ll do it.
The important thing is that no unencrypted record ever touches the hard disk.
The hard drive is already encrypted using aes but as the server can be accessed by a third party without my knowledge I would prefer if there was some way to prevent the actual data being /that/ easily compromised.
What I ended up doing was using mod_wsgi..
with that I’m able to take the upload as a stream and then encrypt it using PyCrypto
works nicely
When I do that I end up encrypting the entire postdata using a stateful cipher and writing it into a file, I then save the key to another file after using GnuPG to encrypt that.