Loading...
Searching...
No Matches
psa_cryptocell_310_aes_common.h File Reference

Common AES functions used by all PSA Crypto wrappers for the CryptoCell 310 AES APIs. More...

Detailed Description

Common AES functions used by all PSA Crypto wrappers for the CryptoCell 310 AES APIs.

Author
Lena Boeckmann lena..nosp@m.boec.nosp@m.kmann.nosp@m.@haw.nosp@m.-hamb.nosp@m.urg..nosp@m.de

Definition in file psa_cryptocell_310_aes_common.h.

#include "psa/crypto.h"
+ Include dependency graph for psa_cryptocell_310_aes_common.h:

Go to the source code of this file.

psa_status_t cryptocell_310_common_aes_setup (SaSiAesUserContext_t *ctx, SaSiAesEncryptMode_t direction, SaSiAesOperationMode_t mode, SaSiAesPaddingType_t padding, const uint8_t *iv, const uint8_t *key_buffer, size_t key_size)
 Common setup function for AES operations.
 
psa_status_t cryptocell_310_common_aes_encrypt_decrypt (SaSiAesUserContext_t *ctx, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_buffer_size, size_t *output_length)
 Common function for an AES encryption.
 

Function Documentation

◆ cryptocell_310_common_aes_encrypt_decrypt()

psa_status_t cryptocell_310_common_aes_encrypt_decrypt ( SaSiAesUserContext_t *  ctx,
const uint8_t *  input,
size_t  input_length,
uint8_t *  output,
size_t  output_buffer_size,
size_t *  output_length 
)

Common function for an AES encryption.

Parameters
ctxAES context of the type SaSiAesUserContext_t
inputConstant input buffer of plain text to encrypt
input_lengthLength of the input buffer
outputOutput buffer to write the cipher
output_buffer_sizeSize of the output buffer. Must be at least input_length
output_lengthPointer to output length. Will contain actual length of cipher
Returns
psa_status_t

◆ cryptocell_310_common_aes_setup()

psa_status_t cryptocell_310_common_aes_setup ( SaSiAesUserContext_t *  ctx,
SaSiAesEncryptMode_t  direction,
SaSiAesOperationMode_t  mode,
SaSiAesPaddingType_t  padding,
const uint8_t *  iv,
const uint8_t *  key_buffer,
size_t  key_size 
)

Common setup function for AES operations.

Parameters
ctxDriver specific AES context of the type SaSiAesUserContext_t
directionEncrypt or decrypt direction of type SaSiAesEncryptMode_t
modeOperation mode (e.g. CBC, CCM) of type SaSiAesOperationMode_t
paddingOperation padding type of type SaSiAesPaddingType_t
ivConstant buffer containing the IV for the operation
key_bufferConstant buffer containing an AES key
key_sizeSize of AES key in use.
Returns
psa_status_t