Cryptnox Docs

SELECT Command

The SELECT command is documented in the ISO 7816-4 specifications and is used to
select the application on the card, making it the active one. The data field is the AID of the application. The card serial ID can be read with the GET_MNFTR_CERT which provides the card certificate signed by the manufacturer. The card serial is the serial of the provided X509 certificate.


def select(): card.select() # For example: select()

Application Protocol Data Unit (APDU) Components for SELECT Command

The following table outlines the components of the Application Protocol Data Unit (APDU).
FieldDescriptionValue
CLAThis field specifies the class of the instruction.0x00
INSThis field specifies the particular command or operation that the smart card or secure element should execute.0xA4
P1First parameter of the instruction that specifies the details about the operation being requested.0x04
P2First parameter of the instruction that specifies additional details about the operation being requested.0x00
DataKey datathe instance AID = 0xA0000010000112

Response

The following table outlines the possible responses that you will receive:

Response data : 24 bytes :

Response TypeDescription
Cryptnox Applet Type1 byte , “B” = Basic
Cryptnox Applet Version3 bytes for Major.Middle.Minor (ex 1.0.2)
Status Bytes

2 bytes short big-endian : bit 15 (first) = MSB, bit 0 (last)

= LSB,

0 = not/false, 1 = yes/true

  • bit 6 : Initialized
  • bit 5 : Seed (master seed, or EC pair loaded)
  • bit 4 : Pin Auth possible
  • bit 3 : Pinless enabled
  • bit 2 : xpub output enabled
  • bit 1 : clear read of the current public key enabled
  • All other bits are R.F.U. (will have clearpubkey)
PubKey Flags

2 bytes short big-endian : bit 15 (first) = MSB, bit 0 (last)

= LSB,

0 = not/false, 1 = yes/true

  • bit 0 : User Public Key #1 (ECDSA 256r1) is set up and active
  • bit 1 : User Public Key #2 (RSA 2048) is set up and active
  • bit 2 : User Public Key #3 (FIDO2) is set up and active
  • All other bits are R.F.U.
Custom Bytes

16 bytes

  • Written by Write Data FC 01 command
  • Set at 16 x 0x00 by default