v0.1.35
The biggest change in this release is the Cert/Tsk split.
Previously, the Cert class was used for both certificates (containing only public parts) and TSKs (secret keys).
The Tsk class was obtained through the secrets accessor of the Cert.
For better security, ergonomics, and alignment with the Stateless OpenPGP specification, this has been reversed:
Tsk.from_*functions are available for reading secret keys- A
Certcan be extracted from aTskvia theextract_certificatefunction
Note that all old APIs continue to work and will trigger deprecation warnings with migration suggestions. There are no plans to remove the old APIs, and we have tests to verify that they continue to work.
In the long term, this will ensure that handing a Cert object to a different function will not allow it to elevate privileges and extract secret components.
Code that explicitly deals with sensitive key material in the form of Tsk will also be easier to spot.
Tsks are, by design, quite limited in features and do not try to mimic Certs.
This is a step towards a future of non-software keys, where the signer or decryptor may live in an HSM.
More details are available in the issue comment.
New:
Tsknow supports__bytes__and__repr__#73verifynow supports compressed signatures #77Cert.generatehas a new option to control expiration:validity_seconds#75Packetnow supports__bytes__to get the full serialized packet #85- Post-quantum cryptography (PQC) support via sequoia-openpgp 2.4:
PublicKeyAlgorithmnow includes PQC variants (ML-DSA, SLH-DSA, ML-KEM)- New
CipherSuiteenum forTsk.generate()with PQC presets (MLDSA65_Ed25519,MLDSA87_Ed448) - New
SigningAlgorithmandEncryptionAlgorithmenums for fine-grained algorithm selection (e.g. SLH-DSA signing with classical encryption)
Fixed:
Packet.bodynow returns just the body bytes without the tag and length header #85
Changed:
Tsk.generate(validity_seconds)defaults toNone#89