Lines Matching refs:pub_key

98     EC_POINT_free(r->pub_key);
135 if (src->pub_key != NULL) {
136 EC_POINT_free(dest->pub_key);
137 dest->pub_key = EC_POINT_new(src->group);
138 if (dest->pub_key == NULL)
140 if (!EC_POINT_copy(dest->pub_key, src->pub_key))
257 EC_POINT *pub_key = NULL;
307 if (eckey->pub_key == NULL) {
308 pub_key = EC_POINT_new(group);
309 if (pub_key == NULL)
312 pub_key = eckey->pub_key;
314 /* Step (8) : pub_key = priv_key * G (where G is a point on the curve) */
315 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx))
319 eckey->pub_key = pub_key;
321 pub_key = NULL;
342 if (eckey->pub_key != NULL)
343 EC_POINT_set_to_infinity(group, eckey->pub_key);
346 EC_POINT_free(pub_key);
368 * pub_key = priv_key * G (where G is a point on the curve)
370 ret = EC_POINT_mul(eckey->group, eckey->pub_key, eckey->priv_key, NULL,
382 if (eckey == NULL || eckey->group == NULL || eckey->pub_key == NULL) {
415 if (!EC_POINT_get_affine_coordinates(key->group, key->pub_key, x, y, ctx))
443 if (eckey == NULL || eckey->group == NULL || eckey->pub_key == NULL) {
449 if (EC_POINT_is_at_infinity(eckey->group, eckey->pub_key)) {
460 /* 5.6.2.3.3 (Step 3) is the pub_key on the elliptic curve */
461 if (EC_POINT_is_on_curve(eckey->group, eckey->pub_key, ctx) <= 0) {
490 /* 5.6.2.3.3 (Step 4) : pub_key * order is the point at infinity. */
491 if (!EC_POINT_mul(eckey->group, point, NULL, eckey->pub_key, order, ctx)) {
527 * Check if generator * priv_key = pub_key
536 || eckey->pub_key == NULL
551 if (EC_POINT_cmp(eckey->group, point, eckey->pub_key, ctx) != 0) {
792 return key->pub_key;
795 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key)
798 && key->meth->set_public(key, pub_key) == 0)
800 EC_POINT_free(key->pub_key);
801 key->pub_key = EC_POINT_dup(pub_key, key->group);
803 return (key->pub_key == NULL) ? 0 : 1;
870 if (key == NULL || key->pub_key == NULL || key->group == NULL)
872 return EC_POINT_point2buf(key->group, key->pub_key, form, pbuf, ctx);
880 if (key->pub_key == NULL)
881 key->pub_key = EC_POINT_new(key->group);
882 if (key->pub_key == NULL)
884 if (EC_POINT_oct2point(key->group, key->pub_key, buf, len, ctx) == 0)