• Home
  • Raw
  • Download

Lines Matching refs:a

52 void p256_init(p256_int* a) {  in p256_init()  argument
53 memset(a, 0, sizeof(*a)); in p256_init()
56 void p256_clear(p256_int* a) { p256_init(a); } in p256_clear() argument
63 int p256_is_zero(const p256_int* a) { in p256_is_zero() argument
65 for (i = 0; i < P256_NDIGITS; ++i) result |= P256_DIGIT(a, i); in p256_is_zero()
71 static p256_digit mulAdd(const p256_int* a, in mulAdd() argument
80 carry += (p256_ddigit)P256_DIGIT(a, i) * b; in mulAdd()
89 const p256_digit* a, in subTop() argument
97 borrow -= *a++; in subTop()
144 const p256_int* a, in p256_modmul() argument
155 top = mulAdd(a, P256_DIGIT(b, i), 0, tmp + i); in p256_modmul()
160 top = mulAdd(a, top_b, 0, tmp + i); in p256_modmul()
191 int p256_is_odd(const p256_int* a) { return P256_DIGIT(a, 0) & 1; } in p256_is_odd() argument
192 int p256_is_even(const p256_int* a) { return !(P256_DIGIT(a, 0) & 1); } in p256_is_even() argument
194 p256_digit p256_shl(const p256_int* a, int n, p256_int* b) { in p256_shl() argument
196 p256_digit top = P256_DIGIT(a, P256_NDIGITS - 1); in p256_shl()
200 p256_digit accu = (P256_DIGIT(a, i) << n); in p256_shl()
201 accu |= (P256_DIGIT(a, i - 1) >> (P256_BITSPERDIGIT - n)); in p256_shl()
204 P256_DIGIT(b, i) = (P256_DIGIT(a, i) << n); in p256_shl()
211 void p256_shr(const p256_int* a, int n, p256_int* b) { in p256_shr() argument
216 p256_digit accu = (P256_DIGIT(a, i) >> n); in p256_shr()
217 accu |= (P256_DIGIT(a, i + 1) << (P256_BITSPERDIGIT - n)); in p256_shr()
220 P256_DIGIT(b, i) = (P256_DIGIT(a, i) >> n); in p256_shr()
223 static void p256_shr1(const p256_int* a, int highbit, p256_int* b) { in p256_shr1() argument
227 p256_digit accu = (P256_DIGIT(a, i) >> 1); in p256_shr1()
228 accu |= (P256_DIGIT(a, i + 1) << (P256_BITSPERDIGIT - 1)); in p256_shr1()
231 P256_DIGIT(b, i) = (P256_DIGIT(a, i) >> 1) | in p256_shr1()
236 int p256_cmp(const p256_int* a, const p256_int* b) { in p256_cmp() argument
242 borrow += (p256_sddigit)P256_DIGIT(a, i) - P256_DIGIT(b, i); in p256_cmp()
252 int p256_sub(const p256_int* a, const p256_int* b, p256_int* c) { in p256_sub() argument
257 borrow += (p256_sddigit)P256_DIGIT(a, i) - P256_DIGIT(b, i); in p256_sub()
265 int p256_add(const p256_int* a, const p256_int* b, p256_int* c) { in p256_add() argument
270 carry += (p256_ddigit)P256_DIGIT(a, i) + P256_DIGIT(b, i); in p256_add()
278 int p256_add_d(const p256_int* a, p256_digit d, p256_int* b) { in p256_add_d() argument
283 carry += (p256_ddigit)P256_DIGIT(a, i); in p256_add_d()
292 const p256_int* a, in p256_modinv_vartime() argument
297 p256_int V = *a; in p256_modinv_vartime()