/freebsd-src/crypto/openssl/test/ssl-tests/ |
H A D | 14-curves.cnf | 5 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 D | 14-curves.cnf.in | 56 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, 86 "Curves" => $curve 89 "ExpectedTmpKeyType" => get_key_type($curve), [all …]
|
/freebsd-src/contrib/bearssl/src/ec/ |
H A D | ec_all_m31.c | 28 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 D | ec_all_m15.c | 28 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 D | ec_pubkey.c | 28 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 D | ec_keygen.c | 31 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()
|
H A D | ecdsa_i15_vrfy_raw.c | 52 * If the curve is not supported, then report an error. in br_ecdsa_i15_vrfy_raw() 54 if (((impl->supported_curves >> pk->curve) & 1) == 0) { in br_ecdsa_i15_vrfy_raw() 59 * Get the curve parameters (generator and order). in br_ecdsa_i15_vrfy_raw() 61 switch (pk->curve) { in br_ecdsa_i15_vrfy_raw() 84 * Public key point must have the proper size for this curve. in br_ecdsa_i15_vrfy_raw() 123 * it modulo the curve order. The modular reduction can be done in br_ecdsa_i15_vrfy_raw() 149 tx, nlen, ty, nlen, cd->curve); in br_ecdsa_i15_vrfy_raw() 152 * Get the X coordinate, reduce modulo the curve order, and in br_ecdsa_i15_vrfy_raw() 156 * we work with curves of prime order, so the curve order is in br_ecdsa_i15_vrfy_raw()
|
H A D | ecdsa_i31_vrfy_raw.c | 51 * If the curve is not supported, then report an error. in br_ecdsa_i31_vrfy_raw() 53 if (((impl->supported_curves >> pk->curve) & 1) == 0) { in br_ecdsa_i31_vrfy_raw() 58 * Get the curve parameters (generator and order). in br_ecdsa_i31_vrfy_raw() 60 switch (pk->curve) { in br_ecdsa_i31_vrfy_raw() 83 * Public key point must have the proper size for this curve. in br_ecdsa_i31_vrfy_raw() 122 * it modulo the curve order. The modular reduction can be done in br_ecdsa_i31_vrfy_raw() 148 tx, nlen, ty, nlen, cd->curve); in br_ecdsa_i31_vrfy_raw() 151 * Get the X coordinate, reduce modulo the curve order, and in br_ecdsa_i31_vrfy_raw() 155 * we work with curves of prime order, so the curve order is in br_ecdsa_i31_vrfy_raw()
|
/freebsd-src/contrib/bearssl/inc/ |
H A D | bearssl_ec.h | 44 * ## 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-src/contrib/wpa/src/common/ |
H A D | dpp_pkex.c | 37 const struct dpp_curve_params *curve = pkex->own_bi->curve; in dpp_pkex_build_exchange_req() 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 in dpp_pkex_build_exchange_req() 38 const struct dpp_curve_params *curve = pkex->own_bi->curve; dpp_pkex_build_exchange_req() local 219 const struct dpp_curve_params *curve = pkex->own_bi->curve; dpp_pkex_build_exchange_resp() local 348 const struct dpp_curve_params *curve = bi->curve; dpp_pkex_rx_exchange_req() local 581 const struct dpp_curve_params *curve = pkex->own_bi->curve; dpp_pkex_build_commit_reveal_req() local 698 const struct dpp_curve_params *curve = pkex->own_bi->curve; dpp_pkex_rx_exchange_resp() local 900 const struct dpp_curve_params *curve = pkex->own_bi->curve; dpp_pkex_build_commit_reveal_resp() local 1013 const struct dpp_curve_params *curve = pkex->own_bi->curve; dpp_pkex_rx_commit_reveal_req() local 1194 const struct dpp_curve_params *curve = pkex->own_bi->curve; dpp_pkex_rx_commit_reveal_resp() local [all...] |
H A D | dpp_crypto.c | 26 /* 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_set_keypair() 276 key = crypto_ec_key_gen(curve->ike_group); in dpp_set_keypair() 284 struct crypto_ec_key * dpp_set_keypair(const struct dpp_curve_params **curve, in dpp_set_keypair() 302 *curve = dpp_get_curve_ike_group(group); in dpp_bootstrap_key_hash() 303 if (!*curve) { in dpp_bootstrap_key_hash() 249 dpp_gen_keypair(const struct dpp_curve_params * curve) dpp_gen_keypair() argument 263 dpp_set_keypair(const struct dpp_curve_params ** curve,const u8 * privkey,size_t privkey_len) dpp_set_keypair() argument 312 dpp_keygen(struct dpp_bootstrap_info * bi,const char * curve,const u8 * privkey,size_t privkey_len) dpp_keygen() argument 587 dpp_parse_jws_prot_hdr(const struct dpp_curve_params * curve,const u8 * prot_hdr,u16 prot_hdr_len,int * hash_func) dpp_parse_jws_prot_hdr() argument 709 const struct dpp_curve_params *curve; dpp_process_signed_connector() local 1145 dpp_derive_pmkid(const struct dpp_curve_params * curve,struct crypto_ec_key * own_key,struct crypto_ec_key * peer_key,u8 * pmkid) dpp_derive_pmkid() argument 1398 dpp_pkex_get_role_elem(const struct dpp_curve_params * curve,int init) dpp_pkex_get_role_elem() argument 1436 dpp_pkex_derive_Qi(const struct dpp_curve_params * curve,const u8 * mac_init,const char * code,const char * identifier,struct crypto_ec ** ret_ec) dpp_pkex_derive_Qi() argument 1511 dpp_pkex_derive_Qr(const struct dpp_curve_params * curve,const u8 * mac_resp,const char * code,const char * identifier,struct crypto_ec ** ret_ec) dpp_pkex_derive_Qr() argument 1671 const struct dpp_curve_params *curve; dpp_reconfig_derive_ke_responder() local 1771 const struct dpp_curve_params *curve; dpp_reconfig_derive_ke_initiator() local 1877 const struct dpp_curve_params *curve; dpp_build_conn_signature() local 2361 dpp_test_gen_invalid_key(struct wpabuf * msg,const struct dpp_curve_params * curve) dpp_test_gen_invalid_key() argument [all...] |
H A D | dpp_reconfig.c | 138 4 + auth->curve->nonce_len; in dpp_reconfig_build_req() 175 wpabuf_put_le16(msg, auth->curve->nonce_len); in dpp_configurator_build_own_connector() 176 wpabuf_put_data(msg, auth->c_nonce, auth->curve->nonce_len); in dpp_configurator_build_own_connector() 188 const struct dpp_curve_params *curve) in dpp_configurator_build_own_connector() 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() 172 dpp_configurator_build_own_connector(struct dpp_configurator * conf,const struct dpp_curve_params * curve) dpp_configurator_build_own_connector() argument 228 const struct dpp_curve_params *curve; dpp_reconfig_init() local [all...] |
/freebsd-src/crypto/openssl/doc/man3/ |
H A D | EC_GROUP_copy.pod | 75 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 D | EC_GROUP_new.pod | 76 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-src/secure/lib/libcrypto/man/man3/ |
H A D | EC_GROUP_copy.3 | 212 \&\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 …]
|
H A D | EC_GROUP_new.3 | 213 Within the library there are two forms of elliptic curve that are of interest. 216 elliptic curve equation as follows: 222 curve equation is modified to: 231 a new curve can be constructed by calling \fBEC_GROUP_new()\fR, using the 236 It is then necessary to call \fBEC_GROUP_set_curve()\fR to set the curve parameters. 252 \&\fBEC_GROUP_set_curve()\fR sets the curve parameters \fIp\fR, \fIa\fR and \fIb\fR. For a curve 253 over Fp \fIp\fR is the prime for the field. For a curve over F2^m \fIp\fR represents 260 \&\fBEC_group_get_curve()\fR obtains the previously set curve parameters. 274 Whilst the library can be used to create any curve using the functions described 295 readable comment string describing the curve. [all …]
|
/freebsd-src/contrib/bearssl/src/x509/ |
H A D | skey_decoder.t0 | 117 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-src/crypto/openssl/doc/man7/ |
H A D | EVP_PKEY-EC.pod | 15 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-src/sys/dev/syscons/dragon/ |
H A D | dragon_saver.c | 55 #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-src/secure/lib/libcrypto/man/man7/ |
H A D | EVP_PKEY-EC.7 | 148 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-src/sys/dev/qat/qat_api/include/lac/ |
H A D | cpa_cy_ec.h | 46 * @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-src/crypto/openssl/crypto/ec/ |
H A D | ec_asn1.c | 71 X9_62_CURVE *curve; member 148 ASN1_SIMPLE(ECPARAMETERS, curve, X9_62_CURVE), 309 static int ec_asn1_group2curve(const EC_GROUP *group, X9_62_CURVE *curve) in ec_asn1_group2curve() argument 316 if (!group || !curve || !curve->a || !curve->b) in ec_asn1_group2curve() 331 * Per SEC 1, the curve coefficients must be padded up to size. See C.2's in ec_asn1_group2curve() 332 * definition of Curve, C.1's definition of FieldElement, and 2.3.5's in ec_asn1_group2curve() 348 if (!ASN1_OCTET_STRING_set(curve->a, a_buf, len) in ec_asn1_group2curve() 349 || !ASN1_OCTET_STRING_set(curve->b, b_buf, len)) { in ec_asn1_group2curve() 356 if (!curve->seed) in ec_asn1_group2curve() 357 if ((curve->seed = ASN1_BIT_STRING_new()) == NULL) { in ec_asn1_group2curve() [all …]
|
/freebsd-src/sys/net/altq/ |
H A D | altq_hfsc.h | 72 /* service curve types */ 83 struct service_curve_v0 usc; /* upper limit service curve */ 126 struct service_curve_v1 usc; /* upper limit service curve */ 172 * kernel internal service curve representation 179 * the service curve parameters are converted to the internal 191 /* kernel internal representation of a service curve */ 201 /* runtime service curve */ 242 class's own upperlimit curve) */ 257 struct internal_sc *cl_rsc; /* internal real-time service curve */ 258 struct internal_sc *cl_fsc; /* internal fair service curve */ [all …]
|
/freebsd-src/crypto/openssl/providers/common/der/ |
H A D | ECX.asn1 | 12 id-edwards-curve-algs OBJECT IDENTIFIER ::= { 1 3 101 } 14 id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } 15 id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } 16 id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } 17 id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 }
|
/freebsd-src/contrib/wpa/wpa_supplicant/examples/ |
H A D | dpp-qrcode.py | 75 def dpp_display(curve): argument 90 if curve: 91 cmd += " curve=" + curve 115 parser.add_argument('--curve', '-c', 116 …help='set a specific curve (P-256, P-384, P-521, BP-256R1, BP-384R1, BP-512R1) for key generation') 127 dpp_display(args.curve)
|