Commit graph

99 commits

Author SHA1 Message Date
Helder Eijs
31e253fbbb Support the import of RSA keys with PSS OID 2024-06-16 20:13:43 +02:00
Helder Eijs
dcb92e2969 Update RSA and ECC documentation 2024-01-08 20:04:49 +01:00
Helder Eijs
36ff5d6164 Add more hash algorithms for PBES encryption 2024-01-06 21:20:54 +01:00
Helder Eijs
51cd585835 Hide obsolete RSA methods 2023-12-29 10:59:32 +01:00
Helder Eijs
519e7aea6d Avoid changing signature of RSA._decrypt() method if possible 2023-12-25 14:49:27 +01:00
Helder Eijs
afb5e27a15 Fix side-channel leakage in RSA decryption 2023-12-25 01:30:40 +01:00
Helder Eijs
f6007d0387 Compute invq only on access. Add tests and docs. 2022-12-11 22:58:37 +01:00
Francesco Caponio
eb1d29a884 RSA - Added getter for DP, DQ and InverseQ 2022-12-11 22:42:44 +01:00
pgp
4c8e282795 Fix typo in comment in RSA class 2022-06-06 17:39:55 +02:00
pgp
85449d8f04 Fix typo in comment in RSA class 2022-06-06 17:39:55 +02:00
Helder Eijs
764c1e81b9 Add Ed25519 keys and EdDSA signatures 2022-05-08 22:35:37 +02:00
Naoya Okanami
8d21866cde Fix sphinx doc 2021-09-19 09:57:21 +02:00
Helder Eijs
0b99f0dc52 Add method public_key() to RSA objects 2020-11-15 21:41:51 +01:00
comet
4077e9d6a2 update 2020-01-27 13:22:46 +01:00
Helder Eijs
cc46c9f516 Cache CRT exponents of p and q (dP and dQ) 2019-12-17 22:17:04 +01:00
Helder Eijs
5589b48e90 RSA ciphertext and plaintext can be zero 2019-12-15 00:30:31 +01:00
Helder Eijs
7187ffdc6f Fix for blocking RSA decryption/signing operation in case of small factor 2019-11-18 16:07:07 +01:00
Helder Eijs
f9087a6d3e Speed-up import of RSA and ECC 2019-11-01 23:39:04 +01:00
Helder Eijs
1be4e465ba Fix docs and pep8 2019-08-26 23:04:07 +02:00
Helder Eijs
6312174b45 Add import of RSA keys in new OpenSSH format 2019-08-26 23:04:07 +02:00
Rexoid
c6d629f5f4
Typo
Just a small typo I noticed :)
2019-06-07 17:43:55 +12:00
Helder Eijs
3200814a9d Raise ValueError when importing asymmetric key from empty string 2019-03-26 23:27:15 +01:00
Helder Eijs
cd7f0128b6 Make code base suitable for Python 2 and 3 - stop using 2to3 2018-11-04 15:04:23 +01:00
Helder Eijs
066b8969ee More cleanup 2018-10-16 22:09:53 +02:00
Helder Eijs
a0f368a381 Add export_key method for RSA and DSA key objects (to replace exportKey) 2018-03-25 22:29:54 +02:00
Helder Eijs
b9eff9a7b6 More information about RSA consistency errors 2017-08-26 22:24:12 +02:00
Helder Eijs
cb8ab4f121 GH#38 Fixed PEM header for RSA/DSA public keys 2017-08-26 12:04:19 +02:00
Helder Eijs
d710dd3e56 Small API doc fixes 2017-08-23 00:10:28 +02:00
Helder Eijs
9b7192abc5 More asymmetric keys APIs 2017-08-14 23:41:07 +02:00
Helder Eijs
d1dad2ed08 Add RSA to API 2017-08-14 07:22:48 +02:00
Legrandin
d5114c5973 Add 'size_in_bits' and 'size_in_bytes' to RsaKey 2016-02-06 23:12:33 +01:00
Legrandin
f9d3939a46 Clean up RSA code (and revert exportKey) 2016-02-06 23:12:33 +01:00
Legrandin
ab4ed2dcc1 Raise NotImplementedError for dangerous, old PyCrypto methods
Closes #6.
2016-02-05 22:10:59 +01:00
Legrandin
c35ac4c3fd Introduce export_key as alias to exportKey for RsaKey and DsaKey 2016-02-04 21:38:30 +01:00
Legrandin
362e0a5087 Introduce import_key as alias to importKey for RSA and DSA. 2016-02-04 18:50:49 +01:00
Legrandin
c7b491de3f Factor out routine creating subjectPublicKeyInfo 2016-01-31 15:04:09 +01:00
Legrandin
577282d020 Simplify DER parsing for PKCS#8 2016-01-24 15:17:59 +01:00
Legrandin
a53023c304 Simplify RSA and DSA import 2016-01-23 21:33:50 +01:00
Legrandin
ab759b3936 Remove the need to consider EOFError when parsing DER 2016-01-23 20:45:28 +01:00
Legrandin
718501e42a Remove Crypto.Util.asn1.newDerBitString 2016-01-23 20:44:40 +01:00
Legrandin
820176457b Remove Crypto.Util.asn1.newDerSequence 2016-01-23 20:44:33 +01:00
Hannes van Niekerk
9c9afa557d Bug fixes on RsaKey class
Remove reference to ".size()" in RsaKey.__repr__ method and return key
size with alternative implementation.
Fix "hasattr" check in RsaKey.__repr__ method.
Fix broken "in" expressions.

Closes #5
2015-11-13 22:05:14 +01:00
Legrandin
7f14313273 Verify that no faults occur during RSA decryption 2015-09-23 08:58:09 +02:00
Legrandin
d97b240d56 Removed parameter verify_x509_cert from importKey (RSA/DSA) 2015-06-30 20:52:22 +00:00
Legrandin
12b75141c4 Minor simplification to DER decoding code 2015-03-18 08:42:04 +01:00
Legrandin
0701df338c Remove ambiguous method size() from RSA, DSA and ElGamal keys 2015-03-13 20:35:38 +01:00
Legrandin
8e4d6f3518 Update to API documentation. 2015-03-13 20:35:37 +01: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
72aff29a65 Update to API documentation. 2015-03-11 11:30:16 -04:00
Legrandin
06501ae142 RSA modulus size is not required to be a multiple of 256 bits anymore.
RSA key method ``size`` returns the same value as
in PyCrypto.

Use LCM for RSA private exponent.
2015-03-05 21:55:03 +01:00