Loading...
Searching...
No Matches
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
10#pragma once
11
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include "psa/algorithm.h"
29#include "bits.h"
30#include "id.h"
31#include "lifetime.h"
32#include "type.h"
33#include "usage.h"
34
42
47
58
161
166#define PSA_KEY_ATTRIBUTES_INIT { 0 }
167
174{
176
177 return v;
178}
179
180#ifdef __cplusplus
181}
182#endif
183
Algorithm definitions for the PSA Crypto API.
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
Definition algorithm.h:38
static psa_key_attributes_t psa_key_attributes_init(void)
Return an initial value for a key attribute object.
Definition attributes.h:173
struct psa_key_attributes_s psa_key_attributes_t
The type of an object containing key attributes.
Definition attributes.h:160
#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:166
struct psa_key_policy_s psa_key_policy_t
Type for key usage policies.
Definition attributes.h:46
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:33
Key ID definitions for the PSA Crypto API.
uint32_t psa_key_id_t
Key identifier.
Definition id.h:36
Key ilfetime definitions for the PSA Crypto API.
uint32_t psa_key_lifetime_t
Encoding of key lifetimes.
Definition lifetime.h:66
Key type definitions for the PSA Crypto API.
uint16_t psa_key_type_t
Encoding of a key type.
Definition type.h:44
Structure storing key attributes.
Definition attributes.h:51
psa_key_id_t id
Key identifier.
Definition attributes.h:55
psa_key_bits_t bits
Size of key in bits.
Definition attributes.h:53
psa_key_policy_t policy
Key usage policy.
Definition attributes.h:56
psa_key_type_t type
Type of key.
Definition attributes.h:52
psa_key_lifetime_t lifetime
Lifetime of key.
Definition attributes.h:54
Structure storing the key usage policies.
Definition attributes.h:38
psa_key_usage_t usage
Key usage policy.
Definition attributes.h:39
psa_algorithm_t alg
Algorithm for key usage.
Definition attributes.h:40
Key usage definitions for the PSA Crypto API.
uint32_t psa_key_usage_t
Encoding of permitted usage on a key.
Definition usage.h:33