mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
@ -56,8 +56,8 @@ typedef enum
|
|||||||
MBEDTLS_MPI_MOD_REP_OPT_RED
|
MBEDTLS_MPI_MOD_REP_OPT_RED
|
||||||
} mbedtls_mpi_mod_rep_selector;
|
} mbedtls_mpi_mod_rep_selector;
|
||||||
|
|
||||||
#define MBEDTLS_MI_MOD_EXT_REP_LE 0x1
|
#define MBEDTLS_MPI_MOD_EXT_REP_LE 0x1
|
||||||
#define MBEDTLS_MI_MOD_EXT_REP_BE 0x2
|
#define MBEDTLS_MPI_MOD_EXT_REP_BE 0x2
|
||||||
|
|
||||||
void mbedtls_mpi_mod_residue_release( mbedtls_mpi_mod_residue *r );
|
void mbedtls_mpi_mod_residue_release( mbedtls_mpi_mod_residue *r );
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ int mbedtls_mpi_mod_residue_setup( mbedtls_mpi_mod_residue *r,
|
|||||||
|
|
||||||
void mbedtls_mpi_mod_modulus_init( mbedtls_mpi_mod_modulus *m );
|
void mbedtls_mpi_mod_modulus_init( mbedtls_mpi_mod_modulus *m );
|
||||||
|
|
||||||
void mbedtls_mpi_mod_modulus_init( mbedtls_mpi_mod_modulus *m );
|
void mbedtls_mpi_mod_modulus_free( mbedtls_mpi_mod_modulus *m );
|
||||||
|
|
||||||
int mbedtls_mpi_mod_modulus_setup( mbedtls_mpi_mod_modulus *m,
|
int mbedtls_mpi_mod_modulus_setup( mbedtls_mpi_mod_modulus *m,
|
||||||
mbedtls_mpi_uint *p,
|
mbedtls_mpi_uint *p,
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_BIGNUM_CORE_H
|
#ifndef MBEDTLS_BIGNUM_MOD_RAW_H
|
||||||
#define MBEDTLS_BIGNUM_CORE_H
|
#define MBEDTLS_BIGNUM_MOD_RAW_H
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
@ -36,4 +36,4 @@ int mbedtls_mpi_mod_raw_write( mbedtls_mpi_uint *X,
|
|||||||
unsigned char *buf,
|
unsigned char *buf,
|
||||||
size_t buflen );
|
size_t buflen );
|
||||||
|
|
||||||
#endif /* MBEDTLS_BIGNUM_CORE_H */
|
#endif /* MBEDTLS_BIGNUM_MOD_RAW_H */
|
||||||
|
@ -413,10 +413,10 @@ int mbedtls_mpi_mod_raw_read( mbedtls_mpi_uint *X,
|
|||||||
unsigned char *buf,
|
unsigned char *buf,
|
||||||
size_t buflen )
|
size_t buflen )
|
||||||
{
|
{
|
||||||
if( m->ext_rep & MBEDTLS_MI_MOD_EXT_REP_LE )
|
if( m->ext_rep & MBEDTLS_MPI_MOD_EXT_REP_LE )
|
||||||
return mbedtls_mpi_core_read_le( X, m->n, buf, buflen );
|
return mbedtls_mpi_core_read_le( X, m->n, buf, buflen );
|
||||||
|
|
||||||
else if( m->ext_rep & MBEDTLS_MI_MOD_EXT_REP_BE )
|
else if( m->ext_rep & MBEDTLS_MPI_MOD_EXT_REP_BE )
|
||||||
return mbedtls_mpi_core_read_be( X, m->n, buf, buflen );
|
return mbedtls_mpi_core_read_be( X, m->n, buf, buflen );
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -430,10 +430,10 @@ int mbedtls_mpi_mod_raw_write( mbedtls_mpi_uint *X,
|
|||||||
unsigned char *buf,
|
unsigned char *buf,
|
||||||
size_t buflen )
|
size_t buflen )
|
||||||
{
|
{
|
||||||
if( m->ext_rep & MBEDTLS_MI_MOD_EXT_REP_LE )
|
if( m->ext_rep & MBEDTLS_MPI_MOD_EXT_REP_LE )
|
||||||
return mbedtls_mpi_core_write_le( X, m->n, buf, buflen );
|
return mbedtls_mpi_core_write_le( X, m->n, buf, buflen );
|
||||||
|
|
||||||
else if( m->ext_rep & MBEDTLS_MI_MOD_EXT_REP_BE )
|
else if( m->ext_rep & MBEDTLS_MPI_MOD_EXT_REP_BE )
|
||||||
return mbedtls_mpi_core_write_be( X, m->n, buf, buflen );
|
return mbedtls_mpi_core_write_be( X, m->n, buf, buflen );
|
||||||
|
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user