crypto

Paul Rubin phr-n2002a at nightsong.com
Tue Apr 30 21:29:58 EDT 2002


"Mark McEahern" <marklists at mceahern.com> writes:
> 1.  Generate public/private key pairs.
> 2.  Encrypt data with the public key.
> 3.  Decrypt it with the private key.
> 
> Step 1 is likely to be manual.  (You're probably thinking, "No shit,
> sherlock.")
>
> I'm using Linux and I've seen how I can create a key with gpg.  I'm just not
> sure how to use that properly from Python.  I suppose I could write things
> out to files and use os.popen() or something, but that seems like it would
> increase my risk, not decrease it.  ;-)

Do you want to interoperate with some particular program like gpg?

If not, I have a Python library (pre-alpha, but you can try it out if
you want) that does what you're asking.  Preliminary docs are at:

  http://www.nightsong.com/phr/crypto/crypto.txt

It uses fairly boneheaded algorithms and mostly bends over backwards
to keep your keys secure, a failing of most crypto libraries.

If you have general crypto questions, sci.crypt is a better place to
ask than comp.lang.python.



More information about the Python-list mailing list