MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DCP AES non-blocking driver

Overview

This section describes the programming interface of the DCP AES non-blocking driver.

Functions

status_t DCP_AES_EncryptEcbNonBlocking (DCP_Type *base, dcp_handle_t *handle, dcp_work_packet_t *dcpPacket, const uint8_t *plaintext, uint8_t *ciphertext, size_t size)
 Encrypts AES using the ECB block mode. More...
 
status_t DCP_AES_DecryptEcbNonBlocking (DCP_Type *base, dcp_handle_t *handle, dcp_work_packet_t *dcpPacket, const uint8_t *ciphertext, uint8_t *plaintext, size_t size)
 Decrypts AES using ECB block mode. More...
 
status_t DCP_AES_EncryptCbcNonBlocking (DCP_Type *base, dcp_handle_t *handle, dcp_work_packet_t *dcpPacket, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t *iv)
 Encrypts AES using CBC block mode. More...
 
status_t DCP_AES_DecryptCbcNonBlocking (DCP_Type *base, dcp_handle_t *handle, dcp_work_packet_t *dcpPacket, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t *iv)
 Decrypts AES using CBC block mode. More...
 

Function Documentation

status_t DCP_AES_EncryptEcbNonBlocking ( DCP_Type *  base,
dcp_handle_t handle,
dcp_work_packet_t dcpPacket,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size 
)

Puts AES ECB encrypt work packet to DCP channel.

Parameters
baseDCP peripheral base address
handleHandle used for this request.
[out]dcpPacketMemory for the DCP work packet.
plaintextInput plain text to encrypt.
[out]ciphertextOutput cipher text
sizeSize of input and output data in bytes. Must be multiple of 16 bytes.
Returns
kStatus_Success The work packet has been scheduled at DCP channel.
kStatus_DCP_Again The DCP channel is busy processing previous request.
status_t DCP_AES_DecryptEcbNonBlocking ( DCP_Type *  base,
dcp_handle_t handle,
dcp_work_packet_t dcpPacket,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size 
)

Puts AES ECB decrypt dcpPacket to DCP input job ring.

Parameters
baseDCP peripheral base address
handleHandle used for this request.
[out]dcpPacketMemory for the DCP work packet.
ciphertextInput cipher text to decrypt
[out]plaintextOutput plain text
sizeSize of input and output data in bytes. Must be multiple of 16 bytes.
Returns
kStatus_Success The work packet has been scheduled at DCP channel.
kStatus_DCP_Again The DCP channel is busy processing previous request.
status_t DCP_AES_EncryptCbcNonBlocking ( DCP_Type *  base,
dcp_handle_t handle,
dcp_work_packet_t dcpPacket,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size,
const uint8_t *  iv 
)

Puts AES CBC encrypt dcpPacket to DCP input job ring.

Parameters
baseDCP peripheral base address
handleHandle used for this request. Specifies jobRing.
[out]dcpPacketMemory for the DCP work packet.
plaintextInput plain text to encrypt
[out]ciphertextOutput cipher text
sizeSize of input and output data in bytes. Must be multiple of 16 bytes.
ivInput initial vector to combine with the first input block.
Returns
kStatus_Success The work packet has been scheduled at DCP channel.
kStatus_DCP_Again The DCP channel is busy processing previous request.
status_t DCP_AES_DecryptCbcNonBlocking ( DCP_Type *  base,
dcp_handle_t handle,
dcp_work_packet_t dcpPacket,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size,
const uint8_t *  iv 
)

Puts AES CBC decrypt dcpPacket to DCP input job ring.

Parameters
baseDCP peripheral base address
handleHandle used for this request. Specifies jobRing.
[out]dcpPacketMemory for the DCP work packet.
ciphertextInput cipher text to decrypt
[out]plaintextOutput plain text
sizeSize of input and output data in bytes. Must be multiple of 16 bytes.
ivInput initial vector to combine with the first input block.
Returns
kStatus_Success The work packet has been scheduled at DCP channel.
kStatus_DCP_Again The DCP channel is busy processing previous request.