Repository navigation
Releases: misiektoja/go-pkcs7
Releases · misiektoja/go-pkcs7
Release list
v0.3.0
First release as github.com/misiektoja/go-pkcs7. It lists the changes since smallstep/pkcs7
v0.2.3. Algorithms are chosen per call through option structs. The defaults are SHA-256 and
AES-128-CBC. Weak or malformed input is refused. Code written for smallstep/pkcs7 needs the
changes under Changed and Removed.
Added
- RSASSA-PSS signature verification (RFC 4055).
VerifyOptionsset trust anchors, intermediates, the check time and required extended key
usages.SignerCertificatesverifies messages that leave out their signer certificate.EncryptOptionschoose the cipher and PKCS #1 v1.5 or RSAES-OAEP key transport.
DecryptOptionslist the ciphers a decryption accepts. DES-EDE3-CBC and AES-192-CBC are new.RecipientsandContentEncryptionAlgorithmreport who a message is encrypted for and
with which cipher.DegenerateCRL,RemoveCertificatesandSignerInfoConfig.SigningTimebuild the
message forms SCEP answers use.ParseOptions.LegacyCertificateParseraccepts certificates with a critical authority key
identifier.
Changed
- Module path
github.com/misiektoja/go-pkcs7. Go 1.27.3 or newer is required. VerifytakesVerifyOptionsand replacesVerifyWithChainandVerifyWithChainAtTime.
Chains are checked at the current time. SetVerifyAtSigningTimefor archived signatures.- Keys are
crypto.Signerandcrypto.Decrypter, so they can live in an HSM. - Signing uses SHA-256 and encryption uses AES-128-CBC by default. They were SHA-1 and DES-CBC.
The cipher constants are nowAES128CBC,AES192CBC,AES256CBC,DESEDE3CBCandDESCBC. - MD5 signatures and DES-CBC content are refused unless the options allow them.
- Every decryption failure returns
ErrDecryptionFailed, so a sender cannot tell which step
failed.
Removed
- AES-GCM content encryption and DSA. The AES-GCM encoding did not follow RFC 5084.
- Package-level settings
ContentEncryptionAlgorithm,KeyEncryptionAlgorithm,
KeyEncryptionHash,SetDefaultDigestAlgorithmand
SetFallbackLegacyX509CertificateParserEnabled. Use the option structs.
Fixed
- Signatures over unsorted signed attributes verify.
- RSAES-OAEP with SHA-256 names the matching MGF1 hash, so OpenSSL can decrypt it.
- PKCS #1 v1.5 key transport uses the RFC 3218 padding oracle countermeasure.
- Malformed input is refused: bad BER lengths, nesting deeper than 64 levels, trailing data,
repeated signed attributes and a content-type attribute that does not match the content.