MLDSA44Sign

Cryptography

Description

Creates a 2420-byte ML-DSA-44 signature for a message and optional context

Syntax

Delphi

Function MLDSA44Sign(Const SecretKey, Message, Context, Rnd: AnsiString; Out Signature: AnsiString): Boolean;

Return values

True when SecretKey is 2560 bytes, Rnd is 32 bytes, Context is at most 255 bytes and a valid signature is produced
False for invalid lengths or when the bounded rejection-sampling budget is exhausted; Signature remains empty

Remarks

Use fresh unpredictable Rnd bytes for hedged signing, which is the recommended mode. All-zero Rnd selects deterministic signing and must not be reused as a substitute for entropy. The message and context are domain-separated as required by FIPS 204

Example

if MLDSA44Sign(SecretKey, Message, Context, Rnd, Signature) then
  Send(Message, Signature);

See also

MLDSA44KeyGen, MLDSA44Verify