Loading...
Searching...
No Matches
attributes.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 TU Dresden
3 * SPDX-FileCopyrightText: 2021 HAW Hamburg
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include "psa/algorithm.h"
26#include "bits.h"
27#include "id.h"
28#include "lifetime.h"
29#include "type.h"
30#include "usage.h"
31
39
44
55
158
163#define PSA_KEY_ATTRIBUTES_INIT { 0 }
164
171{
173
174 return v;
175}
176
177#ifdef __cplusplus
178}
179#endif
180
Algorithm definitions for the PSA Crypto API.
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
Definition algorithm.h:35
static psa_key_attributes_t psa_key_attributes_init(void)
Return an initial value for a key attribute object.
Definition attributes.h:170
struct psa_key_attributes_s psa_key_attributes_t
The type of an object containing key attributes.
Definition attributes.h:157
#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:163
struct psa_key_policy_s psa_key_policy_t
Type for key usage policies.
Definition attributes.h:43
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:30
Key ID definitions for the PSA Crypto API.
uint32_t psa_key_id_t
Key identifier.
Definition id.h:33
Key ilfetime definitions for the PSA Crypto API.
uint32_t psa_key_lifetime_t
Encoding of key lifetimes.
Definition lifetime.h:63
Key type definitions for the PSA Crypto API.
uint16_t psa_key_type_t
Encoding of a key type.
Definition type.h:41
Structure storing key attributes.
Definition attributes.h:48
psa_key_id_t id
Key identifier.
Definition attributes.h:52
psa_key_bits_t bits
Size of key in bits.
Definition attributes.h:50
psa_key_policy_t policy
Key usage policy.
Definition attributes.h:53
psa_key_type_t type
Type of key.
Definition attributes.h:49
psa_key_lifetime_t lifetime
Lifetime of key.
Definition attributes.h:51
Structure storing the key usage policies.
Definition attributes.h:35
psa_key_usage_t usage
Key usage policy.
Definition attributes.h:36
psa_algorithm_t alg
Algorithm for key usage.
Definition attributes.h:37
Key usage definitions for the PSA Crypto API.
uint32_t psa_key_usage_t
Encoding of permitted usage on a key.
Definition usage.h:30