Commit graph

9 commits

Author SHA1 Message Date
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
134e164ac0 A set of small changes to documentation.
* Add table to Crypto.Util package docs
* Clarify that PKCS#1v1.5 encryption only works on byte strings
* Clarify that padding is ignored by Cipher classes
* Clarify that block encrypt() and decrypt() do not respectively
  add and remove any padding.
* Clarify what the 'overflow' parameter does (that is, nothing)
  to the Crypto.Util.Counter class.
2013-07-14 23:08:47 -07: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
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
02103e2a5a Modify decryption function for PKCS#1 v1.5 so that a sentinel is returned in case of padding error, as opposed to an exception being raised. Added also more information on how to avoid timing attacks. 2011-09-28 00:09:41 +02:00
Legrandin
260430cbcf Added PKCS#1 v1.5 encryption 2011-02-10 22:45:20 +01:00