Private Key - Stored in Slot

The GenKey command can be used to generate an ECC P256 private key and store it in a data slot that has been so designated as holding an ECC private key. When this command is run, the corresponding ECC public key is also generated. If the slot has been locked, this command returns an error. On rare occasions an invalid ECC private key is generated and this too will cause an error.

For the ATECC608A-TNGTLS, the GenKey command can be used to generate private keys only in Slots 2, 3 and 4. Authorization is not required prior to updating these keys.

Table 1. Input Parameters - Private Key Stored in Slot

Opcode
(1 Byte)

Mode
(1 Byte)

KeyID
(2 Bytes)

OtherData
(0 Bytes)

Description
0x40 0x04 0x00 0[Slot]
  • Private key stored in [Slot]
  • Public key generated and output on the bus
0x40 0x0C 0x00 0[Slot]
  • Private key stored in [Slot]
  • Public key generated and output on the bus
  • Public key digest is generated and stored in TempKey
Table 2. Output Response - Private Key Stored in Slot
Name Size Response
Response 1 byte
  • ECC Fault Code if command fails
64 bytes
  • Public keys X and Y coordinate the command’s success