The Generate Key command is used to create cryptographic key pairs within the Cryptnox smart card, ensuring that private keys are generated and stored securely without ever leaving the card. This process is fundamental for various security applications, including SSH authentication and hardware wallet functionalities.
The following code snippet outlines the Python object for this command:
def generate_seed(pin: str) -> bytes:
# Generate new seed on the card
card.generate_seed(pin)
For example, generate_seed administration(“1234”).
Application Protocol Data Unit (APDU) Components
The following table outlines the components of the Application Protocol Data Unit (APDU).
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. | 0xD4 |
P1 | First parameter of the instruction that specifies the details about the operation being requested. | 0x00 |
P2 | First parameter of the instruction that specifies additional details about the operation being requested. | 0x00 |
Data | Key data | PIN (if no user auth, 9 bytes 0x00 right-padded). Refer to the ‘Data Values’ table below for more conditions around this field. |
📘 Prerequisites
Response
The following table outlines the possible responses that you will receive:
Response Code | Description |
0x9000 | Success |
0x63Cx | PIN is not valid. |
0x6986 | A key/seed administration is already loaded. We recommend performing a reset if you receive this response. |
📘 Note