Note: Signing prehashed data with LMS keys
When creating an LMS signature, the first step is to hash the message with a prefix that is unknown to the caller (see RFC8554, algorithm 3). As the caller cannot precompute this value, DSM follows different semantics for prehashed data. Namely, when the hash field is used, DSM will check the length of the digest and then feed it as raw data for the LMS signature generation.
Consequently, if you hash your data using an algorithm such as SHA256
and then supply this digest to the LMS signing API (putting prehashed
data in the hash
field), DSM interprets the provided digest as raw
data, and verification of the signature should be conducted accordingly.
Uniquely identifies a persisted or transient sobject.
Type of security object.
A hash algorithm.
Hashed data to be signed. Either hash
or data
should be specified;
it is an error to specify both or none.
Hash should be base64 encoded.
Data to be signed. Either hash
or data
should be specified; it is
an error to specify both or none.
Data should be base64 encoded.
Signature mechanism
Specifies the Mask Generating Function (MGF) to use.
A hash algorithm.
Whether signatures should be deterministic. Defaults to false. If specified, the value must be compatible with the key's settings.
The context parameter to be provided to the sign algorithm.
Currently only ML-DSA keys accept a context parameter; this parameter must not be specified for any other key types.
Success result
The ID of the key used for signing. Returned for non-transient keys
Signed data