Lines Matching refs:curve
179 X9_62_CURVE *curve;
250 ASN1_SIMPLE(ECPARAMETERS, curve, X9_62_CURVE),
431 static int ec_asn1_group2curve(const EC_GROUP *group, X9_62_CURVE *curve)
440 if (!group || !curve || !curve->a || !curve->b)
502 if (!M_ASN1_OCTET_STRING_set(curve->a, a_buf, len_1) ||
503 !M_ASN1_OCTET_STRING_set(curve->b, b_buf, len_2)) {
510 if (!curve->seed)
511 if ((curve->seed = ASN1_BIT_STRING_new()) == NULL) {
515 curve->seed->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07);
516 curve->seed->flags |= ASN1_STRING_FLAG_BITS_LEFT;
517 if (!ASN1_BIT_STRING_set(curve->seed, group->seed,
523 if (curve->seed) {
524 ASN1_BIT_STRING_free(curve->seed);
525 curve->seed = NULL;
575 /* set the curve */
576 if (!ec_asn1_group2curve(group, ret->curve)) {
665 * use the asn1 OID to describe the the elliptic curve parameters
704 /* now extract the curve parameters a and b */
705 if (!params->curve || !params->curve->a ||
706 !params->curve->a->data || !params->curve->b ||
707 !params->curve->b->data) {
711 a = BN_bin2bn(params->curve->a->data, params->curve->a->length, NULL);
716 b = BN_bin2bn(params->curve->b->data, params->curve->b->length, NULL);
815 /* we have a curve over a prime field */
851 if (params->curve->seed != NULL) {
854 if (!(ret->seed = OPENSSL_malloc(params->curve->seed->length))) {
858 memcpy(ret->seed, params->curve->seed->data,
859 params->curve->seed->length);
860 ret->seed_len = params->curve->seed->length;
941 if (params->type == 0) { /* the curve is given by an OID */