summaryrefslogtreecommitdiff
path: root/kexc25519s.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 /kexc25519s.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 'kexc25519s.c')
-rw-r--r--kexc25519s.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kexc25519s.c b/kexc25519s.c
index d7cc70fe..ace4d5c7 100644
--- a/kexc25519s.c
+++ b/kexc25519s.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexc25519s.c,v 1.15 2019/01/21 10:05:09 djm Exp $ */
+/* $OpenBSD: kexc25519s.c,v 1.16 2019/01/21 10:20:12 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2010 Damien Miller. All rights reserved.
@@ -104,10 +104,10 @@ input_kex_c25519_init(int type, u_int32_t seq, struct ssh *ssh)
sshbuf_ptr(kex->peer), sshbuf_len(kex->peer),
sshbuf_ptr(kex->my), sshbuf_len(kex->my),
server_host_key_blob, sbloblen,
- client_pubkey,
- server_pubkey,
+ client_pubkey, pklen,
+ server_pubkey, sizeof(server_pubkey),
sshbuf_ptr(shared_secret), sshbuf_len(shared_secret),
- hash, &hashlen)) < 0)
+ hash, &hashlen)) != 0)
goto out;
/* sign H */