Loading...
Searching...
No Matches
aes_common.h
1/*
2 * Copyright (C) 2022 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
9#pragma once
10
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include "psa/crypto.h"
27#include "crypto/modes/cbc.h"
28
32psa_status_t cipher_to_psa_error(int error);
33
39psa_status_t cbc_aes_common_encrypt_decrypt(cipher_t *ctx,
40 const uint8_t *key_buffer,
41 size_t key_buffer_size,
42 const uint8_t *iv,
43 const uint8_t *input,
44 size_t input_length,
45 uint8_t *output,
46 size_t *output_length,
47 psa_encrypt_or_decrypt_t direction);
48
49#ifdef __cplusplus
50}
51#endif
52
Cipher block chaining mode of operation for block ciphers.
Function declarations for PSA Crypto.
int32_t psa_status_t
Status code type used for all PSA Certified APIs.
Definition error.h:40
basic struct for using block ciphers contains the cipher interface and the context
Definition ciphers.h:118
psa_encrypt_or_decrypt_t
For encrypt-decrypt functions, whether the operation is an encryption or a decryption.
Definition types.h:44