12.3 Commands
12.3.1 CEStatus
The Crypto Status Byte CEStatus indicates the state Crypto Engine. It is returned after each command invoking the Crypto
Engine.
CEStatus:
•
0: CRYP_API_SUCCESS. The previous command was successful.
•
1: CRYP_API_FAIL_CMAC. MIC (first 4 bytes of the CMAC) comparison failed.
•
2: RFU.
•
3: CRYP_API_INV_KEY_ID. Key/Param Source or Destination ID error
•
4: RFU.
•
5: CRYP_API_BUF_SIZE. Data buffer size is invalid. For the CryptoAesEncrypt( ), the command the buffer size must be
multiple of 16 Bytes.
•
6: CRYP_API_ERROR. Any other error.
12.3.2 CryptoSetKey
The command CryptoSetKey( ) sets a specific Key identified by KeyID into the Crypto Engine:
Table 12-2: CryptoSetKey Command
Byte
Data from Host
Data to Host
Table 12-3: CryptoSetKey Response
Byte
Data from Host
Data to Host
•
KeyID goes from 1 to 27, as defined in
device internal firmware to avoid overwriting the pre-provisioned keys.
•
Key is an array of bytes as defined in the FIPS-197. With the key K (2b7e1516 28aed2a6abf71588 09cf4f3c) provided in
test vectors of the rfc4493 we then have Key1 = 0x2b, Key2 = 0x7e, Key3 = 0x15, Key4 = 0x16 , ... , Key16 = 0x3c.
•
CEStatus is defined in section
LR1110
User Manual
Rev.1.0
UM.LR1110.W.APP
March 2020
0
1
2
0x05
0x02
KeyID (7:0)
IrqStatus
Stat1
Stat2
(31:24)
0
1
0x00
0x00
Stat1
CEStatus
Table 12-1: Cryptographic Keys Usage and
CEStatus on page
107.
www.semtech.com
3
4
Key1
Key2
IrqStatus
IrqStatus
(23:16)
(15:8)
Derivation. KeyID 0 is blocked by
5
...
Key3
...
Key16
IrqStatus
...
0x00
(7:0)
107 of 130
18
Semtech