Lines Matching refs:A1
129 static int witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1,
249 BIGNUM *A1, *A1_odd, *check; /* taken from ctx */
290 A1 = BN_CTX_get(ctx);
295 /* compute A1 := A - 1 */
296 if (!BN_copy(A1, A))
298 if (!BN_sub_word(A1, 1))
300 if (BN_is_zero(A1))
306 /* write A1 as A1_odd * 2^k */
308 while (!BN_is_bit_set(A1, k))
310 if (!BN_rshift(A1_odd, A1, k))
322 if (!BN_pseudo_rand_range(check, A1))
328 j = witness(check, A, A1, A1_odd, k, ctx, mont);
352 static int witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1,
359 if (BN_cmp(w, a1) == 0)
368 if (BN_cmp(w, a1) == 0)