RTEMS 6.1-rc1
|
Macros | |
#define | DCP_AES_BLOCK_SIZE 16 |
Functions | |
status_t | DCP_AES_SetKey (DCP_Type *base, dcp_handle_t *handle, const uint8_t *key, size_t keySize) |
Set AES key to dcp_handle_t struct and optionally to DCP. More... | |
status_t | DCP_AES_EncryptEcb (DCP_Type *base, dcp_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size) |
Encrypts AES on one or multiple 128-bit block(s). More... | |
status_t | DCP_AES_DecryptEcb (DCP_Type *base, dcp_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size) |
Decrypts AES on one or multiple 128-bit block(s). More... | |
status_t | DCP_AES_EncryptCbc (DCP_Type *base, dcp_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[16]) |
Encrypts AES using CBC block mode. More... | |
status_t | DCP_AES_DecryptCbc (DCP_Type *base, dcp_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[16]) |
Decrypts AES using CBC block mode. More... | |
#define DCP_AES_BLOCK_SIZE 16 |
AES block size in bytes
status_t DCP_AES_DecryptCbc | ( | DCP_Type * | base, |
dcp_handle_t * | handle, | ||
const uint8_t * | ciphertext, | ||
uint8_t * | plaintext, | ||
size_t | size, | ||
const uint8_t | iv[16] | ||
) |
Decrypts AES using CBC block mode.
Decrypts AES using CBC block mode. The source ciphertext and destination plaintext can overlap in system memory.
base | DCP peripheral base address | |
handle | Handle used for this request. | |
ciphertext | Input cipher text to decrypt | |
[out] | plaintext | Output plain text |
size | Size of input and output data in bytes. Must be multiple of 16 bytes. | |
iv | Input initial vector to combine with the first input block. |
brief Decrypts AES using CBC block mode.
Decrypts AES using CBC block mode. The source ciphertext and destination plaintext can overlap in system memory.
param base DCP peripheral base address param handle Handle used for this request. param ciphertext Input cipher text to decrypt param[out] plaintext Output plain text param size Size of input and output data in bytes. Must be multiple of 16 bytes. param iv Input initial vector to combine with the first input block. return Status from decrypt operation
status_t DCP_AES_DecryptEcb | ( | DCP_Type * | base, |
dcp_handle_t * | handle, | ||
const uint8_t * | ciphertext, | ||
uint8_t * | plaintext, | ||
size_t | size | ||
) |
Decrypts AES on one or multiple 128-bit block(s).
Decrypts AES. The source ciphertext and destination plaintext can overlap in system memory.
base | DCP peripheral base address | |
handle | Handle used for this request. | |
ciphertext | Input plain text to encrypt | |
[out] | plaintext | Output cipher text |
size | Size of input and output data in bytes. Must be multiple of 16 bytes. |
brief Decrypts AES on one or multiple 128-bit block(s).
Decrypts AES. The source ciphertext and destination plaintext can overlap in system memory.
param base DCP peripheral base address param handle Handle used for this request. param ciphertext Input plain text to encrypt param[out] plaintext Output cipher text param size Size of input and output data in bytes. Must be multiple of 16 bytes. return Status from decrypt operation
status_t DCP_AES_EncryptCbc | ( | DCP_Type * | base, |
dcp_handle_t * | handle, | ||
const uint8_t * | plaintext, | ||
uint8_t * | ciphertext, | ||
size_t | size, | ||
const uint8_t | iv[16] | ||
) |
Encrypts AES using CBC block mode.
Encrypts AES using CBC block mode. The source plaintext and destination ciphertext can overlap in system memory.
base | DCP peripheral base address | |
handle | Handle used for this request. | |
plaintext | Input plain text to encrypt | |
[out] | ciphertext | Output cipher text |
size | Size of input and output data in bytes. Must be multiple of 16 bytes. | |
iv | Input initial vector to combine with the first input block. |
brief Encrypts AES using CBC block mode.
Encrypts AES using CBC block mode. The source plaintext and destination ciphertext can overlap in system memory.
param base DCP peripheral base address param handle Handle used for this request. param plaintext Input plain text to encrypt param[out] ciphertext Output cipher text param size Size of input and output data in bytes. Must be multiple of 16 bytes. param iv Input initial vector to combine with the first input block. return Status from encrypt operation
status_t DCP_AES_EncryptEcb | ( | DCP_Type * | base, |
dcp_handle_t * | handle, | ||
const uint8_t * | plaintext, | ||
uint8_t * | ciphertext, | ||
size_t | size | ||
) |
Encrypts AES on one or multiple 128-bit block(s).
Encrypts AES. The source plaintext and destination ciphertext can overlap in system memory.
base | DCP peripheral base address | |
handle | Handle used for this request. | |
plaintext | Input plain text to encrypt | |
[out] | ciphertext | Output cipher text |
size | Size of input and output data in bytes. Must be multiple of 16 bytes. |
brief Encrypts AES on one or multiple 128-bit block(s).
Encrypts AES. The source plaintext and destination ciphertext can overlap in system memory.
param base DCP peripheral base address param handle Handle used for this request. param plaintext Input plain text to encrypt param[out] ciphertext Output cipher text param size Size of input and output data in bytes. Must be multiple of 16 bytes. return Status from encrypt operation
status_t DCP_AES_SetKey | ( | DCP_Type * | base, |
dcp_handle_t * | handle, | ||
const uint8_t * | key, | ||
size_t | keySize | ||
) |
Set AES key to dcp_handle_t struct and optionally to DCP.
Sets the AES key for encryption/decryption with the dcp_handle_t structure. The dcp_handle_t input argument specifies keySlot. If the keySlot is kDCP_OtpKey, the function will check the OTP_KEY_READY bit and will return it's ready to use status. For other keySlot selections, the function will copy and hold the key in dcp_handle_t struct. If the keySlot is one of the four DCP SRAM-based keys (one of kDCP_KeySlot0, kDCP_KeySlot1, kDCP_KeySlot2, kDCP_KeySlot3), this function will also load the supplied key to the specified keySlot in DCP.
base | DCP peripheral base address. |
handle | Handle used for the request. |
key | 0-mod-4 aligned pointer to AES key. |
keySize | AES key size in bytes. Shall equal 16. |
brief Set AES key to dcp_handle_t struct and optionally to DCP.
Sets the AES key for encryption/decryption with the dcp_handle_t structure. The dcp_handle_t input argument specifies keySlot. If the keySlot is kDCP_OtpKey, the function will check the OTP_KEY_READY bit and will return it's ready to use status. For other keySlot selections, the function will copy and hold the key in dcp_handle_t struct. If the keySlot is one of the four DCP SRAM-based keys (one of kDCP_KeySlot0, kDCP_KeySlot1, kDCP_KeySlot2, kDCP_KeySlot3), this function will also load the supplied key to the specified keySlot in DCP.
param base DCP peripheral base address. param handle Handle used for the request. param key 0-mod-4 aligned pointer to AES key. param keySize AES key size in bytes. Shall equal 16. return status from set key operation