Lines Matching defs:curve

184     X9_62_CURVE *curve;
255 ASN1_SIMPLE(ECPARAMETERS, curve, X9_62_CURVE),
436 static int ec_asn1_group2curve(const EC_GROUP *group, X9_62_CURVE *curve)
445 if (!group || !curve || !curve->a || !curve->b)
507 if (!M_ASN1_OCTET_STRING_set(curve->a, a_buf, len_1) ||
508 !M_ASN1_OCTET_STRING_set(curve->b, b_buf, len_2)) {
515 if (!curve->seed)
516 if ((curve->seed = ASN1_BIT_STRING_new()) == NULL) {
520 curve->seed->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07);
521 curve->seed->flags |= ASN1_STRING_FLAG_BITS_LEFT;
522 if (!ASN1_BIT_STRING_set(curve->seed, group->seed,
528 if (curve->seed) {
529 ASN1_BIT_STRING_free(curve->seed);
530 curve->seed = NULL;
580 /* set the curve */
581 if (!ec_asn1_group2curve(group, ret->curve)) {
670 * use the asn1 OID to describe the the elliptic curve parameters
711 /* now extract the curve parameters a and b */
712 if (!params->curve || !params->curve->a ||
713 !params->curve->a->data || !params->curve->b ||
714 !params->curve->b->data) {
718 a = BN_bin2bn(params->curve->a->data, params->curve->a->length, NULL);
723 b = BN_bin2bn(params->curve->b->data, params->curve->b->length, NULL);
822 /* we have a curve over a prime field */
858 if (params->curve->seed != NULL) {
861 if (!(ret->seed = OPENSSL_malloc(params->curve->seed->length))) {
865 memcpy(ret->seed, params->curve->seed->data,
866 params->curve->seed->length);
867 ret->seed_len = params->curve->seed->length;
955 * the same curve, we prefer the SECP nid when matching explicit
986 if (params->curve->seed == NULL) {
1026 if (params->type == 0) { /* the curve is given by an OID */