Loading...
Searching...
No Matches
crypto_types.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
20#ifndef PSA_CRYPTO_PSA_CRYPTO_TYPES_H
21#define PSA_CRYPTO_PSA_CRYPTO_TYPES_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <stdint.h>
28
29#include "psa/error.h"
30
35typedef enum {
36 PSA_CRYPTO_DRIVER_DECRYPT,
37 PSA_CRYPTO_DRIVER_ENCRYPT
39
48typedef uint32_t psa_algorithm_t;
49
60typedef uint8_t psa_dh_family_t;
61
72typedef uint8_t psa_ecc_family_t;
73
106
111
118typedef uint32_t psa_key_id_t;
119
156typedef uint32_t psa_key_lifetime_t;
157
192typedef uint32_t psa_key_location_t;
193
232typedef uint8_t psa_key_persistence_t;
233
248typedef uint16_t psa_key_type_t;
249
253typedef uint32_t psa_key_usage_t;
254
258typedef uint16_t psa_key_bits_t;
259
260/* These are all temporarily defined as some numeric type to prevent errors at compile time.*/
292
323
355
458
490
491#ifdef __cplusplus
492}
493#endif
494
495#endif /* PSA_CRYPTO_PSA_CRYPTO_TYPES_H */
uint32_t psa_key_id_t
Key identifier.
uint8_t psa_key_persistence_t
Encoding of key persistence levels.
uint16_t psa_key_bits_t
Public interfaces use size_t, but internally we use a smaller type.
uint32_t psa_key_location_t
Encoding of key location indicators.
uint16_t psa_key_type_t
Encoding of a key type.
uint32_t psa_key_lifetime_t
Encoding of key lifetimes.
uint32_t psa_key_usage_t
Encoding of permitted usage on a key.
uint16_t psa_key_derivation_step_t
Encoding of the step of a key derivation.
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
psa_encrypt_or_decrypt_t
For encrypt-decrypt functions, whether the operation is an encryption or a decryption.
uint8_t psa_ecc_family_t
The type of PSA elliptic curve family identifiers.
uint8_t psa_dh_family_t
The type of PSA finite-field Diffie-Hellman group family identifiers.
Error definitions for the PSA Crypto API.
Structure storing an AEAD operation context.
Structure storing a cipher operation context.
Structure containing a hash context and algorithm.
Structure storing key attributes.
Structure storing a key derivation context.
Structure storing a MAC operation context.