sizes.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2025 TU Dresden
3  * SPDX-FileCopyrightText: 2021 HAW Hamburg
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #include "psa/sizes.h"
26 #include "psa/key/type.h"
27 
39 #define PSA_SIGNATURE_MAX_SIZE /* implementation-defined value */
40 
50 #define PSA_ECDSA_SIGNATURE_SIZE(curve_bits) \
51  ((size_t)(PSA_BITS_TO_BYTES(curve_bits) * 2))
52 
71 #define PSA_SIGN_OUTPUT_SIZE(key_type, key_bits, alg) \
72  (PSA_KEY_TYPE_IS_ECC(key_type) ? PSA_ECDSA_SIGNATURE_SIZE(key_bits) : \
73  ((void)alg, 0))
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
Key type definitions for the PSA Crypto API.
Size definitions for the PSA Crypto API.