summaryrefslogtreecommitdiff
path: root/ssh_api.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-01-21 10:20:12 +0000
committerDamien Miller <djm@mindrot.org>2019-01-21 22:07:02 +1100
commitdfd591618cdf2c96727ac0eb65f89cf54af0d97e (patch)
tree59700563da0dc6f1de649394ffb4c787710eda5a /ssh_api.c
parentb1b2ff4ed559051d1035419f8f236275fa66d5d6 (diff)
upstream: 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@ OpenBSD-Commit-ID: d687f76cffd3561dd73eb302d17a1c3bf321d1a7
Diffstat (limited to 'ssh_api.c')
-rw-r--r--ssh_api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssh_api.c b/ssh_api.c
index 182c0d7e4..73981aa37 100644
--- a/ssh_api.c
+++ b/ssh_api.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh_api.c,v 1.10 2019/01/19 21:43:56 djm Exp $ */ 1/* $OpenBSD: ssh_api.c,v 1.11 2019/01/21 10:20:12 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2012 Markus Friedl. All rights reserved. 3 * Copyright (c) 2012 Markus Friedl. All rights reserved.
4 * 4 *
@@ -111,6 +111,7 @@ ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params)
111# endif 111# endif
112#endif /* WITH_OPENSSL */ 112#endif /* WITH_OPENSSL */
113 ssh->kex->kex[KEX_C25519_SHA256] = kexc25519_server; 113 ssh->kex->kex[KEX_C25519_SHA256] = kexc25519_server;
114 ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_kem_server;
114 ssh->kex->load_host_public_key=&_ssh_host_public_key; 115 ssh->kex->load_host_public_key=&_ssh_host_public_key;
115 ssh->kex->load_host_private_key=&_ssh_host_private_key; 116 ssh->kex->load_host_private_key=&_ssh_host_private_key;
116 ssh->kex->sign=&_ssh_host_key_sign; 117 ssh->kex->sign=&_ssh_host_key_sign;
@@ -128,6 +129,7 @@ ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params)
128# endif 129# endif
129#endif /* WITH_OPENSSL */ 130#endif /* WITH_OPENSSL */
130 ssh->kex->kex[KEX_C25519_SHA256] = kexc25519_client; 131 ssh->kex->kex[KEX_C25519_SHA256] = kexc25519_client;
132 ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_kem_client;
131 ssh->kex->verify_host_key =&_ssh_verify_host_key; 133 ssh->kex->verify_host_key =&_ssh_verify_host_key;
132 } 134 }
133 *sshp = ssh; 135 *sshp = ssh;