MCUXpresso SDK API Reference Manual  Rev 2.15.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
CAU3 TDES driver

Overview

This section describes the programming interface of the CAU3 TDES driver.

Functions

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...
 

Function Documentation

status_t CAU3_TDES_CheckParity ( CAU3_Type *  base,
cau3_key_slot_t  keySlot 
)

Performs a 3DES key parity check on three 8-byte keys. The function is blocking.

Parameters
baseCAU3 peripheral base address
keySlotdefines 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
baseCAU3 peripheral base address.
handleHandle used for the request.
key0-mod-4 aligned pointer to 3DES key.
keySize3DES 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
baseCAU3 peripheral base address.
handleHandle used for this request.
plaintextis source uint8_t array of data bytes, any alignment
ciphertextis 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
baseCAU3 peripheral base address.
handleHandle used for this request.
ciphertextis destination uint8_t array of data byte, any alignment
plaintextis source uint8_t array of data bytes, any alignment
Returns
status check from task completion