5.3.4.3 GenDig - Data

Data from the Data zone slots can be included in the GenDig calculation. Data are always included in 32-byte blocks and only the lowest block of a slot is included in the GenDig calculation. The Nonce command must be run prior to the first GenDig command to load a value into TempKey. If the slot requires a random nonce, then the data must be generated by the Nonce command versus passing it into the device. Subsequent GenDig commands will use the value from the previous GenDig operation.

If a slot is set for NoMAC, then it is not allowed to use the output of this GenDig in a MAC command. If multiple GenDigs are run, if any slot has NoMAC set, then the output in TempKey cannot be used in executing a MAC command.

Table 5-73. Input Parameters - GenDig Data

Opcode
(1 Byte)

Mode
(1 Byte)

KeyID(1)
(2 Bytes)

Data
(0 or 4 Bytes)

Description
0x150x020x00 0[Slot]Use data from slot # in the calculation.
0x00 0[Slot]4 bytesUse data from slot # in the calculation and other data when using a NoMAC key slot
Note:
  1. KeyId specifies the Data zone slot to be used in the TempKey calculation. Only the lowest 32 bytes will be used.
Table 5-74. Output Response - GenDig Data
NameSizeDescription
Response1 byte

0x00 - If successful.

Error code - If the command fails.

Note: Flag Bits
  1. TempKey.Valid flag will be set to 1 if successful, otherwise it is 0.
  2. TempKey.GenDigData will be set to 1 indicating a DataZone slot was used in the calculation.
  3. TempKey.KeyID will set to the slot specified in the command.
  4. TempKey.NoMacFlag will be set to 0 if the MAC command is allowed and 1 if it is not.
Table 5-75. TempKey Calculation - GenDig Data
SizeParameters - MACParameters - NoMAC
32 bytesDATA.slot[KeyID]DATA.slot[KeyID]
4 byteOpcode, Mode, KeyID = 0x15, 0x02, 0x0[Slot] 0x00OtherData[0:3]
1 byteSN[8] = Varies by vendorSN[8] = Varies by vendor
2 bytesSN[0:1] = 0x01 0x23SN[0:1] = 0x01 0x23
25 bytesAll ZerosAll Zeros
32 bytesTempKey.ValueTempKey.Value