Cryptnox Docs

Reset Command

This command performs a full factory restoration of the card if the provided PUK is valid.

  • If the encrypted PUK is correct, the card is restored:
    • All data, including keys, pairing, and state, will be permanently deleted.
    • Cannot be recovered unless restored from an external mnemonic or seed backup (see BIP39 Seed Backup Guide).
  • If a power loss occurs during reset:
    • Blockchain keys may be wiped, but other states may remain.
    • Card status could become: seeded = false, initialized = true.
    • In this case, either:
      • Run the restore command again to fully wipe, or
      • Generate/load new keys to continue using the card.

⚠️ This command is destructive — ensure recovery backup exists before issuing.


def reset(PUK): card.reset(PUK) # For example: reset(b"123456789012")

Application Protocol Data Unit (APDU) Reset Components

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.

Response

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