Loading...
Searching...
No Matches
PSA Wrapper Functions: Cipher

Detailed Description

Files

file  psa_ciphers.h
 Function declarations for low level wrapper functions for cipher operations.
 

Functions

psa_status_t psa_cipher_cbc_aes_128_encrypt (const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
 Low level wrapper function to call a driver for an AES 128 CBC encryption.
 
psa_status_t psa_cipher_cbc_aes_128_decrypt (const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
 Low level wrapper function to call a driver for an AES 128 CBC decryption.
 
psa_status_t psa_cipher_cbc_aes_192_encrypt (const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
 Low level wrapper function to call a driver for an AES 192 CBC encryption.
 
psa_status_t psa_cipher_cbc_aes_256_encrypt (const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
 Low level wrapper function to call a driver for an AES 256 CBC encryption.
 
psa_status_t psa_cipher_chacha20_encrypt (uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
 Low level wrapper function to call a driver for ChaCha20 encryption/decryption.
 
psa_status_t psa_cipher_chacha20_decrypt (uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
 Low level wrapper function to call a driver for ChaCha20 decryption.
 

Function Documentation

◆ psa_cipher_cbc_aes_128_decrypt()

psa_status_t psa_cipher_cbc_aes_128_decrypt ( const psa_key_attributes_t attributes,
const uint8_t *  key_buffer,
size_t  key_buffer_size,
psa_algorithm_t  alg,
const uint8_t *  input,
size_t  input_length,
uint8_t *  output,
size_t  output_size,
size_t *  output_length 
)

Low level wrapper function to call a driver for an AES 128 CBC decryption.

See psa_cipher_decrypt()

Parameters
attributes
key_buffer
key_buffer_size
alg
input
input_length
output
output_size
output_length
Returns
psa_status_t

◆ psa_cipher_cbc_aes_128_encrypt()

psa_status_t psa_cipher_cbc_aes_128_encrypt ( const psa_key_attributes_t attributes,
const uint8_t *  key_buffer,
size_t  key_buffer_size,
psa_algorithm_t  alg,
const uint8_t *  input,
size_t  input_length,
uint8_t *  output,
size_t  output_size,
size_t *  output_length 
)

Low level wrapper function to call a driver for an AES 128 CBC encryption.

See psa_cipher_encrypt()

Parameters
attributes
key_buffer
key_buffer_size
alg
input
input_length
output
output_size
output_length
Returns
psa_status_t

◆ psa_cipher_cbc_aes_192_encrypt()

psa_status_t psa_cipher_cbc_aes_192_encrypt ( const psa_key_attributes_t attributes,
const uint8_t *  key_buffer,
size_t  key_buffer_size,
psa_algorithm_t  alg,
const uint8_t *  input,
size_t  input_length,
uint8_t *  output,
size_t  output_size,
size_t *  output_length 
)

Low level wrapper function to call a driver for an AES 192 CBC encryption.

See psa_cipher_encrypt()

Parameters
attributes
key_buffer
key_buffer_size
alg
input
input_length
output
output_size
output_length
Returns
psa_status_t

◆ psa_cipher_cbc_aes_256_encrypt()

psa_status_t psa_cipher_cbc_aes_256_encrypt ( const psa_key_attributes_t attributes,
const uint8_t *  key_buffer,
size_t  key_buffer_size,
psa_algorithm_t  alg,
const uint8_t *  input,
size_t  input_length,
uint8_t *  output,
size_t  output_size,
size_t *  output_length 
)

Low level wrapper function to call a driver for an AES 256 CBC encryption.

See psa_cipher_encrypt()

Parameters
attributes
key_buffer
key_buffer_size
alg
input
input_length
output
output_size
output_length
Returns
psa_status_t

◆ psa_cipher_chacha20_decrypt()

psa_status_t psa_cipher_chacha20_decrypt ( uint8_t *  key_buffer,
size_t  key_buffer_size,
const uint8_t *  input,
size_t  input_length,
uint8_t *  output,
size_t  output_size,
size_t *  output_length 
)

Low level wrapper function to call a driver for ChaCha20 decryption.

See psa_cipher_decrypt().

Parameters
key_bufferBuffer containing the Key.
key_buffer_sizeSize of the key in bytes. Must be 32 bytes long.
inputInput buffer containing the 12 byte nonce used in the encryption followed by the cipher to be decrypted.
input_lengthSize of input buffer (including 12 byte nonce).
outputOutput buffer.
output_sizeSize of output buffer. Must be at least (input_length - 12) bytes long.
output_lengthActual size of the output.

◆ psa_cipher_chacha20_encrypt()

psa_status_t psa_cipher_chacha20_encrypt ( uint8_t *  key_buffer,
size_t  key_buffer_size,
const uint8_t *  input,
size_t  input_length,
uint8_t *  output,
size_t  output_size,
size_t *  output_length 
)

Low level wrapper function to call a driver for ChaCha20 encryption/decryption.

See psa_cipher_encrypt().

Parameters
key_bufferBuffer containing the Key.
key_buffer_sizeSize of the key in bytes. Must be 32 bytes.
inputInput Buffer containing the message to be encrypted.
input_lengthSize of input buffer.
outputOutput buffer containing the generated 12 byte nonce followed by the cipher of the input.
output_sizeSize of output buffer. Must be at least (input_length + 12) bytes long.
output_lengthActual size of the output (including nonce).