-
Added support of PBMAC1 for PKCS#12 integrity. Type
IntegrityParams
used in functionswriteP12File
andwriteP12FileToMemory
is modified. A low-level function for PBMAC1 is also available in the PKCS5 module. -
CMS now supports SHA-3 algorithms in HMAC, or as digest algorithm
-
Functions
pemToKey
,pemToPubKey
andpemToContentInfo
are modified to return error details when a PEM object cannot be read. The old API signature that discarded error details is available with functions renamedpemToKeyAccum
,pemToPubKeyAccum
andpemToContentInfoAccum
. -
Fixed encoding of some HMAC and PRF parameters
- Strict validation of GCM/CCM authentication tag length
- Add optional flag to use crypton instead of cryptonite
-
API change in PKCS5, PKCS8 and PKCS12 modules to handle better password-based encryption derived from an empty password. All encryption/decryption functions now expect an opaque
ProtectionPassword
data type. Conversion functionstoProtectionPassword
andfromProtectionPassword
are provided. Additionnally in the PKCS12 module, the typeOptProtected
is replaced withOptAuthenticated
when dealing with password integrity. Similarly at that level, functionrecover
is to be replaced withrecoverAuthenticated
. -
Added support for KMAC (Keccak Message Authentication Code) in CMS authenticated data, through constructors
KMAC_SHAKE128
andKMAC_SHAKE256
. -
CMS key agreement now supports derivation with HKDF along with X9.63. Data type
KeyAgreementParams
is modified to include a KDF instead of simply the digest algorithm. HKDF has assigned OIDs only for standard DH and cannot be used with cofactor DH. -
Added CMS utility functions to deal with the
signingTime
attribute. -
Changed
withSignerCertificate
validation callback API to include thesigningTime
value when available.
- Fix RC2 on big-endian architectures
- Fix buffer overrun in
pkcs12Derive
-
Added CMS fuctions
contentInfoToDER
andberToContentInfo
in order to generate and parse raw ASN.1. -
Implementation of AES key wrap had some optimizations.
-
SHAKE hash algorithms now allow arbitrary output lengths. Lengths that are very small decrease security. A protection is added so that attempts to use lengths which are too small fail, although the criteria are conservative. Generating and parsing content has no restriction.
-
Added functions
toNamedCredential
andfromNamedCredential
to handle PKCS#12 elements with an alias (friendly name). -
Functions
fromCredential
andfromNamedCredential
now generate PKCS#12 elements with thelocalKeyId
attribute. -
Function
toCredential
is now able to locate the leaf certificate and issuers more reliably. -
Algorithms X25519, X448, Ed25519 and Ed448 are now supported.
-
CMS functions
digestVerify
andverifySignedData
now return anEither
instead of aMaybe
. ErrorsDigestMismatch
andSignatureNotVerified
are added to report failures. -
CMS types
SignedData
,DigestedData
andAuthenticatedData
now retain the encapsulated content in encoded form (with type aliasEncapsulatedContent
) instead of a decoded and parsedContentInfo
. TheContentInfo
is parsed and provided only when successfully unwrapping the encapsulated type. -
The CMS interface is transformed to support detached content. CMS types now have a type parameter to distinguish between a direct reference to the encapsulated or encrypted content, and the
Encap
indirection which denotes an attached or detached content. Functions building CMS types do not return theContentInfo
directly anymore, but an intermediate type to be fed intotoAttachedCI
ortoDetachedCI
. Reverse transformation is possible with utility functionsfromAttached
andfromDetached
when unwrapping aContentInfo
.
- First version. Released on an unsuspecting world.