New features
- Added the mode
MODE_GCM_SIVtoCrypto.Cipher.AES(AES-GCM-SIV, RFC 8452),
for authenticated encryption that is resistant to the reuse of a nonce. - Added the mode
MODE_XTStoCrypto.Cipher.AES(IEEE 1619, NIST SP 800-38E),
for the encryption of storage. - CTR mode is about 35% faster on short
bytesmessages.
Breaking changes
export_keyof RSA and DSA keys raisesValueErrorfor a private key in the'OpenSSH'format,
like ECC keys. It used to silently return the public key, ignoring anypassphrase.
To export the public key, usekey.public_key().export_key('OpenSSH').
Resolved issues
- Security: the base64 body of a PEM block (for instance, a private key that is not encrypted)
was decoded withbinascii.a2b_base64, which looks up each character in a table, and could leak
the key through a cache side channel. The body is now decoded in constant time, and it is no longer
processed by Python string functions that look up characters in a table. Thanks to Li-Chung Chiang.