| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |
|
| |
OpenBSD 7.1 is no longer supported so neither is LibreSSL 3.5.x
|
| |
|
|
|
|
|
| |
* add support for aes256-gcm@openssh.com decryption for SSH keys
* review feedback
* skip when bcrypt isn't present
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
* support equality checks on all public asymmetric key types
* review feedback
|
| |
|
|
|
|
|
| |
* Upgrade to pyo3 0.16
* Upgrade to pyo3 0.17
* Upgrade to pyo3 0.18
|
| |
|
|
|
| |
This removes the OS random engine, which contained the only CPython PSF
licensed code in the repository. Accordingly, that license has now been
removed.
|
| | |
|
| |
|
| |
This is extra mega cursed, and strictly speaking unsound. It does, however, match the status quo ante, where someone mutating a buffer while its being used in cffi code will basically always be UB.
|
| | |
|
| | |
|
| |
|
| |
See: https://github.com/pyca/cryptography/pull/7933#issuecomment-1471865194 + https://foss.heptapod.net/pypy/pypy/-/issues/3905#note_290457 to understand why
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
The test in question has 2**24 iterations and doesn't represent an
interesting edge case in the algorithm, just a high iteration count.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* double the speed of our rsa tests
this both creates a reusable fixture for our most commonly used private
keys as well as disables key validation. as always, disabling key
validation should not be done unless you never parse untrusted key
input. unsurprisingly, our tests are trusted and understood input (and
we also continue to have tests where we run check key to verify that it
catches corrupt things)
* fix typing
* explain why we don't use the rsa_key_2048 fixture in the blinding test
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Enforce max number of SSH certificate principals
There is an undocumented limit for the maximum number of valid principals accepted by the openssh tooling, as seen at:
* https://github.com/openssh/openssh-portable/blob/27267642699342412964aa785b98afd69d952c88/sshkey.h#L108
* https://github.com/openssh/openssh-portable/blob/25c8a2bbcc10c493d27faea57c42a6bf13fa51f2/sshkey.c#L1801
* https://github.com/openssh/openssh-portable/blob/6180b0fa4f7996687678702806257e661fd5931e/ssh-keygen.c#L1833
This change enforces that same restriction as currently a SSH certificate can be generated that is invalid against the default sshd server. Consideration might be given for any non openssh servers that accept openssh certificates, if they exist and want to allow a greater number of principals.
Of note, the 256 limit is not found in the spec for SSH certificates as defined at https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys. It instead seems to be arbitrarily chosen by the project as some limit was needed.
* Address formatting error.
* Comment on valid_prinicpals size limit plus test added.
---------
Co-authored-by: Jake <jake@vaultish.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WIP: Add raw export alias method for x25519 keys
* Ditto for x448, ed448, ed25519
* Document new private_bytes_raw public_bytes_raw methods
* docs: Populate versionadded to be 40
* docs: Fix PublicFormat -> PrivateFormat where applicable
* formatting
* Update tests for test_pub_priv_bytes_raw in x25519, x448, ed448 (TODO: ed25519)
* Add test_pub_priv_bytes_raw test for Ed25519
|
| |
|
|
|
|
|
|
| |
* fix some binding declarations
also adds a comment about why we deliberately incorrectly declare some
of them, sigh
* it's actually safe to do this since no high bit mode options exist
|
| |
|
| |
this code will be gone soon, but it's easy enough to fix
|
| | |
|
| |
|
|
|
|
|
|
| |
* add support for centos9-fips
Requires a variety of new FIPS constraints on our tests, including the
addition of rsa_encryption_supported
* review comments
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
algorithms (#8187)
* add support for bytes-like objects in data and associated_data in aead algorithms
* flake
* flake again
* rework AESSIV _check_params
* flake and 80char columns
* associated_data cannot be None in _check_params, set to [] in calling function
* Update src/cryptography/hazmat/primitives/ciphers/aead.py
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
* flake fix
---------
Co-authored-by: mat gas <none@none.com>
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
|
| | |
|
| |
|
| |
(Also objectively this is better)
|
| | |
|
| |
|
|
|
| |
* deprecate the rest of DSA support for SSH
* review comments
|
| |
|
|
|
| |
* deprecate support for DSA in load_ssh_public_key
* try to prevent bad things a bit more
|
| |
|
|
|
|
|
| |
* switch to using integers for valid_after/valid_before in SSH certs
* i know this, it's a unix timestamp
* one more review nit
|
| |
|
|
|
|
|
|
|
|
|
| |
* SSHCertificateBuilder
This adds support for generating SSH certificates
* add deterministic signing tests and valid_for_all_principals
* test another edge
* one of these two fixes makes no sense
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* support SSH certificate parsing
DSA (deliberately) not supported
* make a unified API
* Update src/cryptography/hazmat/primitives/serialization/ssh.py
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
|
| | |
|
| | |
|
| | |
|
| |
|
| |
It's more than 60x faster.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
(#7895)
* Bump BoringSSL and/or OpenSSL in CI
* Attempt to work-around wycheproof tests
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(#7833)
One of the tests checking behavior with invalid EC keys hardcoded the
error reason.
This commit replaces the string matching with a regex to match both the
current string and a new reason, introduced by upcoming OpenSSL
changes [0], which would otherwise trigger a false positive failure.
[0]: https://github.com/openssl/openssl/pull/19681
|
| |
|
|
| |
our minimum (#7813)
|
| |
|
|
|
|
|
| |
* Test against OpenSSL master in CI
A future PR will incorporate automatic revision bumping into our CI
* Sigh, increase this....
|
| |
|
| |
tests that _create_ x509 structures are left, since they at least exercise signing code
|