This section describes the programming interface of the CAU3 TDES driver.
|
status_t | CAU3_TDES_CheckParity (CAU3_Type *base, cau3_key_slot_t keySlot) |
| Perform a 3DES key parity check. More...
|
|
status_t | CAU3_TDES_SetKey (CAU3_Type *base, cau3_handle_t *handle, const uint8_t *key, size_t keySize) |
| Load DES key into CAU3 key slot. More...
|
|
status_t | CAU3_TDES_Encrypt (CAU3_Type *base, cau3_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext) |
| Perform a 3DES encryption. More...
|
|
status_t | CAU3_TDES_Decrypt (CAU3_Type *base, cau3_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext) |
| Perform a 3DES decryption. More...
|
|
Performs a 3DES key parity check on three 8-byte keys. The function is blocking.
- Parameters
-
base | CAU3 peripheral base address |
keySlot | defines the key context to be used in the parity check |
- Returns
- status check from task completion
status_t CAU3_TDES_SetKey |
( |
CAU3_Type * |
base, |
|
|
cau3_handle_t * |
handle, |
|
|
const uint8_t * |
key, |
|
|
size_t |
keySize |
|
) |
| |
Load the key context into the private DMEM.
- Parameters
-
base | CAU3 peripheral base address. |
handle | Handle used for the request. |
key | 0-mod-4 aligned pointer to 3DES key. |
keySize | 3DES key size in bytes. Shall equal 24. |
- Returns
- status from set key operation
status_t CAU3_TDES_Encrypt |
( |
CAU3_Type * |
base, |
|
|
cau3_handle_t * |
handle, |
|
|
const uint8_t * |
plaintext, |
|
|
uint8_t * |
ciphertext |
|
) |
| |
Performs a 3DES "electronic code book" encryption on one 8-byte data block. The source plaintext and destination ciphertext can overlap in system memory. Supports both blocking and non-blocking task completion.
- Parameters
-
base | CAU3 peripheral base address. |
handle | Handle used for this request. |
plaintext | is source uint8_t array of data bytes, any alignment |
ciphertext | is destination uint8_t array of data byte, any alignment |
- Returns
- status check from task completion
status_t CAU3_TDES_Decrypt |
( |
CAU3_Type * |
base, |
|
|
cau3_handle_t * |
handle, |
|
|
const uint8_t * |
ciphertext, |
|
|
uint8_t * |
plaintext |
|
) |
| |
Performs a 3DES "electronic code book" decryption on one 8-byte data block. The source ciphertext and destination plaintext can overlap in sysMemory. Supports both blocking and non-blocking task completion.
- Parameters
-
base | CAU3 peripheral base address. |
handle | Handle used for this request. |
ciphertext | is destination uint8_t array of data byte, any alignment |
plaintext | is source uint8_t array of data bytes, any alignment |
- Returns
- status check from task completion