ATSHA204A
Security Commands
2. A subsequent Read or Write command can use the digest to provide authentication and/or
confidentiality for the data, in which case it is known as a data protection digest.
3. This command can be used for secure personalization by using a value from the transport key
array. The resulting data protection digest would then be used by the Write Command.
If zone is two (Data) and SlotID is less than or equal to 15, the GenDig command sets
TempKey.GenData to one and TempKey.SlotID to the input SlotID; otherwise, TempKey.GenData is set to
zero.
Regardless of how the resulting digest is computed, it can never be read from the device.
If TempKey.Valid is invalid, this command returns an error. Upon command completion, the
TempKey.Valid bit is set, indicating that a digest has been loaded and is ready for use. The
TempKey.Valid bit is cleared when the next command is executed. See Section Static RAM (SRAM) for
details.
For all SlotID values less than 0x8000, the device uses the least-significant four bits of SlotID to
determine the slot number from which to retrieve the key value from the Data zone of the EEPROM.
SlotID values above 0x8000 reference keys stored in the masks of the design. In any event, all 16 bits of
SlotID as input to the device are used as Param2 in the SHA-256 calculation.
If the zone parameter points to the Configuration zone, then this command returns an error if the
Configuration zone is unlocked.
When the key specified on input to GenDig has the CheckOnly bit set, GenDig can be used to generate
ephemeral keys matching those generated on Client CryptoAuthentication devices using the DeriveKey
command. Keys that have the CheckOnly bit set represent situations in which the device is acting as a
Host. In this case, the opcode and parameter bytes that would normally be included in the SHA
calculation are replaced with bytes from the input stream.
Table 8-15. Input Parameters
Name
Opcode GenDig
Param1 Zone
Size Notes
1 0x15
If 0x00 (Config), then use SlotID to specify either the first (SlotID=0) or second
(SlotID = 1) 256-bit block of the Configuration zone.
If 0x01 (OTP), then use SlotID to specify either the first or second 256-bit block of the
1 OTP zone.
If 0x02 (Data), then SlotID specifies a slot in the Data zone or a transport key in the
hardware array.
All other values are reserved and must not be used.
Param2 SlotID
2 Identification number of the key to be used, or selection of which OTP block.
Data
OtherData
4 or 0
Four bytes of data for SHA calculation when using a CheckOnly key; otherwise
ignored.
Table 8-16. Output Parameter
Name
Size Notes
Success
1 Upon successful execution, the ATSHA204A returns a value of zero.
© 2018 Microchip Technology Inc.
DS40002025A-page 52