math descriptor: add parameter "b" to isprime()
This commit is contained in:
@@ -326,10 +326,11 @@ typedef struct {
|
||||
|
||||
/** Primality testing
|
||||
@param a The integer to test
|
||||
@param b The destination of the result (FP_YES if prime)
|
||||
@param b The number of tests that shall be executed
|
||||
@param c The destination of the result (FP_YES if prime)
|
||||
@return CRYPT_OK on success
|
||||
*/
|
||||
int (*isprime)(void *a, int *b);
|
||||
int (*isprime)(void *a, int b, int *c);
|
||||
|
||||
/* ---- (optional) ecc point math ---- */
|
||||
|
||||
@@ -516,7 +517,7 @@ extern const ltc_math_descriptor gmp_desc;
|
||||
#define mp_montgomery_free(a) ltc_mp.montgomery_deinit(a)
|
||||
|
||||
#define mp_exptmod(a,b,c,d) ltc_mp.exptmod(a,b,c,d)
|
||||
#define mp_prime_is_prime(a, b, c) ltc_mp.isprime(a, c)
|
||||
#define mp_prime_is_prime(a, b, c) ltc_mp.isprime(a, b, c)
|
||||
|
||||
#define mp_iszero(a) (mp_cmp_d(a, 0) == LTC_MP_EQ ? LTC_MP_YES : LTC_MP_NO)
|
||||
#define mp_isodd(a) (mp_get_digit_count(a) > 0 ? (mp_get_digit(a, 0) & 1 ? LTC_MP_YES : LTC_MP_NO) : LTC_MP_NO)
|
||||
|
||||
Reference in New Issue
Block a user