This command performs a full factory restoration of the card if the provided PUK is valid.
Table of Contents
Toggle⚠️ This command is destructive — ensure recovery backup exists before issuing.
def reset(PUK):
card.reset(PUK)
# For example:
reset(b"123456789012")
The following table outlines the components of the Application Protocol Data Unit (APDU). For detailed guidance, visit Cryptnox Documentation.
Field | Description | Value |
CLA | This field specifies the class of the instruction. | 0x80 |
INS | This field specifies the particular command or operation that the smart card or secure element should execute. | 0xFD |
P1 | First parameter of the instruction that specifies the details about the operation being requested. | Not used |
P2 | First parameter of the instruction that specifies additional details about the operation being requested. | Not used |
Data | Key data | PUK code (12 bytes) |
📘
Prerequisites
The secure channel must be open.
The following table outlines the possible responses that you will receive:
Response Code | Description |
0x9000 | Success |
0x63Cx | PUK invalid with x the number of remaining tries before a card power cycle is required |
0x63C0 | A card power cycle is required before to test next PUK try |
0x6A80 | data length is not PUK’s length |