mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-16 08:42:50 +00:00
Move ECC and FFDH macros to internal header
ECC macros used in the following files: library/pk.c library/pk_wrap.c library/pkparse.c library/pkwrite.c library/ssl_misc.h library/ssl_tls12_client.c FFDH macro use only in library/ssl_misc.h so could possibly be moved there, but it seems cleaner to keep it close to the ECC macros are they are very similar in nature. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
f9b012f313
commit
a5a8f29d7e
@ -42,17 +42,6 @@
|
|||||||
#include "mbedtls/error.h"
|
#include "mbedtls/error.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* Translations for ECC. */
|
|
||||||
|
|
||||||
#define MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH \
|
|
||||||
PSA_KEY_EXPORT_ECC_PUBLIC_KEY_MAX_SIZE(PSA_VENDOR_ECC_MAX_CURVE_BITS)
|
|
||||||
|
|
||||||
#define MBEDTLS_PSA_MAX_EC_KEY_PAIR_LENGTH \
|
|
||||||
PSA_KEY_EXPORT_ECC_KEY_PAIR_MAX_SIZE(PSA_VENDOR_ECC_MAX_CURVE_BITS)
|
|
||||||
|
|
||||||
#define MBEDTLS_PSA_MAX_FFDH_PUBKEY_LENGTH \
|
|
||||||
PSA_KEY_EXPORT_FFDH_PUBLIC_KEY_MAX_SIZE(PSA_VENDOR_FFDH_MAX_KEY_BITS)
|
|
||||||
|
|
||||||
/* Expose whatever RNG the PSA subsystem uses to applications using the
|
/* Expose whatever RNG the PSA subsystem uses to applications using the
|
||||||
* mbedtls_xxx API. The declarations and definitions here need to be
|
* mbedtls_xxx API. The declarations and definitions here need to be
|
||||||
* consistent with the implementation in library/psa_crypto_random_impl.h.
|
* consistent with the implementation in library/psa_crypto_random_impl.h.
|
||||||
|
@ -28,5 +28,22 @@
|
|||||||
|
|
||||||
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* FFDH
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
#define MBEDTLS_PSA_MAX_FFDH_PUBKEY_LENGTH \
|
||||||
|
PSA_KEY_EXPORT_FFDH_PUBLIC_KEY_MAX_SIZE(PSA_VENDOR_FFDH_MAX_KEY_BITS)
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* ECC
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
#define MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH \
|
||||||
|
PSA_KEY_EXPORT_ECC_PUBLIC_KEY_MAX_SIZE(PSA_VENDOR_ECC_MAX_CURVE_BITS)
|
||||||
|
|
||||||
|
#define MBEDTLS_PSA_MAX_EC_KEY_PAIR_LENGTH \
|
||||||
|
PSA_KEY_EXPORT_ECC_KEY_PAIR_MAX_SIZE(PSA_VENDOR_ECC_MAX_CURVE_BITS)
|
||||||
|
|
||||||
#endif /* MBEDTLS_PSA_CRYPTO_C */
|
#endif /* MBEDTLS_PSA_CRYPTO_C */
|
||||||
#endif /* MBEDTLS_PSA_UTIL_INTERNAL_H */
|
#endif /* MBEDTLS_PSA_UTIL_INTERNAL_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user