Program that encrypts files and uses an external file to unlock it

Hi, I am trying to find a program that will encrypt files and allow me to set a password, something really long (250 chars) and allow me to unlock the file by dragging and dropping the password key file on it without having to view the password or copy paste it in a password field, does anything like that even exist? I've been searching for a few days now and cant seem to find anything so im unsure. Making something like that myself wouldn't be possible, I dont possess the skills. I'm encrypting a game project and I would like to give certain people password keys to unlock it.

So for example the program would generate a password key with a strong password like this:

xb9fS%tvuLZu+q/ND5+jba`HhmhW/K!%NC@7;t:/VJ#&4aBFV/-%!"N)6t:[wDAvruy-Y~!DYx=MK'YGQEz/uY`)q73QvQ\K/':(j\P{[qj''q`/G[X5%k2Xg;JZ:3*!L)Q]h%[RE*PkmY.+bqjxBMyeqfbBVqqyQkG9<,)<:_,E_;f@.6r+596d'k];+nFTUT4-yz"q<d&EuQqq=`Z7Y5X~mR&vu%dW@7;&^.{%`SX=UNQGb]UdG&RsA;EL.Qhx

and give me that key file to then give to people and they drag that file on the program and it unlocks.
Last edited on
You are going overboard. Just zip it with a password and send the archive directly to your friends.

I recommend 7-Zip.
https://answers.fredonia.edu/display/SC/How+to+Password+Protect+and+Encrypt+Files+using+7-Zip+for+Windows

I recommend two modifications to that site’s instructions:
  • Leave the archive type as “.7z” (do not change it to “.zip”).
  • Set the “Encrypt file names” checkbox to “checked”.

The password does not need to be super long. A good fifteen to twenty characters ought to do it, and you no longer have a file sitting around with the password.

Hope this helps.
Making something like that for yourself would be possible, it's actually not that hard! This is why asymmetric encryption was invented.

That said, this is essentially how https/ftps works with TLS so for your purpose, you could probably setup a web server over https.

In no over-exaggerated terms, the basics of it is this:

1) Create an asymmetric key pair (using RSA 2048 for example)
2) Send the public key to your peer.
3) Your peer will create an asymmetric key pair.
4) Your peer will send his public key to you.
5) You then create a symmetric (or secret) key (using AES 256 for example). This is your session key. It only lasts the one session.
6) Encrypt your file using your symmetric key.
7) Encrypt your symmetric key using *your peers* asymmetric public key.
8) Send your encrypted symmetric key to your peer.
9) Send your encrypted file to your peer.
10) Your peer can now decrypt the symmetric key using his own private key.
11) Then using using the decrypted symmetric key, he can now decrypt the encrypted file.

There's other measures usually used here as well. For example, to prevent man-in-the-middle attacks, you should introduce certificates signed by a certificate authority that you and your peer trusts, in order to verify authenticity of each message. Various certificate authorties exists such as through Comodo or GoDaddy. You can make your own but can't recommend it.

It might seem complicated but it's been mostly the same since the 70s. Once you get down the basics of how an asymmetric key and a symmetric key works, it's really easy from there and you can apply that knowledge to all sorts of things. Pretty much any protocol you'll find such as TLS, OpenPGP, etc. have some form of the above steps generally, assuming they use asymmetric encryption.

Also, you don't always have to sweat the details, let libraries do the hard work for you. The concept is easy to grasp, the implementation of those concepts is not. (HINT: There are better and easier libraries than OpenSSL to use).
Last edited on
Topic archived. No new replies allowed.