[PYTHON-CRYPTO] Existing python APIs

Andrew Archibald aarchiba at YAHOO.COM
Fri Feb 16 20:43:50 CET 2001


Hi,

It seems like it would be useful to take a look at existing pthon APIs
before attempting to design a unified one.  Thus:

- amkCrypto (subsumes mxCrypto):  wraps openSSL, contains code for a number
    of block and stream ciphers.  Contains code for hash functions, same
    interface as python native.  Contains code for HMACs.
    Contains code for RSA, ElGamal and DSA, but the interface is not very
    nice.  Contains a grab-bag of other stuff.  No code for interoperability
    of formats.

- pisces: implements SPKI.  Lives on top of amkCrypto.  Provides a whole
    lot of interoperability and serialization functions.  Wraps yarrow.
    What do people think of the API?  I've never used it.

- M2crypto: wraps openSSL.  Contains block and stream ciphers, HMACs, RSA,
    DH, DSA.  Adds SSL and S/MIME.  Designed for use by Zope (?).

- pyAES: wraps AES sample code.  API vaguely resembles that of amkCrypto,
    but is not compatible.  Does not provide unpadded CBC mode or support
    blocksizes other than 128 bits.  Also provides SHA256; interface resembles
    old outdated python hash API (no new() method).  Also contains a random
    number generator whose reliability is unclear.

- Builtin python crypto: just provides hash functions and a goofy
    enigma-type stream cipher.

- Mojonation writes their own crypto.  It's slow.

Any others that I'm missing?

Are any of these worth emulating?  I like amkCrypto's block and stream
cipher interface, and I like python's native hash interface.  Perhaps file
wrappers for both would be nice, though.  I don't like the interface
amkCrypto has for HMACs; they should be just hashes with a creation
argument.  I think pisces is at a different layer from most of the others,
but a collection of interoperability functions would be extremely useful.

What do you think?

Andrew





More information about the python-crypto mailing list