10.3 Commands
10.3.1 CEStatus
The Crypto Status byte CEStatus indicates the Crypto Engine state. 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 CryptoAesEncrypt(...) the buffer size must be multiple of
•
16 bytes
•
6: CRYP_API_ERROR. Any other error
10.3.2 CryptoSetKey
Command CryptoSetKey(...) sets a specific Key identified by KeyID into the Crypto Engine:
Table 10-2: CryptoSetKey Command
Byte
Data from Host
Data to Host
Table 10-3: CryptoSetKey Response
Byte
Data from Host
Data to Host
•
KeyID goes from 2 to 27, as defined in
•
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 thru to Key16 = 0x3c.
•
CEStatus is defined in section
LR1121
User Manual
Rev 1.1
UM.LR1121.W.APP
Mar 2023
0
1
2
0x05
0x02
KeyID (7:0)
IrqStatus
Stat1
Stat2
(31:24)
0
0x00
Stat1
Table 10-1: Cryptographic Keys Usage and
CEStatus on page
103.
www.semtech.com
3
4
Key1
Key2
IrqStatus
IrqStatus
(23:16)
(15:8)
1
0x00
CEStatus
Derivation. Other values are reserved.
5
...
Key3
...
Key16
IrqStatus
...
0x00
(7:0)
103 of 130
Proprietary & Confidential
18
Semtech