| Electronic Components Datasheet Search |
|
ATSHA204 Datasheet(PDF) 37 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
ATSHA204 Datasheet(HTML) 37 Page - ATMEL Corporation |
|
37 / 65 page ![]() Atmel ATSHA204 [DATASHEET] 37 8740D −CRYPTO−3/12 8.2 CheckMac Command The CheckMac command calculates a MAC response that would have been generated on a CryptoAuthentication device and compares that with an input value. It returns a Boolean to indicate the success or failure of the comparison. Prior to running this command, the Nonce and/or GenDig commands may have been optionally run to create a key or nonce value in TempKey. The input mode parameter determines the source of the “key” (the first 32 bytes of the SHA message) and “challenge/nonce” (the second 32 bytes of the SHA message). If the comparison matches, then the target EEPROM slot value may be copied into TempKey. If KeyID is even, then the target slot is KeyID+1, else the target slot is KeyID. For the copy to take place, the mode parameter to CheckMac must have a value of 0x01 and SlotConfig.ReadKey for the target key must be zero. When CheckMac is loaded in this manner, it will not be retained when the device enters the idle state Table 8-9. Input parameters Name Size Notes Opcode CHECKMAC 1 0x28 Param1 Mode 1 Bit 0: If zero, the second 32 bytes of the SHA message are taken from the input ClientChal parameter. If one, the second 32 bytes of the message are taken from TempKey. Bit 1: If zero, use key[KeyID] in first SHA block. If one, use TempKey. Bit 2: If Mode:0 or Mode:1 are set, then the value of this bit must match the value in TempKey.SourceFlag or the command will return an error. Bit 5: If one, use 64 bits of OTP zone in calculation. If zero, use 64 zeros. Bits 3-4 and 6-7: Must be zero. Param2 KeyID 2 Which internal key is to be used to generate the response. All but bits 0:3 are ignored. Data1 ClientChal 32 Challenge sent to client. If Mode:0 is one, then the value of this parameter will be ignored (though these 32 bytes MUST still appear in the input stream). Data2 ClientResp 32 Response generated by the client. Data3 OtherData 13 Remaining constant data needed for response calculation. Table 8-10. Output parameter Name Size Notes Result 1 Returns a single byte with a value of zero if ClientResp matches the internally computed digest, one if there is a mismatch. The message that will be hashed with the SHA-256 algorithm consists of the following information: 32 bytes key[KeyID] or TempKey (depending on mode) 32 bytes ClientChal or TempKey (depending on mode) 4 bytes OtherData[0:3] 8 bytes OTP[0:7] (or 0s depending on mode) 3 bytes OtherData[4:6] 1 byte SN[8] 4 bytes OtherData[7:10] 2 bytes SN[0:1] 2 bytes OtherData[11:12] |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |