Home | History | Annotate | Download | only in ec

Lines Matching refs:pub_key

85 	ret->pub_key = NULL;
129 if (r->pub_key != NULL)
130 EC_POINT_free(r->pub_key);
164 if (src->pub_key && src->group)
166 if (dest->pub_key)
167 EC_POINT_free(dest->pub_key);
168 dest->pub_key = EC_POINT_new(src->group);
169 if (dest->pub_key == NULL)
171 if (!EC_POINT_copy(dest->pub_key, src->pub_key))
242 EC_POINT *pub_key = NULL;
275 if (eckey->pub_key == NULL)
277 pub_key = EC_POINT_new(eckey->group);
278 if (pub_key == NULL)
282 pub_key = eckey->pub_key;
284 if (!EC_POINT_mul(eckey->group, pub_key, priv_key, NULL, NULL, ctx))
288 eckey->pub_key = pub_key;
295 if (pub_key != NULL && eckey->pub_key == NULL)
296 EC_POINT_free(pub_key);
311 if (!eckey || !eckey->group || !eckey->pub_key)
317 if (EC_POINT_is_at_infinity(eckey->group, eckey->pub_key))
328 /* testing whether the pub_key is on the elliptic curve */
329 if (!EC_POINT_is_on_curve(eckey->group, eckey->pub_key, ctx))
334 /* testing whether pub_key * order is the point at infinity */
341 if (!EC_POINT_mul(eckey->group, point, NULL, eckey->pub_key, order, ctx))
352 * check if generator * priv_key == pub_key
367 if (EC_POINT_cmp(eckey->group, point, eckey->pub_key,
487 return key->pub_key;
490 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key)
492 if (key->pub_key != NULL)
493 EC_POINT_free(key->pub_key);
494 key->pub_key = EC_POINT_dup(pub_key, key->group);
495 return (key->pub_key == NULL) ? 0 : 1;