5.3.2 CheckMac
Command
The CheckMac
command calculates a MAC response that would
have been generated on a different CryptoAuthentication™ (ATECC608B, ATECC508A, ATSHA204A) device and then compares the result with the
input value. The command returns a boolean result to indicate the success or failure of
the comparison.
If a value in TempKey is used as an input to the CheckMac
,
then a Nonce
and/or GenDig
command must be run prior
to the CheckMac
command.
Opcode |
Mode |
KeyID |
Data | Description |
---|---|---|---|---|
0x28 | 0x00 | 0x00 0[Slot] |
| |
0x01 | 0x00 0[Slot] |
| Use if TempKey.SourceFlag was random | |
0x05 | 0x00 0[Slot] | Use if TempKey.SourceFlag was fixed | ||
0x02 | 0x00 00 |
| Use if TempKey.SourceFlag was random | |
0x06 | 0x00 00 | Use if TempKey.SourceFlag was fixed |
Note:
- OtherData[0:12] values must match
the values used in the original
MAC
command. - For modes other than 0x00, Mode[2] must match the TempKey.SourceFlag.
Name | Size | Description |
---|---|---|
Response | 1 byte |
|
# of Bytes | Mode 0x00 | Mode 0x01 or 0x05 | Mode 0x02 or 0x06 |
---|---|---|---|
32 | Key[KeyID] | Key[KeyID] | TempKey |
32 | Input Client Challenge | TempKey | Input Client Challenge |
4 | OtherData[0:3] | OtherData[0:3] | OtherData[0:3] |
8 | Zeros | Zeros | Zeros |
3 | OtherData[4:6] | OtherData[4:6] | OtherData[4:6] |
1 | SN[8] = Varies by vendor | SN[8] = Varies by vendor | SN[8] = Varies by vendor |
4 | OtherData[7:10] | OtherData[7:10] | OtherData[7:10] |
2 | SN[0:1] = 0x01 0x23 | SN[0:1] = 0x01 0x23 | SN[0:1] = 0x01 0x23 |
2 | OtherData[11:12] | OtherData[11:12] | OtherData[11:12] |