New features
- Added the elliptic curve secp256k1 to
Crypto.PublicKey.ECC: key generation,
import and export, ECDSA withCrypto.Signature.DSS, and ECDH with
Crypto.Protocol.DH. - Added the mode
'sec1'toCrypto.Signature.DSS.new, for randomized ECDSA on all Weierstrass
curves. Mode'fips-186-3'does not accept secp256k1, which is not a curve of that standard. - GH#759: Added the parameter
low_stoCrypto.Signature.DSS.new, for ECDSA signatures
in the low-S form (for all curves): signing normalizess, and verifying rejects a highs. - ECDSA signatures in DER encoding are about 5-8x faster.
Resolved issues
ECC.import_keyraisedTypeErrorinstead ofValueErrorfor an OpenSSH public key
with an unsupported curve or key type, or with a malformed body.ECC.import_keyaccepted an OpenSSH key (public or private) whose curve did not match its key type.- GH#960: In HPKE, a message rejected by
unseal()consumed a sequence number, so all later
messages of that context failed too. The sequence number now only advances whenunseal()
succeeds (RFC 9180, Section 5.2). Thanks to Zulfareen Shaikh. - In HPKE, a
seal()that raised an exception also consumed a sequence number,
so the receiver could not unseal the messages that followed.