Loading...
Searching...
No Matches
psa_ciphers.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 HAW Hamburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
21#ifndef PSA_CIPHERS_H
22#define PSA_CIPHERS_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include "psa/crypto.h"
29#include "psa/crypto_contexts.h"
30
31#if IS_USED(MODULE_PSA_CIPHER_AES_128_CBC) || defined(DOXYGEN)
48 const uint8_t *key_buffer,
49 size_t key_buffer_size,
51 const uint8_t *input,
52 size_t input_length,
53 uint8_t *output,
54 size_t output_size,
55 size_t *output_length);
56
73 const uint8_t *key_buffer,
74 size_t key_buffer_size,
76 const uint8_t *input,
77 size_t input_length,
78 uint8_t *output,
79 size_t output_size,
80 size_t *output_length);
81#endif /* MODULE_PSA_CIPHER_AES_128_CBC */
82
83#if IS_USED(MODULE_PSA_CIPHER_AES_192_CBC) || defined(DOXYGEN)
100 const uint8_t *key_buffer,
101 size_t key_buffer_size,
102 psa_algorithm_t alg,
103 const uint8_t *input,
104 size_t input_length,
105 uint8_t *output,
106 size_t output_size,
107 size_t *output_length);
108#endif /* MODULE_PSA_CIPHER_AES_192_CBC */
109
110#if IS_USED(MODULE_PSA_CIPHER_AES_256_CBC) || defined(DOXYGEN)
127 const uint8_t *key_buffer,
128 size_t key_buffer_size,
129 psa_algorithm_t alg,
130 const uint8_t *input,
131 size_t input_length,
132 uint8_t *output,
133 size_t output_size,
134 size_t *output_length);
135#endif /* MODULE_PSA_CIPHER_AES_256_CBC */
136
137#if IS_USED(MODULE_PSA_CIPHER_CHACHA20) || defined(DOXYGEN)
138
153 size_t key_buffer_size,
154 const uint8_t *input,
155 size_t input_length,
156 uint8_t *output,
157 size_t output_size,
158 size_t *output_length);
159
174 size_t key_buffer_size,
175 const uint8_t *input,
176 size_t input_length,
177 uint8_t *output,
178 size_t output_size,
179 size_t *output_length);
180
181#endif /* MODULE_PSA_CIPHER_CHACHA20 */
182#ifdef __cplusplus
183}
184#endif
185
186#endif /* PSA_CIPHERS_H */
Function declarations for PSA Crypto.
Context definitions for PSA Crypto.
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
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.
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_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_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_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.
int32_t psa_status_t
Status code type used for all PSA Certified APIs.
Definition error.h:41
Structure storing key attributes.