summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh_api.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2019-01-21 10:20:12 +0000
committerdjm <djm@openbsd.org>2019-01-21 10:20:12 +0000
commitb869f5f7ec8b43f9976e8e6bfdf5991563bf2670 (patch)
tree253f6ada4333902a7fe9fda2e454f82963a7c26b /usr.bin/ssh/ssh_api.c
parentfactor out kex_verify_hostkey() - again, duplicated almost exactly (diff)
downloadwireguard-openbsd-b869f5f7ec8b43f9976e8e6bfdf5991563bf2670.tar.xz
wireguard-openbsd-b869f5f7ec8b43f9976e8e6bfdf5991563bf2670.zip
Add support for a PQC KEX/KEM: sntrup4591761x25519-sha512@tinyssh.org
using the Streamlined NTRU Prime 4591^761 implementation from SUPERCOP coupled with X25519 as a stop-loss. Not enabled by default. introduce KEM API; a simplified framework for DH-ish KEX methods. from markus@ feedback & ok djm@
Diffstat (limited to 'usr.bin/ssh/ssh_api.c')
-rw-r--r--usr.bin/ssh/ssh_api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh_api.c b/usr.bin/ssh/ssh_api.c
index c2e18dee704..7fe799a62d5 100644
--- a/usr.bin/ssh/ssh_api.c
+++ b/usr.bin/ssh/ssh_api.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh_api.c,v 1.10 2019/01/19 21:43:56 djm Exp $ */
+/* $OpenBSD: ssh_api.c,v 1.11 2019/01/21 10:20:12 djm Exp $ */
/*
* Copyright (c) 2012 Markus Friedl. All rights reserved.
*
@@ -105,6 +105,7 @@ ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params)
ssh->kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
#endif /* WITH_OPENSSL */
ssh->kex->kex[KEX_C25519_SHA256] = kexc25519_server;
+ ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_kem_server;
ssh->kex->load_host_public_key=&_ssh_host_public_key;
ssh->kex->load_host_private_key=&_ssh_host_private_key;
ssh->kex->sign=&_ssh_host_key_sign;
@@ -120,6 +121,7 @@ ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params)
ssh->kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
#endif /* WITH_OPENSSL */
ssh->kex->kex[KEX_C25519_SHA256] = kexc25519_client;
+ ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_kem_client;
ssh->kex->verify_host_key =&_ssh_verify_host_key;
}
*sshp = ssh;