locked_user STork-rus has asked for the wisdom of the Perl Monks concerning the following question:

We have a problem.

We need to encrypt file (PGP). This is file we send our users. Some time ago we send a password for decrypt this file.

How can we do it? (We don't want send a users our keys)

Replies are listed 'Best First'.
Re: Perl + PGP
by pboin (Deacon) on May 16, 2005 at 13:00 UTC

    I think holli is right. You need to do some reading on the basics of how public-key cryptography works. The whole point is that you can safely exchange your public keys with anyone.

    Now, that being said, you might want to use conventional (symetric) encryption, which does use one, shared private key/password to decrypt. That's entirely different, and a bit problematic on the internet. (If you have a safe way to send your shared password out, then you also have a safe way to send your message in the first place.)

    You definitely need to bone up on cryptography before you start asking perl questions.

    Wikipedia on PGP

    If you want to do symetric encryption with perl, I suggest Crypt::Blowfish.

    Finally the standard book on all things crypto is Schneier's Applied Cryptography

      We know how PGP work. We found are path to try it.

      pgp 2.6.3i

      pgp -ca file

      this is crypt on IDEA tehnology. PGP message with only password authentification.

      PS Sorry for bad English.

Re: Perl + PGP
by holli (Abbot) on May 16, 2005 at 12:49 UTC
    Are you sure you know how PGP works? The users have to send you their public key and you use that for encryption. Then they can decrypt with their private keys.

    That's how I understand it. Feel free to prove me wrong ;-)


    holli, /regexed monk/