5.2.5.3 Verify - Validate and Invalidate
The Verify
command can be used to validate or invalidate
a public key. Only those public keys whose access policies require validation need
to go through this process. Prior to a public key being used to verify a signature,
it must be validated. If a validated public key needs to be updated, then it needs
to be invalidated prior to being written. Only internally stored public keys can be
validated or invalidated. The status of a public key is stored in the most
significant nibble of byte 0 of the public key slot.
For the ATECC608A-TFLXTLS device, Slot 14 contains a validated public key.
Procedure for Validating or Invalidating a Public Key
- Using GenKey, generate a digest of the public key to be validated or invalidated and store it in TempKey.
- OtherData[18:0] bytes must be the
same as the bytes that were used when calculating the original signature.
- OtherData[17][0] = 0 if you are going to validate the key
- OtherData[17][0] = 1 if you are going to invalidate the key
- This bit must match the
Mode[2] value of the
Verify Validate
orInvalidate
command or an error will occur.
Note: The message is created in the same manner as for the Internal mode of theSign
command, but it uses the OtherData[18:0] bytes. - Issue the
Verify Validate
orInvalidate
command, including the signature R and S values and the OtherData bytes. - Upon successful validation or invalidation, a code of 0x00 will be returned and bits [7:4] of the LSB of the slot will be set.
Opcode |
Mode |
Key ID | Data Field (83 Bytes) | Comment | |
---|---|---|---|---|---|
Signature |
Other Data(1) | ||||
0x45 | 0x03 | 0x00 0[Slot] |
R value | OtherData[17][0] = 0 |
Validates public key |
0x07 | 0x00 0[Slot] |
R Value | OtherData[17][0] = 1 |
Invalidates public key |
- Other Data byte values must align with the data used to generate the original message.
Name | Size | Description |
---|---|---|
Response | 1 byte |
|
ValidateNibble of Public Key | 4 bits. | Slot[n][0] [7:4] will be updated of the public
key
|
32 bytes |
TempKey digest of the PublicKey (must be generated by GenKey) |
- These bytes should match the bytes used in the original message that generated the signature. The original message calculation can be found in Section Internal Message Generation. The only exception is for bit 0 of byte 17, as described above.