ID TECH SecureHead SPI with TMIV User Manual
Page | 23
4.14.1.
Review KSN (DUKPT Key management only)
Command:
<STX><R><51h><ETX><CheckSum>
This command gets the DUKPT key serial number and counter.
4.14.2.
Review Security Level
Command:
<STX><R><7Eh><ETX><CheckSum>
This command gets the current security level.
4.14.3.
Encrypt External Data Command
This command encrypts the data passed to the SecureHead and sends back the encrypted data to the
host. The command is valid when the security level is set to 3 or 4.
Command:
Host->Device:
Command:
<STX><41h><Length<Data to Be Encrypted><ETX><CheckSum>
Where:
<Length> is the 2-byte length of <Data to Be Encrypted> in hex, represented as <Length_L> and
<Length_H>
Device->Host:
Command:
<ACK><STX><Length><Encrypted Data>[SessionID]<KSN><ETX><LRC> (success)
or <NAK> (fail)
Where:
<Length> is the 2-byte length of <Encrypted Data>[SessionID]<KSN> in hex, represented as
<Length_L> and <Length_H>
[SessionID] is only used at security level 4; it is part of the encrypted data. No data in this field at
security level 3.
<KSN> is a 10 bytes string, in the case of fix key management, use serial number plus two bytes null
characters instead of KSN.
After each successful response, KSN will increment automatically.