ADuCM302x Device Drivers API Reference Manual  Release 3.1.2.0
ADI_CRYPTO_TRANSACTION Struct Reference

#include <adi_crypto.h>

Data Fields

ADI_CRYPTO_CIPHER_MODE eCipherMode
 
ADI_CRYPTO_CODING_MODE eCodingMode
 
ADI_CRYPTO_AES_BYTE_SWAP eAesByteSwap
 
uint8_t * pAesKey
 
ADI_CRYPTO_AES_KEY_LEN eAesKeyLen
 
uint8_t * pHmacKey
 
uint32_t * pAuthData
 
uint32_t numAuthBytes
 
uint32_t * pInputData
 
uint32_t numInputBytes
 
uint32_t * pOutputData
 
uint32_t numOutputBytes
 
uint8_t * pNonceIV
 
uint32_t CounterInit
 
uint32_t numValidBytes
 
uint32_t numShaBits
 

Detailed Description

superset user Crypto transaction structure (different elements used for different modes)

Definition at line 239 of file adi_crypto.h.

Field Documentation

◆ eCipherMode

Cipher mode to use

Definition at line 241 of file adi_crypto.h.

◆ eCodingMode

Coding Mode (Encryption or Decryption)

Definition at line 242 of file adi_crypto.h.

◆ eAesByteSwap

AES endianness

Definition at line 247 of file adi_crypto.h.

◆ pAesKey

uint8_t* pAesKey

Pointer to the KEY data: pre-formatted as a byte array, according to eAesKeyLen.

Definition at line 249 of file adi_crypto.h.

◆ eAesKeyLen

The length of the AES KEY

Definition at line 250 of file adi_crypto.h.

◆ pHmacKey

uint8_t* pHmacKey

Pointer to the 512-bit/32-bytes HMAC KEY data: pre-formatted as a byte array.

Definition at line 252 of file adi_crypto.h.

◆ pAuthData

uint32_t* pAuthData

CCM mode: pointer to user prefix buffer

Definition at line 254 of file adi_crypto.h.

◆ numAuthBytes

uint32_t numAuthBytes

Length of the prefix buffer in bytes (should be a multiple of 16 bytes)

Definition at line 255 of file adi_crypto.h.

◆ pInputData

uint32_t* pInputData

Pointer to user input data buffer

Definition at line 257 of file adi_crypto.h.

◆ numInputBytes

uint32_t numInputBytes

Length of the data buffer in bytes (should be a multiple of 16bytes)

Definition at line 258 of file adi_crypto.h.

◆ pOutputData

uint32_t* pOutputData

Pointer to user output buffer

Definition at line 260 of file adi_crypto.h.

◆ numOutputBytes

uint32_t numOutputBytes

Length of the output buffer in bytes (should be a multiple of 16bytes)

Definition at line 261 of file adi_crypto.h.

◆ pNonceIV

uint8_t* pNonceIV

Pointer to user 16-byte array containing one of three values, depending on cipher mode:

  • CTR mode = 108-bit NONCE
  • CCM mode = 112-bit NONCE
  • CBC mode = 128-bit IV (Initialization Vector)

    NONCE and IV assume little endian format, for example: CTR NONCE packing is:
  • NONCE[0] -> 7:0
  • NONCE[1] -> 15:8
  • ...
  • NONCE[13] -> 103:96
  • NONCE[14](Bits 3:0) -> 107:104

Definition at line 263 of file adi_crypto.h.

◆ CounterInit

uint32_t CounterInit

CTR/CCM mode: Counter Initialization Value (CTR=20-bit, CCM=16-bit)

Definition at line 274 of file adi_crypto.h.

◆ numValidBytes

uint32_t numValidBytes

CCM mode: Number of valid bytes in the last (padding) block (1-16)

Definition at line 275 of file adi_crypto.h.

◆ numShaBits

uint32_t numShaBits

SHA mode: Number of bits in the SHA payload, which may be odd-sized

Definition at line 276 of file adi_crypto.h.