Commit graph

13 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
1f3c1b4fcc Remove Crypto.PublicKey.RSA.RSAImplementation
In the process, we add a "randfunc" parameter to
- Crypto.Cipher.PKCS1_OAEP.new()
- Crypto.Cipher.PKCS1_v1_5.new()
- Crypto.Signature.PKCS1_PSS.new()
to set the PRNG used by each algorithm.
Previously, the PRNG was taken from the RSA key itself.
2015-03-11 11:30:33 -04:00
Legrandin
1c3c049a4c Clean up Crypto.PublicKey module
This patch does a few things to simplify the public key classes
(RSA, DSA and ElGamal):

* It removes the Crypto.PublicKey.pubkey module. The 3 classes
  do not have an ancestor anymore.
* Methods sign(), verify(), encrypt(), and decrypt() are removed.
* Methods blind() and unblind() are removed.
* Methods can_sign() and can_encrypt() are removed.
* The 3 classes cannot be pickled anymore.
2014-06-16 22:00:03 +02:00
Legrandin
d83380a048 Removed support for Python<2.4 2014-06-16 20:36:35 +02:00
Legrandin
74bd74f490 FIX #1177614. Clarify that RSA OAEP only works on byte strings
Closes: https://bugs.launchpad.net/pycrypto/+bug/1177614
2013-07-14 23:08:47 -07: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
Legrandin
6f31263720 Fix documentation for PKCS#1 modules.
Objects used by PKCS#1 modules were treated as private,
and therefore ignored by epydoc.

Replaced SHA module with None as PBKDF1 default parameter value, because it was
not displayed nicely by epydoc. Default value is assigned in the body.
2012-04-19 22:40:39 +02:00
Legrandin
8390495a9d Further fixed for python 3 2011-10-19 23:02:58 +02:00
Legrandin
c22fa18c0d Merged from upstream (py3k support) and modified so that all unit tests pass. 2011-10-18 23:20:26 +02:00
Legrandin
cee93d88d0 Restructure both PKCS#1 ciphers as objects, to make them more uniform with other ciphers in the module. 2011-10-11 23:53:43 +02: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
a2ef0a2bde Add PKCS#1 OAEP encryption, with test cases 2011-02-17 23:16:42 +01:00