/openbsd-current/usr.bin/ssh/ |
H A D | kexdh.c | 33 #include "kex.h" 41 kex_dh_keygen(struct kex *kex) argument 43 switch (kex->kex_type) { 45 kex->dh = dh_new_group1(); 49 kex->dh = dh_new_group14(); 52 kex->dh = dh_new_group16(); 55 kex->dh = dh_new_group18(); 60 if (kex->dh == NULL) 62 return (dh_gen_key(kex 66 kex_dh_compute_key(struct kex *kex, BIGNUM *dh_pub, struct sshbuf *out) argument 108 kex_dh_keypair(struct kex *kex) argument 136 kex_dh_enc(struct kex *kex, const struct sshbuf *client_blob, struct sshbuf **server_blobp, struct sshbuf **shared_secretp) argument 168 kex_dh_dec(struct kex *kex, const struct sshbuf *dh_blob, struct sshbuf **shared_secretp) argument [all...] |
H A D | kexgexc.c | 38 #include "kex.h" 55 struct kex *kex = ssh->kex; local 59 nbits = dh_estimate(kex->dh_need * 8); 61 kex->min = DH_GRP_MIN; 62 kex->max = DH_GRP_MAX; 63 kex->nbits = nbits; 65 kex->nbits = MINIMUM(kex 90 struct kex *kex = ssh->kex; local 140 struct kex *kex = ssh->kex; local [all...] |
H A D | kexgen.c | 33 #include "kex.h" 98 struct kex *kex = ssh->kex; local 101 switch (kex->kex_type) { 108 r = kex_dh_keypair(kex); 111 r = kex_ecdh_keypair(kex); 115 r = kex_c25519_keypair(kex); 118 r = kex_kem_sntrup761x25519_keypair(kex); 127 (r = sshpkt_put_stringb(ssh, kex 138 struct kex *kex = ssh->kex; local 265 struct kex *kex = ssh->kex; local [all...] |
H A D | kexgexs.c | 37 #include "kex.h" 66 struct kex *kex = ssh->kex; local 79 kex->nbits = nbits; 80 kex->min = min; 81 kex->max = max; 87 if (kex->max < kex->min || kex 122 struct kex *kex = ssh->kex; local [all...] |
H A D | kex.c | 1 /* $OpenBSD: kex.c,v 1.186 2024/05/17 00:30:23 djm Exp $ */ 48 #include "kex.h" 92 const char **defprop = ssh->kex->server ? defpropserver : defpropclient; 102 if ((cp = kex_names_cat(kexalgos, ssh->kex->server ? 103 "ext-info-s,kex-strict-s-v00@openssh.com" : 104 "ext-info-c,kex-strict-c-v00@openssh.com")) == NULL) 191 /* extract kex init proposal strings */ 199 /* first kex follows / reserved */ 236 if ((ssh->kex->flags & KEX_INITIAL) && ssh->kex 406 kex_ext_info_check_ver(struct kex *kex, const char *name, const u_char *val, size_t len, const char *want_ver, u_int flag) argument 474 struct kex *kex = ssh->kex; local 521 struct kex *kex = ssh->kex; local 570 struct kex *kex = ssh->kex; local 607 struct kex *kex = ssh->kex; local 667 struct kex *kex; local 712 kex_free(struct kex *kex) argument 923 struct kex *kex = ssh->kex; local 1057 struct kex *kex = ssh->kex; local 1122 struct kex *kex = ssh->kex; local 1160 struct kex *kex = ssh->kex; local 1181 struct kex *kex = ssh->kex; local [all...] |
H A D | kexecdh.c | 36 #include "kex.h" 42 kex_ecdh_dec_key_group(struct kex *, const struct sshbuf *, EC_KEY *key, 46 kex_ecdh_keypair(struct kex *kex) argument 54 if ((client_key = EC_KEY_new_by_curve_name(kex->ec_nid)) == NULL) { 76 kex->ec_client_key = client_key; 77 kex->ec_group = group; 78 client_key = NULL; /* owned by the kex */ 79 kex->client_pub = buf; 88 kex_ecdh_enc(struct kex *ke argument 134 kex_ecdh_dec_key_group(struct kex *kex, const struct sshbuf *ec_blob, EC_KEY *key, const EC_GROUP *group, struct sshbuf **shared_secretp) argument 196 kex_ecdh_dec(struct kex *kex, const struct sshbuf *server_blob, struct sshbuf **shared_secretp) argument [all...] |
H A D | ssh_api.c | 49 * stubs for privsep calls in the server side implementation of kex. 119 ssh->kex->server = is_server; 122 ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server; 123 ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server; 124 ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server; 125 ssh->kex->kex[KEX_DH_GRP16_SHA51 439 struct kex *kex = ssh->kex; local [all...] |
H A D | kex.h | 1 /* $OpenBSD: kex.h,v 1.123 2024/05/17 00:30:23 djm Exp $ */ 101 /* kex->flags */ 134 struct kex { struct 167 int (*kex[KEX_MAX])(struct ssh *); member in struct:kex 168 /* kex specific state */ 194 struct kex *kex_new(void); 198 void kex_free(struct kex *); 221 int kex_dh_keypair(struct kex *); 222 int kex_dh_enc(struct kex *, const struct sshbuf *, struct sshbuf **, 224 int kex_dh_dec(struct kex *, cons [all...] |
H A D | kexsntrup761x25519.c | 33 #include "kex.h" 39 kex_kem_sntrup761x25519_keypair(struct kex *kex) argument 51 crypto_kem_sntrup761_keypair(cp, kex->sntrup761_client_key); 57 kexc25519_keygen(kex->c25519_client_key, cp); 61 kex->client_pub = buf; 69 kex_kem_sntrup761x25519_enc(struct kex *kex, argument 125 if ((r = ssh_digest_buffer(kex->hash_alg, buf, hash, sizeof(hash))) != 0) 138 ssh_digest_bytes(kex 156 kex_kem_sntrup761x25519_dec(struct kex *kex, const struct sshbuf *server_blob, struct sshbuf **shared_secretp) argument [all...] |
H A D | kexc25519.c | 35 #include "kex.h" 90 kex_c25519_keypair(struct kex *kex) argument 100 kexc25519_keygen(kex->c25519_client_key, cp); 104 kex->client_pub = buf; 112 kex_c25519_enc(struct kex *kex, const struct sshbuf *client_blob, argument 164 kex_c25519_dec(struct kex *kex, const struct sshbuf *server_blob, argument 186 if ((r = kexc25519_shared_key_ext(kex [all...] |
H A D | ssh-keyscan.c | 37 #include "kex.h" 269 c->c_ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client; 270 c->c_ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client; 271 c->c_ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client; 272 c->c_ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client; 273 c->c_ssh->kex [all...] |
H A D | sshd-session.c | 72 #include "kex.h" 288 /* Store a pointer to the kex for later rekeying */ 289 pmonitor->m_pkex = &ssh->kex; 1282 struct kex *kex; local 1302 kex = ssh->kex; 1305 kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server; 1306 kex [all...] |
H A D | packet.c | 68 #include "kex.h" 217 (ssh->kex = kex_new()) == NULL || 241 kex_free(ssh->kex); 266 (ssh->kex != NULL && ssh->kex->done == 0); 329 kex_free(ssh->kex); 330 ssh->kex = NULL; 713 kex_free(ssh->kex); 714 ssh->kex = NULL; 922 if (ssh->kex 2313 kex_to_blob(struct sshbuf *m, struct kex *kex) argument 2475 struct kex *kex; local [all...] |
H A D | monitor.c | 60 #include "kex.h" 577 * than the full kex structure... 1076 * can't check ssh->kex->initial_hostkey directly at this point 1429 struct kex *kex; local 1437 if ((kex = ssh->kex) == NULL) 1438 fatal_f("internal error: ssh->kex == NULL"); 1439 if (session_id2_len != sshbuf_len(ssh->kex->session_id)) { 1441 sshbuf_len(ssh->kex [all...] |
H A D | monitor.h | 69 struct kex **m_pkex;
|
/openbsd-current/regress/usr.bin/ssh/ |
H A D | putty-kex.sh | 1 # $OpenBSD: putty-kex.sh,v 1.11 2024/02/09 08:56:59 dtucker Exp $ 15 kex="" 16 for k in `$SSH -Q kex`; do 18 kex="${kex} ${k}" 24 for k in ${kex}; do 25 verbose "$tid: kex $k" 30 2>${OBJ}/log/putty-kex-$k.log 34 kexmsg=`grep -E '^Doing.* key exchange' ${OBJ}/log/putty-kex-$k.log`
|
H A D | keygen-moduli.sh | 7 for kex in `${SSH} -Q kex`; do 8 case $kex in
|
H A 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"
|
H A D | kextype.sh | 11 ALLKEX=`${SSH} -Q kex` 16 for k in `${SSH} -Q kex`; do 17 verbose "kex $k" 21 fail "ssh kex $k"
|
H A D | dropbear-kex.sh | 1 # $OpenBSD: dropbear-kex.sh,v 1.1 2023/10/20 06:56:45 dtucker Exp $ 4 tid="dropbear kex" 16 kex="curve25519-sha256 curve25519-sha256@libssh.org 19 for k in $kex; do 20 verbose "$tid: kex $k" 22 # dbclient doesn't have switch for kex, so force in server
|
H A 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
|
/openbsd-current/regress/usr.bin/ssh/unittests/kex/ |
H A D | test_kex.c | 57 while (!server->kex->done || !client->kex->done) { 70 ASSERT_INT_EQ(server->kex->done, 1); 71 ASSERT_INT_EQ(client->kex->done, 1); 75 do_kex_with_key(char *kex, int keytype, int bits) argument 94 if (kex != NULL) 95 kex_params.proposal[PROPOSAL_KEX_ALGS] = kex; 110 TEST_START("kex"); 139 ASSERT_PTR_NE(server2->kex, NULL); 141 server2->kex 171 do_kex(char *kex) argument [all...] |
H A D | test_proposal.c | 21 #include "kex.h" 91 struct kex kex; local 98 ssh.kex = &kex; 101 kex.server = i;
|
H A D | Makefile | 16 SRCS+= kex.c 17 SRCS+= kex-names.c
|
/openbsd-current/regress/usr.bin/ssh/unittests/ |
H A D | Makefile | 3 SUBDIR= test_helper sshbuf sshkey bitmap kex hostkeys utf8 match conversion
|