Skip to content

Upgrading cryptography 0.5 to 0.6

Breaking0.5.4 → 0.6.1Breaking1Deprecated1New4Changed1Fixed3Other1

BreakingUpgrade verdict

1 breaking change.

  • Code that passed salt_length when creating MGF1 must now pass it to PSS instead.
  • Two older key-loading functions are deprecated; use the new load_elliptic_curve_private_numbers and load_elliptic_curve_public_numbers methods instead.
2 items need code or config changes
Breaking1
Removes the deprecated salt_length argument from the MGF1 constructor; pass salt_length to PSS instead.
cryptography.hazmat.primitives.asymmetric.padding.MGF1cryptography.hazmat.primitives.asymmetric.padding.PSSsalt_length
Deprecated1
Deprecates elliptic_curve_private_key_from_numbers and elliptic_curve_public_key_from_numbers in favor of load_elliptic_curve_private_numbers and load_elliptic_curve_public_numbers on…
elliptic_curve_private_key_from_numberselliptic_curve_public_key_from_numbersload_elliptic_curve_private_numbersload_elliptic_curve_public_numbersEllipticCurveBackend

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • removed: export CommonCryptoBinding
  • removed: export OpenSSLBinding
  • removed: method EllipticCurveBackend.elliptic_curve_private_key_from_numbers(numbers)
  • removed: method EllipticCurveBackend.elliptic_curve_public_key_from_numbers(numbers)
  • added: class PEMSerializationBackend(object)
  • added: method EllipticCurveBackend.load_elliptic_curve_private_numbers(numbers)
  • added: method EllipticCurveBackend.load_elliptic_curve_public_numbers(numbers)
  • added: method PEMSerializationBackend.load_pem_private_key(data, password)
  • added: method PEMSerializationBackend.load_pem_public_key(data)
  • added: method MultiBackend.load_dsa_private_numbers(numbers)
  • added: method MultiBackend.load_dsa_public_numbers(numbers)
  • added: method MultiBackend.load_elliptic_curve_private_numbers(numbers)
  • added: method MultiBackend.load_elliptic_curve_public_numbers(numbers)
  • added: method MultiBackend.load_pem_private_key(data, password)
  • added: method MultiBackend.load_pem_public_key(data)
  • added: method Backend.load_elliptic_curve_private_numbers(numbers)
  • added: method Backend.load_elliptic_curve_public_numbers(numbers)
  • added: method Backend.load_pem_private_key(data, password)
  • added: method Backend.load_pem_public_key(data)
  • removed: static method Binding.is_available()
  • removed: static method Binding.is_available()
  • changed: constructor MGF1(algorithm, salt_length=…) → constructor MGF1(algorithm)
  • changed: constructor PSS(mgf, salt_length=…) → constructor PSS(mgf, salt_length)
  • removed: variable FUNCTIONS
  • removed: variable TYPES
  • added: class EllipticCurvePrivateKeyWithNumbers(EllipticCurvePrivateKey)
  • added: class EllipticCurvePublicKeyWithNumbers(EllipticCurvePublicKey)
  • added: method EllipticCurvePrivateKeyWithNumbers.private_numbers()
  • added: method EllipticCurvePublicKeyWithNumbers.public_numbers()
  • added: function load_pem_private_key(data, password, backend)
  • added: function load_pem_public_key(data, backend)
  • removed: variable DeprecatedIn04
  • added: variable DeprecatedIn06