Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
algorithm.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
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
28
#include "
psa/algorithm.h
"
29
33
#define PSA_ALG_CATEGORY_KEY_AGREEMENT ((psa_algorithm_t)0x09000000)
34
43
#define PSA_ALG_IS_KEY_AGREEMENT(alg) \
44
(((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_KEY_AGREEMENT)
45
58
#define PSA_ALG_KEY_AGREEMENT_GET_BASE(alg) \
59
((psa_algorithm_t)((alg) & 0xffff0000))
60
73
#define PSA_ALG_KEY_AGREEMENT_GET_KDF(alg) \
74
((psa_algorithm_t)((alg) & 0xfe00ffff))
75
92
#define PSA_ALG_IS_RAW_KEY_AGREEMENT(alg) \
93
(((alg) & 0x7f00ffff) == 0x09000000)
94
106
#define PSA_ALG_IS_FFDH(alg) \
107
(((alg) & 0x7fff0000) == 0x09010000)
108
120
#define PSA_ALG_IS_ECDH(alg) \
121
(((alg) & 0x7fff0000) == 0x09020000)
122
153
#define PSA_ALG_FFDH ((psa_algorithm_t)0x09010000)
154
222
#define PSA_ALG_ECDH ((psa_algorithm_t)0x09020000)
223
246
#define PSA_ALG_KEY_AGREEMENT(ka_alg, kdf_alg) \
247
((ka_alg) | (kdf_alg))
248
249
#ifdef __cplusplus
250
}
251
#endif
252
algorithm.h
Algorithm definitions for the PSA Crypto API.
Generated on Sat Jun 28 2025 19:41:34 by
1.9.1