blob: 91d9746ab3e19fa2b78ff7015a4c9c071e1ab8ec [file] [log] [blame]
Manuel Pégourié-Gonnard2be8c632023-06-07 13:07:21 +02001/**
2 * \file psa_util_internal.h
3 *
4 * \brief Internal utility functions for use of PSA Crypto.
5 */
6/*
7 * Copyright The Mbed TLS Contributors
8 * SPDX-License-Identifier: Apache-2.0
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License"); you may
11 * not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 */
22
23#ifndef MBEDTLS_PSA_UTIL_INTERNAL_H
24#define MBEDTLS_PSA_UTIL_INTERNAL_H
25
26/* Include the public header so that users only need one include. */
27#include "mbedtls/psa_util.h"
28
29#if defined(MBEDTLS_PSA_CRYPTO_C)
30
Manuel Pégourié-Gonnarda5a8f292023-06-07 13:25:51 +020031/*************************************************************************
32 * FFDH
33 ************************************************************************/
34
35#define MBEDTLS_PSA_MAX_FFDH_PUBKEY_LENGTH \
36 PSA_KEY_EXPORT_FFDH_PUBLIC_KEY_MAX_SIZE(PSA_VENDOR_FFDH_MAX_KEY_BITS)
37
38/*************************************************************************
39 * ECC
40 ************************************************************************/
41
42#define MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH \
43 PSA_KEY_EXPORT_ECC_PUBLIC_KEY_MAX_SIZE(PSA_VENDOR_ECC_MAX_CURVE_BITS)
44
45#define MBEDTLS_PSA_MAX_EC_KEY_PAIR_LENGTH \
46 PSA_KEY_EXPORT_ECC_KEY_PAIR_MAX_SIZE(PSA_VENDOR_ECC_MAX_CURVE_BITS)
47
Manuel Pégourié-Gonnard2be8c632023-06-07 13:07:21 +020048#endif /* MBEDTLS_PSA_CRYPTO_C */
49#endif /* MBEDTLS_PSA_UTIL_INTERNAL_H */