Lines Matching refs:kex

101 	struct kex *kex = ssh->kex;  in kex_gen_client()  local
104 switch (kex->kex_type) { in kex_gen_client()
111 r = kex_dh_keypair(kex); in kex_gen_client()
114 r = kex_ecdh_keypair(kex); in kex_gen_client()
118 r = kex_c25519_keypair(kex); in kex_gen_client()
121 r = kex_kem_sntrup4591761x25519_keypair(kex); in kex_gen_client()
130 (r = sshpkt_put_stringb(ssh, kex->client_pub)) != 0 || in kex_gen_client()
141 struct kex *kex = ssh->kex; in input_kex_gen_reply() local
172 switch (kex->kex_type) { in input_kex_gen_reply()
179 r = kex_dh_dec(kex, server_blob, &shared_secret); in input_kex_gen_reply()
182 r = kex_ecdh_dec(kex, server_blob, &shared_secret); in input_kex_gen_reply()
186 r = kex_c25519_dec(kex, server_blob, &shared_secret); in input_kex_gen_reply()
189 r = kex_kem_sntrup4591761x25519_dec(kex, server_blob, in input_kex_gen_reply()
202 kex->hash_alg, in input_kex_gen_reply()
203 kex->client_version, in input_kex_gen_reply()
204 kex->server_version, in input_kex_gen_reply()
205 kex->my, in input_kex_gen_reply()
206 kex->peer, in input_kex_gen_reply()
208 kex->client_pub, in input_kex_gen_reply()
215 kex->hostkey_alg, ssh->compat, NULL)) != 0) in input_kex_gen_reply()
222 explicit_bzero(kex->c25519_client_key, sizeof(kex->c25519_client_key)); in input_kex_gen_reply()
223 explicit_bzero(kex->sntrup4591761_client_key, in input_kex_gen_reply()
224 sizeof(kex->sntrup4591761_client_key)); in input_kex_gen_reply()
231 sshbuf_free(kex->client_pub); in input_kex_gen_reply()
232 kex->client_pub = NULL; in input_kex_gen_reply()
247 struct kex *kex = ssh->kex; in input_kex_gen_init() local
266 switch (kex->kex_type) { in input_kex_gen_init()
273 r = kex_dh_enc(kex, client_pubkey, &server_pubkey, in input_kex_gen_init()
277 r = kex_ecdh_enc(kex, client_pubkey, &server_pubkey, in input_kex_gen_init()
282 r = kex_c25519_enc(kex, client_pubkey, &server_pubkey, in input_kex_gen_init()
286 r = kex_kem_sntrup4591761x25519_enc(kex, client_pubkey, in input_kex_gen_init()
305 kex->hash_alg, in input_kex_gen_init()
306 kex->client_version, in input_kex_gen_init()
307 kex->server_version, in input_kex_gen_init()
308 kex->peer, in input_kex_gen_init()
309 kex->my, in input_kex_gen_init()
318 if ((r = kex->sign(ssh, server_host_private, server_host_public, in input_kex_gen_init()
319 &signature, &slen, hash, hashlen, kex->hostkey_alg)) != 0) in input_kex_gen_init()