mbedtls: Re-apply MBEDTLS_BIGNUM_ALT & related macros for custom bignum functions

(IDF-specific patch.)
This commit is contained in:
Angus Gratton
2017-09-06 15:06:57 +10:00
committed by Angus Gratton
parent ae382b3bfa
commit 736db688a8
2 changed files with 18 additions and 0 deletions

View File

@@ -100,6 +100,8 @@
#define MBEDTLS_LN_2_DIV_LN_10_SCALE100 332
#define MBEDTLS_MPI_RW_BUFFER_SIZE ( ((MBEDTLS_MPI_MAX_BITS_SCALE100 + MBEDTLS_LN_2_DIV_LN_10_SCALE100 - 1) / MBEDTLS_LN_2_DIV_LN_10_SCALE100) + 10 + 6 )
#if !defined(MBEDTLS_BIGNUM_ALT)
/*
* Define the base integer type, architecture-wise.
*
@@ -746,6 +748,9 @@ int mbedtls_mpi_is_prime( const mbedtls_mpi *X,
int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng );
#else /* MBEDTLS_BIGNUM_ALT */
#include "bignum_alt.h"
#endif /* MBEDTLS_BIGNUM_ALT */
/**
* \brief Checkup routine