Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: Encrypt files on server and then decrypt when user downloads

by MPM (Novice)
on Oct 22, 2012 at 18:13 UTC ( [id://1000399]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Encrypt files on server and then decrypt when user downloads
in thread Encrypt files on server and then decrypt when user downloads

I don't think it would be plain text would it? The files that they are downloading files are files like PDF and DOC, etc... Also, the clients would be using SSL( https ). The code I included originally is a lot simpler than what is going on....There is already security in place to handle user authentication and authorization to files via a web interface. I'm looking for help with perl code to encrypt the files( again, I'm think gpg ). And then, when a user logs in and clicks a link to download the file, the file is decrypted and the user downloads the file. I don't want to just make a decrypted copy of the file upon request, serve it up to the user and then delete the file. I need to handle it smarter than that since multiple end users can be accessing the same file at the same time. Any more help would be greatly appreciated.

Replies are listed 'Best First'.
Re^5: Encrypt files on server and then decrypt when user downloads
by zentara (Archbishop) on Oct 23, 2012 at 10:06 UTC
    If you are using https, then there is no problem. All you would need to do is setup a program to decrypt your files on the server, then send it out to the browser with https. You still would have to limit access with a login, where you could use GPG keys auth, or just a plain password authentication, but you say you have that covered.

    On the server, the first method to decrypt which comes to mind is a GPG pipe. See GnuPG tie to gpg binary gives broken pipe error in CGI output and he gives a working code example.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1000399]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-03-19 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found