nrfxlib API 2.8.99
Loading...
Searching...
No Matches
cc3xx_psa_cipher.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef CC3XX_PSA_CIPHER_H
9#define CC3XX_PSA_CIPHER_H
10
19#include "psa/crypto.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
45 cc3xx_cipher_operation_t *operation,
46 const psa_key_attributes_t *attributes,
47 const uint8_t *key, size_t key_length,
48 psa_algorithm_t alg);
68 cc3xx_cipher_operation_t *operation,
69 const psa_key_attributes_t *attributes,
70 const uint8_t *key, size_t key_length,
71 psa_algorithm_t alg);
83 cc3xx_cipher_operation_t *operation,
84 const uint8_t *iv, size_t iv_length);
100 cc3xx_cipher_operation_t *operation,
101 const uint8_t *input, size_t input_length,
102 uint8_t *output, size_t output_size, size_t *output_length);
116 cc3xx_cipher_operation_t *operation,
117 uint8_t *output, size_t output_size, size_t *output_length);
127 cc3xx_cipher_operation_t *operation);
148 const psa_key_attributes_t *attributes,
149 const uint8_t *key_buffer,
150 size_t key_buffer_size,
151 psa_algorithm_t alg,
152 const uint8_t *iv,
153 size_t iv_length,
154 const uint8_t *input,
155 size_t input_length,
156 uint8_t *output,
157 size_t output_size,
158 size_t *output_length);
177 const psa_key_attributes_t *attributes,
178 const uint8_t *key_buffer,
179 size_t key_buffer_size,
180 psa_algorithm_t alg,
181 const uint8_t *input,
182 size_t input_length,
183 uint8_t *output,
184 size_t output_size,
185 size_t *output_length);
186
187#ifdef __cplusplus
188}
189#endif
190#endif /* CC3XX_PSA_CIPHER_H */
psa_status_t cc3xx_cipher_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)
Perform a one-shot decryption operation.
psa_status_t cc3xx_cipher_abort(cc3xx_cipher_operation_t *operation)
Abort a multipart cipher operation.
psa_status_t cc3xx_cipher_finish(cc3xx_cipher_operation_t *operation, uint8_t *output, size_t output_size, size_t *output_length)
Finalize the multipart cipher operation by encrypting any buffered input from the previous call to up...
psa_status_t cc3xx_cipher_encrypt(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *iv, size_t iv_length, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
Perform a one-shot encryption operation.
psa_status_t cc3xx_cipher_set_iv(cc3xx_cipher_operation_t *operation, const uint8_t *iv, size_t iv_length)
Setup an IV on the operation object.
psa_status_t cc3xx_cipher_update(cc3xx_cipher_operation_t *operation, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
Update the ciphering operation with new input to produce new output.
psa_status_t cc3xx_cipher_decrypt_setup(cc3xx_cipher_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key, size_t key_length, psa_algorithm_t alg)
Setup a cipher decryption object by binding the key to the context of a multipart cipher operation.
psa_status_t cc3xx_cipher_encrypt_setup(cc3xx_cipher_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key, size_t key_length, psa_algorithm_t alg)
Setup a cipher encryption object by binding the key to the context of a multipart cipher operation.
Definition cc3xx_crypto_primitives_private.h:18