Error Codes

This section defines standard error codes for PALISADE protocol errors.

14.1 Error Code Format

Error codes are 16-bit unsigned integers transmitted in error response messages.

struct ErrorResponse {
    u16 error_code;
    u16 details_len;
    opaque details[details_len];  // Optional human-readable description
}

Wire Format (ABNF):

ErrorResponse = error_code details_len details

error_code  = 2OCTET            ; Big-endian u16
details_len = 2OCTET            ; Big-endian u16 (length of details)
details     = *OCTET            ; Variable length human-readable description

14.2 Error Code Ranges

RangeCategory
0x0000ErrorNone (No error)
0x0100 - 0x01FFHandshake errors
0x0200 - 0x02FFSession errors
0x0300 - 0x03FFData plane errors
0x0400 - 0x04FFResumption errors
0x0500 - 0x05FFMigration errors
0x0600 - 0x06FFControl frame errors
0xFF00 - 0xFFFFGeneric errors

14.3 Defined Error Codes

Handshake Errors (0x0100 - 0x01FF)

CodeNameDescriptionFatal
0x0100ErrorInvalidVersionUnsupported protocol versionYes
0x0101ErrorUnsupportedKEMNo mutually supported KEM algorithmYes
0x0102ErrorUnsupportedSignatureNo mutually supported signature algorithmYes
0x0103ErrorUnsupportedAEADNo mutually supported AEAD algorithmYes
0x0104ErrorInvalidClientHelloMalformed ClientHello messageYes
0x0105ErrorInvalidServerHelloMalformed ServerHello messageYes
0x0106ErrorSignatureVerifyFailedSignature verification failedYes
0x0107ErrorCertificateInvalidInvalid or untrusted certificateYes
0x0108ErrorKEMDecapFailedKEM decapsulation failedYes

Session Errors (0x0200 - 0x02FF)

CodeNameDescriptionFatal
0x0200ErrorSessionNotFoundSession identifier not foundNo
0x0201ErrorSessionExpiredSession has expiredYes
0x0202ErrorSessionLimitExceededMaximum concurrent sessions exceededNo

Data Plane Errors (0x0300 - 0x03FF)

CodeNameDescriptionFatal
0x0300ErrorAEADDecryptFailedAEAD authentication tag verification failedNo
0x0301ErrorInvalidEpochPacket epoch does not match current epochNo
0x0302ErrorSequenceExhaustedSequence number space exhausted, rekey requiredYes
0x0303ErrorReplayDetectedReplayed packet detected (sequence seen before)No
0x0304ErrorTimestampInvalidPacket timestamp outside acceptable windowNo
0x0305ErrorPacketTooLargePacket or handshake message exceeds maximum allowed size (128,000 bytes for handshake messages, 65,535 bytes for data packets)No

Resumption Errors (0x0400 - 0x04FF)

CodeNameDescriptionFatal
0x0400ErrorTicketInvalidResumption ticket signature or decryption failedYes
0x0401ErrorTicketExpiredResumption ticket past expiration timeYes
0x0402ErrorTicketAlreadyUsedResumption ticket already consumedYes
0x0403ErrorEarlyDataRejected0-RTT early data not accepted by serverNo

Migration Errors (0x0500 - 0x05FF)

CodeNameDescriptionFatal
0x0500ErrorMigrationFailedMigration request failedNo
0x0501ErrorMigrationEpochMismatchMIGRATE frame epoch does not match currentNo
0x0502ErrorMigrationStaleTimestampMIGRATE frame timestamp too oldNo
0x0503ErrorInvalidMigrationReasonMIGRATE frame invalid reason codeNo
0x0504ErrorMigrationNonceReusedMIGRATE frame nonce matches last accepted nonce (replay)No
0x0505ErrorMigrationRateLimitExceededToo many migrations within time window (DoS protection)No
0x0506ErrorMigrationInProgressMigration already in progress, frame rejectedNo

Control Frame Errors (0x0600 - 0x06FF)

CodeNameDescriptionFatal
0x0600ErrorInvalidControlFrameMalformed control frameNo
0x0601ErrorUnknownControlTypeUnknown control frame typeNo

Generic Errors (0xFF00 - 0xFFFF)

CodeNameDescriptionFatal
0xFF00ErrorInternalErrorInternal protocol implementation errorYes
0xFF01ErrorResourceExhaustedServer resources exhausted (memory, connections)No

PALISADE Protocol Specification Draft 00

INFORMATIONAL