NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #1246 most downloaded on PyPI
Pythonic WebAuthn
Latest stable
3.0.1
Last release 1 months ago
25 Sep 2026
Release timing varies
gaps range from 2 weeks to 4 months
Most releases are documented
notes for 40 of 45 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
48 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
verify_registration_response() now rejects responses with attestation statement formats that are not strings (#288, h/t @DarkaMaul)
Changes:
verify_registration_response() now rejects responses with attestation statement formats that are not strings (#288, h/t @DarkaMaul)verify_registration_response() and verify_authentication_response() now support use of PQC ML-DSA-44, ML-DSA-65, and ML-DSA-87 algorithms for credenti
Changes:
verify_registration_response() and verify_authentication_response() now support use of PQC ML-DSA-44, ML-DSA-65, and ML-DSA-87 algorithms for credential public key signature verification (#282)
generate_registration_options() will now encourage authenticators to create keypairs using EDDSA when available, signaling acceptance of ES256 or RS256 when EDDSA is unavailable (#284)Your coding agent can read these notes before it upgrades. Set up the MCP server →
BACKWARDS INCOMPATIBLE: Removed support for passing an ~cryptography.x509.Extension instance to ~cryptography.x509.AuthorityKeyIdentifier.from_issuer_subject_key_identifier, as per our deprecation policy.
BACKWARDS INCOMPATIBLE: Support for LibreSSL 2.7.x, 2.8.x, and 2.9.0 has been removed (2.9.1+ is still supported).
BACKWARDS INCOMPATIBLE: Dropped support for macOS 10.9, macOS users must upgrade to 10.10 or newer.
BACKWARDS INCOMPATIBLE: RSA ~cryptography.hazmat.primitives.asymmetric.rsa.generate_private_key no longer accepts public_exponent values except 65537 and 3 (the latter for legacy purposes).
BACKWARDS INCOMPATIBLE: X.509 certificate parsing now enforces that the version field contains a valid value, rather than deferring this check until ~cryptography.x509.Certificate.version is accessed.
Deprecated support for Python 2. At the time there is no time table for actually dropping support, however we strongly encourage all users to upgrade their Python, as Python 2 no longer receives support from the Python core team.
If you have trouble suppressing this warning in tests view the FAQ entry addressing this issue.
Added support for OpenSSH serialization format for ec, ed25519, rsa and dsa private keys: ~cryptography.hazmat.primitives.serialization.load_ssh_private_key for loading and ~cryptography.hazmat.primitives.serialization.PrivateFormat.OpenSSH for writing.
Added support for OpenSSH certificates to ~cryptography.hazmat.primitives.serialization.load_ssh_public_key.
Added ~cryptography.fernet.Fernet.encrypt_at_time and ~cryptography.fernet.Fernet.decrypt_at_time to ~cryptography.fernet.Fernet.
Added support for the ~cryptography.x509.SubjectInformationAccess X.509 extension.
Added support for parsing ~cryptography.x509.SignedCertificateTimestamps in OCSP responses.
Added support for parsing attributes in certificate signing requests via CertificateSigningRequest.get_attribute_for_oid.
Added support for encoding attributes in certificate signing requests via ~cryptography.x509.CertificateSigningRequestBuilder.add_attribute.
On OpenSSL 1.1.1d and higher cryptography now uses OpenSSL's built-in CSPRNG instead of its own OS random engine because these versions of OpenSSL properly reseed on fork.
Added initial support for creating PKCS12 files with ~cryptography.hazmat.primitives.serialization.pkcs12.serialize_key_and_certificates.
"android-key" attestation verification is more tolerant of X.509 leaf certificates with values that violate ASN.1 DER parsing rules
Changes:
"android-key" attestation verification is more tolerant of X.509 leaf certificates with values that violate ASN.1 DER parsing rules (#277)cbor2>=5.6.5,<6.0.0 (#269, h/t @typestring; #272), and cryptography>=46.0.0 and pyOpenSSL>=26.0.0 (#278)"android-key" attestation has been added (#268)"tpm" attestation verification to prevent casing-related lookup issues (#275)webauthn.helpers.exceptions.InvalidRegistrationResponse when encountering bad data. Likewise, authentication verification will more consistently raise webauthn.helpers.exceptions.InvalidAuthenticationResponse when encountering bad data (#271, #273, #276, #280)verify_authentication_response() has been fixed (#266, h/t @Densaugeo)Updated Windows, macOS, and manylinux wheels to be compiled with OpenSSL 1.1.1d.
Added support for Python 3.8.
Added class methods Poly1305.generate_tag and Poly1305.verify_tag for Poly1305 sign and verify operations.
Deprecated support for OpenSSL 1.0.1. Support will be removed in cryptography 2.9.
We now ship manylinux2010 wheels in addition to our manylinux1 wheels.
Added support for ed25519 and ed448 keys in the ~cryptography.x509.CertificateBuilder, ~cryptography.x509.CertificateSigningRequestBuilder, ~cryptography.x509.CertificateRevocationListBuilder and ~cryptography.x509.ocsp.OCSPResponseBuilder.
cryptography no longer depends on asn1crypto.
~cryptography.x509.FreshestCRL is now allowed as a ~cryptography.x509.CertificateRevocationList extension.
verify_registration_response() and verify_authentication_response() now support use of ML-DSA public keys for authenticators with PQC support. Run pip
Changes:
verify_registration_response() and verify_authentication_response() now support use of ML-DSA public keys for authenticators with PQC support. Run pip install dilithium-py to enable this capability (#260)This project now uses the pyasn1 library to parse ASN.1-encoded values (#263, h/t @ggirol-rc)
The webauthn.helpers.options_to_json_dict helper has a new, optional bytes_encoder argument that accepts a Callable[[bytes], Any] method. This enables
Changes:
webauthn.helpers.options_to_json_dict helper has a new, optional bytes_encoder argument that accepts a Callable[[bytes], Any] method. This enables the use of custom encoding logic when serializing bytes values. When this argument is unspecified, bytes values will continue to be encoded into Base64URL (#257)BACKWARDS INCOMPATIBLE: We no longer distribute 32-bit manylinux1 wheels. Continuing to produce them was a maintenance burden.
BACKWARDS INCOMPATIBLE: Removed the cryptography.hazmat.primitives.mac.MACContext interface. The CMAC and HMAC APIs have not changed, but they are no longer registered as MACContext instances.
Updated Windows, macOS, and manylinux1 wheels to be compiled with OpenSSL 1.1.1c.
Removed support for running our tests with setup.py test. Users interested in running our tests can continue to follow the directions in our development documentation.
Add support for ~cryptography.hazmat.primitives.poly1305.Poly1305 when using OpenSSL 1.1.1 or newer.
Support serialization with Encoding.OpenSSH and PublicFormat.OpenSSH in Ed25519PublicKey.public_bytes .
Correctly allow passing a SubjectKeyIdentifier to ~cryptography.x509.AuthorityKeyIdentifier.from_issuer_subject_key_identifier and deprecate passing an Extension object. The documentation always required SubjectKeyIdentifier but the implementation previously required an Extension.
The new webauthn.helpers.options_to_json_dict helper can be used to simplify registration and authentication options into a simple Dict[str, Any] valu
Changes:
webauthn.helpers.options_to_json_dict helper can be used to simplify registration and authentication options into a simple Dict[str, Any] value (#256)BACKWARDS INCOMPATIBLE: Removed cryptography.hazmat.primitives.asymmetric.utils.encode_rfc6979_signature and cryptography.hazmat.primitives.asymmetric.utils.decode_rfc6979_signature, which had been deprecated for nearly 4 years. Use ~cryptography.hazmat.primitives.asymmetric.utils.encode_dss_signature and ~cryptography.hazmat.primitives.asymmetric.utils.decode_dss_signature instead.
BACKWARDS INCOMPATIBLE: Removed cryptography.x509.Certificate.serial, which had been deprecated for nearly 3 years. Use ~cryptography.x509.Certificate.serial_number instead.
Updated Windows, macOS, and manylinux1 wheels to be compiled with OpenSSL 1.1.1b.
Added support for /hazmat/primitives/asymmetric/ed448 when using OpenSSL 1.1.1b or newer.
Added support for /hazmat/primitives/asymmetric/ed25519 when using OpenSSL 1.1.1b or newer.
~cryptography.hazmat.primitives.serialization.load_ssh_public_key can now load ed25519 public keys.
Add support for easily mapping an object identifier to its elliptic curve class via ~cryptography.hazmat.primitives.asymmetric.ec.get_curve_for_oid.
Add support for OpenSSL when compiled with the no-engine (OPENSSL_NO_ENGINE) flag.
More X.509 validation exceptions will include the cause of the exception as reported by the third-party library handling the validation
Changes:
Update project to cryptography==44.0.2 and pyOpenSSL==25.0.0
Changes:
cryptography==44.0.2 and pyOpenSSL==25.0.0 (#250)Prevented "android-key" attestation tests from failing when it's after February 2nd
Changes:
"android-key" attestation tests from failing when it's after February 2nd (#244)A new require_user_presence argument has been added to verify_registration_response() to enable verification of WebAuthn responses generated through u
Changes:
require_user_presence argument has been added to verify_registration_response() to enable verification of WebAuthn responses generated through use of conditional create where the up bit in authData.flags will be False (#236, h/t @bschoenmaeckers)verify_authentication_response() has been updated to return user_verified as well to indicate whether or not the user performed user verification (#235, h/t @ggirol-rc)"android-key" attestation statements has been modernized in light of Android's latest observable behavior (#240)"android-safetynet" attestation statements now enforces the "basicIntegrity" flag instead of the "ctsProfileMatch" flag when determining device integrity (#241)BACKWARDS INCOMPATIBLE: U-label strings were deprecated in version 2.1, but this version removes the default idna dependency as well. If you still need this deprecated path please install cryptography with the idna extra: pip install cryptography[idna].
BACKWARDS INCOMPATIBLE: The minimum supported PyPy version is now 5.4.
Numerous classes and functions have been updated to allow bytes-like types for keying material and passwords, including symmetric algorithms, AEAD ciphers, KDFs, loading asymmetric keys, and one time password classes.
Updated Windows, macOS, and manylinux1 wheels to be compiled with OpenSSL 1.1.1a.
Added support for ~cryptography.hazmat.primitives.hashes.SHA512_224 and ~cryptography.hazmat.primitives.hashes.SHA512_256 when using OpenSSL 1.1.1.
Added support for ~cryptography.hazmat.primitives.hashes.SHA3_224, ~cryptography.hazmat.primitives.hashes.SHA3_256, ~cryptography.hazmat.primitives.hashes.SHA3_384, and ~cryptography.hazmat.primitives.hashes.SHA3_512 when using OpenSSL 1.1.1.
Added support for /hazmat/primitives/asymmetric/x448 when using OpenSSL 1.1.1.
Added support for ~cryptography.hazmat.primitives.hashes.SHAKE128 and ~cryptography.hazmat.primitives.hashes.SHAKE256 when using OpenSSL 1.1.1.
Added initial support for parsing PKCS12 files with ~cryptography.hazmat.primitives.serialization.pkcs12.load_key_and_certificates.
Added support for ~cryptography.x509.IssuingDistributionPoint.
Added rfc4514_string() method to x509.Name, x509.RelativeDistinguishedName, and x509.NameAttribute to format the name or component an 4514 Distinguished Name string.
Added ~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.from_encoded_point, which immediately checks if the point is on the curve and supports compressed points. Deprecated the previous method cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicNumbers.from_encoded_point.
Added ~cryptography.x509.ocsp.OCSPResponse.signature_hash_algorithm to OCSPResponse.
Updated /hazmat/primitives/asymmetric/x25519 support to allow additional serialization methods. Calling ~cryptography.hazmat.primitives.asymmetric.x25519.X25519PublicKey.public_bytes with no arguments has been deprecated.
Added support for encoding compressed and uncompressed points via ~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.public_bytes. Deprecated the previous method cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicNumbers.encode_point.
An optional hints argument has been added to generate_registration_options() to specify one or more categories of authenticators for the browser to pr
Changes:
hints argument has been added to generate_registration_options() to specify one or more categories of authenticators for the browser to prioritize registration of. See webauthn.helpers.structs.PublicKeyCredentialHint for more information (#234)BACKWARDS INCOMPATIBLE: Dropped support for LibreSSL 2.4.x.
Deprecated OpenSSL 1.0.1 support. OpenSSL 1.0.1 is no longer supported by the OpenSSL project. At this time there is no time table for dropping support, however we strongly encourage all users to upgrade or install cryptography from a wheel.
Added initial OCSP support.
Added support for ~cryptography.x509.PrecertPoison.
The minimum supported version of Python has been bumped up to Python 3.9, with ongoing testing from Python 3.9 through Python 3.13. Dependencies have
Changes:
cryptography==43.0.3 (#233, with thanks to @ds-cbo)SECURITY ISSUE: ~cryptography.hazmat.primitives.ciphers.AEADDecryptionContext.finalize_with_tag allowed tag truncation by default which can allow tag forgery in some cases. The method now enforces the min_tag_length provided to the ~cryptography.hazmat.primitives.ciphers.modes.GCM constructor. CVE-2018-10903
Added support for Python 3.7.
Added ~cryptography.fernet.Fernet.extract_timestamp to get the authenticated timestamp of a Fernet token.
Support for Python 2.7.x without hmac.compare_digest has been deprecated. We will require Python 2.7.7 or higher (or 2.7.6 on Ubuntu) in the next cryptography release.
Fixed multiple issues preventing cryptography from compiling against LibreSSL 2.7.x.
Added ~cryptography.x509.CertificateRevocationList.get_revoked_certificate_by_serial_number for quick serial number searches in CRLs.
The ~cryptography.x509.RelativeDistinguishedName class now preserves the order of attributes. Duplicate attributes now raise an error instead of silently discarding duplicates.
~cryptography.hazmat.primitives.keywrap.aes_key_unwrap and ~cryptography.hazmat.primitives.keywrap.aes_key_unwrap_with_padding now raise ~cryptography.hazmat.primitives.keywrap.InvalidUnwrap if the wrapped key is an invalid length, instead of ValueError.
All exceptions in webauthn.helpers.exceptions now subclass the new webauthn.helpers.exceptions.WebAuthnException base exception (#219, h/t @bschoenmae
BACKWARDS INCOMPATIBLE: Support for Python 2.6 has been dropped.
Resolved a bug in HKDF that incorrectly constrained output size.
Added ~cryptography.hazmat.primitives.asymmetric.ec.BrainpoolP256R1, ~cryptography.hazmat.primitives.asymmetric.ec.BrainpoolP384R1, and ~cryptography.hazmat.primitives.asymmetric.ec.BrainpoolP512R1 to support inter-operating with systems like German smart meters.
Added token rotation support to Fernet with ~cryptography.fernet.MultiFernet.rotate.
Fixed a memory leak in ~cryptography.hazmat.primitives.asymmetric.ec.derive_private_key.
Added support for AES key wrapping with padding via ~cryptography.hazmat.primitives.keywrap.aes_key_wrap_with_padding and ~cryptography.hazmat.primitives.keywrap.aes_key_unwrap_with_padding .
Allow loading DSA keys with 224 bit q.
New webauthn.helpers.parse_registration_options_json() and webauthn.helpers.parse_authentication_options_json() methods have been added to help replac
Changes:
webauthn.helpers.parse_registration_options_json() and webauthn.helpers.parse_authentication_options_json() methods have been added to help replace use of Pydantic's .parse_obj() on this library's PublicKeyCredentialCreationOptions and PublicKeyCredentialRequestOptions classes in projects upgrading to webauthn>=2.0.0. See Refactor Guidance below for more info (#210)cryptography==42.0.5 (#212)Taking an example from registration: imagine a py_webauthn v1.11.1 scenario in which a project using this library wanted to retrieve output from generate_registration_options(), serialized to JSON using webauthn.helpers.options_to_json() and then stored in a cache or DB, and turn it back into an instance of PublicKeyCredentialCreationOptions:
# webauthn==1.11.1
json_reg_options: dict = get_stored_registration_options(session_id)
parsed_reg_options = PublicKeyCredentialCreationOptions.parse_obj(
json_reg_options,
)
py_webauthn v2.0.0+ removed use of Pydantic so .parse_obj() is no longer available on PublicKeyCredentialCreationOptions. It will become possible to refactor away this use of .parse_obj() with the new webauthn.helpers.parse_registration_options_json() in this release:
# webauthn==2.1.0
from webauthn.helpers import parse_registration_options_json
json_reg_options: dict = get_stored_registration_options(session_id)
parsed_reg_options: PublicKeyCredentialCreationOptions = parse_registration_options_json(
json_reg_options,
)
This same logic applies to calls to PublicKeyCredentialRequestOptions.parse_obj() - these calls can be replaced with the new webauthn.helpers.parse_authentication_options_json() in this release as well.
FINAL DEPRECATION Python 2.6 support is deprecated, and will be removed in the next release of cryptography.
BACKWARDS INCOMPATIBLE: Whirlpool, RIPEMD160, and UnsupportedExtension have been removed in accordance with our /api-stability policy.
BACKWARDS INCOMPATIBLE: DNSName.value, RFC822Name.value, and UniformResourceIdentifier.value will now return an A-label string when parsing a certificate containing an internationalized domain name (IDN) or if the caller passed a U-label to the constructor. See below for additional deprecations related to this change.
Installing cryptography now requires pip 6 or newer.
Deprecated passing U-label strings to the ~cryptography.x509.DNSName, ~cryptography.x509.UniformResourceIdentifier, and ~cryptography.x509.RFC822Name constructors. Instead, users should pass values as A-label strings with idna encoding if necessary. This change will not affect anyone who is not processing internationalized domains.
Added support for ~cryptography.hazmat.primitives.ciphers.algorithms.ChaCha20. In most cases users should choose ~cryptography.hazmat.primitives.ciphers.aead.ChaCha20Poly1305 rather than using this unauthenticated form.
Added ~cryptography.x509.CertificateRevocationList.is_signature_valid to ~cryptography.x509.CertificateRevocationList.
Support ~cryptography.hazmat.primitives.hashes.BLAKE2b and ~cryptography.hazmat.primitives.hashes.BLAKE2s with ~cryptography.hazmat.primitives.hmac.HMAC.
Added support for ~cryptography.hazmat.primitives.ciphers.modes.XTS mode for AES.
Added support for using labels with ~cryptography.hazmat.primitives.asymmetric.padding.OAEP when using OpenSSL 1.0.2 or greater.
Improved compatibility with NSS when issuing certificates from an issuer that has a subject with non-UTF8String string types.
Add support for the ~cryptography.x509.DeltaCRLIndicator extension.
Add support for the ~cryptography.x509.TLSFeature extension. This is commonly used for enabling OCSP Must-Staple in certificates.
Add support for the ~cryptography.x509.FreshestCRL extension.
Pydantic is no longer used by py_webauthn. If your project calls any Pydantic-specific methods on classes provided by py_webauthn then you will need t
Changes:
Breaking Changes:
RegistrationCredential.parse_raw() can be replaced with calls to the new webauthn.helpers.parse_registration_credential_json()AuthenticationCredential.parse_raw() can be replaced with calls to the new webauthn.helpers.parse_authentication_credential_json()webauthn.helpers.generate_challenge() now always generates 64 random bytes and no longer accepts any arguments. Refactor your existing calls to remove any arguments (#198)webauthn.helpers.exceptions.InvalidClientDataJSONStructure has been replaced by webauthn.helpers.exceptions.InvalidJSONStructure (#195)webauthn.helpers.json_loads_base64url_to_bytes() has been removed (#195)user_id argument passed into generate_registration_options() is now Optional[bytes]
instead of a required str value. A random sequence of 64 bytes will be generated for user_id
if it is None (#197)
base64url_to_bytes() helperIf you already store your WebAuthn user ID bytes as base64url-encoded strings then you can simply decode these strings to bytes using an included helper:
Before:
options = generate_registration_options(
# ...
user_id: "3ZPk1HGhX_cul7z5UydfZE_vgnUYkOVshDNcvI1ILyQ",
)
After:
from webauthn.helpers import bytes_to_base64url
options = generate_registration_options(
# ...
user_id: bytes_to_base64url("3ZPk1HGhX_cul7z5UydfZE_vgnUYkOVshDNcvI1ILyQ"),
)
WebAuthn strongly encourages Relying Parties to use 64 randomized bytes for every user ID you pass into navigator.credentials.create(). This would be a second identifier used exclusively for WebAuthn that you associate along with your typical internal user ID.
py_webauthn includes a generate_user_handle() helper that can simplify the task of creating this special user identifier for your existing users in one go:
from webauthn.helpers import generate_user_handle
# Pseudocode (imagine this is in some kind of migration script)
for user in get_all_users_in_db():
add_webauthn_user_id_to_db_for_user(
current_user=user.id,
webauthn_user_id=generate_user_handle(), # Generates 64 random bytes
)
You can also use this method when creating new users to ensure that all subsequent users have a WebAuthn-specific identifier as well:
from webauthn.helpers import generate_user_handle
# ...existing user onboarding logic...
# Pseudocode
create_new_user_in_db(
# ...
webauthn_user_id=generate_user_handle(),
)
Once your users are assigned their second WebAuthn-specific ID you can then pass those bytes into generate_registration_options() on subsequent calls:
# Pseudocode
webauthn_user_id: bytes = get_webauthn_user_id_bytes_from_db(current_user.id)
options = generate_registration_options(
# ...
user_id=webauthn_user_id,
)
generate_registration_options() generate a user ID for youWhen the user_id argument is omitted then a random 64-byte identifier will be generated for you:
Before:
options = generate_registration_options(
# ...
user_id: "USERIDGOESHERE",
)
After:
# Pseudocode
webauthn_user_id: bytes | None = get_webauthn_user_id_bytes_from_db(
current_user=current_user.id,
)
options = generate_registration_options(
# ...
user_id=webauthn_user_id,
)
if webauthn_user_id is None:
# Pseudocode
store_webauthn_user_id_bytes_in_your_db(
current_user=current_user.id,
webauthn_user_id=options.user.id, # Randomly generated 64-bytes
)
str argument to UTF-8 bytesThis technique is a quick win, but can be prone to base64url-related encoding and decoding quirks between browsers. It is recommended you quickly follow this up with Option 2 or Option 3 above:
Before:
options = generate_registration_options(
# ...
user_id: "USERIDGOESHERE",
)
After:
options = generate_registration_options(
# ...
user_id: "USERIDGOESHERE".encode('utf-8'),
)
BACKWARDS INCOMPATIBLE: Support for Python 3.3 has been dropped.
We now ship manylinux1 wheels linked against OpenSSL 1.1.0f. These wheels will be automatically used with most Linux distributions if you are running the latest pip.
Deprecated the use of signer on ~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey, ~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey, and ~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey in favor of sign.
Deprecated the use of verifier on ~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey, ~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey, and ~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey in favor of verify.
Added support for parsing ~cryptography.x509.certificate_transparency.SignedCertificateTimestamp objects from X.509 certificate extensions.
Added support for ~cryptography.hazmat.primitives.ciphers.aead.ChaCha20Poly1305.
Added support for ~cryptography.hazmat.primitives.ciphers.aead.AESCCM.
Added ~cryptography.hazmat.primitives.ciphers.aead.AESGCM, a "one shot" API for AES GCM encryption.
Added support for /hazmat/primitives/asymmetric/x25519.
Added support for serializing and deserializing Diffie-Hellman parameters with ~cryptography.hazmat.primitives.serialization.load_pem_parameters, ~cryptography.hazmat.primitives.serialization.load_der_parameters, and ~cryptography.hazmat.primitives.asymmetric.dh.DHParameters.parameter_bytes .
The extensions attribute on ~cryptography.x509.Certificate, ~cryptography.x509.CertificateSigningRequest, ~cryptography.x509.CertificateRevocationList, and ~cryptography.x509.RevokedCertificate now caches the computed Extensions object. There should be no performance change, just a performance improvement for programs accessing the extensions attribute multiple times.
Deprecation warnings related to cbor2 in projects using cbor2>=5.5.0 will no longer appear during registration and authentication response verificatio…
Changes:
cbor2 in projects using cbor2>=5.5.0 will no longer appear during registration and authentication response verification (#181)The credential argument in verify_registration_response() and verify_authentication_response() can now also be a stringified JSON str or a plain JSON
Changes:
credential argument in verify_registration_response() and verify_authentication_response() can now also be a stringified JSON str or a plain JSON dict version of a WebAuthn response (#172, #178)webauthn.helpers.exceptions.InvalidCBORData when there is a problem parsing CBOR-encoded data (#179)cbor2==5.4.6 and cryptography==41.0.4 (#178)Fix parsing error caused by registration responses from certain models of authenticators that incorrectly CBOR-encode their authData after creating an
Changes:
authData after creating an Ed25519 public keys (#167)Support use in projects using either Pydantic v1 or v2
Changes:
Keep using Pydantic v1.x for now
BACKWARDS INCOMPATIBLE: Elliptic Curve signature verification no longer returns True on success. This brings it in line with the interface's documentation, and our intent. The correct way to use ~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.verify has always been to check whether or not ~cryptography.exceptions.InvalidSignature was raised.
BACKWARDS INCOMPATIBLE: Dropped support for macOS 10.7 and 10.8.
BACKWARDS INCOMPATIBLE: The minimum supported PyPy version is now 5.3.
Python 3.3 support has been deprecated, and will be removed in the next cryptography release.
Add support for providing tag during ~cryptography.hazmat.primitives.ciphers.modes.GCM finalization via ~cryptography.hazmat.primitives.ciphers.AEADDecryptionContext.finalize_with_tag.
Fixed an issue preventing cryptography from compiling against LibreSSL 2.5.x.
Added ~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.key_size and ~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey.key_size as convenience methods for determining the bit size of a secret scalar for the curve.
Accessing an unrecognized extension marked critical on an X.509 object will no longer raise an UnsupportedExtension exception, instead an ~cryptography.x509.UnrecognizedExtension object will be returned. This behavior was based on a poor reading of the RFC, unknown critical extensions only need to be rejected on certificate verification.
The CommonCrypto backend has been removed.
MultiBackend has been removed.
Whirlpool and RIPEMD160 have been deprecated.
Update dependency versions in setup.py
Changes:
.. _v1-8:
Move the RegistrationCredential.transports property into RegistrationCredential.response.transports to better conform to upcoming WebAuthn JSON serial
Changes:
RegistrationCredential.transports property into RegistrationCredential.response.transports to better conform to upcoming WebAuthn JSON serialization method output (#150)Added support for Python 3.6.
Windows and macOS wheels now link against OpenSSL 1.1.0.
macOS wheels are no longer universal. This change significantly shrinks the size of the wheels. Users on macOS 32-bit Python (if there are any) should migrate to 64-bit or build their own packages.
Changed ASN.1 dependency from pyasn1 to asn1crypto resulting in a general performance increase when encoding/decoding ASN.1 structures. Also, the pyasn1_modules test dependency is no longer required.
Added support for ~cryptography.hazmat.primitives.ciphers.CipherContext.update_into on ~cryptography.hazmat.primitives.ciphers.CipherContext.
Added ~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey.private_bytes to ~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey.
Added ~cryptography.hazmat.primitives.asymmetric.dh.DHPublicKey.public_bytes to ~cryptography.hazmat.primitives.asymmetric.dh.DHPublicKey.
~cryptography.hazmat.primitives.serialization.load_pem_private_key and ~cryptography.hazmat.primitives.serialization.load_der_private_key now require that password must be bytes if provided. Previously this was documented but not enforced.
Added support for subgroup order in /hazmat/primitives/asymmetric/dh.
Update cryptography to 39.0.1 (and its dependency pyOpenSSL to 23.0.0)
Changes:
cryptography to 39.0.1 (and its dependency pyOpenSSL to 23.0.0) (#148)
.. _v1-7-1:
Add support for from webauthn import * syntax with proper use of __all__
Changes:
from webauthn import * syntax with proper use of __all__ (#146)int_from_bytes where it failed to accept
bytearray... _v1-7:
Add new authenticator_attachment value to RegistrationCredential and AuthenticationCredential, defining the attachment of the authenticator that compl
Changes:
authenticator_attachment value to RegistrationCredential and AuthenticationCredential, defining the attachment of the authenticator that completed a corresponding ceremony, as it may be returned by the WebAuthn API (#141)Support for OpenSSL 1.0.0 has been removed. Users on older version of OpenSSL will need to upgrade.
Added support for Diffie-Hellman key exchange using ~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey.exchange.
The OS random engine for OpenSSL has been rewritten to improve compatibility with embedded Python and other edge cases. More information about this change can be found in the pull request.
Add new credential_device_type and credential_backed_up values to output from verify_registration_response() and verify_authentication_response()
Deprecated support for OpenSSL 1.0.0. Support will be removed in cryptography 1.7.
Replaced the Python-based OpenSSL locking callbacks with a C version to fix a potential deadlock that could occur if a garbage collection cycle occurred while inside the lock.
Added support for ~cryptography.hazmat.primitives.hashes.BLAKE2b and ~cryptography.hazmat.primitives.hashes.BLAKE2s when using OpenSSL 1.1.0.
Added ~cryptography.x509.Certificate.signature_algorithm_oid support to ~cryptography.x509.Certificate.
Added ~cryptography.x509.CertificateSigningRequest.signature_algorithm_oid support to ~cryptography.x509.CertificateSigningRequest.
Added ~cryptography.x509.CertificateRevocationList.signature_algorithm_oid support to ~cryptography.x509.CertificateRevocationList.
Added support for ~cryptography.hazmat.primitives.kdf.scrypt.Scrypt when using OpenSSL 1.1.0.
Added a workaround to improve compatibility with Python application bundling tools like PyInstaller and cx_freeze.
Added support for generating a ~cryptography.x509.random_serial_number.
Added support for encoding IPv4Network and IPv6Network in X.509 certificates for use with ~cryptography.x509.NameConstraints.
Added ~cryptography.x509.Name.public_bytes to ~cryptography.x509.Name.
Added ~cryptography.x509.RelativeDistinguishedName
~cryptography.x509.DistributionPoint now accepts ~cryptography.x509.RelativeDistinguishedName for ~cryptography.x509.DistributionPoint.relative_name. Deprecated use of ~cryptography.x509.Name as ~cryptography.x509.DistributionPoint.relative_name.
~cryptography.x509.Name now accepts an iterable of ~cryptography.x509.RelativeDistinguishedName. RDNs can be accessed via the ~cryptography.x509.Name.rdns attribute. When constructed with an iterable of ~cryptography.x509.NameAttribute, each attribute becomes a single-valued RDN.
Added ~cryptography.hazmat.primitives.asymmetric.ec.derive_private_key.
Added support for signing and verifying RSA, DSA, and ECDSA signatures with ~cryptography.hazmat.primitives.asymmetric.utils.Prehashed digests.
Restore the ability to pass more common bytes-like values for bytes fields, such as str values
Changes:
bytes fields, such as str values (#132).. _v1-5-1:
Refine support for bytes-like inputs to comply with stricter mypy configurations
Changes:
UserWarning when used with cffi 1.8.3.cryptography from compiling against
OpenSSL 1.0.2i... _v1-5:
Fix authenticator data parsing to correctly parse extension data when present
Added ~cryptography.hazmat.primitives.asymmetric.padding.calculate_max_pss_salt_length.
Added "one shot" ~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey.sign and ~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey.verify methods to DSA keys.
Added "one shot" ~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey.sign and ~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.verify methods to ECDSA keys.
Switched back to the older callback model on Python 3.5 in order to mitigate the locking callback problem with OpenSSL <1.1.0.
~cryptography.x509.CertificateBuilder, ~cryptography.x509.CertificateRevocationListBuilder, and ~cryptography.x509.RevokedCertificateBuilder now accept timezone aware datetime objects as method arguments
cryptography now supports OpenSSL 1.1.0 as a compilation target.
Add support for memoryviews for BytesLike properties including credential_public_key, authenticator_data, etc...
Changes:
memoryviews for BytesLike properties including credential_public_key, authenticator_data, etc...Support for OpenSSL 0.9.8 has been removed. Users on older versions of OpenSSL will need to upgrade.
Added ~cryptography.hazmat.primitives.kdf.kbkdf.KBKDFHMAC.
Added support for OpenSSH public key serialization.
Added support for SHA-2 in RSA ~cryptography.hazmat.primitives.asymmetric.padding.OAEP when using OpenSSL 1.0.2 or greater.
Added "one shot" ~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey.sign and ~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey.verify methods to RSA keys.
Deprecated the serial attribute on ~cryptography.x509.Certificate, in favor of ~cryptography.x509.Certificate.serial_number.
Switch back from attrs + cattrs to Pydantic while preserving support for bytes-like values in subclasses of WebAuthnBaseModel.
Changes:
bytes-like values in subclasses of WebAuthnBaseModel.
Added support for padding ANSI X.923 with ~cryptography.hazmat.primitives.padding.ANSIX923.
Deprecated support for OpenSSL 0.9.8. Support will be removed in cryptography 1.4.
Added support for the ~cryptography.x509.PolicyConstraints X.509 extension including both parsing and generation using ~cryptography.x509.CertificateBuilder and ~cryptography.x509.CertificateSigningRequestBuilder.
Added ~cryptography.x509.CertificateSigningRequest.is_signature_valid to ~cryptography.x509.CertificateSigningRequest.
Fixed an intermittent AssertionError when performing an RSA decryption on an invalid ciphertext, ValueError is now correctly raised in all cases.
Added ~cryptography.x509.AuthorityKeyIdentifier.from_issuer_subject_key_identifier.
Clarify credential docstring for verify_authentication_response()
Changes:
credential docstring for verify_authentication_response()EVP_PKEY object that caused errors with
pyOpenSSL... _v1-2:
Switched from Pydantic to the combination of attrs + cattrs. This achieves more-Pythonic library behavior when used in a project alongside other third
Changes:
bytes to represent such values as credential IDs and public keys.BACKWARDS INCOMPATIBLE: ~cryptography.x509.RevokedCertificate ~cryptography.x509.RevokedCertificate.extensions now uses extension classes rather than returning raw values inside the ~cryptography.x509.Extension ~cryptography.x509.Extension.value. The new classes are:
~cryptography.x509.CertificateIssuer
~cryptography.x509.CRLReason
~cryptography.x509.InvalidityDate
Deprecated support for OpenSSL 0.9.8 and 1.0.0. At this time there is no time table for actually dropping support, however we strongly encourage all users to upgrade, as those versions no longer receive support from the OpenSSL project.
The ~cryptography.x509.Certificate class now has ~cryptography.x509.Certificate.signature and ~cryptography.x509.Certificate.tbs_certificate_bytes attributes.
The ~cryptography.x509.CertificateSigningRequest class now has ~cryptography.x509.CertificateSigningRequest.signature and ~cryptography.x509.CertificateSigningRequest.tbs_certrequest_bytes attributes.
The ~cryptography.x509.CertificateRevocationList class now has ~cryptography.x509.CertificateRevocationList.signature and ~cryptography.x509.CertificateRevocationList.tbs_certlist_bytes attributes.
~cryptography.x509.NameConstraints are now supported in the ~cryptography.x509.CertificateBuilder and ~cryptography.x509.CertificateSigningRequestBuilder.
Support serialization of certificate revocation lists using the ~cryptography.x509.CertificateRevocationList.public_bytes method of ~cryptography.x509.CertificateRevocationList.
Add support for parsing ~cryptography.x509.CertificateRevocationList ~cryptography.x509.CertificateRevocationList.extensions in the OpenSSL backend. The following extensions are currently supported:
~cryptography.x509.AuthorityInformationAccess
~cryptography.x509.AuthorityKeyIdentifier
~cryptography.x509.CRLNumber
~cryptography.x509.IssuerAlternativeName
Added ~cryptography.x509.CertificateRevocationListBuilder and ~cryptography.x509.RevokedCertificateBuilder to allow creation of CRLs.
Unrecognized non-critical X.509 extensions are now parsed into an ~cryptography.x509.UnrecognizedExtension object.
Fixed SafetyNet attestation statement verification failing due to server time drift
Changes:
Added support for Elliptic Curve Diffie-Hellman with ~cryptography.hazmat.primitives.asymmetric.ec.ECDH.
Added ~cryptography.hazmat.primitives.kdf.x963kdf.X963KDF.
Added support for parsing certificate revocation lists (CRLs) using ~cryptography.x509.load_pem_x509_crl and ~cryptography.x509.load_der_x509_crl.
Add support for AES key wrapping with ~cryptography.hazmat.primitives.keywrap.aes_key_wrap and ~cryptography.hazmat.primitives.keywrap.aes_key_unwrap.
Added a __hash__ method to ~cryptography.x509.Name.
Add support for encoding and decoding elliptic curve points to a byte string form using cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicNumbers.encode_point and cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicNumbers.from_encoded_point.
Added ~cryptography.x509.Extensions.get_extension_for_class.
~cryptography.x509.CertificatePolicies are now supported in the ~cryptography.x509.CertificateBuilder.
countryName is now encoded as a PrintableString when creating subject and issuer distinguished names with the Certificate and CSR builder classes.
Fixed SafetyNet unit test failing due to expired x5c certs (see PR #99)
Changes:
We now ship OS X wheels that statically link OpenSSL by default. When installing a wheel on OS X 10.10+ (and using a Python compiled against the 10.10 SDK) users will no longer need to compile. See /installation for alternate installation methods if required.
Set the default string mask to UTF-8 in the OpenSSL backend to resolve character encoding issues with older versions of OpenSSL.
Several new OpenSSL bindings have been added to support a future pyOpenSSL release.
Raise an error during install on PyPy < 2.6. 1.0+ requires PyPy 2.6+.
This preview release of the revitalized py_webauthn library features an entirely new API, as well as support for all attestation statement formats inc
This preview release of the revitalized py_webauthn library features an entirely new API, as well as support for all attestation statement formats included in L2 of the WebAuthn spec:
Practical examples are included in the examples/ directory to serve as a primary reference for now on how to use the new library functionality.
This preview release of the revitalized py_webauthn library features an entirely new API, as well as support for all attestation statement formats included in L2 of the WebAuthn spec:
Practical examples are included in the examples/ directory to serve as a primary reference for now on how to use the new library functionality.
Changes:
Switched to the new `cffi`_ set_source out-of-line API mode for compilation. This results in significantly faster imports and lowered memory consumption. Due to this change we no longer support PyPy releases older than 2.6 nor do we support any released version of PyPy3 (until a version supporting cffi 1.0 comes out).
Fix parsing of OpenSSH public keys that have spaces in comments.
Support serialization of certificate signing requests using the public_bytes method of ~cryptography.x509.CertificateSigningRequest.
Support serialization of certificates using the public_bytes method of ~cryptography.x509.Certificate.
Add get_provisioning_uri method to ~cryptography.hazmat.primitives.twofactor.hotp.HOTP and ~cryptography.hazmat.primitives.twofactor.totp.TOTP for generating provisioning URIs.
Add ~cryptography.hazmat.primitives.kdf.concatkdf.ConcatKDFHash and ~cryptography.hazmat.primitives.kdf.concatkdf.ConcatKDFHMAC.
Raise a TypeError when passing objects that are not text as the value to ~cryptography.x509.NameAttribute.
Add support for ~cryptography.x509.OtherName as a general name type.
Added new X.509 extension support in ~cryptography.x509.Certificate The following new extensions are now supported:
~cryptography.x509.OCSPNoCheck
~cryptography.x509.InhibitAnyPolicy
~cryptography.x509.IssuerAlternativeName
~cryptography.x509.NameConstraints
Extension support was added to ~cryptography.x509.CertificateSigningRequest.
Add support for creating signed certificates with ~cryptography.x509.CertificateBuilder. This includes support for the following extensions:
~cryptography.x509.BasicConstraints
~cryptography.x509.SubjectAlternativeName
~cryptography.x509.KeyUsage
~cryptography.x509.ExtendedKeyUsage
~cryptography.x509.SubjectKeyIdentifier
~cryptography.x509.AuthorityKeyIdentifier
~cryptography.x509.AuthorityInformationAccess
~cryptography.x509.CRLDistributionPoints
~cryptography.x509.InhibitAnyPolicy
~cryptography.x509.IssuerAlternativeName
~cryptography.x509.OCSPNoCheck
Add support for creating certificate signing requests with ~cryptography.x509.CertificateSigningRequestBuilder. This includes support for the same extensions supported in the CertificateBuilder.
Deprecate encode_rfc6979_signature and decode_rfc6979_signature in favor of ~cryptography.hazmat.primitives.asymmetric.utils.encode_dss_signature and ~cryptography.hazmat.primitives.asymmetric.utils.decode_dss_signature.
Nothing published for this version
Preview release of the revitalized py_webauthn library. See PR #95
Preview release of the revitalized py_webauthn library. See PR #95
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Deprecated salt_length on ~cryptography.hazmat.primitives.asymmetric.padding.MGF1 and added it to ~cryptography.hazmat.primitives.asymmetric.padding.P…
Deprecated salt_length on ~cryptography.hazmat.primitives.asymmetric.padding.MGF1 and added it to ~cryptography.hazmat.primitives.asymmetric.padding.PSS. It will be removed from MGF1 in two releases per our /api-stability policy.
Added SEED support.
Added ~cryptography.hazmat.primitives.cmac.CMAC.
Added decryption support to ~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey and encryption support to ~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey.
Added signature support to ~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey and verification support to ~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey.
Nothing published for this version
Added ~cryptography.hazmat.primitives.twofactor.hotp.HOTP.
Added ~cryptography.hazmat.primitives.twofactor.hotp.HOTP.
Added ~cryptography.hazmat.primitives.twofactor.totp.TOTP.
Added IDEA support.
Added signature support to ~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey and verification support to ~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey.
Moved test vectors to the new cryptography_vectors package.
Removed register_cipher_adapter method from CipherBackend.
Added commoncrypto.
Added initial commoncrypto.
Removed register_cipher_adapter method from CipherBackend.
Added support for the OpenSSL backend under Windows.
Improved thread-safety for the OpenSSL backend.
Fixed compilation on systems where OpenSSL's ec.h header is not available, such as CentOS.
Added ~cryptography.hazmat.primitives.kdf.pbkdf2.PBKDF2HMAC.
Added ~cryptography.hazmat.primitives.kdf.hkdf.HKDF.
Added multibackend.
Set default random for openssl to the OS random engine.
Added CAST5 (CAST-128) support.
.. _as documented here: https://docs.rs/openssl/latest/openssl/#automatic .. _main: https://github.com/pyca/cryptography/ .. _cffi: https://cffi.readt
.. _as documented here: https://docs.rs/openssl/latest/openssl/#automatic
.. _main: https://github.com/pyca/cryptography/
.. _cffi: https://cffi.readthedocs.io/
.. _aws-lc: https://github.com/aws/aws-lc
.. _Dropped support for win_arm64 wheels: https://github.com/pyca/cryptography/pull/14216
One column per quarter.