Hello,
I'm going to build a small web application which stores some encrypted data in a database (sqlite). One requisite is not to keep the encryption key along with the database file , for obvious reasons.
So the approach could be an user supplied pass-phrase at the login screen and then derive a key from it to cipher the data. Of course the transport will be secured by SSL.
The question is, due to the expected behaviour for the user is to enter the pass-phrase just once (at the login, for example) and not being asked every time he clicks on a link, the pass-phrase has to be stored somewhere, at least temporarily... but, where?
It is a good idea to keep it in a PHP session variable? ...it will be written to disk on the server side.
Is it better (or worse) to keep it on the client side? discarding cookies, I don't know if it is even possible, maybe Ajax would help?
Anyway, which do you think is the best approach to this problem?
Thanks.