Commit graph

9 commits

Author SHA1 Message Date
Legrandin
29302e0686 Fix missing module problem on Windows 2015-07-11 20:37:33 +00:00
Legrandin
f45c561328 Add Crypto.Signature.pkcs1_pss with NIST test vectors
Crypto.Signature.PKCS1_PSS is reverted to the old behavior it had
in PyCrypto: verify() returns True/False and does not raise an
exception with wrong signature.
2015-07-11 20:26:17 +00:00
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
8675e6f03f Start licensing under BSD 2-Clause 2014-06-23 22:23:38 +02:00
Legrandin
727780b7da Implement a robust DSA API.
This patch introduces a new module (Crypto.Signature.DSS)
with a less error prone API for performing DSA signatures.

Similarly to Crypto.Signature.PKCS1_PSS, the module
creates a signer object that only works with hash objects,
not directly with messages.

Additionally, the caller does not need to provide any RNG.
The module will use the default one and will correctly pick
the critical nonce K.

Example of API usage:

>>> from Crypto.Signature.DSS
>>> from Crypto.Hash import SHA256
>>> from Crypto.PublicKey import DSA
>>>
>>> message = b'I give my permission to order #4355'
>>> key = DSA.importKey(open('privkey.der').read())
>>> h = SHA256.new(message)
>>> signer = DSS.new(key)
>>> signature = signer.sign(h)
2014-03-04 22:34:29 +01:00
Legrandin
9cb1a2d35d To simplify, no RNG needs to be provided with PKCS1 encryption: the one belonging to each RSA key is reused.
Error detection is internally implemented in a simpler (and safer) way for PKCS1 OAEP decryption.
General fixes to documentation for PKCS1.
2011-10-02 22:37:36 +02:00
Legrandin
6d7eb4f0f3 First fully tested version of Crypto.Signature.PKCS1_PSS 2011-02-06 23:07:58 +01:00
Legrandin
1166875eb3 The final, tested PKCS#1 v1.5 signature module 2011-02-03 01:35:59 +01:00
Legrandin
1a51197542 Add PKCS1_v_1_5 module 2011-02-02 20:14:04 +01:00