Skip to main content

ML-DSA

These two basic cryptography operations allow the calculation and verification of the ML-DSA signatures.

Allowed usersUser✓Master✗ExtAuth✓
Required access scopekeymgmt:use:<KID>

where <KID> is a Key ID as a 32-character hexadecimal string

Sign​

Sign a message​

POSThttps://my.ence.do/api/crypto/pqc/mldsa/sign

Return an ML-DSA signature of the given message.

Headers​

NameTypeDescription
Authorization*StringBearer JWT_TOKEN
Content-Type*Stringapplication/json

Request Body​

NameTypeDescription
ctxStringBase64 encoded additional context data (max. 255 bytes)
kid*StringKey ID, 32 chars hex string
msg*StringData message to sign (max. 2048 bytes)

Response status code​

{
"sign": "4IzdVAZlsNHaUXGNaPMUg139TwnW5QB7WvVKA...22JTTnCHuZ1Z6sc2Hvz3WETWJ0ePKUVRJ5HzxDQ==",
"alg": "MLDSA44"
}

Response data for successful operation​

NameTypeDescription
signStringBase64 encoded signature
algStringML-DSA algorithm type represented by the kid

Possible alg values​

AlgorithmDescription
MLDSA44Regarding FIPS 204 ML-DSA-44 key
MLDSA65Regarding FIPS 204 ML-DSA-65 key
MLDSA87Regarding FIPS 204 ML-DSA-87 key

Log entries​

EventResultSource
LOG_TYPE_FAILED_SCOPE_CHECKLOG_RESULT_FAILED403
LOG_TYPE_CRYPTO_PQC_MLDSA_SIGNLOG_RESULT_ERROR400
LOG_TYPE_CRYPTO_PQC_MLDSA_SIGNLOG_RESULT_FAILED406
LOG_TYPE_CRYPTO_PQC_MLDSA_SIGNLOG_RESULT_OK200

Verify​

Verify the message signature​

POSThttps://my.ence.do/api/crypto/pqc/mldsa/verify

Verify the signature of the given message.

Headers​

NameTypeDescription
Authorization*StringBearer JWT_TOKEN
Content-Type*Stringapplication/json

Request Body​

NameTypeDescription
ctxStringBase64 encoded additional context data (max. 64 bytes)
kid*StringKey ID, 32 chars hex string
msg*StringData message to verify (max. 2048 bytes)
sign*StringSignature to validate returned by sign

Response status code​

No response body.

Log entries​

EventResultSource
LOG_TYPE_FAILED_SCOPE_CHECKLOG_RESULT_FAILED403
LOG_TYPE_CRYPTO_PQC_MLDSA_VERIFYLOG_RESULT_ERROR400
LOG_TYPE_CRYPTO_PQC_MLDSA_VERIFYLOG_RESULT_FAILED406
LOG_TYPE_CRYPTO_PQC_MLDSA_VERIFYLOG_RESULT_OK200