Home
last modified time | relevance | path

Searched full:curve (Results 1 – 25 of 446) sorted by relevance

12345678910>>...18

/freebsd/crypto/openssl/test/ssl-tests/
H A D14-curves.cnf5 test-0 = 0-curve-prime256v1
6 test-1 = 1-curve-secp384r1
7 test-2 = 2-curve-secp521r1
8 test-3 = 3-curve-X25519
9 test-4 = 4-curve-X448
10 test-5 = 5-curve-ffdhe2048
11 test-6 = 6-curve-ffdhe3072
12 test-7 = 7-curve-ffdhe4096
13 test-8 = 8-curve-ffdhe6144
14 test-9 = 9-curve-ffdhe8192
[all …]
H A D14-curves.cnf.in56 my $curve = $curves[$_];
58 name => "curve-${curve}",
60 "Curves" => $curve,
66 "Curves" => $curve
69 "ExpectedTmpKeyType" => get_key_type($curve),
76 my $curve = $curves_tls_1_2[$_];
78 name => "curve-${curve}",
80 "Curves" => $curve,
[all...]
/freebsd/contrib/bearssl/src/ec/
H A Dec_all_m31.c28 api_generator(int curve, size_t *len) in api_generator() argument
30 switch (curve) { in api_generator()
33 return br_ec_p256_m64.generator(curve, len); in api_generator()
35 return br_ec_p256_m31.generator(curve, len); in api_generator()
39 return br_ec_c25519_m64.generator(curve, len); in api_generator()
41 return br_ec_c25519_m31.generator(curve, len); in api_generator()
44 return br_ec_prime_i31.generator(curve, len); in api_generator()
49 api_order(int curve, size_t *len) in api_order() argument
51 switch (curve) { in api_order()
54 return br_ec_p256_m64.order(curve, len); in api_order()
[all …]
H A Dec_all_m15.c28 api_generator(int curve, size_t *len) in api_generator() argument
30 switch (curve) { in api_generator()
32 return br_ec_p256_m15.generator(curve, len); in api_generator()
34 return br_ec_c25519_m15.generator(curve, len); in api_generator()
36 return br_ec_prime_i15.generator(curve, len); in api_generator()
41 api_order(int curve, size_t *len) in api_order() argument
43 switch (curve) { in api_order()
45 return br_ec_p256_m15.order(curve, len); in api_order()
47 return br_ec_c25519_m15.order(curve, len); in api_order()
49 return br_ec_prime_i15.order(curve, len); in api_order()
[all …]
H A Dec_pubkey.c28 0, /* 0: not a valid curve ID */
66 int curve; in br_ec_compute_pub() local
69 curve = sk->curve; in br_ec_compute_pub()
70 if (curve < 0 || curve >= 32 || curve >= (int)(sizeof POINT_LEN) in br_ec_compute_pub()
71 || ((impl->supported_curves >> curve) & 1) == 0) in br_ec_compute_pub()
76 return POINT_LEN[curve]; in br_ec_compute_pub()
78 len = impl->mulgen(kbuf, sk->x, sk->xlen, curve); in br_ec_compute_pub()
80 pk->curve = curve; in br_ec_compute_pub()
H A Dec_keygen.c31 void *kbuf, int curve) in br_ec_keygen() argument
38 if (curve < 0 || curve >= 32 in br_ec_keygen()
39 || ((impl->supported_curves >> curve) & 1) == 0) in br_ec_keygen()
43 order = impl->order(curve, &len); in br_ec_keygen()
58 * the value is strictly lower than the curve order (we also in br_ec_keygen()
81 sk->curve = curve; in br_ec_keygen()
/freebsd/contrib/bearssl/inc/
H A Dbearssl_ec.h44 * ## Elliptic Curve API
52 * Since all currently defined elliptic curve identifiers are in the 0..31
54 * word, such that bit x corresponds to curve of identifier x.
67 * point for that curve.
72 * that curve. That value uses unsigned big-endian encoding.
81 * Multiply a curve point with an integer.
85 * Multiply the curve generator with an integer. This may be faster
90 * Multiply two curve points by two integers, and return the sum of
93 * All curve points are represented in uncompressed format. The `mul()`
95 * are really part of the relevant curve subgroup.
[all …]
/freebsd/crypto/libecc/scripts/
H A Dexpand_libecc.py174 class Curve(object): class
196 def __init__(self, curve, x, y): argument
197 self.curve = curve
199 self.x = (x % curve.p)
203 self.y = (y % curve.p)
206 # Check that the point is indeed on the curve
208 if (pow(y, 2, curve.p) != ((pow(x, 3, curve.p) + (curve.a * x) + curve.b ) % curve.p)):
209 raise Exception("Error: point is not on curve!")
216 curve = self.curve
217 # Check that we are on the same curve
[all …]
H A Dgen_openssl_curves_tests.sh46 for curve in $CURVES
48 echo "Adding $curve"
49 openssl ecparam -param_enc explicit -outform DER -name $curve -out "$curve".der
50 $PYTHON $EXPAND_LIBECC --name="$curve" --ECfile="$curve".der --add-test-vectors=2
51 rm "$curve".der
/freebsd/contrib/wpa/src/common/
H A Ddpp_pkex.c37 const struct dpp_curve_params *curve = pkex->own_bi->curve; in dpp_pkex_build_exchange_req() local
43 Qi = dpp_pkex_derive_Qi(curve, v2 ? NULL : pkex->own_mac, pkex->code, in dpp_pkex_build_exchange_req()
59 pkex->x = dpp_gen_keypair(curve); in dpp_pkex_build_exchange_req()
62 pkex->x = dpp_gen_keypair(curve); in dpp_pkex_build_exchange_req()
86 attr_len += 4 + 2 * curve->prime_len; in dpp_pkex_build_exchange_req()
111 wpabuf_put_le16(msg, curve->ike_group); in dpp_pkex_build_exchange_req()
133 wpabuf_put_le16(msg, 2 * curve->prime_len); in dpp_pkex_build_exchange_req()
138 if (dpp_test_gen_invalid_key(msg, curve) < 0) in dpp_pkex_build_exchange_req()
144 Mx = wpabuf_put(msg, curve->prime_len); in dpp_pkex_build_exchange_req()
145 My = wpabuf_put(msg, curve->prime_len); in dpp_pkex_build_exchange_req()
[all …]
H A Ddpp_crypto.c26 /* The mandatory to support and the default NIST P-256 curve needs to
99 static int dpp_hash_vector(const struct dpp_curve_params *curve, in dpp_hash_vector() argument
103 if (curve->hash_len == 32) in dpp_hash_vector()
105 if (curve->hash_len == 48) in dpp_hash_vector()
107 if (curve->hash_len == 64) in dpp_hash_vector()
270 struct crypto_ec_key * dpp_gen_keypair(const struct dpp_curve_params *curve) in dpp_gen_keypair() argument
276 key = crypto_ec_key_gen(curve->ike_group); in dpp_gen_keypair()
284 struct crypto_ec_key * dpp_set_keypair(const struct dpp_curve_params **curve, in dpp_set_keypair() argument
302 *curve = dpp_get_curve_ike_group(group); in dpp_set_keypair()
303 if (!*curve) { in dpp_set_keypair()
[all …]
H A Ddpp_reconfig.c138 4 + auth->curve->nonce_len; in dpp_reconfig_build_req()
175 wpabuf_put_le16(msg, auth->curve->nonce_len); in dpp_reconfig_build_req()
176 wpabuf_put_data(msg, auth->c_nonce, auth->curve->nonce_len); in dpp_reconfig_build_req()
188 const struct dpp_curve_params *curve) in dpp_configurator_build_own_connector() argument
197 "DPP: Sign own Configurator Connector for reconfiguration with curve %s", in dpp_configurator_build_own_connector()
198 conf->curve->name); in dpp_configurator_build_own_connector()
199 conf->connector_key = dpp_gen_keypair(curve); in dpp_configurator_build_own_connector()
204 dppcon = wpabuf_alloc(1000 + 2 * curve->prime_len * 4 / 3); in dpp_configurator_build_own_connector()
217 curve) < 0) { in dpp_configurator_build_own_connector()
244 const struct dpp_curve_params *curve; in dpp_reconfig_init() local
[all …]
/freebsd/crypto/openssl/doc/man3/
H A DEC_GROUP_copy.pod75 EC_GROUP_copy() copies the curve B<src> into B<dst>. Both B<src> and B<dst> must use the same EC_ME…
83 EC_GROUP_set_generator() sets curve parameters that must be agreed by all participants using the cu…
85 curve chosen for cryptographic operations. Integers used for point multiplications will be between …
86 …s the B<order>. The B<order> multiplied by the B<cofactor> gives the number of points on the curve.
98 …ROUP_set_curve_name() and EC_GROUP_get_curve_name(), set and get the NID for the curve respectively
99 (see L<EC_GROUP_new(3)>). If a curve does not have a NID associated with it, then EC_GROUP_get_curv…
102 The asn1_flag value is used to determine whether the curve encoding uses
103 explicit parameters or a named curve using an ASN1 OID: many applications only
105 named curve form is used and the parameters must have a corresponding
106 named curve NID set. If asn1_flags is B<OPENSSL_EC_EXPLICIT_CURVE> the
[all …]
H A DEC_GROUP_new.pod76 Within the library there are two forms of elliptic curve that are of interest.
79 elliptic curve equation as follows:
85 curve equation is modified to:
94 a new curve can be constructed by calling EC_GROUP_new(), using the
99 It is then necessary to call EC_GROUP_set_curve() to set the curve parameters.
115 EC_GROUP_set_curve() sets the curve parameters I<p>, I<a> and I<b>. For a curve
116 over Fp I<p> is the prime for the field. For a curve over F2^m I<p> represents
123 EC_group_get_curve() obtains the previously set curve parameters.
137 Whilst the library can be used to create any curve using the functions described
156 readable comment string describing the curve.
[all …]
/freebsd/secure/lib/libcrypto/man/man3/
H A DEC_GROUP_copy.3212 \&\fBEC_GROUP_copy()\fR copies the curve \fBsrc\fR into \fBdst\fR. Both \fBsrc\fR and \fBdst\fR mus…
220 \&\fBEC_GROUP_set_generator()\fR sets curve parameters that must be agreed by all participants usin…
222 curve chosen for cryptographic operations. Integers used for point multiplications will be between …
223 …order\fR. The \fBorder\fR multiplied by the \fBcofactor\fR gives the number of points on the curve.
235 …ame()\fR and \fBEC_GROUP_get_curve_name()\fR, set and get the \s-1NID\s0 for the curve respectively
236 (see \fBEC_GROUP_new\fR\|(3)). If a curve does not have a \s-1NID\s0 associated with it, then EC_GR…
239 The asn1_flag value is used to determine whether the curve encoding uses
240 explicit parameters or a named curve using an \s-1ASN1 OID:\s0 many applications only
242 named curve form is used and the parameters must have a corresponding
243 named curve \s-1NID\s0 set. If asn1_flags is \fB\s-1OPENSSL_EC_EXPLICIT_CURVE\s0\fR the
[all …]
/freebsd/crypto/libecc/src/curves/
H A Daff_pt.c37 * function on given curve. Return 0 on success, -1 on error.
39 int aff_pt_init(aff_pt_t in, ec_shortw_crv_src_t curve) in aff_pt_init() argument
44 MUST_HAVE((curve != NULL), ret, err); in aff_pt_init()
46 ret = ec_shortw_crv_check_initialized(curve); EG(ret, err); in aff_pt_init()
47 ret = fp_init(&(in->x), curve->a.ctx); EG(ret, err); in aff_pt_init()
48 ret = fp_init(&(in->y), curve->a.ctx); EG(ret, err); in aff_pt_init()
50 in->crv = curve; in aff_pt_init()
58 * Initialize given point 'in' on given curve 'curve' and set its coordinates to
62 ec_shortw_crv_src_t curve, in aff_pt_init_from_coords() argument
67 ret = aff_pt_init(in, curve); EG(ret, err); in aff_pt_init_from_coords()
[all …]
H A Daff_pt_montgomery.c32 * function on given curve.
36 int aff_pt_montgomery_init(aff_pt_montgomery_t in, ec_montgomery_crv_src_t curve) in aff_pt_montgomery_init() argument
41 ret = ec_montgomery_crv_check_initialized(curve); EG(ret, err); in aff_pt_montgomery_init()
43 ret = fp_init(&(in->u), curve->A.ctx); EG(ret, err); in aff_pt_montgomery_init()
44 ret = fp_init(&(in->v), curve->A.ctx); EG(ret, err); in aff_pt_montgomery_init()
46 in->crv = curve; in aff_pt_montgomery_init()
55 * function on given curve with explicit coordinates.
60 ec_montgomery_crv_src_t curve, in aff_pt_montgomery_init_from_coords() argument
65 ret = aff_pt_montgomery_init(in, curve); EG(ret, err); in aff_pt_montgomery_init_from_coords()
76 * Note that the curve context pointed to by the point element (passed
[all …]
/freebsd/crypto/libecc/src/examples/basic/
H A Dcurve_basic_examples.c23 * curve underlying prime field, and computes y in Fp such that:
25 * curve parameters.
28 * point on our curve. The function then outputs the projective
43 * contains the curve coefficients a and b. in get_random_point_on_curve()
44 * curve_params->ec_fp is the Fp context of the curve. in get_random_point_on_curve()
54 /* Initialize our x value with the curve Fp context */ in get_random_point_on_curve()
76 * and (x, -y) both on the curve. If no square root exist, in get_random_point_on_curve()
80 /* Check that we indeed satisfy the curve equation */ in get_random_point_on_curve()
85 "solution to curve equation ...\n"); in get_random_point_on_curve()
115 /* libecc internal structure holding the curve parameters */ in check_curve()
[all …]
/freebsd/contrib/bearssl/src/x509/
H A Dskey_decoder.t0117 cc: set-ec-key ( curve xlen -- ) {
119 uint32_t curve = T0_POP();
120 CTX->key.ec.curve = curve;
195 : decode-EC ( lim curve -- lim )
196 { curve }
207 curve decode-EC-next
213 \ already been read. The curve ID is provided (0 if unknown).
214 : decode-EC-next ( lim curve -- lim )
215 { curve }
222 \ Next element might be the curve identifier.
[all …]
/freebsd/crypto/openssl/doc/man7/
H A DEVP_PKEY-EC.pod15 The normal way of specifying domain parameters for an EC curve is via the
16 curve name "group". For curves with no curve name, explicit parameters can be
29 The curve name.
38 For a curve over Fp I<p> is the prime for the field. For a curve over F2^m I<p>
49 I<a> and I<b> represents the coefficients of the curve
63 The I<generator> is a well defined point on the curve chosen for cryptographic
64 operations. The encoding conforms with Sec. 2.3.3 of the SECG SEC 1 ("Elliptic Curve
69 I<order> multiplied by the I<cofactor> gives the number of points on the curve.
74 curve parameters. Set to 1 if so or 0 if a named curve was used.
80 EC curve's cofactor (note for some curves the cofactor is 1).
[all …]
/freebsd/sys/dev/syscons/dragon/
H A Ddragon_saver.c55 #define CURVE 3 macro
59 static int curve; variable
118 if (curve > CURVE) { in dragon_update()
122 for (tmp = 0; tmp < 3*CURVE; ++tmp) { in dragon_update()
130 curve = 0; in dragon_update()
135 ++curve; in dragon_update()
139 switch (curve) { in dragon_update()
150 (void)gdraw(dx, dy, curve); out = 0; in dragon_update()
171 if (gdraw(dx, dy, curve)) { in dragon_update()
176 order = ORDER; /* force to terminate this curve */ in dragon_update()
[all …]
/freebsd/secure/lib/libcrypto/man/man7/
H A DEVP_PKEY-EC.7148 The normal way of specifying domain parameters for an \s-1EC\s0 curve is via the
149 curve name \*(L"group\*(R". For curves with no curve name, explicit parameters can be
160 The curve name.
169 For a curve over Fp \fIp\fR is the prime for the field. For a curve over F2^m \fIp\fR
184 \&\fIa\fR and \fIb\fR represents the coefficients of the curve
202 The \fIgenerator\fR is a well defined point on the curve chosen for cryptographic
203 operations. The encoding conforms with Sec. 2.3.3 of the \s-1SECG SEC 1\s0 (\*(L"Elliptic Curve
208 \&\fIorder\fR multiplied by the \fIcofactor\fR gives the number of points on the curve.
213 curve parameters. Set to 1 if so or 0 if a named curve was used.
219 \&\s-1EC\s0 curve's cofactor (note for some curves the cofactor is 1).
[all …]
/freebsd/sys/dev/qat/qat_api/include/lac/
H A Dcpa_cy_ec.h46 * @defgroup cpaCyEc Elliptic Curve (EC) API
52 * (Cryptography) Elliptic Curve (EC) operations.
61 * where q is the modulus, n is the order of the curve and h is the
66 * 1. Montgomery 25519 Curve | scalar point Multiplication
72 * 2. Montgomery 25519 Curve | generator point Multiplication
77 * 3. Twisted Edwards 25519 Curve | scalar point Multiplication
87 * 4. Twisted Edwards 25519 Curve | generator point Multiplication
95 * 5. Montgomery 448 Curve | scalar point Multiplication
101 * 6. Montgomery 448 Curve | generator point Multiplication
106 * 7. Edwards 448 Curve | scalar point Multiplication
[all …]
/freebsd/crypto/libecc/src/wycheproof_tests/
H A Dlibecc_wycheproof.h35 /* Curve params */
36 const ec_str_params *curve; member
60 /* Curve params */
61 const ec_str_params *curve; member
86 /* Curve params */
87 const ec_str_params *curve; member
112 /* Curve params */
113 const ec_str_params *curve; member
/freebsd/crypto/libecc/include/libecc/curves/
H A Daff_pt.h36 ATTRIBUTE_WARN_UNUSED_RET int aff_pt_init(aff_pt_t in, ec_shortw_crv_src_t curve);
38 ec_shortw_crv_src_t curve,
41 …IBUTE_WARN_UNUSED_RET int aff_pt_y_from_x(fp_t y1, fp_t y2, fp_src_t x, ec_shortw_crv_src_t curve);
42 ATTRIBUTE_WARN_UNUSED_RET int is_on_shortw_curve(fp_src_t x, fp_src_t y, ec_shortw_crv_src_t curve,…
65 ATTRIBUTE_WARN_UNUSED_RET int aff_pt_edwards_init(aff_pt_edwards_t in, ec_edwards_crv_src_t curve);
67 ec_edwards_crv_src_t curve,
70 …SED_RET int is_on_edwards_curve(fp_src_t u, fp_src_t v, ec_edwards_crv_src_t curve, int *on_curve);
106 …_WARN_UNUSED_RET int aff_pt_montgomery_init(aff_pt_montgomery_t in, ec_montgomery_crv_src_t curve);
108 ec_montgomery_crv_src_t curve,
111 …T int is_on_montgomery_curve(fp_src_t u, fp_src_t v, ec_montgomery_crv_src_t curve, int *on_curve);

12345678910>>...18