/*
 * Copyright 2020-2025 Yuntu Microelectronics Co., Ltd.
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 * 
 * @file mbedtls_config_yuntu.h
 * @brief 
 * 
 */


#ifndef MBEDTLS_CONFIG_YUNTU_H
#define MBEDTLS_CONFIG_YUNTU_H

#ifdef __cplusplus
extern "C" {
#endif

#define MBEDTLS_PLATFORM_C 
#define MBEDTLS_PLATFORM_MEMORY
#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS 
// Memory configuration
#define MBEDTLS_MEMORY_BUFFER_ALLOC_C 
#define CRYPTO_ENGINE_BUF_SIZE 35840

// Normal 
#define MBEDTLS_BIGNUM_C
#define MBEDTLS_PLATFORM_EXIT_MACRO   (void)

// Custom defines


// PSA
#define MBEDTLS_PSA_CRYPTO_C 
// Enable external RNG for PSA
#define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG

// Symmetric encryption configuration
#define MBEDTLS_CIPHER_C
#define MBEDTLS_AES_C
#define MBEDTLS_CIPHER_MODE_CBC

// Asymmetric encryption configuration
// RSA configuration
#define MBEDTLS_RSA_C
#define MBEDTLS_OID_C
#define MBEDTLS_PLATFORM_SNPRINTF_MACRO   printf
#define MBEDTLS_MD_C
#define MBEDTLS_GENPRIME
#define MBEDTLS_PK_C
#define MBEDTLS_PK_PARSE_C
#define MBEDTLS_PK_WRITE_C
// ECC configuration
#define MBEDTLS_ECDSA_C
#define MBEDTLS_ECP_C
#define MBEDTLS_ASN1_PARSE_C
#define MBEDTLS_ASN1_WRITE_C
// ECC Curve
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED

// PSA HASH Configuration
#define MBEDTLS_SHA256_C

// PSA PKCS#
#define MBEDTLS_PKCS1_V15
#define MBEDTLS_PKCS1_V21



#ifdef __cplusplus
}
#endif

#endif

