encryption - Using OpenSSL and PHP to store data? -


for 1 of roles, i've been receiving couple of documents people via email. it's non-sensitive data email fine, i'd make small portal people can upload files , when submit files required notification request complete.

regardless of content, i'd store documents securely. it's got me thinking encryption in general other needs. looked @ aes encryption in mysql general consensus no key readily available in server. got me thinking public/private key encryption.

here's plan i'm researching see if work or if it's been done , can't find standard implementation:

  1. i generate public/private key pair. public key goes web server, private key stays me @ computer.
  2. user uploads file via webpage web server through https site.
  3. upload script takes file, encrypts public key, , stores in file system or database.
  4. upon completion, notified , connect server , download files via ssh or other encrypted connection.
  5. finally, locally decrypt files using private key , process them necessary.

any flaws i'm missing in scenario? or if there's better ways accomplish this, can point me in right direction? thanks.

your plan says trust server, not filesystem. used in cases using shared service or 3rd party backup, or want enforce data destruction policy via periodic destruction of encryption key.

it's best can if don't want burden users encrypting file before uploading.

the trick setting web server keeps uploaded files strictly in memory until encrypt them. php, example, default write uploaded files /tmp before calling script.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -