Color scheme: Dark
You are here: start » en » Documentation » Post-Quantum Cryptography » WvdS Crypto Service overview » Reference » Error codes

Error codes

Both forms report failures with a code. The L4Re form uses numbers and the Windows form uses names; the two lists don't match one to one. This page lists every code with the situation in which the service currently sends it and the reaction that makes sense on the calling side.

L4Re form

The code is in the first 4 bytes of an error response's payload; see L4Re binary protocol.

ValueConstantWhenWhat to do
1WVDS_ERR_INVALID_HEADERinvalid header, length, level, or payload length field; HKDF output over 1024 bytes or empty IKMfix the request
2WVDS_ERR_INVALID_REQ_TYPEunknown, reserved, or not-built-in request typecheck the type and the service's build features
3WVDS_ERR_INVALID_KEY_IDnon-zero key_id on WVDS_REQ_DERIVE_KEYset key_id to 0
4WVDS_ERR_KEY_NOT_FOUNDWVDS_REQ_EXPORT_KEY for an unknown key ID or for a key without a public partcheck the key ID; regenerate after a restart
5WVDS_ERR_ENCRYPTION_FAILEDAES or ChaCha20 encryption failed, including unknown key ID or reused nonce; ML-KEM encapsulation failedcheck the key ID and nonce
6WVDS_ERR_DECRYPTION_FAILEDdecryption failed, including a wrong tag or unknown key ID; ML-KEM decapsulation failedtreat the data as untrusted
7WVDS_ERR_SIGNATURE_FAILEDsigning failed, including unknown key IDcheck the key ID
8WVDS_ERR_VERIFICATION_FAILEDverification couldn't be performed, for example because the public key is unusabletreat the data as unverified
9WVDS_ERR_INVALID_SIGNATUREnot sent at present; 0x11 reports an invalid signature as result 0–
10WVDS_ERR_ALLOCATION_FAILEDno room for the response in shared memoryretry later
65535WVDS_ERR_INTERNALkey generation, derivation, or sending failed, including a full key storecheck the service log

The code is a 32-bit field; the values themselves fit in 16 bits.

Windows form

The name is in the response's error.code field; see Windows JSON protocol.

NameWhen
INVALID_REQUESTthe line isn't valid JSON, operation is unknown, a required field is missing, or Base64 is invalid
INVALID_KEYthe public key isn't readable as Base64
INVALID_NONCEthe aes_decrypt nonce isn't exactly 12 bytes
INVALID_TAGthe aes_decrypt tag isn't exactly 16 bytes
KEY_NOT_FOUNDunknown key ID in aes_encrypt and aes_decrypt; export_public_key for an unknown key ID or an AES key
DECRYPTION_FAILEDthe tag doesn't match; the data was altered or the key is wrong
SIGNATURE_INVALIDverification couldn't be performed; an invalid signature is reported as valid: false without an error
UNSUPPORTED_ALGORITHMunknown algorithm or unknown level
RATE_LIMIT_EXCEEDEDmore than 60,000 requests in 60 seconds
INTERNAL_ERROReverything else, including unknown key ID in ml_dsa_sign and ml_kem_decapsulate, reused nonce, and a full key store

The names NONCE_REUSED, TIMEOUT, and SUCCESS are defined but not sent at present.

en/wiki/pqcrypt/svc/reference/error-codes.txt · Last modified: by Wolfgang van der Stille