/external/openssh/ |
D | kexgexs.c | 73 struct kex *kex = ssh->kex; in input_kex_dh_gex_request() local 83 kex->nbits = nbits; in input_kex_dh_gex_request() 84 kex->min = min; in input_kex_dh_gex_request() 85 kex->max = max; in input_kex_dh_gex_request() 91 if (kex->max < kex->min || kex->nbits < kex->min || in input_kex_dh_gex_request() 92 kex->max < kex->nbits || kex->max < DH_GRP_MIN) { in input_kex_dh_gex_request() 98 kex->dh = PRIVSEP(choose_dh(min, nbits, max)); in input_kex_dh_gex_request() 99 if (kex->dh == NULL) { in input_kex_dh_gex_request() 106 (r = sshpkt_put_bignum2(ssh, kex->dh->p)) != 0 || in input_kex_dh_gex_request() 107 (r = sshpkt_put_bignum2(ssh, kex->dh->g)) != 0 || in input_kex_dh_gex_request() [all …]
|
D | kexgexc.c | 60 struct kex *kex = ssh->kex; in kexgex_client() local 64 nbits = dh_estimate(kex->dh_need * 8); in kexgex_client() 66 kex->min = DH_GRP_MIN; in kexgex_client() 67 kex->max = DH_GRP_MAX; in kexgex_client() 68 kex->nbits = nbits; in kexgex_client() 70 kex->nbits = MINIMUM(kex->nbits, 4096); in kexgex_client() 73 (r = sshpkt_put_u32(ssh, kex->min)) != 0 || in kexgex_client() 74 (r = sshpkt_put_u32(ssh, kex->nbits)) != 0 || in kexgex_client() 75 (r = sshpkt_put_u32(ssh, kex->max)) != 0 || in kexgex_client() 79 kex->min, kex->nbits, kex->max); in kexgex_client() [all …]
|
D | kexdhs.c | 57 struct kex *kex = ssh->kex; in kexdh_server() local 61 switch (kex->kex_type) { in kexdh_server() 63 kex->dh = dh_new_group1(); in kexdh_server() 67 kex->dh = dh_new_group14(); in kexdh_server() 70 kex->dh = dh_new_group16(); in kexdh_server() 73 kex->dh = dh_new_group18(); in kexdh_server() 79 if (kex->dh == NULL) { in kexdh_server() 83 if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) in kexdh_server() 97 struct kex *kex = ssh->kex; in input_kex_dh_init() local 106 if (kex->load_host_public_key == NULL || in input_kex_dh_init() [all …]
|
D | kexdhc.c | 57 struct kex *kex = ssh->kex; in kexdh_client() local 61 switch (kex->kex_type) { in kexdh_client() 63 kex->dh = dh_new_group1(); in kexdh_client() 67 kex->dh = dh_new_group14(); in kexdh_client() 70 kex->dh = dh_new_group16(); in kexdh_client() 73 kex->dh = dh_new_group18(); in kexdh_client() 79 if (kex->dh == NULL) { in kexdh_client() 84 if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0 || in kexdh_client() 86 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || in kexdh_client() 90 DHparams_print_fp(stderr, kex->dh); in kexdh_client() [all …]
|
D | kexc25519c.c | 52 struct kex *kex = ssh->kex; in kexc25519_client() local 55 kexc25519_keygen(kex->c25519_client_key, kex->c25519_client_pubkey); in kexc25519_client() 57 dump_digest("client private key:", kex->c25519_client_key, in kexc25519_client() 58 sizeof(kex->c25519_client_key)); in kexc25519_client() 61 (r = sshpkt_put_string(ssh, kex->c25519_client_pubkey, in kexc25519_client() 62 sizeof(kex->c25519_client_pubkey))) != 0 || in kexc25519_client() 75 struct kex *kex = ssh->kex; in input_kex_c25519_reply() local 84 if (kex->verify_host_key == NULL) { in input_kex_c25519_reply() 95 if (server_host_key->type != kex->hostkey_type || in input_kex_c25519_reply() 96 (kex->hostkey_type == KEY_ECDSA && in input_kex_c25519_reply() [all …]
|
D | ssh_api.c | 95 if ((r = kex_new(ssh, proposal, &ssh->kex)) != 0) { in ssh_init() 99 ssh->kex->server = is_server; in ssh_init() 102 ssh->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; in ssh_init() 103 ssh->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; in ssh_init() 104 ssh->kex->kex[KEX_DH_GRP14_SHA256] = kexdh_server; in ssh_init() 105 ssh->kex->kex[KEX_DH_GRP16_SHA512] = kexdh_server; in ssh_init() 106 ssh->kex->kex[KEX_DH_GRP18_SHA512] = kexdh_server; in ssh_init() 107 ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; in ssh_init() 108 ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; in ssh_init() 110 ssh->kex->kex[KEX_ECDH_SHA2] = kexecdh_server; in ssh_init() [all …]
|
D | kexecdhc.c | 57 struct kex *kex = ssh->kex; in kexecdh_client() local 63 if ((client_key = EC_KEY_new_by_curve_name(kex->ec_nid)) == NULL) { in kexecdh_client() 84 kex->ec_client_key = client_key; in kexecdh_client() 85 kex->ec_group = group; in kexecdh_client() 101 struct kex *kex = ssh->kex; in input_kex_ecdh_reply() local 114 if (kex->verify_host_key == NULL) { in input_kex_ecdh_reply() 118 group = kex->ec_group; in input_kex_ecdh_reply() 119 client_key = kex->ec_client_key; in input_kex_ecdh_reply() 127 if (server_host_key->type != kex->hostkey_type || in input_kex_ecdh_reply() 128 (kex->hostkey_type == KEY_ECDSA && in input_kex_ecdh_reply() [all …]
|
D | kexecdhs.c | 64 struct kex *kex = ssh->kex; in input_kex_ecdh_init() local 78 if ((server_key = EC_KEY_new_by_curve_name(kex->ec_nid)) == NULL) { in input_kex_ecdh_init() 93 if (kex->load_host_public_key == NULL || in input_kex_ecdh_init() 94 kex->load_host_private_key == NULL) { in input_kex_ecdh_init() 98 server_host_public = kex->load_host_public_key(kex->hostkey_type, in input_kex_ecdh_init() 99 kex->hostkey_nid, ssh); in input_kex_ecdh_init() 100 server_host_private = kex->load_host_private_key(kex->hostkey_type, in input_kex_ecdh_init() 101 kex->hostkey_nid, ssh); in input_kex_ecdh_init() 147 kex->hash_alg, in input_kex_ecdh_init() 149 kex->client_version_string, in input_kex_ecdh_init() [all …]
|
D | kex.c | 379 if (ssh->kex->ext_info_c) in kex_send_newkeys() 389 struct kex *kex = ssh->kex; in kex_input_ext_info() local 409 kex->rsa_sha2 = 256; in kex_input_ext_info() 414 kex->rsa_sha2 = 512; in kex_input_ext_info() 428 struct kex *kex = ssh->kex; in kex_input_newkeys() local 438 kex->done = 1; in kex_input_newkeys() 439 sshbuf_reset(kex->peer); in kex_input_newkeys() 441 kex->flags &= ~KEX_INIT_SENT; in kex_input_newkeys() 442 free(kex->name); in kex_input_newkeys() 443 kex->name = NULL; in kex_input_newkeys() [all …]
|
D | kexc25519s.c | 58 struct kex *kex = ssh->kex; in input_kex_c25519_init() local 74 if (kex->load_host_public_key == NULL || in input_kex_c25519_init() 75 kex->load_host_private_key == NULL) { in input_kex_c25519_init() 79 server_host_public = kex->load_host_public_key(kex->hostkey_type, in input_kex_c25519_init() 80 kex->hostkey_nid, ssh); in input_kex_c25519_init() 81 server_host_private = kex->load_host_private_key(kex->hostkey_type, in input_kex_c25519_init() 82 kex->hostkey_nid, ssh); in input_kex_c25519_init() 113 kex->hash_alg, in input_kex_c25519_init() 114 kex->client_version_string, in input_kex_c25519_init() 115 kex->server_version_string, in input_kex_c25519_init() [all …]
|
D | sshd.c | 588 pmonitor->m_pkex = &active_state->kex; in privsep_preauth() 2212 struct kex *kex; local 2239 kex = active_state->kex; 2241 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; 2242 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; 2243 kex->kex[KEX_DH_GRP14_SHA256] = kexdh_server; 2244 kex->kex[KEX_DH_GRP16_SHA512] = kexdh_server; 2245 kex->kex[KEX_DH_GRP18_SHA512] = kexdh_server; 2246 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; 2247 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; [all …]
|
D | ssh-keyscan.c | 303 c->c_ssh->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client; in keygrab_ssh2() 304 c->c_ssh->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; in keygrab_ssh2() 305 c->c_ssh->kex->kex[KEX_DH_GRP14_SHA256] = kexdh_client; in keygrab_ssh2() 306 c->c_ssh->kex->kex[KEX_DH_GRP16_SHA512] = kexdh_client; in keygrab_ssh2() 307 c->c_ssh->kex->kex[KEX_DH_GRP18_SHA512] = kexdh_client; in keygrab_ssh2() 308 c->c_ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; in keygrab_ssh2() 309 c->c_ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; in keygrab_ssh2() 311 c->c_ssh->kex->kex[KEX_ECDH_SHA2] = kexecdh_client; in keygrab_ssh2() 314 c->c_ssh->kex->kex[KEX_C25519_SHA256] = kexc25519_client; in keygrab_ssh2()
|
D | packet.c | 282 (ssh->state->rekeying || (ssh->kex != NULL && ssh->kex->done == 0)); in ssh_packet_is_rekeying() 990 if ((state->newkeys[mode] = ssh->kex->newkeys[mode]) == NULL) in ssh_set_newkeys() 992 ssh->kex->newkeys[mode] = NULL; in ssh_set_newkeys() 1055 if (ssh->kex == NULL || ssh_packet_is_rekeying(ssh)) in ssh_packet_need_rekeying() 1682 if (ssh->kex) in ssh_packet_read_poll2_mux() 2134 if (ssh && ssh->kex && ssh->kex->failed_choice) { in sshpkt_fatal() 2137 ssh->kex->failed_choice); in sshpkt_fatal() 2490 kex_to_blob(struct sshbuf *m, struct kex *kex) in kex_to_blob() argument 2494 if ((r = sshbuf_put_string(m, kex->session_id, in kex_to_blob() 2495 kex->session_id_len)) != 0 || in kex_to_blob() [all …]
|
D | monitor.c | 1590 struct kex *kex; in monitor_apply_keystate() local 1599 if ((kex = ssh->kex) != NULL) { in monitor_apply_keystate() 1602 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; in monitor_apply_keystate() 1603 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; in monitor_apply_keystate() 1604 kex->kex[KEX_DH_GRP14_SHA256] = kexdh_server; in monitor_apply_keystate() 1605 kex->kex[KEX_DH_GRP16_SHA512] = kexdh_server; in monitor_apply_keystate() 1606 kex->kex[KEX_DH_GRP18_SHA512] = kexdh_server; in monitor_apply_keystate() 1607 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; in monitor_apply_keystate() 1608 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; in monitor_apply_keystate() 1610 kex->kex[KEX_ECDH_SHA2] = kexecdh_server; in monitor_apply_keystate() [all …]
|
D | sshconnect2.c | 162 struct kex *kex; in ssh_kex2() local 202 kex = active_state->kex; in ssh_kex2() 204 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client; in ssh_kex2() 205 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; in ssh_kex2() 206 kex->kex[KEX_DH_GRP14_SHA256] = kexdh_client; in ssh_kex2() 207 kex->kex[KEX_DH_GRP16_SHA512] = kexdh_client; in ssh_kex2() 208 kex->kex[KEX_DH_GRP18_SHA512] = kexdh_client; in ssh_kex2() 209 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; in ssh_kex2() 210 kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; in ssh_kex2() 212 kex->kex[KEX_ECDH_SHA2] = kexecdh_client; in ssh_kex2() [all …]
|
D | kex.h | 130 struct kex { struct 159 int (*kex[KEX_MAX])(struct ssh *); argument 174 int kex_new(struct ssh *, char *[PROPOSAL_MAX], struct kex **); argument 177 void kex_free(struct kex *);
|
D | packet.h | 40 struct kex; 57 struct kex *kex; member
|
/external/openssh/regress/unittests/kex/ |
D | test_kex.c | 63 while (!server->kex->done || !client->kex->done) { in run_kex() 76 ASSERT_INT_EQ(server->kex->done, 1); in run_kex() 77 ASSERT_INT_EQ(client->kex->done, 1); in run_kex() 81 do_kex_with_key(char *kex, int keytype, int bits) in do_kex_with_key() argument 100 if (kex != NULL) in do_kex_with_key() 101 kex_params.proposal[PROPOSAL_KEX_ALGS] = kex; in do_kex_with_key() 142 kex_free(server2->kex); /* XXX or should ssh_packet_set_state()? */ in do_kex_with_key() 146 ASSERT_PTR_NE(server2->kex, NULL); in do_kex_with_key() 148 server2->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; in do_kex_with_key() 149 server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; in do_kex_with_key() [all …]
|
/external/openssh/regress/misc/kexfuzz/ |
D | kexfuzz.c | 181 while (!server->kex->done || !client->kex->done) { in run_kex() 194 ASSERT_INT_EQ(server->kex->done, 1); in run_kex() 195 ASSERT_INT_EQ(client->kex->done, 1); in run_kex() 199 do_kex_with_key(const char *kex, struct sshkey *prvkey, int *c2s, int *s2c, in do_kex_with_key() argument 217 if (kex != NULL) in do_kex_with_key() 218 kex_params.proposal[PROPOSAL_KEX_ALGS] = strdup(kex); in do_kex_with_key() 271 kex_free(server2->kex); /* XXX or should ssh_packet_set_state()? */ in do_kex_with_key() 275 ASSERT_PTR_NE(server2->kex, NULL); in do_kex_with_key() 278 server2->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; in do_kex_with_key() 279 server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; in do_kex_with_key() [all …]
|
/external/openssh/regress/ |
D | dhgex.sh | 10 kexs=`${SSH} -Q kex | grep diffie-hellman-group-exchange` 16 kex="$1"; shift 19 echo "KexAlgorithms=$kex" >> $OBJ/sshd_proxy 22 opts="-oKexAlgorithms=$kex -oCiphers=$cipher" 26 verbose "$tid bits $bits $kex $cipher"
|
D | rekey.sh | 40 for i in `${SSH} -Q kex`; do 58 for kex in `${SSH} -Q kex`; do 59 verbose "client rekey $c $kex" 60 ssh_data_rekeying "KexAlgorithms=$kex" -oRekeyLimit=256k -oCiphers=$c
|
D | kextype.sh | 11 ALLKEX=`${SSH} -Q kex` 16 for k in `${SSH} -Q kex`; do
|
/external/libjpeg-turbo/ |
D | jdarith.c | 442 int tbl, k, kex; in decode_mcu_AC_refine() local 462 for (kex = cinfo->Se; kex > 0; kex--) in decode_mcu_AC_refine() 463 if ((*block)[jpeg_natural_order[kex]]) break; in decode_mcu_AC_refine() 467 if (k > kex) in decode_mcu_AC_refine()
|
D | jcarith.c | 598 int tbl, k, ke, kex; in encode_mcu_AC_refine() local 632 for (kex = ke; kex > 0; kex--) in encode_mcu_AC_refine() 633 if ((v = (*block)[jpeg_natural_order[kex]]) >= 0) { in encode_mcu_AC_refine() 643 if (k > kex) in encode_mcu_AC_refine()
|
/external/openssh/regress/unittests/ |
D | Makefile | 4 SUBDIR= test_helper sshbuf sshkey bitmap kex hostkeys utf8 match conversion
|