Home | History | Annotate | Download | only in ec

Lines Matching refs:pub_key

82 	ret->pub_key = NULL;
126 if (r->pub_key != NULL)
127 EC_POINT_free(r->pub_key);
161 if (src->pub_key && src->group)
163 if (dest->pub_key)
164 EC_POINT_free(dest->pub_key);
165 dest->pub_key = EC_POINT_new(src->group);
166 if (dest->pub_key == NULL)
168 if (!EC_POINT_copy(dest->pub_key, src->pub_key))
238 EC_POINT *pub_key = NULL;
266 if (eckey->pub_key == NULL)
268 pub_key = EC_POINT_new(eckey->group);
269 if (pub_key == NULL)
273 pub_key = eckey->pub_key;
275 if (!EC_POINT_mul(eckey->group, pub_key, priv_key, NULL, NULL, ctx))
279 eckey->pub_key = pub_key;
286 if (pub_key != NULL && eckey->pub_key == NULL)
287 EC_POINT_free(pub_key);
302 if (!eckey || !eckey->group || !eckey->pub_key)
308 if (EC_POINT_is_at_infinity(eckey->group, eckey->pub_key))
319 /* testing whether the pub_key is on the elliptic curve */
320 if (!EC_POINT_is_on_curve(eckey->group, eckey->pub_key, ctx))
325 /* testing whether pub_key * order is the point at infinity */
332 if (!EC_POINT_mul(eckey->group, point, NULL, eckey->pub_key, order, ctx))
343 * check if generator * priv_key == pub_key
358 if (EC_POINT_cmp(eckey->group, point, eckey->pub_key,
402 return key->pub_key;
405 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key)
407 if (key->pub_key != NULL)
408 EC_POINT_free(key->pub_key);
409 key->pub_key = EC_POINT_dup(pub_key, key->group);
410 return (key->pub_key == NULL) ? 0 : 1;