P1 = 0x00 → XPUB Output
Table of Contents
ToggleP1 = 0x01 → Clear Public Key Output
def set_pubexport(status, P1, PUKb):
card.set_pubexport(status, P1, PUKb)
# For example:
set_pubexport(True, 0, b"123456789012")
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.
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 |