- Timestamp:
- Jun 22, 2021, 9:00:19 PM (3 years ago)
- Location:
- azure_iot_hub_f767zi/trunk/wolfssl-4.7.0
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
azure_iot_hub_f767zi/trunk/wolfssl-4.7.0/wolfssl/wolfcrypt/integer.h
r457 r464 34 34 */ 35 35 #include <wolfssl/wolfcrypt/types.h> /* will set MP_xxBIT if not default */ 36 #if def WOLFSSL_SP_MATH36 #if defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_SP_MATH_ALL) 37 37 #include <wolfssl/wolfcrypt/sp_int.h> 38 38 #elif defined(USE_FAST_MATH) … … 43 43 44 44 #ifndef CHAR_BIT 45 #include <limits.h> 45 #if defined(WOLFSSL_LINUXKM) 46 #include <linux/limits.h> 47 #else 48 #include <limits.h> 49 #endif 46 50 #endif 47 51 … … 69 73 70 74 /* detect 64-bit mode if possible */ 71 #if defined(__x86_64__) && !(defined (_MSC_VER) && defined(__clang__))75 #if (defined(__x86_64__) || defined(__aarch64__)) && !(defined (_MSC_VER) && defined(__clang__)) 72 76 #if !(defined(MP_64BIT) && defined(MP_16BIT) && defined(MP_8BIT)) 73 77 #define MP_64BIT … … 158 162 #define MP_MEM -2 /* out of mem */ 159 163 #define MP_VAL -3 /* invalid input */ 160 #define MP_NOT_INF 164 #define MP_NOT_INF -4 /* point not at infinity */ 161 165 #define MP_RANGE MP_NOT_INF 162 166 … … 302 306 MP_API void mp_clamp (mp_int * a); 303 307 MP_API void mp_exch (mp_int * a, mp_int * b); 308 MP_API int mp_cond_swap_ct (mp_int * a, mp_int * b, int c, int m); 304 309 MP_API void mp_rshd (mp_int * a, int b); 305 310 MP_API void mp_rshb (mp_int * a, int b); … … 319 324 MP_API int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d); 320 325 MP_API int mp_div_2(mp_int * a, mp_int * b); 326 MP_API int mp_div_2_mod_ct (mp_int* a, mp_int* b, mp_int* c); 321 327 MP_API int mp_add (mp_int * a, mp_int * b, mp_int * c); 322 328 int s_mp_add (mp_int * a, mp_int * b, mp_int * c); … … 333 339 int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho); 334 340 MP_API int mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho); 341 #define mp_montgomery_reduce_ex(x, n, rho, ct) mp_montgomery_reduce (x, n, rho) 335 342 MP_API void mp_dr_setup(mp_int *a, mp_digit *d); 336 343 MP_API int mp_dr_reduce (mp_int * x, mp_int * n, mp_digit k); … … 356 363 MP_API int mp_submod (mp_int* a, mp_int* b, mp_int* c, mp_int* d); 357 364 MP_API int mp_addmod (mp_int* a, mp_int* b, mp_int* c, mp_int* d); 365 MP_API int mp_submod_ct (mp_int* a, mp_int* b, mp_int* c, mp_int* d); 366 MP_API int mp_addmod_ct (mp_int* a, mp_int* b, mp_int* c, mp_int* d); 358 367 MP_API int mp_mul_d (mp_int * a, mp_digit b, mp_int * c); 359 368 MP_API int mp_2expt (mp_int * a, int b);
Note:
See TracChangeset
for help on using the changeset viewer.