Commit graph

5 commits

Author SHA1 Message Date
Legrandin
c85dfa7953 Add Crypto.Signature.pkcs1_v1_5 module with NIST test vectors
Crypto.Signature.PKCS1_v1_5 is reverted to old behavior it
had in PyCrypto (verify raises no exception; it only returns
True or False).
2015-07-10 19:19:13 +00:00
Legrandin
d83380a048 Removed support for Python<2.4 2014-06-16 20:36:35 +02:00
Dwayne Litzenberger
fd398a28e3 Hash: Speed up initialization by removing pure-Python wrappers
The pure Python wrappers around Crypto.Hash.* were convenient, but they
slowed down hash initialization by 4-7x.

There is a speed trade-off here: The MD5 and SHA1 objects are just
wrapped hashlib objects (or old-style md5/sha objects).  To maintain API
compatibility with the rest of PyCrypto, we still have to wrap them, so
they're slower to initialize than the rest of the hash functions.  If
hashlib ever adds a .new() method, we will automatically use hashlib
directly and gain the initialization speed-up.
2013-02-17 20:07:02 -08:00
Dwayne Litzenberger
59018ff99c Hash: Remove "oid" attributes; add "name" attribute
In PyCrypto v2.5, the "oid" attribute was added to hash objects.  In
retrospect, this was not a good idea, since the OID is not really a
property of the hash algorithm, it's a protocol-specific identifer for
the hash functions.  PKCS#1 v1.5 uses it, but other protocols (e.g.
OpenPGP, DNSSEC, SSH, etc.) use different identifiers, and it doesn't make
sense to add these to Crypto.Hash.* every time a new algorithm is added.

This also has the benefit of being compatible with the Python standard
library's "hashlib" objects, which also have a name attribute.
2013-02-17 19:00:50 -08:00
Dwayne Litzenberger
755375bb7d Hash: Rename SHA->SHA1 and RIPEMD->RIPEMD160 (1/2)
These algorithm names were confusing, because there are actually
algorithms called "SHA" (a.k.a. SHA-0) and "RIPEMD" (the original
version).

This commit just renames the modules, with no backward-compatibility
support.
2013-02-16 16:20:23 -08:00
Renamed from lib/Crypto/Hash/SHA.py (Browse further)