ML-DSA
Category 2
NistyPQC.MLDSA.Category2.generate_keys — Functiongenerate_keys([; ξ])Return a tuple (; sk, pk) consisting of a secret key and the corresponding public key. The length of sk will be 2560 bytes and the length of pk 1312 bytes.
For a deterministic result, a seed ξ of 32 bytes can be provided.
NistyPQC.MLDSA.Category2.sign_message — Functionsign_message(msg, sk[; randomize])Return a signature sig computed from the message msg based on the secret key sk. The message msg may consist of arbitrarily many bytes, whereas sk must be a valid secret key of 2560 bytes. The length of sig will be 2420 bytes.
For a deterministic result, the optional parameter randomize can be set to false or to some given 32 bytes.
NistyPQC.MLDSA.Category2.verify_signature — Functionverify_signature(msg, sig, pk)Check whether sig is a valid signature for msg under the public key pk. The message msg and potential signature sig may consist of arbitrarily many bytes, whereas pk must be a valid public key of 1312 bytes.
Category 3
NistyPQC.MLDSA.Category3.generate_keys — Functiongenerate_keys([; ξ])Return a tuple (; sk, pk) consisting of a secret key and the corresponding public key. The length of sk will be 4032 bytes and the length of pk 1952 bytes.
For a deterministic result, a seed ξ of 32 bytes can be provided.
NistyPQC.MLDSA.Category3.sign_message — Functionsign_message(msg, sk[; randomize])Return a signature sig computed from the message msg based on the secret key sk. The message msg may consist of arbitrarily many bytes, whereas sk must be a valid secret key of 4032 bytes. The length of sig will be 3309 bytes.
For a deterministic result, the optional parameter randomize can be set to false or to some given 32 bytes.
NistyPQC.MLDSA.Category3.verify_signature — Functionverify_signature(msg, sig, pk)Check whether sig is a valid signature for msg under the public key pk. The message msg and potential signature sig may consist of arbitrarily many bytes, whereas pk must be a valid public key of 1952 bytes.
Category 5
NistyPQC.MLDSA.Category5.generate_keys — Functiongenerate_keys([; ξ])Return a tuple (; sk, pk) consisting of a secret key and the corresponding public key. The length of sk will be 4896 bytes and the length of pk 2592 bytes.
For a deterministic result, a seed ξ of 32 bytes can be provided.
NistyPQC.MLDSA.Category5.sign_message — Functionsign_message(msg, sk[; randomize])Return a signature sig computed from the message msg based on the secret key sk. The message msg may consist of arbitrarily many bytes, whereas sk must be a valid secret key of 4896 bytes. The length of sig will be 4627 bytes.
For a deterministic result, the optional parameter randomize can be set to false or to some given 32 bytes.
NistyPQC.MLDSA.Category5.verify_signature — Functionverify_signature(msg, sig, pk)Check whether sig is a valid signature for msg under the public key pk. The message msg and potential signature sig may consist of arbitrarily many bytes, whereas pk must be a valid public key of 2592 bytes.