mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 22:15:43 +01:00
Fix ECP alternative macro names
The compile time macros enabling the initialisation and deinitialisation in the alternative Elliptic Curve Point arithmetic implementation had names that did not end with '_ALT' as required by check-names.sh.
This commit is contained in:
parent
47d28f08a6
commit
4d9c69dde8
@ -150,12 +150,12 @@
|
||||
#error "MBEDTLS_GCM_C defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ECP_ALT_INIT) && !defined(MBEDTLS_ECP_FUNCTION_ALT)
|
||||
#error "MBEDTLS_ECP_ALT_INIT defined, but not all prerequisites"
|
||||
#if defined(MBEDTLS_ECP_INIT_ALT) && !defined(MBEDTLS_ECP_FUNCTION_ALT)
|
||||
#error "MBEDTLS_ECP_INIT_ALT defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ECP_ALT_DEINIT) && !defined(MBEDTLS_ECP_FUNCTION_ALT)
|
||||
#error "MBEDTLS_ECP_ALT_DEINIT defined, but not all prerequisites"
|
||||
#if defined(MBEDTLS_ECP_DEINIT_ALT) && !defined(MBEDTLS_ECP_FUNCTION_ALT)
|
||||
#error "MBEDTLS_ECP_DEINIT_ALT defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ECP_RANDOMIZE_JAC_ALT) && !defined(MBEDTLS_ECP_FUNCTION_ALT)
|
||||
|
@ -314,12 +314,12 @@
|
||||
* The functions:
|
||||
* int ecp_alt_init( const mbedtls_ecp_group *grp )
|
||||
* void ecp_alt_deinit( const mbedtls_ecp_group *grp )
|
||||
* can be enabled by MBEDTLS_ECP_ALT_INIT and MBEDTLS_ECP_ALT_DEINIT.
|
||||
* can be enabled by MBEDTLS_ECP_INIT_ALT and MBEDTLS_ECP_DEINIT_ALT.
|
||||
* They are called before and after each point operation and provide an
|
||||
* opportunity to implement optimized set up and tear down instructions.
|
||||
*
|
||||
* Example: In case you uncomment MBEDTLS_ECP_FUNCTION_ALT and
|
||||
* MBEDTLS_ECP_DOUBLE_JAC, mbed TLS will still provide the ecp_double_jac
|
||||
* MBEDTLS_ECP_DOUBLE_JAC_ALT, mbed TLS will still provide the ecp_double_jac
|
||||
* function, but will use your ecp_double_jac_alt if the group is supported
|
||||
* (your ecp_alt_grp_capable function returns 1 when receives it as an
|
||||
* argument). If the group is not supported then the original implementation is
|
||||
@ -334,8 +334,8 @@
|
||||
/* Required for all the functions in this section */
|
||||
//#define MBEDTLS_ECP_FUNCTION_ALT
|
||||
/* Utility functions for setup and cleanup */
|
||||
//#define MBEDTLS_ECP_ALT_INIT
|
||||
//#define MBEDTLS_ECP_ALT_DEINIT
|
||||
//#define MBEDTLS_ECP_INIT_ALT
|
||||
//#define MBEDTLS_ECP_DEINIT_ALT
|
||||
/* Support for Weierstrass curves with Jacobi representation */
|
||||
//#define MBEDTLS_ECP_RANDOMIZE_JAC_ALT
|
||||
//#define MBEDTLS_ECP_ADD_MIXED_ALT
|
||||
|
@ -29,12 +29,13 @@
|
||||
|
||||
unsigned char ecp_alt_grp_capable( const mbedtls_ecp_group *grp );
|
||||
|
||||
#if defined(MBEDTLS_ECP_ALT_INIT)
|
||||
#if defined(MBEDTLS_ECP_INIT_ALT)
|
||||
int ecp_alt_init( const mbedtls_ecp_group *grp );
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ECP_ALT_DEINIT)
|
||||
#if defined(MBEDTLS_ECP_DEINIT_ALT)
|
||||
void ecp_alt_deinit( const mbedtls_ecp_group *grp );
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ECP_RANDOMIZE_JAC_ALT)
|
||||
int ecp_randomize_jac_alt( const mbedtls_ecp_group *grp, mbedtls_ecp_point *pt,
|
||||
|
@ -1685,7 +1685,7 @@ int mbedtls_ecp_mul( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
|
||||
( ret = mbedtls_ecp_check_pubkey( grp, P ) ) != 0 )
|
||||
return( ret );
|
||||
|
||||
#if defined(MBEDTLS_ECP_ALT_INIT)
|
||||
#if defined(MBEDTLS_ECP_INIT_ALT)
|
||||
if ( ecp_alt_grp_capable( grp ) )
|
||||
{
|
||||
MBEDTLS_MPI_CHK( ecp_alt_init( grp ) );
|
||||
@ -1702,11 +1702,11 @@ int mbedtls_ecp_mul( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
|
||||
ret = ecp_mul_comb( grp, R, m, P, f_rng, p_rng );
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ECP_ALT_INIT)
|
||||
#if defined(MBEDTLS_ECP_INIT_ALT)
|
||||
cleanup:
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ECP_ALT_DEINIT)
|
||||
#if defined(MBEDTLS_ECP_DEINIT_ALT)
|
||||
if ( ecp_alt_grp_capable( grp ) )
|
||||
{
|
||||
ecp_alt_deinit( grp );
|
||||
@ -1815,7 +1815,7 @@ int mbedtls_ecp_muladd( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
|
||||
MBEDTLS_MPI_CHK( mbedtls_ecp_mul_shortcuts( grp, &mP, m, P ) );
|
||||
MBEDTLS_MPI_CHK( mbedtls_ecp_mul_shortcuts( grp, R, n, Q ) );
|
||||
|
||||
#if defined(MBEDTLS_ECP_ALT_INIT)
|
||||
#if defined(MBEDTLS_ECP_INIT_ALT)
|
||||
if ( ecp_alt_grp_capable( grp ) )
|
||||
{
|
||||
MBEDTLS_MPI_CHK( ecp_alt_init( grp ) );
|
||||
@ -1826,7 +1826,7 @@ int mbedtls_ecp_muladd( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
|
||||
|
||||
cleanup:
|
||||
|
||||
#if defined(MBEDTLS_ECP_ALT_DEINIT)
|
||||
#if defined(MBEDTLS_ECP_DEINIT_ALT)
|
||||
if ( ecp_alt_grp_capable( grp ) )
|
||||
{
|
||||
ecp_alt_deinit( grp );
|
||||
|
Loading…
Reference in New Issue
Block a user