| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* support equality checks on all public asymmetric key types
* review feedback
|
| |
|
| |
|
| |
|
|
|
| |
It's more than 60x faster.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add unsafe_skip_rsa_key_validation
This allows users to skip RSA key validation when calling
load_pem_private_key, load_der_private_key, and
RSAPrivateNumbers.private_key. This is a significant performance
improvement but is **only safe if you know the key is valid**. If you
use this when the key is invalid OpenSSL makes no guarantees about what
might happen. Infinite loops, crashes, and all manner of terrible things
become possible if that occurs. Beware, beware, beware.
* Apply suggestions from code review
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
* remove unneeded variable
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
* add PSS auto support for verification
* add support for PSS.DIGEST_LENGTH
* review comments
|
|
|
|
|
|
|
|
|
| |
* check for invalid keys that RSA_check_key misses
RSA_check_key checks for primality but that fails to catch this case
since 2 is prime. Instead we fetch p and q and verify that they are odd
and if not reject the key as invalid.
* circleci sucks
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* remove signer/verifier as they've been deprecated for 4.25 years
* fix coverage
|
|
|
|
|
|
|
| |
* Remove read_only_property and precisely type all these getters
* flake8
* unused
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Drop supported for older LibreSSL
3.1 covers the oldest version used by versions of Alpine and OpenBSD that are supported by their upstreams.
* Remove tests that are now unused
* Update CHANGELOG.rst
Co-authored-by: Paul Kehrer <paul.l.kehrer@gmail.com>
Co-authored-by: Paul Kehrer <paul.l.kehrer@gmail.com>
|
|
|
|
|
|
|
|
|
| |
* Attempt to turn FIPS small RSA errors into something useful
* Black
* fix
* doh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Speed up RSA tests in 3.0.0
RSA_check_key is slower in OpenSSL 3.0.0 due to improved
primality checking. In normal use this is unlikely to be a problem
since users don't load new keys constantly, but we do in our tests.
This adds some private flags to allow skipping those checks for
performance reasons.
On my laptop with this patch it takes 16s to run test_rsa.py. The
previous commit takes 72s.
* black
* different approach
* skip rsa key checks in wycheproof
wycheproof's tets don't rely on broken keys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* rsa type hinting
* remove unused import
* missed return type
* type fixes
* ignores no longer required
* black gets me every time
* Update src/cryptography/hazmat/backends/openssl/rsa.py
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
|
|
|
|
|
| |
* make PrivateKeyWithSerialization an alias of PrivateKey
* black
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Removed unused argument.
* Added support for RSA signature recovery.
* Syntatic corrections for passing pep8 tests.
* Corrected typo.
* Added test of invalid Prehashed parameter to RSA signature recover.
* Renamed recover to a more descriptive name.
* Extended RSA signature recovery with option to return full data (not
only the digest part).
* Added missing words to pass spell check.
|
| |
|
| |
|
|
|
|
|
| |
* move blinding to __init__ on both RSA public and private
* change signature to guarantee this test is testing what we think
|
| |
|
|
|
|
|
| |
* fixes #4706 -- don't internal error on corrupt private key
* Temporary disable paramiko
|
|
|
| |
the quest to stop using unstable openssl error codes continues
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Additional tests for public/private_bytes
They expose few places that raise TypeError and AssertionError!
before, and ValueError later.
* Cleanup of private_bytes() backend
Also pass key itself down to backend.
* Cleanup of public_bytes() backend
* Test handling of unsupported key type
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
this will make life a bit easier when we support bytearrays
|
|
|
|
|
|
| |
* create & use _evp_md_from_algorithm and _evp_md_non_null_from_algorithm
* remove unused import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#4325)
* we don't actually care about the errstack here, it's an invalid signature
We previously had no cases where we could error without getting errors
on the error stack, but wycheproof contains test cases that can error
without adding anything to the stack. Accordingly, we should clear the
stack but raise InvalidSignature no matter what (rather than
InternalError if we have no error msgs)
* add a test
|
|
|
| |
We have an existence proof that the latter assertion can be triggered, and I bet the former can too.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* RSA OAEP label support for OpenSSL 1.0.2+
* changelog
* move around tests, address review feedback, use backend supported method
* unsupported padding catches this now
|
|
|
|
|
|
| |
* deprecate signer/verifier on asymmetric keys
* review feedback, switch deprecated_call to work around a bug
|
|
|
|
|
|
| |
* make signature and verification contexts error better re: prehashed
* code review feedback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* delete the 1.0.0 support
* drop the version check
* drop the AES-CTR stuff
* Update the example
* openssl truncates for us now
* delete unused test
* unused imports
* Remove a bunch of conditional bindings for NPN
* no more 1.0.0 builders
* libressl fix
* update the docs
* remove dead branches
* oops
* this is a word, damnit
* spelling
* try removing this
* this test is not needed
* unused import
|
|
|
|
|
|
|
|
|
|
| |
* support RSA verify with prehashing
* review feedback
* more dedupe
* refactor and move to a separate module
|
|
|
|
|
|
|
|
| |
* support prehashing in RSA sign
* check to make sure digest size matches prehashed data provided
* move doctest for prehashed
|
| |
|
| |
|