PSA Crypto Algorithm Dispatcher

Detailed Description

Files

file  psa_crypto_algorithm_dispatch.h
 Function declarations for PSA Crypto algorithm dispatcher.
 

Functions

psa_status_t psa_algorithm_dispatch_hash_setup (psa_hash_operation_t *operation, psa_algorithm_t alg)
 Dispatch a hash setup function to a specific backend. More...
 
psa_status_t psa_algorithm_dispatch_hash_update (psa_hash_operation_t *operation, const uint8_t *input, size_t input_length)
 Dispatch a hash update function to a specific backend. More...
 
psa_status_t psa_algorithm_dispatch_hash_finish (psa_hash_operation_t *operation, uint8_t *hash, size_t hash_size, size_t *hash_length)
 Dispatch a hash finish function to a specific backend. More...
 
psa_status_t psa_algorithm_dispatch_sign_hash (const psa_key_attributes_t *attributes, psa_algorithm_t alg, const psa_key_slot_t *slot, const uint8_t *hash, size_t hash_length, uint8_t *signature, size_t signature_size, size_t *signature_length)
 Dispatch a hash signature function to a specific backend. More...
 
psa_status_t psa_algorithm_dispatch_sign_message (const psa_key_attributes_t *attributes, psa_algorithm_t alg, const psa_key_slot_t *slot, const uint8_t *input, size_t input_length, uint8_t *signature, size_t signature_size, size_t *signature_length)
 Dispatch a message signature function to a specific backend. More...
 
psa_status_t psa_algorithm_dispatch_verify_hash (const psa_key_attributes_t *attributes, psa_algorithm_t alg, const psa_key_slot_t *slot, const uint8_t *hash, size_t hash_length, const uint8_t *signature, size_t signature_length)
 Dispatch a hash verification function to a specific backend. More...
 
psa_status_t psa_algorithm_dispatch_verify_message (const psa_key_attributes_t *attributes, psa_algorithm_t alg, const psa_key_slot_t *slot, const uint8_t *input, size_t input_length, const uint8_t *signature, size_t signature_length)
 Dispatch a message verification function to a specific backend. More...
 
psa_status_t psa_algorithm_dispatch_generate_key (const psa_key_attributes_t *attributes, psa_key_slot_t *slot)
 Dispatch the key generation function to a specific backend. More...
 
