Lines Matching defs:kex
70 #include "kex.h"
691 * Supported KEX types use SHA1 (20 bytes), SHA256 (32 bytes),
1793 static Kex *
1796 Kex *kex;
1800 kex = xcalloc(1, sizeof(*kex));
1801 kex->session_id = buffer_get_string(m, &kex->session_id_len);
1803 kex->session_id_len != session_id2_len ||
1804 timingsafe_bcmp(kex->session_id, session_id2, session_id2_len) != 0)
1806 kex->we_need = buffer_get_int(m);
1807 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
1808 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
1809 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
1810 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
1811 kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
1812 kex->server = 1;
1813 kex->hostkey_type = buffer_get_int(m);
1814 kex->kex_type = buffer_get_int(m);
1816 buffer_init(&kex->my);
1817 buffer_append(&kex->my, blob, bloblen);
1820 buffer_init(&kex->peer);
1821 buffer_append(&kex->peer, blob, bloblen);
1823 kex->done = 1;
1824 kex->flags = buffer_get_int(m);
1825 kex->client_version_string = buffer_get_string(m, NULL);
1826 kex->server_version_string = buffer_get_string(m, NULL);
1827 kex->load_host_public_key=&get_hostkey_public_by_type;
1828 kex->load_host_private_key=&get_hostkey_private_by_type;
1829 kex->host_key_index=&get_hostkey_index;
1831 return (kex);
1859 /* Get the Kex for rekeying */