Upgrading cryptography 36 to 37
Breaking36.0.2 → 37.0.4Breaking2Deprecated4New12Changed8Fixed1Other1
BreakingUpgrade verdict
2 breaking changes.
In plain terms
- If you build cryptography against LibreSSL, you now need LibreSSL 3.1 or newer.
- Old signing and verifying methods that were deprecated in version 2.0 are gone; use sign and verify instead.
- Building against OpenSSL 1.1.0 is deprecated and will stop working after the next release.
- Python 3.6 is deprecated and support will be dropped in a future version.
Must act Top 5 of 6 that need code or config changes
What you must change
Breaking2
Drops support for LibreSSL 2.9.x and 3.0.x, raising the minimum LibreSSL version to 3.1+.
Removes the deprecated signer and verifier methods from public and private key classes.
signerverifiersignverifyDeprecations to plan for
Deprecated4
Deprecates OpenSSL 1.1.0 support; the next release will be the last to support compiling with it.
Deprecates Python 3.6 support, which will be removed in a future release.
Deprecates the current MSRV of Rust 1.41.0; the next release raises it to 1.48.0.
Deprecates CAST5, SEED, IDEA, and Blowfish as legacy low-usage algorithms to be removed later.
CAST5SEEDIDEABlowfishAPI changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- changed:
constructor InternalError(msg, err_code) → constructor InternalError(msg: str, err_code: typing.List[_OpenSSLErrorWithText]) -> None - changed:
constructor UnsupportedAlgorithm(message, reason=…) → constructor UnsupportedAlgorithm(message: str, reason: typing.Optional[_Reasons]=…) -> None
- changed:
class Fernet(object) → class Fernet - changed:
class MultiFernet(object) → class MultiFernet
- removed:
export Backend - changed:
function default_backend() -> Backend → function default_backend() -> Any
- removed:
class Backend(CipherBackend, CMACBackend, DERSerializationBackend, DHBackend, DSABackend, EllipticCurveBackend, HashBackend, HMACBackend, PBKDF2HMACBackend, RSABackend, PEMSerializationBackend, ScryptBackend) - removed:
class CMACBackend - removed:
class CipherBackend - removed:
class DERSerializationBackend - removed:
class DHBackend - removed:
class DSABackend - removed:
class EllipticCurveBackend - removed:
class HMACBackend - removed:
class HashBackend - removed:
class PBKDF2HMACBackend - removed:
class PEMSerializationBackend - removed:
class RSABackend - removed:
class ScryptBackend - removed:
method Backend.load_der_pkcs7_certificates(data) - removed:
method Backend.load_key_and_certificates_from_pkcs12(data, password) - removed:
method Backend.load_pem_pkcs7_certificates(data) - removed:
method Backend.load_pkcs12(data, password) - removed:
method Backend.pkcs7_sign(builder, encoding, options) - removed:
method Backend.serialize_key_and_certificates_to_pkcs12(name, key, cert, cas, encryption_algorithm) - removed:
method CMACBackend.cmac_algorithm_supported(algorithm) - removed:
method CMACBackend.create_cmac_ctx(algorithm) - removed:
method CipherBackend.cipher_supported(cipher, mode) - removed:
method CipherBackend.create_symmetric_decryption_ctx(cipher, mode) - removed:
method CipherBackend.create_symmetric_encryption_ctx(cipher, mode) - removed:
method DERSerializationBackend.load_der_parameters(data) - removed:
method DERSerializationBackend.load_der_private_key(data, password) - removed:
method DERSerializationBackend.load_der_public_key(data) - removed:
method DHBackend.dh_parameters_supported(p, g, q=…) - removed:
method DHBackend.dh_x942_serialization_supported() - removed:
method DHBackend.generate_dh_parameters(generator, key_size) - removed:
method DHBackend.generate_dh_private_key(parameters) - removed:
method DHBackend.generate_dh_private_key_and_parameters(generator, key_size) - removed:
method DHBackend.load_dh_parameter_numbers(numbers) - removed:
method DHBackend.load_dh_private_numbers(numbers) - removed:
method DHBackend.load_dh_public_numbers(numbers) - removed:
method DSABackend.dsa_hash_supported(algorithm) - removed:
method DSABackend.dsa_parameters_supported(p, q, g) - removed:
method DSABackend.generate_dsa_parameters(key_size) - removed:
method DSABackend.generate_dsa_private_key(parameters) - removed:
method DSABackend.generate_dsa_private_key_and_parameters(key_size) - removed:
method DSABackend.load_dsa_parameter_numbers(numbers) - removed:
method DSABackend.load_dsa_private_numbers(numbers) - removed:
method DSABackend.load_dsa_public_numbers(numbers) - removed:
method EllipticCurveBackend.derive_elliptic_curve_private_key(private_value, curve) - removed:
method EllipticCurveBackend.elliptic_curve_exchange_algorithm_supported(algorithm, curve) - removed:
method EllipticCurveBackend.elliptic_curve_signature_algorithm_supported(signature_algorithm, curve) - removed:
method EllipticCurveBackend.elliptic_curve_supported(curve) - removed:
method EllipticCurveBackend.generate_elliptic_curve_private_key(curve) - removed:
method EllipticCurveBackend.load_elliptic_curve_private_numbers(numbers) - removed:
method EllipticCurveBackend.load_elliptic_curve_public_numbers(numbers) - removed:
method HMACBackend.create_hmac_ctx(key, algorithm) - removed:
method HMACBackend.hmac_supported(algorithm) - removed:
method HashBackend.create_hash_ctx(algorithm) - removed:
method HashBackend.hash_supported(algorithm) - removed:
method PBKDF2HMACBackend.derive_pbkdf2_hmac(algorithm, length, salt, iterations, key_material) - removed:
method PBKDF2HMACBackend.pbkdf2_hmac_supported(algorithm) - removed:
method PEMSerializationBackend.load_pem_parameters(data) - removed:
method PEMSerializationBackend.load_pem_private_key(data, password) - removed:
method PEMSerializationBackend.load_pem_public_key(data) - removed:
method RSABackend.generate_rsa_parameters_supported(public_exponent, key_size) - removed:
method RSABackend.generate_rsa_private_key(public_exponent, key_size) - removed:
method RSABackend.load_rsa_private_numbers(numbers) - removed:
method RSABackend.load_rsa_public_numbers(numbers) - removed:
method RSABackend.rsa_padding_supported(padding) - removed:
method ScryptBackend.derive_scrypt(key_material, salt, length, n, r, p) - removed:
method ScryptBackend.scrypt_supported()
- removed:
method Backend.dsa_parameters_supported(p, q, g) - changed:
class Backend(BackendInterface) → class Backend - changed:
class GetCipherByName(object) → class GetCipherByName - changed:
constructor GetCipherByName(fmt) → constructor GetCipherByName(fmt: str) - changed:
method Backend.activate_builtin_random() → method Backend.activate_builtin_random() -> None - changed:
method Backend.activate_osrandom_engine() → method Backend.activate_osrandom_engine() -> None - changed:
method Backend.aead_cipher_supported(cipher) → method Backend.aead_cipher_supported(cipher) -> bool - changed:
method Backend.cipher_supported(cipher, mode) → method Backend.cipher_supported(cipher: CipherAlgorithm, mode: Mode) -> bool - changed:
method Backend.cmac_algorithm_supported(algorithm) → method Backend.cmac_algorithm_supported(algorithm) -> bool - changed:
method Backend.create_cmac_ctx(algorithm) → method Backend.create_cmac_ctx(algorithm: BlockCipherAlgorithm) -> _CMACContext - changed:
method Backend.create_hash_ctx(algorithm) → method Backend.create_hash_ctx(algorithm: hashes.HashAlgorithm) -> hashes.HashContext - changed:
method Backend.create_hmac_ctx(key, algorithm) → method Backend.create_hmac_ctx(key: bytes, algorithm: hashes.HashAlgorithm) -> _HMACContext - changed:
method Backend.create_poly1305_ctx(key) → method Backend.create_poly1305_ctx(key: bytes) -> _Poly1305Context - changed:
method Backend.create_symmetric_decryption_ctx(cipher, mode) → method Backend.create_symmetric_decryption_ctx(cipher: CipherAlgorithm, mode: Mode) -> _CipherContext - changed:
method Backend.create_symmetric_encryption_ctx(cipher, mode) → method Backend.create_symmetric_encryption_ctx(cipher: CipherAlgorithm, mode: Mode) -> _CipherContext - changed:
method Backend.derive_elliptic_curve_private_key(private_value, curve) → method Backend.derive_elliptic_curve_private_key(private_value: int, curve: ec.EllipticCurve) -> ec.EllipticCurvePrivateKey - changed:
method Backend.derive_pbkdf2_hmac(algorithm, length, salt, iterations, key_material) → method Backend.derive_pbkdf2_hmac(algorithm: hashes.HashAlgorithm, length: int, salt: bytes, iterations: int, key_material: bytes) -> bytes - changed:
method Backend.derive_scrypt(key_material, salt, length, n, r, p) → method Backend.derive_scrypt(key_material: bytes, salt: bytes, length: int, n: int, r: int, p: int) -> bytes - changed:
method Backend.dh_parameters_supported(p, g, q=…) → method Backend.dh_parameters_supported(p: int, g: int, q: typing.Optional[int]=…) -> bool - changed:
method Backend.dh_supported() → method Backend.dh_supported() -> bool - changed:
method Backend.dh_x942_serialization_supported() → method Backend.dh_x942_serialization_supported() -> bool - changed:
method Backend.dsa_hash_supported(algorithm) → method Backend.dsa_hash_supported(algorithm: hashes.HashAlgorithm) -> bool - changed:
method Backend.ed25519_generate_key() → method Backend.ed25519_generate_key() -> ed25519.Ed25519PrivateKey - changed:
method Backend.ed25519_load_private_bytes(data) → method Backend.ed25519_load_private_bytes(data: bytes) -> ed25519.Ed25519PrivateKey - changed:
method Backend.ed25519_load_public_bytes(data) → method Backend.ed25519_load_public_bytes(data: bytes) -> ed25519.Ed25519PublicKey - changed:
method Backend.ed25519_supported() → method Backend.ed25519_supported() -> bool - changed:
method Backend.ed448_generate_key() → method Backend.ed448_generate_key() -> ed448.Ed448PrivateKey - changed:
method Backend.ed448_load_private_bytes(data) → method Backend.ed448_load_private_bytes(data: bytes) -> ed448.Ed448PrivateKey - changed:
method Backend.ed448_load_public_bytes(data) → method Backend.ed448_load_public_bytes(data: bytes) -> ed448.Ed448PublicKey - changed:
method Backend.ed448_supported() → method Backend.ed448_supported() -> bool - changed:
method Backend.elliptic_curve_exchange_algorithm_supported(algorithm, curve) → method Backend.elliptic_curve_exchange_algorithm_supported(algorithm: ec.ECDH, curve: ec.EllipticCurve) -> bool - changed:
method Backend.elliptic_curve_signature_algorithm_supported(signature_algorithm, curve) → method Backend.elliptic_curve_signature_algorithm_supported(signature_algorithm: ec.EllipticCurveSignatureAlgorithm, curve: ec.EllipticCurve) -> bool - changed:
method Backend.elliptic_curve_supported(curve) → method Backend.elliptic_curve_supported(curve: ec.EllipticCurve) -> bool - changed:
method Backend.generate_dh_parameters(generator, key_size) → method Backend.generate_dh_parameters(generator: int, key_size: int) -> dh.DHParameters - changed:
method Backend.generate_dh_private_key(parameters) → method Backend.generate_dh_private_key(parameters: dh.DHParameters) -> dh.DHPrivateKey - changed:
method Backend.generate_dh_private_key_and_parameters(generator, key_size) → method Backend.generate_dh_private_key_and_parameters(generator: int, key_size: int) -> dh.DHPrivateKey - changed:
method Backend.generate_dsa_parameters(key_size) → method Backend.generate_dsa_parameters(key_size: int) -> dsa.DSAParameters - changed:
method Backend.generate_dsa_private_key(parameters) → method Backend.generate_dsa_private_key(parameters: dsa.DSAParameters) -> dsa.DSAPrivateKey - changed:
method Backend.generate_dsa_private_key_and_parameters(key_size) → method Backend.generate_dsa_private_key_and_parameters(key_size: int) -> dsa.DSAPrivateKey - changed:
method Backend.generate_elliptic_curve_private_key(curve) → method Backend.generate_elliptic_curve_private_key(curve: ec.EllipticCurve) -> ec.EllipticCurvePrivateKey - changed:
method Backend.generate_rsa_parameters_supported(public_exponent, key_size) → method Backend.generate_rsa_parameters_supported(public_exponent: int, key_size: int) -> bool - changed:
method Backend.generate_rsa_private_key(public_exponent, key_size) → method Backend.generate_rsa_private_key(public_exponent: int, key_size: int) -> rsa.RSAPrivateKey - changed:
method Backend.hash_supported(algorithm) → method Backend.hash_supported(algorithm: hashes.HashAlgorithm) -> bool - changed:
method Backend.hmac_supported(algorithm) → method Backend.hmac_supported(algorithm: hashes.HashAlgorithm) -> bool - changed:
method Backend.load_der_parameters(data) → method Backend.load_der_parameters(data: bytes) -> dh.DHParameters - changed:
method Backend.load_der_pkcs7_certificates(data) → method Backend.load_der_pkcs7_certificates(data: bytes) -> typing.List[x509.Certificate] - changed:
method Backend.load_der_private_key(data, password) → method Backend.load_der_private_key(data: bytes, password: typing.Optional[bytes]) -> PRIVATE_KEY_TYPES - changed:
method Backend.load_der_public_key(data) → method Backend.load_der_public_key(data: bytes) -> PUBLIC_KEY_TYPES - changed:
method Backend.load_dh_parameter_numbers(numbers) → method Backend.load_dh_parameter_numbers(numbers: dh.DHParameterNumbers) -> dh.DHParameters - changed:
method Backend.load_dh_private_numbers(numbers) → method Backend.load_dh_private_numbers(numbers: dh.DHPrivateNumbers) -> dh.DHPrivateKey - changed:
method Backend.load_dh_public_numbers(numbers) → method Backend.load_dh_public_numbers(numbers: dh.DHPublicNumbers) -> dh.DHPublicKey - changed:
method Backend.load_dsa_parameter_numbers(numbers) → method Backend.load_dsa_parameter_numbers(numbers: dsa.DSAParameterNumbers) -> dsa.DSAParameters - changed:
method Backend.load_dsa_private_numbers(numbers) → method Backend.load_dsa_private_numbers(numbers: dsa.DSAPrivateNumbers) -> dsa.DSAPrivateKey - changed:
method Backend.load_dsa_public_numbers(numbers) → method Backend.load_dsa_public_numbers(numbers: dsa.DSAPublicNumbers) -> dsa.DSAPublicKey - changed:
method Backend.load_elliptic_curve_private_numbers(numbers) → method Backend.load_elliptic_curve_private_numbers(numbers: ec.EllipticCurvePrivateNumbers) -> ec.EllipticCurvePrivateKey - changed:
method Backend.load_elliptic_curve_public_bytes(curve, point_bytes) → method Backend.load_elliptic_curve_public_bytes(curve: ec.EllipticCurve, point_bytes: bytes) -> ec.EllipticCurvePublicKey - changed:
method Backend.load_elliptic_curve_public_numbers(numbers) → method Backend.load_elliptic_curve_public_numbers(numbers: ec.EllipticCurvePublicNumbers) -> ec.EllipticCurvePublicKey - changed:
method Backend.load_key_and_certificates_from_pkcs12(data, password) → method Backend.load_key_and_certificates_from_pkcs12(data: bytes, password: typing.Optional[bytes]) -> typing.Tuple[typing.Optional[PRIVATE_KEY_TYPES], typing.Optional[x509.Certificate], typing.List[x509.Certificate]] - changed:
method Backend.load_pem_parameters(data) → method Backend.load_pem_parameters(data: bytes) -> dh.DHParameters - changed:
method Backend.load_pem_pkcs7_certificates(data) → method Backend.load_pem_pkcs7_certificates(data: bytes) -> typing.List[x509.Certificate] - changed:
method Backend.load_pem_private_key(data, password) → method Backend.load_pem_private_key(data: bytes, password: typing.Optional[bytes]) -> PRIVATE_KEY_TYPES - changed:
method Backend.load_pem_public_key(data) → method Backend.load_pem_public_key(data: bytes) -> PUBLIC_KEY_TYPES - changed:
method Backend.load_pkcs12(data, password) → method Backend.load_pkcs12(data: bytes, password: typing.Optional[bytes]) -> PKCS12KeyAndCertificates - changed:
method Backend.load_rsa_private_numbers(numbers) → method Backend.load_rsa_private_numbers(numbers: rsa.RSAPrivateNumbers) -> rsa.RSAPrivateKey - changed:
method Backend.load_rsa_public_numbers(numbers) → method Backend.load_rsa_public_numbers(numbers: rsa.RSAPublicNumbers) -> rsa.RSAPublicKey - changed:
method Backend.openssl_assert(ok, errors=…) → method Backend.openssl_assert(ok: bool, errors: typing.Optional[typing.List[binding._OpenSSLError]]=…) -> None - changed:
method Backend.openssl_version_number() → method Backend.openssl_version_number() -> int - changed:
method Backend.openssl_version_text() → method Backend.openssl_version_text() -> str - changed:
method Backend.osrandom_engine_implementation() → method Backend.osrandom_engine_implementation() -> str - changed:
method Backend.pbkdf2_hmac_supported(algorithm) → method Backend.pbkdf2_hmac_supported(algorithm: hashes.HashAlgorithm) -> bool - changed:
method Backend.pkcs7_sign(builder, encoding, options) → method Backend.pkcs7_sign(builder: pkcs7.PKCS7SignatureBuilder, encoding: serialization.Encoding, options: typing.List[pkcs7.PKCS7Options]) -> bytes - changed:
method Backend.pkcs7_supported() → method Backend.pkcs7_supported() -> bool - changed:
method Backend.poly1305_supported() → method Backend.poly1305_supported() -> bool - changed:
method Backend.rsa_padding_supported(padding) → method Backend.rsa_padding_supported(padding: AsymmetricPadding) -> bool - changed:
method Backend.scrypt_supported() → method Backend.scrypt_supported() -> bool - changed:
method Backend.serialize_key_and_certificates_to_pkcs12(name, key, cert, cas, encryption_algorithm) → method Backend.serialize_key_and_certificates_to_pkcs12(name: typing.Optional[bytes], key: typing.Optional[_ALLOWED_PKCS12_TYPES], cert: typing.Optional[x509.Certificate], cas: typing.Optional[typing.List[_PKCS12_CAS_TYPES]], encryption_algorithm: serialization.KeySerializationEncryption) -> bytes - changed:
method Backend.x25519_generate_key() → method Backend.x25519_generate_key() -> x25519.X25519PrivateKey - changed:
method Backend.x25519_load_private_bytes(data) → method Backend.x25519_load_private_bytes(data: bytes) -> x25519.X25519PrivateKey - changed:
method Backend.x25519_load_public_bytes(data) → method Backend.x25519_load_public_bytes(data: bytes) -> x25519.X25519PublicKey - changed:
method Backend.x25519_supported() → method Backend.x25519_supported() -> bool - changed:
method Backend.x448_generate_key() → method Backend.x448_generate_key() -> x448.X448PrivateKey - changed:
method Backend.x448_load_private_bytes(data) → method Backend.x448_load_private_bytes(data: bytes) -> x448.X448PrivateKey - changed:
method Backend.x448_load_public_bytes(data) → method Backend.x448_load_public_bytes(data: bytes) -> x448.X448PublicKey - changed:
method Backend.x448_supported() → method Backend.x448_supported() -> bool - added:
method Backend.dsa_supported() -> bool - added:
method Backend.pkcs7_serialize_certificates(certs: typing.List[x509.Certificate], encoding: serialization.Encoding) - added:
method Backend.signature_hash_supported(algorithm: hashes.HashAlgorithm) -> bool
- changed:
class Binding(object) → class Binding
- removed:
class AsymmetricSignatureContext - removed:
class AsymmetricVerificationContext - removed:
method AsymmetricSignatureContext.finalize() -> bytes - removed:
method AsymmetricSignatureContext.update(data: bytes) -> None - removed:
method AsymmetricVerificationContext.update(data: bytes) -> None - removed:
method AsymmetricVerificationContext.verify() -> None
- removed:
field DHParameterNumbers.g - removed:
field DHParameterNumbers.p - removed:
field DHParameterNumbers.q - removed:
field DHPrivateNumbers.public_numbers - removed:
field DHPrivateNumbers.x - removed:
field DHPublicNumbers.parameter_numbers - removed:
field DHPublicNumbers.y - changed:
class DHParameterNumbers(object) → class DHParameterNumbers - changed:
class DHPrivateNumbers(object) → class DHPrivateNumbers - changed:
class DHPublicNumbers(object) → class DHPublicNumbers - changed:
method DHParameters.parameter_bytes(encoding: serialization.Encoding, format: serialization.ParameterFormat) -> bytes → method DHParameters.parameter_bytes(encoding: _serialization.Encoding, format: _serialization.ParameterFormat) -> bytes - changed:
method DHPrivateKey.private_bytes(encoding: serialization.Encoding, format: serialization.PrivateFormat, encryption_algorithm: serialization.KeySerializationEncryption) -> bytes → method DHPrivateKey.private_bytes(encoding: _serialization.Encoding, format: _serialization.PrivateFormat, encryption_algorithm: _serialization.KeySerializationEncryption) -> bytes - changed:
method DHPublicKey.public_bytes(encoding: serialization.Encoding, format: serialization.PublicFormat) -> bytes → method DHPublicKey.public_bytes(encoding: _serialization.Encoding, format: _serialization.PublicFormat) -> bytes - added:
property DHParameterNumbers.g -> int - added:
property DHParameterNumbers.p -> int - added:
property DHParameterNumbers.q -> typing.Optional[int] - added:
property DHPrivateNumbers.public_numbers -> DHPublicNumbers - added:
property DHPrivateNumbers.x -> int - added:
property DHPublicNumbers.parameter_numbers -> DHParameterNumbers - added:
property DHPublicNumbers.y -> int
- removed:
field DSAParameterNumbers.g - removed:
field DSAParameterNumbers.p - removed:
field DSAParameterNumbers.q - removed:
field DSAPrivateNumbers.public_numbers - removed:
field DSAPrivateNumbers.x - removed:
field DSAPublicNumbers.parameter_numbers - removed:
field DSAPublicNumbers.y - removed:
method DSAPrivateKey.signer(signature_algorithm: hashes.HashAlgorithm) -> AsymmetricSignatureContext - removed:
method DSAPublicKey.verifier(signature: bytes, signature_algorithm: hashes.HashAlgorithm) -> AsymmetricVerificationContext - changed:
class DSAParameterNumbers(object) → class DSAParameterNumbers - changed:
class DSAPrivateNumbers(object) → class DSAPrivateNumbers - changed:
class DSAPublicNumbers(object) → class DSAPublicNumbers - added:
property DSAParameterNumbers.g -> int - added:
property DSAParameterNumbers.p -> int - added:
property DSAParameterNumbers.q -> int - added:
property DSAPrivateNumbers.public_numbers -> DSAPublicNumbers - added:
property DSAPrivateNumbers.x -> int - added:
property DSAPublicNumbers.parameter_numbers -> DSAParameterNumbers - added:
property DSAPublicNumbers.y -> int
- removed:
field EllipticCurvePrivateNumbers.private_value - removed:
field EllipticCurvePrivateNumbers.public_numbers - removed:
field EllipticCurvePublicNumbers.curve - removed:
field EllipticCurvePublicNumbers.x - removed:
field EllipticCurvePublicNumbers.y - removed:
method EllipticCurvePrivateKey.signer(signature_algorithm: EllipticCurveSignatureAlgorithm) -> AsymmetricSignatureContext - removed:
method EllipticCurvePublicKey.verifier(signature: bytes, signature_algorithm: EllipticCurveSignatureAlgorithm) -> AsymmetricVerificationContext - changed:
class ECDH(object) → class ECDH - changed:
class EllipticCurveOID(object) → class EllipticCurveOID - changed:
class EllipticCurvePrivateNumbers(object) → class EllipticCurvePrivateNumbers - changed:
class EllipticCurvePublicNumbers(object) → class EllipticCurvePublicNumbers - added:
property EllipticCurvePrivateNumbers.private_value -> int - added:
property EllipticCurvePrivateNumbers.public_numbers -> EllipticCurvePublicNumbers - added:
property EllipticCurvePublicNumbers.curve -> EllipticCurve - added:
property EllipticCurvePublicNumbers.x -> int - added:
property EllipticCurvePublicNumbers.y -> int
- changed:
class MGF1(object) → class MGF1(MGF) - changed:
constructor OAEP(mgf: MGF1, algorithm: hashes.HashAlgorithm, label: typing.Optional[bytes]) → constructor OAEP(mgf: MGF, algorithm: hashes.HashAlgorithm, label: typing.Optional[bytes]) - changed:
constructor PSS(mgf, salt_length) → constructor PSS(mgf: MGF, salt_length: typing.Union[int, _MaxLength, _Auto, _DigestLength]) -> None - added:
class MGF - added:
field PSS.AUTO - added:
field PSS.DIGEST_LENGTH
- removed:
field RSAPrivateNumbers.d - removed:
field RSAPrivateNumbers.dmp1 - removed:
field RSAPrivateNumbers.dmq1 - removed:
field RSAPrivateNumbers.iqmp - removed:
field RSAPrivateNumbers.p - removed:
field RSAPrivateNumbers.public_numbers - removed:
field RSAPrivateNumbers.q - removed:
field RSAPublicNumbers.e - removed:
field RSAPublicNumbers.n - removed:
method RSAPrivateKey.signer(padding: AsymmetricPadding, algorithm: hashes.HashAlgorithm) -> AsymmetricSignatureContext - removed:
method RSAPublicKey.verifier(signature: bytes, padding: AsymmetricPadding, algorithm: hashes.HashAlgorithm) -> AsymmetricVerificationContext - changed:
class RSAPrivateNumbers(object) → class RSAPrivateNumbers - changed:
class RSAPublicNumbers(object) → class RSAPublicNumbers - added:
property RSAPrivateNumbers.d -> int - added:
property RSAPrivateNumbers.dmp1 -> int - added:
property RSAPrivateNumbers.dmq1 -> int - added:
property RSAPrivateNumbers.iqmp -> int - added:
property RSAPrivateNumbers.p -> int - added:
property RSAPrivateNumbers.public_numbers -> RSAPublicNumbers - added:
property RSAPrivateNumbers.q -> int - added:
property RSAPublicNumbers.e -> int - added:
property RSAPublicNumbers.n -> int
- added:
variable CERTIFICATE_ISSUER_PUBLIC_KEY_TYPES - added:
variable CERTIFICATE_PRIVATE_KEY_TYPES
- removed:
field Prehashed.digest_size - changed:
class Prehashed(object) → class Prehashed - added:
property Prehashed.digest_size -> int
- changed:
class AESCCM(object) → class AESCCM - changed:
class AESGCM(object) → class AESGCM - changed:
class AESOCB3(object) → class AESOCB3 - changed:
class ChaCha20Poly1305(object) → class ChaCha20Poly1305 - added:
class AESSIV(object) - added:
constructor AESSIV(key: bytes) - added:
method AESSIV.decrypt(data: bytes, associated_data: typing.Optional[typing.List[bytes]]) -> bytes - added:
method AESSIV.encrypt(data: bytes, associated_data: typing.Optional[typing.List[bytes]]) -> bytes - added:
static method AESSIV.generate_key(bit_length: int) -> bytes
- changed:
class ChaCha20(CipherAlgorithm, ModeWithNonce) → class ChaCha20(CipherAlgorithm) - changed:
class IDEA(CipherAlgorithm) → class IDEA(CipherAlgorithm, BlockCipherAlgorithm)
- changed:
class AEADCipherContext → class AEADCipherContext(CipherContext) - changed:
class AEADDecryptionContext → class AEADDecryptionContext(AEADCipherContext) - changed:
class AEADEncryptionContext → class AEADEncryptionContext(AEADCipherContext) - changed:
class Cipher(object) → class Cipher(typing.Generic[Mode]) - changed:
constructor Cipher(algorithm: CipherAlgorithm, mode: typing.Optional[modes.Mode], backend: typing.Any=…) → constructor Cipher(algorithm: CipherAlgorithm, mode: Mode, backend: typing.Any=…) - changed:
method Cipher.decryptor() → method Cipher.decryptor() -> AEADDecryptionContext | () -> CipherContext - changed:
method Cipher.encryptor() → method Cipher.encryptor() -> AEADEncryptionContext | () -> CipherContext - changed:
method CipherContext.update_into(data: bytes, buf) -> int → method CipherContext.update_into(data: bytes, buf: bytes) -> int - added:
variable Mode
- changed:
class CBC(Mode, ModeWithInitializationVector) → class CBC(ModeWithInitializationVector) - changed:
class CFB(Mode, ModeWithInitializationVector) → class CFB(ModeWithInitializationVector) - changed:
class CFB8(Mode, ModeWithInitializationVector) → class CFB8(ModeWithInitializationVector) - changed:
class CTR(Mode, ModeWithNonce) → class CTR(ModeWithNonce) - changed:
class GCM(Mode, ModeWithInitializationVector, ModeWithAuthenticationTag) → class GCM(ModeWithInitializationVector, ModeWithAuthenticationTag) - changed:
class ModeWithAuthenticationTag → class ModeWithAuthenticationTag(Mode) - changed:
class ModeWithInitializationVector → class ModeWithInitializationVector(Mode) - changed:
class ModeWithNonce → class ModeWithNonce(Mode) - changed:
class ModeWithTweak → class ModeWithTweak(Mode) - changed:
class OFB(Mode, ModeWithInitializationVector) → class OFB(ModeWithInitializationVector) - changed:
class XTS(Mode, ModeWithTweak) → class XTS(ModeWithTweak)
- changed:
class CMAC(object) → class CMAC - changed:
constructor CMAC(algorithm: ciphers.BlockCipherAlgorithm, backend: typing.Any=…, ctx=…) → constructor CMAC(algorithm: ciphers.BlockCipherAlgorithm, backend: typing.Any=…, ctx: typing.Optional[_CMACContext]=…)
- changed:
method KBKDFHMAC.derive(key_material) -> bytes → method KBKDFHMAC.derive(key_material: bytes) -> bytes
- changed:
class ANSIX923(object) → class ANSIX923 - changed:
class PKCS7(object) → class PKCS7 - changed:
method PKCS7.padder() → method PKCS7.padder() -> PaddingContext - changed:
method PKCS7.unpadder() → method PKCS7.unpadder() -> PaddingContext
- changed:
class Poly1305(object) → class Poly1305
- changed:
function load_key_and_certificates(data: bytes, password: typing.Optional[bytes], backend: typing.Any=…) -> typing.Tuple[typing.Optional[_ALLOWED_PKCS12_TYPES], typing.Optional[x509.Certificate], typing.List[x509.Certificate]] → function load_key_and_certificates(data: bytes, password: typing.Optional[bytes], backend: typing.Any=…) -> typing.Tuple[typing.Optional[PRIVATE_KEY_TYPES], typing.Optional[x509.Certificate], typing.List[x509.Certificate]] - changed:
function serialize_key_and_certificates(name: typing.Optional[bytes], key: typing.Optional[_ALLOWED_PKCS12_TYPES], cert: typing.Optional[x509.Certificate], cas: typing.Optional[typing.Iterable[x509.Certificate]], encryption_algorithm: serialization.KeySerializationEncryption) -> bytes → function serialize_key_and_certificates(name: typing.Optional[bytes], key: typing.Optional[_ALLOWED_PKCS12_TYPES], cert: typing.Optional[x509.Certificate], cas: typing.Optional[typing.Iterable[_PKCS12_CAS_TYPES]], encryption_algorithm: serialization.KeySerializationEncryption) -> bytes
- changed:
class PKCS7SignatureBuilder(object) → class PKCS7SignatureBuilder - changed:
constructor PKCS7SignatureBuilder(data=…, signers=…, additional_certs=…) → constructor PKCS7SignatureBuilder(data: typing.Optional[bytes]=…, signers: typing.List[typing.Tuple[x509.Certificate, _ALLOWED_PRIVATE_KEY_TYPES, _ALLOWED_PKCS7_HASH_TYPES]]=…, additional_certs: typing.List[x509.Certificate]=…) - added:
function serialize_certificates(certs: typing.List[x509.Certificate], encoding: serialization.Encoding) -> bytes
- changed:
class HOTP(object) → class HOTP
- changed:
class TOTP(object) → class TOTP
- removed:
function read_only_property(name: str) - removed:
variable DeprecatedIn34 - removed:
variable PersistentlyDeprecated2017 - removed:
variable int_from_bytes - changed:
function cached_property(func) → function cached_property(func: typing.Callable) -> property - changed:
function deprecated(value, module_name, message, warning_class) → function deprecated(value: object, module_name: str, message: str, warning_class: typing.Type[Warning], name: typing.Optional[str]=…) -> _DeprecatedValue - changed:
function strip_annotation(signature) → function strip_annotation(signature: inspect.Signature) -> inspect.Signature - changed:
function verify_interface(iface, klass, *, check_annotations=…) → function verify_interface(iface: abc.ABCMeta, klass: object, *, check_annotations: bool=…) - added:
variable DeprecatedIn37
- changed:
class CertificateBuilder(object) → class CertificateBuilder - changed:
class CertificateRevocationListBuilder(object) → class CertificateRevocationListBuilder - changed:
class CertificateSigningRequestBuilder(object) → class CertificateSigningRequestBuilder - changed:
class RevokedCertificateBuilder(object) → class RevokedCertificateBuilder - changed:
constructor CertificateSigningRequestBuilder(subject_name: typing.Optional[Name]=…, extensions: typing.List[Extension[ExtensionType]]=…, attributes: typing.List[typing.Tuple[ObjectIdentifier, bytes]]=…) → constructor CertificateSigningRequestBuilder(subject_name: typing.Optional[Name]=…, extensions: typing.List[Extension[ExtensionType]]=…, attributes: typing.List[typing.Tuple[ObjectIdentifier, bytes, typing.Optional[int]]]=…) - changed:
method CertificateBuilder.sign(private_key: PRIVATE_KEY_TYPES, algorithm: typing.Optional[hashes.HashAlgorithm], backend: typing.Any=…) -> Certificate → method CertificateBuilder.sign(private_key: CERTIFICATE_PRIVATE_KEY_TYPES, algorithm: typing.Optional[hashes.HashAlgorithm], backend: typing.Any=…) -> Certificate - changed:
method CertificateRevocationList.is_signature_valid(public_key: PUBLIC_KEY_TYPES) -> bool → method CertificateRevocationList.is_signature_valid(public_key: CERTIFICATE_ISSUER_PUBLIC_KEY_TYPES) -> bool - changed:
method CertificateRevocationListBuilder.sign(private_key: PRIVATE_KEY_TYPES, algorithm: typing.Optional[hashes.HashAlgorithm], backend: typing.Any=…) -> CertificateRevocationList → method CertificateRevocationListBuilder.sign(private_key: CERTIFICATE_PRIVATE_KEY_TYPES, algorithm: typing.Optional[hashes.HashAlgorithm], backend: typing.Any=…) -> CertificateRevocationList - changed:
method CertificateSigningRequest.public_key() -> PUBLIC_KEY_TYPES → method CertificateSigningRequest.public_key() -> CERTIFICATE_PUBLIC_KEY_TYPES - changed:
method CertificateSigningRequestBuilder.add_attribute(oid: ObjectIdentifier, value: bytes) -> CertificateSigningRequestBuilder → method CertificateSigningRequestBuilder.add_attribute(oid: ObjectIdentifier, value: bytes, *, _tag: typing.Optional[_ASN1Type]=…) -> CertificateSigningRequestBuilder - changed:
method CertificateSigningRequestBuilder.sign(private_key: PRIVATE_KEY_TYPES, algorithm: typing.Optional[hashes.HashAlgorithm], backend: typing.Any=…) -> CertificateSigningRequest → method CertificateSigningRequestBuilder.sign(private_key: CERTIFICATE_PRIVATE_KEY_TYPES, algorithm: typing.Optional[hashes.HashAlgorithm], backend: typing.Any=…) -> CertificateSigningRequest
- changed:
class AccessDescription(object) → class AccessDescription - changed:
class DistributionPoint(object) → class DistributionPoint - changed:
class Extensions(object) → class Extensions - changed:
class GeneralNames(object) → class GeneralNames - changed:
class NoticeReference(object) → class NoticeReference - changed:
class PolicyInformation(object) → class PolicyInformation - changed:
class UserNotice(object) → class UserNotice - changed:
static method AuthorityKeyIdentifier.from_issuer_public_key(public_key: PUBLIC_KEY_TYPES) -> AuthorityKeyIdentifier → static method AuthorityKeyIdentifier.from_issuer_public_key(public_key: CERTIFICATE_ISSUER_PUBLIC_KEY_TYPES) -> AuthorityKeyIdentifier
- removed:
property NameAttribute.value -> str - changed:
class Name(object) → class Name - changed:
class NameAttribute(object) → class NameAttribute - changed:
class RelativeDistinguishedName(object) → class RelativeDistinguishedName - changed:
constructor NameAttribute(oid: ObjectIdentifier, value: str, _type=…, *, _validate=…) -> None → constructor NameAttribute(oid: ObjectIdentifier, value: typing.Union[str, bytes], _type: typing.Optional[_ASN1Type]=…, *, _validate: bool=…) -> None - added:
property NameAttribute.value -> typing.Union[str, bytes] - added:
static method Name.from_rfc4514_string(data: str) -> Name
- changed:
class OCSPRequestBuilder(object) → class OCSPRequestBuilder - changed:
class OCSPResponseBuilder(object) → class OCSPResponseBuilder - changed:
method OCSPResponseBuilder.sign(private_key: PRIVATE_KEY_TYPES, algorithm: typing.Optional[hashes.HashAlgorithm]) -> OCSPResponse → method OCSPResponseBuilder.sign(private_key: CERTIFICATE_PRIVATE_KEY_TYPES, algorithm: typing.Optional[hashes.HashAlgorithm]) -> OCSPResponse - added:
class OCSPSingleResponse - added:
method OCSPResponse.responses() -> typing.Iterator[OCSPSingleResponse] - added:
method OCSPSingleResponse.certificate_status() -> OCSPCertStatus - added:
method OCSPSingleResponse.hash_algorithm() -> hashes.HashAlgorithm - added:
method OCSPSingleResponse.issuer_key_hash() -> bytes - added:
method OCSPSingleResponse.issuer_name_hash() -> bytes - added:
method OCSPSingleResponse.next_update() -> typing.Optional[datetime.datetime] - added:
method OCSPSingleResponse.revocation_reason() -> typing.Optional[x509.ReasonFlags] - added:
method OCSPSingleResponse.revocation_time() -> typing.Optional[datetime.datetime] - added:
method OCSPSingleResponse.serial_number() -> int - added:
method OCSPSingleResponse.this_update() -> datetime.datetime