/freebsd/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, [all...] |
/freebsd/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 | 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() 81 sk->curve = curve; in br_ec_keygen()
|
H A D | ec_c25519_i15.c | 92 api_generator(int curve, size_t *len) in api_generator() argument 94 (void)curve; in api_generator() 100 api_order(int curve, size_t *len) in api_order() argument 102 (void)curve; in api_order() 108 api_xoff(int curve, size_t *len) in api_xoff() argument 110 (void)curve; in api_xoff() 180 const unsigned char *kb, size_t kblen, int curve) in api_mul() argument 195 (void)curve; in api_mul() 357 const unsigned char *x, size_t xlen, int curve) in api_mulgen() argument 362 G = api_generator(curve, &Glen); in api_mulgen() [all …]
|
H A D | ec_c25519_i31.c | 89 api_generator(int curve, size_t *len) in api_generator() argument 91 (void)curve; in api_generator() 97 api_order(int curve, size_t *len) in api_order() argument 99 (void)curve; in api_order() 105 api_xoff(int curve, size_t *len) in api_xoff() argument 107 (void)curve; in api_xoff() 177 const unsigned char *kb, size_t kblen, int curve) in api_mul() argument 186 (void)curve; in api_mul() 349 const unsigned char *x, size_t xlen, int curve) in api_mulgen() argument 354 G = api_generator(curve, &Glen); in api_mulgen() [all …]
|
H A D | ec_prime_i15.c | 115 id_to_curve(int curve) in id_to_curve() argument 123 return &pp[curve - BR_EC_secp256r1]; in id_to_curve() 686 id_to_curve_def(int curve) in id_to_curve_def() argument 688 switch (curve) { in id_to_curve_def() 700 api_generator(int curve, size_t *len) in api_generator() argument 704 cd = id_to_curve_def(curve); in api_generator() 710 api_order(int curve, size_t *len) in api_order() argument 714 cd = id_to_curve_def(curve); in api_order() 720 api_xoff(int curve, size_t *len) in api_xoff() argument 722 api_generator(curve, len); in api_xoff() [all …]
|
H A D | ec_prime_i31.c | 114 id_to_curve(int curve) in id_to_curve() argument 122 return &pp[curve - BR_EC_secp256r1]; in id_to_curve() 688 id_to_curve_def(int curve) in id_to_curve_def() argument 690 switch (curve) { in id_to_curve_def() 702 api_generator(int curve, size_t *len) in api_generator() argument 706 cd = id_to_curve_def(curve); in api_generator() 712 api_order(int curve, size_t *len) in api_order() argument 716 cd = id_to_curve_def(curve); in api_order() 722 api_xoff(int curve, size_t *len) in api_xoff() argument 724 api_generator(curve, len); in api_xoff() [all …]
|
/freebsd/crypto/libecc/src/wycheproof_tests/ |
H A D | libecc_wycheproof_tests.h | 35 .curve = &brainpoolp224r1_str_params, 61 .curve = &brainpoolp224r1_str_params, 87 .curve = &brainpoolp224r1_str_params, 113 .curve = &brainpoolp224r1_str_params, 139 .curve = &brainpoolp224r1_str_params, 165 .curve = &brainpoolp224r1_str_params, 191 .curve = &brainpoolp224r1_str_params, 217 .curve = &brainpoolp224r1_str_params, 243 .curve = &brainpoolp224r1_str_params, 269 .curve = &brainpoolp224r1_str_params, [all …]
|
/freebsd/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() 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 D | dpp_crypto.c | 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() 333 int dpp_keygen(struct dpp_bootstrap_info *bi, const char *curve, in dpp_keygen() 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_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 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 248 curve = dpp_get_curve_ike_group(group); in dpp_reconfig_init() [all …]
|
H A D | dpp_auth.c | 205 if (aes_siv_encrypt(auth->k1, auth->curve->hash_len, clear, siv_len, in dpp_auth_build_req() 391 if (aes_siv_encrypt(siv_key, auth->curve->hash_len, clear, siv_len, in dpp_auth_build_resp() 443 nonce_len = auth->curve->nonce_len; in dpp_auth_build_resp_ok() 451 nonce_len = auth->curve->nonce_len; in dpp_auth_build_resp_ok() 470 auth->own_protocol_key = dpp_gen_keypair(auth->curve); in dpp_auth_build_resp_ok() 473 auth->own_protocol_key = dpp_gen_keypair(auth->curve); in dpp_auth_build_resp_ok() 492 auth->curve->hash_len) < 0) in dpp_auth_build_resp_ok() 506 WPA_PUT_LE16(&r_auth[2], auth->curve->hash_len); in dpp_auth_build_resp_ok() 512 r_auth[4 + auth->curve->hash_len / 2] ^= 0x01; in dpp_auth_build_resp_ok() 515 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_auth_build_resp_ok() [all …]
|
H A D | dpp.c | 797 nonce_len = auth->curve->nonce_len; in dpp_build_conf_req_attr() 817 clear_len += 4 + auth->curve->hash_len; in dpp_build_conf_req_attr() 871 wpabuf_put_le16(clear, auth->curve->hash_len); in dpp_build_conf_req_attr() 872 wpabuf_put_data(clear, auth_i, auth->curve->hash_len); in dpp_build_conf_req_attr() 891 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_build_conf_req_attr() 1558 const struct dpp_curve_params *curve) in dpp_build_jwk() argument 1571 json_add_string(buf, "crv", curve->jwk_crv); in dpp_build_jwk() 1574 if (json_add_base64url(buf, "x", pos, curve->prime_len) < 0) in dpp_build_jwk() 1577 pos += curve->prime_len; in dpp_build_jwk() 1578 if (json_add_base64url(buf, "y", pos, curve->prime_len) < 0) in dpp_build_jwk() [all …]
|
/freebsd/crypto/libecc/scripts/ |
H A D | expand_libecc.py | 196 def __init__(self, curve, x, y): argument 197 self.curve = curve 199 self.x = (x % curve.p) 203 self.y = (y % curve.p) 208 if (pow(y, 2, curve.p) != ((pow(x, 3, curve.p) + (curve.a * x) + curve.b ) % curve.p)): 216 curve = self.curve 218 if Q.curve != curve: 222 return Point(self.curve, self.x, self.y) 228 if (((y1 + y2) % curve.p) == 0): 230 return Point(self.curve, None, None) [all …]
|
H A D | gen_openssl_curves_tests.sh | 46 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/crypto/libecc/src/curves/ |
H A D | aff_pt.c | 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() 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() 102 int aff_pt_y_from_x(fp_t y1, fp_t y2, fp_src_t x, ec_shortw_crv_src_t curve) in aff_pt_y_from_x() argument 107 ret = ec_shortw_crv_check_initialized(curve); EG(ret, err); in aff_pt_y_from_x() [all …]
|
/freebsd/contrib/bearssl/inc/ |
H A D | bearssl_ec.h | 243 int curve; member 260 int curve; member 292 const unsigned char *(*generator)(int curve, size_t *len); 306 const unsigned char *(*order)(int curve, size_t *len); 318 size_t (*xoff)(int curve, size_t *len); 351 const unsigned char *x, size_t xlen, int curve); 367 const unsigned char *x, size_t xlen, int curve); 414 const unsigned char *y, size_t ylen, int curve); 930 void *kbuf, int curve);
|
/freebsd/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 …]
|
/freebsd/sys/dev/syscons/dragon/ |
H A D | dragon_saver.c | 59 static int curve; variable 118 if (curve > CURVE) { 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() 193 curve = CURVE + 1; in dragon_saver()
|
/freebsd/crypto/libecc/include/libecc/curves/ |
H A D | aff_pt.h | 36 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);
|
/freebsd/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/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 }
|