Cryptnox Docs

Set Pub Export Command

This command controls public key export capabilities:

P1 = 0x00 → XPUB Output

  • Enables or disables extended public key (XPUB) export.
  • If the first byte of Data is >0, XPUB export is enabled.
  • If the first byte is 0x00, XPUB export is disabled.

P1 = 0x01 → Clear Public Key Output

  • Enables or disables public key output without requiring PIN or secure channel.
  • If the first byte is >0, the public key becomes readable without auth.
  • If 0x00, public key readout is disabled again.
  • A valid PUK must be included.
Both features are disabled by default after factory reset or card reset.

def set_pubexport(status, P1, PUKb): card.set_pubexport(status, P1, PUKb) # For example: set_pubexport(True, 0, b"123456789012")

Application Protocol Data Unit (APDU) Components for Set Pub Export

The following table outlines the components of the Application Protocol Data Unit (APDU) used in Set Pub Export. Learn more in our 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.

0xC5

P1

First parameter of the instruction that specifies the details about the operation being requested.

0x00 : XPUB capability

0x01 : clear pubkey reading

P2

First parameter of the instruction that specifies additional details about the operation being requested.

0x00

Data

Key data

1 bytes status | PUK

📘

Prerequisites

The secure channel must be open and a seed must be loaded into the card. The PUK must be valid and provided in the Data field.

Response

The following table outlines the possible responses that you will receive during the set pub export process:

Response Code

Description

0x9000

Success

0x63Cx

PUK not validated

0x6A80

the data length is not PUK’s length plus one

0x6985

no seed or extkey loaded

0x6A86

P1 is not 0/1