attributes.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2024 TU Dresden
3  * Copyright (C) 2021 HAW Hamburg
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
22 #ifndef PSA_CRYPTO_PSA_KEY_ATTRIBUTES_H
23 #define PSA_CRYPTO_PSA_KEY_ATTRIBUTES_H
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #include "psa/algorithm.h"
30 #include "bits.h"
31 #include "id.h"
32 #include "lifetime.h"
33 #include "type.h"
34 #include "usage.h"
35 
42 };
43 
47 typedef struct psa_key_policy_s psa_key_policy_t;
48 
58 };
59 
162 
167 #define PSA_KEY_ATTRIBUTES_INIT { 0 }
168 
175 {
177 
178  return v;
179 }
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #endif /* PSA_CRYPTO_PSA_KEY_ATTRIBUTES_H */
Algorithm definitions for the PSA Crypto API.
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
Definition: algorithm.h:39
static psa_key_attributes_t psa_key_attributes_init(void)
Return an initial value for a key attribute object.
Definition: attributes.h:174
#define PSA_KEY_ATTRIBUTES_INIT
This macro returns a suitable initializer for a key attribute object of type psa_key_attributes_t.
Definition: attributes.h:167
Key size definitions for the PSA Crypto API.
uint16_t psa_key_bits_t
Public interfaces use size_t, but internally we use a smaller type.
Definition: bits.h:34
Key ID definitions for the PSA Crypto API.
uint32_t psa_key_id_t
Key identifier.
Definition: id.h:37
Key ilfetime definitions for the PSA Crypto API.
uint32_t psa_key_lifetime_t
Encoding of key lifetimes.
Definition: lifetime.h:67
Key type definitions for the PSA Crypto API.
uint16_t psa_key_type_t
Encoding of a key type.
Definition: type.h:45
Structure storing key attributes.
Definition: attributes.h:52
psa_key_id_t id
Key identifier.
Definition: attributes.h:56
psa_key_bits_t bits
Size of key in bits.
Definition: attributes.h:54
psa_key_policy_t policy
Key usage policy.
Definition: attributes.h:57
psa_key_type_t type
Type of key.
Definition: attributes.h:53
psa_key_lifetime_t lifetime
Lifetime of key.
Definition: attributes.h:55
Structure storing the key usage policies.
Definition: attributes.h:39
psa_key_usage_t usage
Key usage policy.
Definition: attributes.h:40
psa_algorithm_t alg
Algorithm for key usage.
Definition: attributes.h:41
Key usage definitions for the PSA Crypto API.
uint32_t psa_key_usage_t
Encoding of permitted usage on a key.
Definition: usage.h:34