If I have files that I would like share with another person however if this person does not have a public key e.g. they have not yet installed PGP, etc how can I encrypt the data so that only that individual can decipher it with their private key?


With PGP, or other public-key encryption methods, no, this is not possible. You must have their public key to encrypt the file to them.

There are other methods of encryption, however. The most common would be called "shared-secret", and this includes things like ZIP file encryption or RAR file encryption. You essentially encrypt the file using a "password." To decrypt, you must also know the same password. So this does not require knowing the recipient's public key, but it does require telling the recipient the password some how--hopefully over a secure channel.

| improve this answer | |
  • 1
    Argh, five seconds! :-D – Synetech Oct 31 '11 at 22:25

You can’t. If you want to use PGP, then you need their key to encrypt it with. An alternate solution is to zip/rar/7z/etc. the files, specifying a password. Obviously it requires giving them the password, but then you could encrypt a text file with the password with their public key when they get one; that would be out-of-band in a way.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.