hashlib - faster md5/sha, adds sha256/512 support
"Gregory P. Smith" <[email protected]>
| Newsgroups | gmane.comp.python.cryptography |
|---|---|
| Message-ID | <[email protected]> |
I sent this to python-dev but forgot to cc it here. (no response so far). Anyways this proposes a hashlib module for a future python standard library that sports md5, sha1, sha224-sha512 using openssl's optimized implementations when available but including its own (existing or libtomcrypt derived) otherwise so that all python installations have the hashes available. ----- Forwarded message from "Gregory P. Smith" <[email protected]> ----- From: "Gregory P. Smith" <[email protected]> Subject: [Python-Dev] hashlib - faster md5/sha, adds sha256/512 support To: [email protected] Date: Sat, 11 Jun 2005 20:47:23 -0700 I have finished up the hashlib work I started on in feb/march for patch 1121611 and 935454 after some discussion on this list. The full patch including tests and module documentation has been posted in the sf patch 1121611 as hashlib-008. I believe it is done and ready and would like to commit it after a review. Let the reviewing begin! For easy viewing, here's what the module documentation looks like: http://electricrain.com/greg/hashlib-py25-doc/module-hashlib.html The code is in the hashlib-008.patch file: http://redirx.com/?3e19 hashlib incorporates both the 1121611 openssl hash support and the 935454 sha256+sha512 module support into a single hashlib module that picks the fastest implementation of each algorithm to use. OpenSSLs implementations of md5 and sha1 are nearly 2x as fast as the existing python builtin versions. The (now legacy) md5 and sha modules are turned into simple stubs that use hashlib. The actual sourceforge patch tracker entries: https://sourceforge.net/tracker/?func=detail&aid=1121611&group_id=5470&atid=305470 https://sourceforge.net/tracker/?func=detail&aid=935454&group_id=5470&atid=305470 Greg ----- End forwarded message -----