psa_status_t psa_algorithm_dispatch_cipher_encrypt (const psa_key_attributes_t *attributes, psa_algorithm_t alg, const psa_key_slot_t *slot, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
 Dispatch a cipher encrypt function to a specific backend. More...
 
psa_status_t psa_algorithm_dispatch_cipher_decrypt (const psa_key_attributes_t *attributes, psa_algorithm_t alg, const psa_key_slot_t *slot, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
 Dispatch a cipher decrypt function to a specific backend. More...
 
psa_status_t psa_algorithm_dispatch_mac_compute (const psa_key_attributes_t *attributes, psa_algorithm_t alg, const psa_key_slot_t *slot, const uint8_t *input, size_t input_length, uint8_t *mac, size_t mac_size, size_t *mac_length)
 Dispatch a mac computation function to a specific backend. More...
 

Function Documentation

◆ psa_algorithm_dispatch_cipher_decrypt()

psa_status_t psa_algorithm_dispatch_cipher_decrypt ( const psa_key_attributes_t attributes,
psa_algorithm_t  alg,
const psa_key_slot_t slot,
const uint8_t *  input,
size_t  input_length,
uint8_t *  output,
size_t  output_size,
size_t *  output_length 
)

Dispatch a cipher decrypt function to a specific backend.

See psa_cipher_decrypt()

Parameters
attributes
alg
slot
input
input_length
output
output_size
output_length
Returns
psa_status_t

◆ psa_algorithm_dispatch_cipher_encrypt()

psa_status_t psa_algorithm_dispatch_cipher_encrypt ( const psa_key_attributes_t attributes,
psa_algorithm_t  alg,
const psa_key_slot_t slot,
const uint8_t *  input,
size_t  input_length,
uint8_t *  output,
size_t  output_size,
size_t *  output_length 
)

Dispatch a cipher encrypt function to a specific backend.

See psa_cipher_encrypt()

Parameters
attributes
alg
slot
input
input_length
output
output_size
output_length
Returns
psa_status_t

◆ psa_algorithm_dispatch_generate_key()

psa_status_t psa_algorithm_dispatch_generate_key ( const psa_key_attributes_t attributes,
psa_key_slot_t slot 
)

Dispatch the key generation function to a specific backend.

See psa_generate_key()

Parameters
attributes
slot
Returns
psa_status_t

◆ psa_algorithm_dispatch_hash_finish()

psa_status_t psa_algorithm_dispatch_hash_finish ( psa_hash_operation_t operation,
uint8_t *  hash,
size_t  hash_size,
size_t *  hash_length 
)

Dispatch a hash finish function to a specific backend.

See psa_hash_finish()

Parameters
operation
hash
hash_size
hash_length
Returns
psa_status_t

◆ psa_algorithm_dispatch_hash_setup()

psa_status_t psa_algorithm_dispatch_hash_setup ( psa_hash_operation_t operation,
psa_algorithm_t  alg 
)

Dispatch a hash setup function to a specific backend.

See psa_hash_setup()

Parameters
operation
alg
Returns
psa_status_t

◆ psa_algorithm_dispatch_hash_update()

psa_status_t psa_algorithm_dispatch_hash_update ( psa_hash_operation_t operation,
const uint8_t *  input,
size_t  input_length 
)

Dispatch a hash update function to a specific backend.

See psa_hash_update()

Parameters
operation
input
input_length
Returns
psa_status_t

◆ psa_algorithm_dispatch_mac_compute()

psa_status_t psa_algorithm_dispatch_mac_compute ( const psa_key_attributes_t attributes,
psa_algorithm_t  alg,
const psa_key_slot_t slot,
const uint8_t *  input,
size_t  input_length,
uint8_t *  mac,
size_t  mac_size,
size_t *  mac_length 
)

Dispatch a mac computation function to a specific backend.

See psa_mac_compute()

Parameters
attributes
alg
slot
input
input_length
mac
mac_size
mac_length
Returns
psa_status_t

◆ psa_algorithm_dispatch_sign_hash()

psa_status_t psa_algorithm_dispatch_sign_hash ( const psa_key_attributes_t attributes,
psa_algorithm_t  alg,
const psa_key_slot_t slot,
const uint8_t *  hash,
size_t  hash_length,
uint8_t *  signature,
size_t  signature_size,
size_t *  signature_length 
)

Dispatch a hash signature function to a specific backend.

See psa_sign_hash()

Parameters
attributes
alg
slot
hash
hash_length
signature
signature_size
signature_length
Returns
psa_status_t

◆ psa_algorithm_dispatch_sign_message()

psa_status_t psa_algorithm_dispatch_sign_message ( const psa_key_attributes_t attributes,
psa_algorithm_t  alg,
const psa_key_slot_t slot,
const uint8_t *  input,
size_t  input_length,
uint8_t *  signature,
size_t  signature_size,
size_t *  signature_length 
)

Dispatch a message signature function to a specific backend.

See psa_sign_message()

Parameters
attributes
alg
slot
input
input_length
signature
signature_size
signature_length
Returns
psa_status_t

◆ psa_algorithm_dispatch_verify_hash()

psa_status_t psa_algorithm_dispatch_verify_hash ( const psa_key_attributes_t attributes,
psa_algorithm_t  alg,
const psa_key_slot_t slot,
const uint8_t *  hash,
size_t  hash_length,
const uint8_t *  signature,
size_t  signature_length 
)

Dispatch a hash verification function to a specific backend.

See psa_verify_hash()

Parameters
attributes
alg
slot
hash
hash_length
signature
signature_length
Returns
psa_status_t

◆ psa_algorithm_dispatch_verify_message()

psa_status_t psa_algorithm_dispatch_verify_message ( const psa_key_attributes_t attributes,
psa_algorithm_t  alg,
const psa_key_slot_t slot,
const uint8_t *  input,
size_t  input_length,
const uint8_t *  signature,
size_t  signature_length 
)

Dispatch a message verification function to a specific backend.

See psa_verify_message()

Parameters
attributes
alg
slot
input
input_length
signature
signature_length
Returns
psa_status_t