mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 04:25:32 +00:00
mbedtls: Update to 2.6.0 release (without IDF-specific patches)
This commit is contained in:

committed by
Angus Gratton

parent
63e1e4e502
commit
ae382b3bfa
@@ -31,6 +31,8 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if !defined(MBEDTLS_ECP_ALT)
|
||||
|
||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||
!defined(inline) && !defined(__cplusplus)
|
||||
#define inline __inline
|
||||
@@ -1213,7 +1215,7 @@ static inline int ecp_mod_koblitz( mbedtls_mpi *N, mbedtls_mpi_uint *Rp, size_t
|
||||
int ret;
|
||||
size_t i;
|
||||
mbedtls_mpi M, R;
|
||||
mbedtls_mpi_uint Mp[P_KOBLITZ_MAX + P_KOBLITZ_R];
|
||||
mbedtls_mpi_uint Mp[P_KOBLITZ_MAX + P_KOBLITZ_R + 1];
|
||||
|
||||
if( N->n < p_limbs )
|
||||
return( 0 );
|
||||
@@ -1235,7 +1237,7 @@ static inline int ecp_mod_koblitz( mbedtls_mpi *N, mbedtls_mpi_uint *Rp, size_t
|
||||
memcpy( Mp, N->p + p_limbs - adjust, M.n * sizeof( mbedtls_mpi_uint ) );
|
||||
if( shift != 0 )
|
||||
MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, shift ) );
|
||||
M.n += R.n - adjust; /* Make room for multiplication by R */
|
||||
M.n += R.n; /* Make room for multiplication by R */
|
||||
|
||||
/* N = A0 */
|
||||
if( mask != 0 )
|
||||
@@ -1257,7 +1259,7 @@ static inline int ecp_mod_koblitz( mbedtls_mpi *N, mbedtls_mpi_uint *Rp, size_t
|
||||
memcpy( Mp, N->p + p_limbs - adjust, M.n * sizeof( mbedtls_mpi_uint ) );
|
||||
if( shift != 0 )
|
||||
MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, shift ) );
|
||||
M.n += R.n - adjust; /* Make room for multiplication by R */
|
||||
M.n += R.n; /* Make room for multiplication by R */
|
||||
|
||||
/* N = A0 */
|
||||
if( mask != 0 )
|
||||
@@ -1322,4 +1324,6 @@ static int ecp_mod_p256k1( mbedtls_mpi *N )
|
||||
}
|
||||
#endif /* MBEDTLS_ECP_DP_SECP256K1_ENABLED */
|
||||
|
||||
#endif /* !MBEDTLS_ECP_ALT */
|
||||
|
||||
#endif /* MBEDTLS_ECP_C */
|
||||
|
Reference in New Issue
Block a user