Home | History | Annotate | Download | only in ec

Lines Matching refs:curve

175         X9_62_CURVE       *curve;
246 ASN1_SIMPLE(ECPARAMETERS, curve, X9_62_CURVE),
430 static int ec_asn1_group2curve(const EC_GROUP *group, X9_62_CURVE *curve)
439 if (!group || !curve || !curve->a || !curve->b)
516 if (!M_ASN1_OCTET_STRING_set(curve->a, a_buf, len_1) ||
517 !M_ASN1_OCTET_STRING_set(curve->b, b_buf, len_2))
526 if (!curve->seed)
527 if ((curve->seed = ASN1_BIT_STRING_new()) == NULL)
532 curve->seed->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07);
533 curve->seed->flags |= ASN1_STRING_FLAG_BITS_LEFT;
534 if (!ASN1_BIT_STRING_set(curve->seed, group->seed,
543 if (curve->seed)
545 ASN1_BIT_STRING_free(curve->seed);
546 curve->seed = NULL;
602 /* set the curve */
603 if (!ec_asn1_group2curve(group, ret->curve))
710 * the elliptic curve parameters
755 /* now extract the curve parameters a and b */
756 if (!params->curve || !params->curve->a ||
757 !params->curve->a->data || !params->curve->b ||
758 !params->curve->b->data)
763 a = BN_bin2bn(params->curve->a->data, params->curve->a->length, NULL);
769 b = BN_bin2bn(params->curve->b->data, params->curve->b->length, NULL);
867 /* we have a curve over a prime field */
910 if (params->curve->seed != NULL)
914 if (!(ret->seed = OPENSSL_malloc(params->curve->seed->length)))
920 memcpy(ret->seed, params->curve->seed->data,
921 params->curve->seed->length);
922 ret->seed_len = params->curve->seed->length;
1017 { /* the curve is given by an OID */