• Home
  • Raw
  • Download

Lines Matching refs:p

75 	struct ecc_point *p = kmalloc(sizeof(*p), GFP_KERNEL);  in ecc_alloc_point()  local
77 if (!p) in ecc_alloc_point()
80 p->x = ecc_alloc_digits_space(ndigits); in ecc_alloc_point()
81 if (!p->x) in ecc_alloc_point()
84 p->y = ecc_alloc_digits_space(ndigits); in ecc_alloc_point()
85 if (!p->y) in ecc_alloc_point()
88 p->ndigits = ndigits; in ecc_alloc_point()
90 return p; in ecc_alloc_point()
93 ecc_free_digits_space(p->x); in ecc_alloc_point()
95 kfree(p); in ecc_alloc_point()
99 static void ecc_free_point(struct ecc_point *p) in ecc_free_point() argument
101 if (!p) in ecc_free_point()
104 kzfree(p->x); in ecc_free_point()
105 kzfree(p->y); in ecc_free_point()
106 kzfree(p); in ecc_free_point()
1152 u64 *curve_prime = curve->p; in ecc_point_mult()
1207 const struct ecc_point *p, const struct ecc_point *q, in ecc_point_add() argument
1217 vli_mod_sub(z, result->x, p->x, curve->p, ndigits); in ecc_point_add()
1218 vli_set(px, p->x, ndigits); in ecc_point_add()
1219 vli_set(py, p->y, ndigits); in ecc_point_add()
1220 xycz_add(px, py, result->x, result->y, curve->p, ndigits); in ecc_point_add()
1221 vli_mod_inv(z, z, curve->p, ndigits); in ecc_point_add()
1222 apply_z(result->x, result->y, z, curve->p, ndigits); in ecc_point_add()
1229 const u64 *u1, const struct ecc_point *p, in ecc_point_mult_shamir() argument
1245 ecc_point_add(&sum, p, q, curve); in ecc_point_mult_shamir()
1247 points[1] = p; in ecc_point_mult_shamir()
1263 ecc_point_double_jacobian(rx, ry, z, curve->p, ndigits); in ecc_point_mult_shamir()
1273 apply_z(tx, ty, z, curve->p, ndigits); in ecc_point_mult_shamir()
1274 vli_mod_sub(tz, rx, tx, curve->p, ndigits); in ecc_point_mult_shamir()
1275 xycz_add(tx, ty, rx, ry, curve->p, ndigits); in ecc_point_mult_shamir()
1276 vli_mod_mult_fast(z, z, tz, curve->p, ndigits); in ecc_point_mult_shamir()
1279 vli_mod_inv(z, z, curve->p, ndigits); in ecc_point_mult_shamir()
1280 apply_z(rx, ry, z, curve->p, ndigits); in ecc_point_mult_shamir()
1436 if (vli_cmp(curve->p, pk->x, pk->ndigits) != 1) in ecc_is_pubkey_valid_partial()
1438 if (vli_cmp(curve->p, pk->y, pk->ndigits) != 1) in ecc_is_pubkey_valid_partial()
1442 vli_mod_square_fast(yy, pk->y, curve->p, pk->ndigits); /* y^2 */ in ecc_is_pubkey_valid_partial()
1443 vli_mod_square_fast(xxx, pk->x, curve->p, pk->ndigits); /* x^2 */ in ecc_is_pubkey_valid_partial()
1444 vli_mod_mult_fast(xxx, xxx, pk->x, curve->p, pk->ndigits); /* x^3 */ in ecc_is_pubkey_valid_partial()
1445 vli_mod_mult_fast(w, curve->a, pk->x, curve->p, pk->ndigits); /* a·x */ in ecc_is_pubkey_valid_partial()
1446 vli_mod_add(w, w, curve->b, curve->p, pk->ndigits); /* a·x + b */ in ecc_is_pubkey_valid_partial()
1447 vli_mod_add(w, w, xxx, curve->p, pk->ndigits); /* x^3 + a·x + b */ in ecc_is_pubkey_valid_partial()