# cryptography 49.0.0 - Product: cryptography (https://whatsnew.fyi/product/cryptography) - Vendor: cryptography - Date: 2026-06-12 - Version: 49.0.0 - Original notes: https://pypi.org/project/cryptography/49.0.0/ - Permalink: https://whatsnew.fyi/product/cryptography/releases/49.0.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: release facts (products, versions, dates, links, CVE ids and flags) are open data under CC BY 4.0, from the API at https://whatsnew.fyi/api/v1 or the nightly dataset at https://github.com/whatsnew-fyi/dataset. The summaries, labels and curation are © What's New: quote freely with attribution and a link back; wholesale republication of them is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- Changes to check: - **Requirement raised:** `x86_64 macOS` → `arm64` (inferred by a model) - **Requirement raised:** `32-bit Windows` → `64-bit Python installation` (inferred by a model) - **Removed:** `PUBLIC_KEY_TYPES` → `PublicKeyTypes` (inferred by a model) - **Removed:** `PRIVATE_KEY_TYPES` → `PrivateKeyTypes` (inferred by a model) - **Removed:** `CERTIFICATE_PRIVATE_KEY_TYPES` → `CertificateIssuerPrivateKeyTypes` (inferred by a model) - **Removed:** `CERTIFICATE_ISSUER_PUBLIC_KEY_TYPES` → `CertificateIssuerPublicKeyTypes` (inferred by a model) - **Removed:** `CERTIFICATE_PUBLIC_KEY_TYPES` → `CertificatePublicKeyTypes` (inferred by a model) - **Behavior changed:** `ChaCha20` (inferred by a model) - **Behavior changed:** `ECDSA or DSA signature `AlgorithmIdentifier` contains encoded NULL parameters` (inferred by a model) - **removed** — Support for x86_64 macOS has been removed; only arm64 wheels are published for macOS - **removed** — Support for 32-bit Windows has been removed - **removed** — Removed deprecated type aliases PUBLIC_KEY_TYPES, PRIVATE_KEY_TYPES, CERTIFICATE_PRIVATE_KEY_TYPES, CERTIFICATE_ISSUER_PUBLIC_KEY_TYPES, and CERTIFICATE_PUBLIC_KEY_TYPES - **changed** — 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 - **fixed** — ChaCha20 now raises ValueError when attempting to encrypt or decrypt more data than the counter allows before it would overflow, rather than silently diverging from RFC 7539 - **changed** — Loading an X.509 certificate whose ECDSA or DSA signature AlgorithmIdentifier contains encoded NULL parameters now raises ValueError instead of loading with a deprecation warning - **fixed** — Fixed cross-compilation of the CFFI bindings when PYO3_CROSS_LIB_DIR is set by deriving the Python include directory from PYO3_CROSS_LIB_DIR instead of querying the host interpreter - **added** — Added support for signing and verifying X.509 certificates, certificate signing requests, and certificate revocation lists with ML-DSA signing keys - **added** — Added support for loading certificates that contain ML-DSA public keys - **added** — Added enc_length() method to KEM to allow callers to split the encapsulated key from the ciphertext returned by encrypt() - **changed** — require_present(), may_be_present(), and require_not_present() now accept any extension type instead of only a fixed set - **added** — Added support for using Certificate, CertificateSigningRequest, and CertificateRevocationList as field types in ASN.1 structures - **added** — Added value_set() class decorator to register an enum.Enum subclass as an ASN.1 value set - **added** — Added from_bytes() method for parsing a Name from DER bytes as the inverse of public_bytes() - **added** — Added rsa_padding keyword-only parameter to CertificateBuilder.public_key() to encode RSA subject public keys with the id-RSASSA-PSS OID * **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:** [ChaCha20](https://cryptography.io/en/latest/hazmat/primitives/symmetric-encryption/#cryptography.hazmat.primitives.ciphers.algorithms.ChaCha20 "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**](https://datatracker.ietf.org/doc/html/rfc7539.html)) 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 [ValueError](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.14)") 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 [ValueError](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.14)"). 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 [ML-DSA signing](https://cryptography.io/en/latest/hazmat/primitives/asymmetric/mldsa/) keys, as well as loading certificates that contain ML-DSA public keys. * Added [enc\_length()](https://cryptography.io/en/latest/hazmat/primitives/hpke/#cryptography.hazmat.primitives.hpke.KEM.enc%5Flength "cryptography.hazmat.primitives.hpke.KEM.enc_length") to [KEM](https://cryptography.io/en/latest/hazmat/primitives/hpke/#cryptography.hazmat.primitives.hpke.KEM "cryptography.hazmat.primitives.hpke.KEM") so callers can split the encapsulated key from the ciphertext returned by [encrypt()](https://cryptography.io/en/latest/hazmat/primitives/hpke/#cryptography.hazmat.primitives.hpke.Suite.encrypt "cryptography.hazmat.primitives.hpke.Suite.encrypt"). * [require\_present()](https://cryptography.io/en/latest/x509/verification/#cryptography.x509.verification.ExtensionPolicy.require%5Fpresent "cryptography.x509.verification.ExtensionPolicy.require_present"), [may\_be\_present()](https://cryptography.io/en/latest/x509/verification/#cryptography.x509.verification.ExtensionPolicy.may%5Fbe%5Fpresent "cryptography.x509.verification.ExtensionPolicy.may_be_present"), and [require\_not\_present()](https://cryptography.io/en/latest/x509/verification/#cryptography.x509.verification.ExtensionPolicy.require%5Fnot%5Fpresent "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 [Certificate](https://cryptography.io/en/latest/x509/refer _[Truncated at 4000 characters — full notes: https://pypi.org/project/cryptography/49.0.0/]_