Status codes reference
Standard status words
SW |
Description |
|---|---|
|
Success. When secure channel is open, this is always the outer SW; the real SW is encrypted in the response data. |
|
Authentication failure. |
|
Wrong data length. |
|
Security status not satisfied. MAC verification failed — secure channel is aborted. Returned without MAC. |
|
Path not allowed (e.g., pinless path does not start with |
|
Invalid data (decryption failed, invalid public key). |
|
Conditions not satisfied (secure channel not open, PIN not verified, card not initialized, seed not loaded). |
|
Command not allowed (key slot already filled, PIN auth disabled, xpub at depth < 3). |
|
Incorrect data parameters (invalid format, bad PIN format, malformed path). |
|
Incorrect |
|
Referenced data not found (pinless path not set, clear pubkey read not allowed). |
|
Wrong parameters (invalid parent key, unknown |
|
Instruction not supported (e.g., |
|
PUK verification not successful (used in |
Secure channel status words
When the secure channel is open, all response status words are 0x9000 in the outer
(plaintext) APDU. The actual status word is the last 2 bytes of the decrypted response data.
The only exception is 0x6982, which indicates the secure channel has been aborted and is
returned in plaintext (without MAC).
See also
Secure channel for the full encryption/decryption process and MAC generation details.
PIN retry behavior
Counter |
Behavior |
|---|---|
Per-session (transient) |
3 tries per power cycle. After 3 failures, returns |
Persistent |
6 total tries across sessions. Depleted = PIN blocked, requires PUK to unblock. |
See also
VERIFY PIN and cmd-unblock-pin for the full APDU specifications.
PUK retry behavior
Counter |
Behavior |
|---|---|
Per-session (transient) |
12 tries per power cycle. After 12 failures, returns |
Persistent |
None. PUK tries are unlimited across power cycles. |
See also
Lifecycle management for details on card reset using the PUK.