and primitives to Python developers. Our goal is for it to be your
"cryptographic standard library".
2026-12-02 06:57:06 by Adam Ciarcinski | Files touched by this commit (7) |  |
Log message:
py-cryptography py-cryptography_vectors: updated to 51.0.0
51.0.0 - 2026-12-01
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 4.1.1.
* We no longer publish wheels for PyPy 3.11; it can still be installed from
source. We now publish wheels for PyPy 3.12.
* Added :class:`~cryptography.hazmat.primitives.asymmetric.ec.BrainpoolP224R1`
and :class:`~cryptography.hazmat.primitives.asymmetric.ec.BrainpoolP320R1`,
Brainpool curves specified in :rfc:`5639`.
* Added support for loading elliptic curve keys that contain explicit encodings
of the curves ``brainpoolP224r1``, ``brainpoolP256r1``, ``brainpoolP320r1``,
``brainpoolP384r1``, and ``brainpoolP512r1``.
* :class:`~cryptography.hazmat.primitives.serialization.pkcs7.PKCS7SignatureBuilder`
now retains additional certificates when ``set_data`` or ``add_signer`` is
called after ``add_certificate``.
* Require CFFI 2.1.1 or newer on Python 3.15 to avoid an ABI issue in
earlier CFFI releases.
* X.509 names now reject IA5String attributes containing non-ASCII
characters when parsing and serializing.
* :func:`~cryptography.hazmat.primitives.serialization.load_der_private_key`
and :func:`~cryptography.hazmat.primitives.serialization.load_pem_private_key`
now accept :rfc:`5958` ``OneAsymmetricKey`` (PKCS8 version 2).
* Updated the minimum supported Rust version (MSRV) to 1.85.0, from 1.83.0.
* Fixed a deadlock when multiple threads concurrently derived keys with
:class:`~cryptography.hazmat.primitives.kdf.argon2.Argon2id` (and the other
Argon2 variants) using ``lanes`` greater than 1.
* Deprecated DSA. Everything DSA is deprecated, including the types in
``cryptography.hazmat.primitives.asymmetric.dsa`` and loading DSA keys with
the key loading APIs (including from X.509 certificates and certificate
signing requests). Users should migrate to a more modern signature
algorithm.
* The ``*_into`` methods (e.g. ``encrypt_into``, ``update_into``, and
``derive_into``) now raise ``ValueError`` if the input and output buffers
overlap. Previously, overlapping buffers could silently produce incorrect
output.
* Parsing a ``subjectAltName`` or ``issuerAltName`` extension now rejects an
empty ``GeneralNames`` sequence, matching the ``SIZE (1..MAX)`` constraint
RFC 5280 4.2.1.6/4.2.1.7 places on the field and the strictness already
applied to ``extendedKeyUsage``.
* :class:`~cryptography.x509.ExtendedKeyUsage`,
:class:`~cryptography.x509.SubjectAlternativeName` and
:class:`~cryptography.x509.IssuerAlternativeName` now raise ``ValueError``
when constructed with an empty list.
* :class:`~cryptography.x509.CertificatePolicies` now raises ``ValueError``
when constructed with an empty ``policies`` list, matching the
``SIZE (1..MAX)`` constraint RFC 5280 4.2.1.4 places on the field and the
check :class:`~cryptography.x509.ExtendedKeyUsage` already performs.
* \
:meth:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateNumbers \
.private_key`
now raises ``ValueError`` when ``private_value`` is not smaller than the
curve's order, matching
:func:`~cryptography.hazmat.primitives.asymmetric.ec.derive_private_key` and
the private key loading functions.
* :func:`~cryptography.hazmat.primitives.serialization.load_pem_private_key`
now raises ``ValueError`` for an encrypted traditional PEM whose
``DEK-Info`` IV does not match the cipher's IV length.
* Added
:class:`~cryptography.hazmat.primitives.serialization.MLDSA44Ed25519PrivateKey`
and
:class:`~cryptography.hazmat.primitives.serialization.MLDSA44Ed25519PublicKey`,
composite ML-DSA-44 and Ed25519 keys for OpenSSH ``ssh-mldsa44-ed25519``
keys. These keys can be loaded with
:func:`~cryptography.hazmat.primitives.serialization.load_ssh_private_key`
and
:func:`~cryptography.hazmat.primitives.serialization.load_ssh_public_key`,
and serialized in the OpenSSH formats.
* :meth:`~cryptography.x509.Name.from_rfc4514_string` now recognizes attribute
names such as ``cn`` regardless of case, including names supplied in
``attr_name_overrides``.
* Parsing X.509 ``Name`` structures now rejects ``NumericString`` values that
contain characters other than digits and spaces.
* :meth:`~cryptography.x509.verification.PolicyBuilder.build_server_verifier`
now raises ``ValueError`` when given a
:class:`~cryptography.x509.DNSName` that is an IP address. Previously, the
address was matched against the DNS names in the ``subjectAltName``
extension, so a wildcard such as ``*.0.2.1`` matched ``192.0.2.1`` and IP
name constraints did not apply. IP addresses must be passed as an
:class:`~cryptography.x509.IPAddress`.
* The AEAD ``decrypt_into`` methods, and ``update_into`` on the
:doc:`/cobblestone` decryption classes now zero the output buffer when
authentication fails.
* Added :class:`~cryptography.x509.CustomExtensionType` which can be used to
parse and generate X.509 extensions using :mod:`cryptography.hazmat.asn1`.
* When a server certificate doesn't match the expected name,
:class:`~cryptography.x509.verification.VerificationError` now says which
name was expected.
|
| 2026-11-09 17:33:40 by Adam Ciarcinski | Files touched by this commit (1) |
Log message:
py-cryptography: ugly hack to fix PLIST on Darwin
|
| 2026-10-12 13:17:54 by Thomas Klausner | Files touched by this commit (2) |
Log message:
py-cryptography, py-ast-serialize: switch to PYSTABLEAPI
Fixes packaging with Python 3.15.
|
2026-09-30 21:16:45 by Adam Ciarcinski | Files touched by this commit (5) |  |
Log message:
py-cryptography py-cryptography_vectors: updated to 50.0.2
50.0.2 - 2026-09-30
Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 4.0.3.
Added abi3.abi3t wheels for free-threaded CPython 3.15 and later.
Updated to PyO3 0.29.2, which fixes building cryptography on Cygwin and MSYS2.
|
2026-08-26 10:12:28 by Adam Ciarcinski | Files touched by this commit (4) |  |
Log message:
py-cryptography py-cryptography_vectors: updated to 50.0.1
50.0.1 - 2026-08-25
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 4.0.2.
|
2026-08-03 19:52:28 by Thomas Klausner | Files touched by this commit (4) |  |
Log message:
py-cryptography: update to 50.0.0.
50.0.0 - 2026-07-31
~~~~~~~~~~~~~~~~~~~
* **SECURITY ISSUE**:
:func:`~cryptography.hazmat.primitives.serialization.pkcs7.pkcs7_decrypt_der`
and its PEM and S/MIME variants no longer expose distinguishable errors or
timing when unwrapping a ``RecipientInfo``'s ``encryptedKey``, which could
act as a Bleichenbacher oracle for callers that decrypt untrusted messages.
A random key is now substituted on failure, as described in :rfc:`3218`.
Credit to **@X1AOxiang** for reporting the issue
* Deprecated Diffie-Hellman key exchange over finite fields (FFDH).
Everything FFDH is deprecated, including the types in
``cryptography.hazmat.primitives.asymmetric.dh`` and loading FFDH keys or
parameters with the key loading APIs. Users should migrate to a more
modern key exchange algorithm.
* Added ``xof()`` class methods to
:class:`~cryptography.hazmat.primitives.hashes.SHAKE128` and
:class:`~cryptography.hazmat.primitives.hashes.SHAKE256` for constructing
algorithm instances configured for use with
:class:`~cryptography.hazmat.primitives.hashes.XOFHash`.
* The :mod:`X.509 verification <cryptography.x509.verification>` APIs are now
considered stable and are subject to our API stability policy.
* Added the :doc:`/cobblestone` recipe, an implementation of the
Cobblestone-128 and Cobblestone-256 instantiations of the `C2SP
chunked-encryption specification
<https://c2sp.org/chunked-encryption>`_ for streaming authenticated
encryption of large messages.
* Parsing a Signed Certificate Timestamp list now rejects encodings that
carry trailing bytes after the list or after an individual SCT, instead of
silently ignoring them.
* Added support for using :class:`~cryptography.x509.Name` as a field type in
the :doc:`/hazmat/asn1/index` module.
* Loading a public key or an EC private key now rejects DER where the
``subjectPublicKey`` (or EC ``publicKey``) ``BIT STRING`` declares a non-zero
number of unused bits, instead of silently ignoring it.
* Parsing a CRL entry's ``InvalidityDate`` extension now rejects a
``GeneralizedTime`` that carries fractional seconds or another non-DER form,
matching the strict encoding already required for every other X.509 time
field.
* :func:`~cryptography.x509.ocsp.load_der_ocsp_request` and
:func:`~cryptography.x509.ocsp.load_der_ocsp_response` now reject a request
or response whose ``version`` field is not ``v1``, the only version defined
by RFC 6960, matching the version validation already performed when loading
certificates, CSRs and CRLs.
* :class:`~cryptography.hazmat.primitives.hashes.XOFHash` is now supported
when building against AWS-LC.
* HMAC (and therefore PBKDF2-HMAC) with SHA-3 hashes is now supported when
building against AWS-LC.
* Diffie-Hellman (:doc:`/hazmat/primitives/asymmetric/dh`) is now supported
when building against AWS-LC.
* :func:`~cryptography.hazmat.primitives.serialization.load_der_public_key` and
:func:`~cryptography.hazmat.primitives.serialization.load_pem_public_key` now
reject Diffie-Hellman public keys whose modulus is smaller than 512 bits,
matching the minimum already enforced when loading DH private keys and when
constructing \
:class:`~cryptography.hazmat.primitives.asymmetric.dh.DHParameterNumbers`.
* Added
:class:`~cryptography.hazmat.primitives.asymmetric.mldsa.MLDSAMuHasher` for
incrementally computing the ML-DSA ``mu`` (message representative) used by
the external-mu signing and verification APIs.
* The builtin :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
classes and the classes in
:mod:`~cryptography.hazmat.primitives.asymmetric.padding` can now be
compared with ``==``.
* :class:`~cryptography.x509.CertificateBuilder` now supports creating unsigned
certificates (:rfc:`9925`) with the ``create_unsigned`` method.
* The :mod:`X.509 verification <cryptography.x509.verification>` APIs now
permit ML-DSA-44, ML-DSA-65, and ML-DSA-87 (:rfc:`9881`) public keys and
signatures by default.
|
2026-06-22 21:50:00 by Thomas Klausner | Files touched by this commit (3) |  |
Log message:
py-cryptography: update to 49.0.0.
49.0.0 - 2026-06-12
BACKWARDS INCOMPATIBLE: Support for x86_64 macOS has been removed. We now \
only publish arm64 wheels for macOS.
BACKWARDS INCOMPATIBLE: Support for 32-bit Windows has been removed. Users \
should move to a 64-bit Python installation.
BACKWARDS INCOMPATIBLE: Removed the deprecated PUBLIC_KEY_TYPES, \
PRIVATE_KEY_TYPES, CERTIFICATE_PRIVATE_KEY_TYPES, \
CERTIFICATE_ISSUER_PUBLIC_KEY_TYPES, and CERTIFICATE_PUBLIC_KEY_TYPES type \
aliases. Use PublicKeyTypes, PrivateKeyTypes, CertificateIssuerPrivateKeyTypes, \
CertificateIssuerPublicKeyTypes, and CertificatePublicKeyTypes instead. These \
were deprecated in version 40.0.
BACKWARDS INCOMPATIBLE: \
:class:`~cryptography.hazmat.primitives.ciphers.algorithms.ChaCha20` now treats \
the first 4 bytes of the nonce as a 32-bit little-endian block counter (as \
defined in RFC 7539) and tracks the number of bytes processed. Attempting to \
encrypt or decrypt more data than the counter allows before it would overflow \
now raises a :class:`ValueError` rather than silently diverging from RFC 7539. \
Setting the counter portion of the nonce to zero allows encrypting up to 256 GiB \
with a given nonce.
BACKWARDS INCOMPATIBLE: Loading an X.509 certificate whose ECDSA or DSA \
signature AlgorithmIdentifier contains encoded NULL parameters now raises a \
:class:`ValueError`. Such certificates are invalid, but older versions of Java \
emitted them; previously they loaded with a deprecation warning.
Fixed cross-compilation of the CFFI bindings when PYO3_CROSS_LIB_DIR is set. \
The build now derives the Python include directory from PYO3_CROSS_LIB_DIR \
instead of querying the host interpreter, which previously caused the build to \
fail during cross-compilations for embedded systems, on hosts which have \
same-version Python development headers installed as the target Python.
Added support for signing and verifying X.509 certificates, certificate \
signing requests, and certificate revocation lists with \
:doc:`/hazmat/primitives/asymmetric/mldsa` keys, as well as loading certificates \
that contain ML-DSA public keys.
Added :meth:`~cryptography.hazmat.primitives.hpke.KEM.enc_length` to \
:class:`~cryptography.hazmat.primitives.hpke.KEM` so callers can split the \
encapsulated key from the ciphertext returned by \
:meth:`~cryptography.hazmat.primitives.hpke.Suite.encrypt`.
:meth:`~cryptography.x509.verification.ExtensionPolicy.require_present`, \
:meth:`~cryptography.x509.verification.ExtensionPolicy.may_be_present`, and \
:meth:`~cryptography.x509.verification.ExtensionPolicy.require_not_present` now \
accept any extension type. Previously only a fixed set of extension types was \
supported, which made it impossible to account for otherwise unrecognized \
critical extensions during path validation.
Added support for using :class:`~cryptography.x509.Certificate`, \
:class:`~cryptography.x509.CertificateSigningRequest`, and \
:class:`~cryptography.x509.CertificateRevocationList` as field types in \
:doc:`/hazmat/asn1/index` structures.
Added :func:`~cryptography.hazmat.asn1.value_set`, a class decorator that \
registers an :class:`enum.Enum` subclass as an ASN.1 value set: members are \
encoded as their underlying value, and decoding fails if the decoded value does \
not match one of the declared members.
Added :meth:`~cryptography.x509.Name.from_bytes` for parsing a \
:class:`~cryptography.x509.Name` from DER bytes, the inverse of \
:meth:`~cryptography.x509.Name.public_bytes`.
Added the rsa_padding keyword-only parameter to \
:meth:`~cryptography.x509.CertificateBuilder.public_key`. Passing the \
:class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS` class (not an \
instance) encodes an RSA subject public key in the certificate's \
subjectPublicKeyInfo with the id-RSASSA-PSS OID and no parameters.
Added external mu (message representative) support to \
:doc:`/hazmat/primitives/asymmetric/mldsa` via the sign_mu and verify_mu \
methods, which sign and verify a precomputed 64-byte mu as defined in FIPS 204.
|
2026-06-10 06:02:07 by Adam Ciarcinski | Files touched by this commit (4) |  |
Log message:
py-cryptography py-cryptography_vectors: updated to 48.0.1
48.0.1
Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 4.0.1.
|