Lines Matching refs:curve

71     X9_62_CURVE *curve;
148 ASN1_SIMPLE(ECPARAMETERS, curve, X9_62_CURVE),
309 static int ec_asn1_group2curve(const EC_GROUP *group, X9_62_CURVE *curve)
316 if (!group || !curve || !curve->a || !curve->b)
331 * Per SEC 1, the curve coefficients must be padded up to size. See C.2's
348 if (!ASN1_OCTET_STRING_set(curve->a, a_buf, len)
349 || !ASN1_OCTET_STRING_set(curve->b, b_buf, len)) {
356 if (!curve->seed)
357 if ((curve->seed = ASN1_BIT_STRING_new()) == NULL) {
361 curve->seed->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07);
362 curve->seed->flags |= ASN1_STRING_FLAG_BITS_LEFT;
363 if (!ASN1_BIT_STRING_set(curve->seed, group->seed,
369 ASN1_BIT_STRING_free(curve->seed);
370 curve->seed = NULL;
411 /* set the curve */
412 if (!ec_asn1_group2curve(group, ret->curve)) {
490 * use the asn1 OID to describe the elliptic curve parameters
540 * Now extract the curve parameters a and b. Note that, although SEC 1
545 if (params->curve == NULL
546 || params->curve->a == NULL || params->curve->a->data == NULL
547 || params->curve->b == NULL || params->curve->b->data == NULL) {
551 a = BN_bin2bn(params->curve->a->data, params->curve->a->length, NULL);
556 b = BN_bin2bn(params->curve->b->data, params->curve->b->length, NULL);
653 /* we have a curve over a prime field */
689 if (params->curve->seed != NULL) {
696 if (params->curve->seed->length == 0) {
701 if ((ret->seed = OPENSSL_malloc(params->curve->seed->length)) == NULL) {
705 memcpy(ret->seed, params->curve->seed->data,
706 params->curve->seed->length);
707 ret->seed_len = params->curve->seed->length;
796 * the same curve, we prefer the SECP nid when matching explicit
825 if (params->curve->seed == NULL) {
861 /* the curve is given by an OID */