ATSHA204A
Security Commands
Table 8-25. Input Parameters
Name
Size Notes
Opcode Nonce
1 0x16.
Param1 Mode
1 Controls the mechanism of the internal RNG and seed update.
Param2 Zero
2 Must be 0x0000.
Data
NumIn 20,32 Input value from system.
Table 8-26. Output Parameter
Name
Size Notes
RandOut 1 or 32 The output of the RNG or a single byte with a value of zero if Mode<0:1> is three.
If Mode<1:0> is 0b00 or 0b01, the input NumIn parameter must be 20 bytes long and the SHA-256
message body used to create the nonce stored internally in TempKey consists of the following:
32 bytes
20 bytes
1 byte
1 byte
1 byte
RandOut
NumIn from input stream
Opcode (always 0x16)
Mode
LSb of Param2 (should always be 0x00)
Upon completion of the command, TempKey.SourceFlag is set to “Rand.”
If Mode<1:0> is 0b11, this command operates in pass-through mode, the input parameter (NumIn) must
be 32 bytes long and TempKey is loaded with NumIn. No SHA-256 calculation is performed, no data is
returned to the system and TempKey.SourceFlag is set to “Input.”
If Mode<1:0> is 0b01, the automatic seed update is suppressed. See Section Random Number
Generator (RNG) for more details. Microchip recommends that Mode<1:0> is set to 0b00 for highest
security.
Table 8-27. Mode Encoding
Bits Meaning
7 – 2 Must be zero.
00 =
Combine the new random number with NumIn, store in TempKey. Automatically update EEPROM
seed only if necessary prior to random number generation. Recommended for highest security.
1–0
01 =
Combine the new random number with NumIn, store in TempKey. Generate random number using
existing EEPROM seed, do not update EEPROM seed.
10 = Invalid State
11 = Operate in the pass-through mode and write TempKey with NumIn. (Should be 32 bytes).
8.5.13
Pause Command
All devices on the bus for which the configuration Selector byte does not match the input selector
parameter go into the idle state. This command is used to prevent bus conflicts in a system that includes
multiple ATSHA204A devices sharing the same bus.
© 2018 Microchip Technology Inc.
DS40002025A-page 58