summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Makefile.in4
-rw-r--r--kex.c3
-rw-r--r--kex.h19
-rw-r--r--myproposal.h3
-rw-r--r--smult_curve25519_ref.c265
-rw-r--r--ssh-keyscan.c3
-rw-r--r--sshconnect2.c3
-rw-r--r--sshd.c3
9 files changed, 299 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 75a300584..4c4d8eeb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,10 @@
4 [ssh-pkcs11.c] 4 [ssh-pkcs11.c]
5 support pkcs#11 tokes that only provide x509 zerts instead of raw pubkeys; 5 support pkcs#11 tokes that only provide x509 zerts instead of raw pubkeys;
6 fixes bz#1908; based on patch from Laurent Barbe; ok djm 6 fixes bz#1908; based on patch from Laurent Barbe; ok djm
7 - markus@cvs.openbsd.org 2013/11/02 21:59:15
8 [kex.c kex.h myproposal.h ssh-keyscan.c sshconnect2.c sshd.c]
9 use curve25519 for default key exchange (curve25519-sha256@libssh.org);
10 initial patch from Aris Adamantiadis; ok djm@
7 11
820131103 1220131103
9 - (dtucker) [openbsd-compat/bsd-misc.c] Include time.h for nanosleep. 13 - (dtucker) [openbsd-compat/bsd-misc.c] Include time.h for nanosleep.
diff --git a/Makefile.in b/Makefile.in
index 92c95a928..797aa3e0c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.340 2013/06/11 01:26:10 dtucker Exp $ 1# $Id: Makefile.in,v 1.341 2013/11/03 21:26:53 djm Exp $
2 2
3# uncomment if you run a non bourne compatable shell. Ie. csh 3# uncomment if you run a non bourne compatable shell. Ie. csh
4#SHELL = @SH@ 4#SHELL = @SH@
@@ -73,7 +73,7 @@ LIBSSH_OBJS=authfd.o authfile.o bufaux.o bufbn.o buffer.o \
73 monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-rsa.o dh.o \ 73 monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-rsa.o dh.o \
74 kexdh.o kexgex.o kexdhc.o kexgexc.o bufec.o kexecdh.o kexecdhc.o \ 74 kexdh.o kexgex.o kexdhc.o kexgexc.o bufec.o kexecdh.o kexecdhc.o \
75 msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o umac128.o \ 75 msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o umac128.o \
76 jpake.o schnorr.o ssh-pkcs11.o krl.o 76 jpake.o schnorr.o ssh-pkcs11.o krl.o smult_curve25519_ref.o
77 77
78SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ 78SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
79 sshconnect.o sshconnect1.o sshconnect2.o mux.o \ 79 sshconnect.o sshconnect1.o sshconnect2.o mux.o \
diff --git a/kex.c b/kex.c
index 54bd1a438..07f25e2e2 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kex.c,v 1.91 2013/05/17 00:13:13 djm Exp $ */ 1/* $OpenBSD: kex.c,v 1.92 2013/11/02 21:59:15 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -80,6 +80,7 @@ static const struct kexalg kexalgs[] = {
80 { KEX_ECDH_SHA2_NISTP384, KEX_ECDH_SHA2, NID_secp384r1, EVP_sha384 }, 80 { KEX_ECDH_SHA2_NISTP384, KEX_ECDH_SHA2, NID_secp384r1, EVP_sha384 },
81 { KEX_ECDH_SHA2_NISTP521, KEX_ECDH_SHA2, NID_secp521r1, EVP_sha512 }, 81 { KEX_ECDH_SHA2_NISTP521, KEX_ECDH_SHA2, NID_secp521r1, EVP_sha512 },
82#endif 82#endif
83 { KEX_CURVE25519_SHA256, KEX_C25519_SHA256, 0, EVP_sha256 },
83 { NULL, -1, -1, NULL}, 84 { NULL, -1, -1, NULL},
84}; 85};
85 86
diff --git a/kex.h b/kex.h
index 9f1e1adb3..0f67f5934 100644
--- a/kex.h
+++ b/kex.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: kex.h,v 1.56 2013/07/19 07:37:48 markus Exp $ */ 1/* $OpenBSD: kex.h,v 1.57 2013/11/02 21:59:15 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -43,6 +43,7 @@
43#define KEX_ECDH_SHA2_NISTP256 "ecdh-sha2-nistp256" 43#define KEX_ECDH_SHA2_NISTP256 "ecdh-sha2-nistp256"
44#define KEX_ECDH_SHA2_NISTP384 "ecdh-sha2-nistp384" 44#define KEX_ECDH_SHA2_NISTP384 "ecdh-sha2-nistp384"
45#define KEX_ECDH_SHA2_NISTP521 "ecdh-sha2-nistp521" 45#define KEX_ECDH_SHA2_NISTP521 "ecdh-sha2-nistp521"
46#define KEX_CURVE25519_SHA256 "curve25519-sha256@libssh.org"
46 47
47#define COMP_NONE 0 48#define COMP_NONE 0
48#define COMP_ZLIB 1 49#define COMP_ZLIB 1
@@ -74,6 +75,7 @@ enum kex_exchange {
74 KEX_DH_GEX_SHA1, 75 KEX_DH_GEX_SHA1,
75 KEX_DH_GEX_SHA256, 76 KEX_DH_GEX_SHA256,
76 KEX_ECDH_SHA2, 77 KEX_ECDH_SHA2,
78 KEX_C25519_SHA256,
77 KEX_MAX 79 KEX_MAX
78}; 80};
79 81
@@ -161,6 +163,8 @@ void kexgex_client(Kex *);
161void kexgex_server(Kex *); 163void kexgex_server(Kex *);
162void kexecdh_client(Kex *); 164void kexecdh_client(Kex *);
163void kexecdh_server(Kex *); 165void kexecdh_server(Kex *);
166void kexc25519_client(Kex *);
167void kexc25519_server(Kex *);
164 168
165void 169void
166kex_dh_hash(char *, char *, char *, int, char *, int, u_char *, int, 170kex_dh_hash(char *, char *, char *, int, char *, int, u_char *, int,
@@ -175,6 +179,19 @@ kex_ecdh_hash(const EVP_MD *, const EC_GROUP *, char *, char *, char *, int,
175 char *, int, u_char *, int, const EC_POINT *, const EC_POINT *, 179 char *, int, u_char *, int, const EC_POINT *, const EC_POINT *,
176 const BIGNUM *, u_char **, u_int *); 180 const BIGNUM *, u_char **, u_int *);
177#endif 181#endif
182void
183kex_c25519_hash(const EVP_MD *, char *, char *, char *, int,
184 char *, int, u_char *, int, const u_char *, const u_char *,
185 const BIGNUM *, u_char **, u_int *);
186
187#define CURVE25519_SIZE 32
188void kexc25519_keygen(u_char[CURVE25519_SIZE], u_char[CURVE25519_SIZE])
189 __attribute__((__bounded__(__minbytes__, 1, CURVE25519_SIZE)))
190 __attribute__((__bounded__(__minbytes__, 2, CURVE25519_SIZE)));
191BIGNUM *kexc25519_shared_key(const u_char[CURVE25519_SIZE],
192 const u_char[CURVE25519_SIZE])
193 __attribute__((__bounded__(__minbytes__, 1, CURVE25519_SIZE)))
194 __attribute__((__bounded__(__minbytes__, 2, CURVE25519_SIZE)));
178 195
179void 196void
180derive_ssh1_session_id(BIGNUM *, BIGNUM *, u_int8_t[8], u_int8_t[16]); 197derive_ssh1_session_id(BIGNUM *, BIGNUM *, u_int8_t[8], u_int8_t[16]);
diff --git a/myproposal.h b/myproposal.h
index 4e913e3ce..0820749a8 100644
--- a/myproposal.h
+++ b/myproposal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: myproposal.h,v 1.32 2013/01/08 18:49:04 markus Exp $ */ 1/* $OpenBSD: myproposal.h,v 1.33 2013/11/02 21:59:15 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -66,6 +66,7 @@
66#endif 66#endif
67 67
68# define KEX_DEFAULT_KEX \ 68# define KEX_DEFAULT_KEX \
69 "curve25519-sha256@libssh.org," \
69 KEX_ECDH_METHODS \ 70 KEX_ECDH_METHODS \
70 KEX_SHA256_METHODS \ 71 KEX_SHA256_METHODS \
71 "diffie-hellman-group-exchange-sha1," \ 72 "diffie-hellman-group-exchange-sha1," \
diff --git a/smult_curve25519_ref.c b/smult_curve25519_ref.c
new file mode 100644
index 000000000..2e69934d4
--- /dev/null
+++ b/smult_curve25519_ref.c
@@ -0,0 +1,265 @@
1/* $OpenBSD: smult_curve25519_ref.c,v 1.2 2013/11/02 22:02:14 markus Exp $ */
2/*
3version 20081011
4Matthew Dempsky
5Public domain.
6Derived from public domain code by D. J. Bernstein.
7*/
8
9int crypto_scalarmult_curve25519(unsigned char *, const unsigned char *, const unsigned char *);
10
11static void add(unsigned int out[32],const unsigned int a[32],const unsigned int b[32])
12{
13 unsigned int j;
14 unsigned int u;
15 u = 0;
16 for (j = 0;j < 31;++j) { u += a[j] + b[j]; out[j] = u & 255; u >>= 8; }
17 u += a[31] + b[31]; out[31] = u;
18}
19
20static void sub(unsigned int out[32],const unsigned int a[32],const unsigned int b[32])
21{
22 unsigned int j;
23 unsigned int u;
24 u = 218;
25 for (j = 0;j < 31;++j) {
26 u += a[j] + 65280 - b[j];
27 out[j] = u & 255;
28 u >>= 8;
29 }
30 u += a[31] - b[31];
31 out[31] = u;
32}
33
34static void squeeze(unsigned int a[32])
35{
36 unsigned int j;
37 unsigned int u;
38 u = 0;
39 for (j = 0;j < 31;++j) { u += a[j]; a[j] = u & 255; u >>= 8; }
40 u += a[31]; a[31] = u & 127;
41 u = 19 * (u >> 7);
42 for (j = 0;j < 31;++j) { u += a[j]; a[j] = u & 255; u >>= 8; }
43 u += a[31]; a[31] = u;
44}
45
46static const unsigned int minusp[32] = {
47 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128
48} ;
49
50static void freeze(unsigned int a[32])
51{
52 unsigned int aorig[32];
53 unsigned int j;
54 unsigned int negative;
55
56 for (j = 0;j < 32;++j) aorig[j] = a[j];
57 add(a,a,minusp);
58 negative = -((a[31] >> 7) & 1);
59 for (j = 0;j < 32;++j) a[j] ^= negative & (aorig[j] ^ a[j]);
60}
61
62static void mult(unsigned int out[32],const unsigned int a[32],const unsigned int b[32])
63{
64 unsigned int i;
65 unsigned int j;
66 unsigned int u;
67
68 for (i = 0;i < 32;++i) {
69 u = 0;
70 for (j = 0;j <= i;++j) u += a[j] * b[i - j];
71 for (j = i + 1;j < 32;++j) u += 38 * a[j] * b[i + 32 - j];
72 out[i] = u;
73 }
74 squeeze(out);
75}
76
77static void mult121665(unsigned int out[32],const unsigned int a[32])
78{
79 unsigned int j;
80 unsigned int u;
81
82 u = 0;
83 for (j = 0;j < 31;++j) { u += 121665 * a[j]; out[j] = u & 255; u >>= 8; }
84 u += 121665 * a[31]; out[31] = u & 127;
85 u = 19 * (u >> 7);
86 for (j = 0;j < 31;++j) { u += out[j]; out[j] = u & 255; u >>= 8; }
87 u += out[j]; out[j] = u;
88}
89
90static void square(unsigned int out[32],const unsigned int a[32])
91{
92 unsigned int i;
93 unsigned int j;
94 unsigned int u;
95
96 for (i = 0;i < 32;++i) {
97 u = 0;
98 for (j = 0;j < i - j;++j) u += a[j] * a[i - j];
99 for (j = i + 1;j < i + 32 - j;++j) u += 38 * a[j] * a[i + 32 - j];
100 u *= 2;
101 if ((i & 1) == 0) {
102 u += a[i / 2] * a[i / 2];
103 u += 38 * a[i / 2 + 16] * a[i / 2 + 16];
104 }
105 out[i] = u;
106 }
107 squeeze(out);
108}
109
110static void select(unsigned int p[64],unsigned int q[64],const unsigned int r[64],const unsigned int s[64],unsigned int b)
111{
112 unsigned int j;
113 unsigned int t;
114 unsigned int bminus1;
115
116 bminus1 = b - 1;
117 for (j = 0;j < 64;++j) {
118 t = bminus1 & (r[j] ^ s[j]);
119 p[j] = s[j] ^ t;
120 q[j] = r[j] ^ t;
121 }
122}
123
124static void mainloop(unsigned int work[64],const unsigned char e[32])
125{
126 unsigned int xzm1[64];
127 unsigned int xzm[64];
128 unsigned int xzmb[64];
129 unsigned int xzm1b[64];
130 unsigned int xznb[64];
131 unsigned int xzn1b[64];
132 unsigned int a0[64];
133 unsigned int a1[64];
134 unsigned int b0[64];
135 unsigned int b1[64];
136 unsigned int c1[64];
137 unsigned int r[32];
138 unsigned int s[32];
139 unsigned int t[32];
140 unsigned int u[32];
141 unsigned int j;
142 unsigned int b;
143 int pos;
144
145 for (j = 0;j < 32;++j) xzm1[j] = work[j];
146 xzm1[32] = 1;
147 for (j = 33;j < 64;++j) xzm1[j] = 0;
148
149 xzm[0] = 1;
150 for (j = 1;j < 64;++j) xzm[j] = 0;
151
152 for (pos = 254;pos >= 0;--pos) {
153 b = e[pos / 8] >> (pos & 7);
154 b &= 1;
155 select(xzmb,xzm1b,xzm,xzm1,b);
156 add(a0,xzmb,xzmb + 32);
157 sub(a0 + 32,xzmb,xzmb + 32);
158 add(a1,xzm1b,xzm1b + 32);
159 sub(a1 + 32,xzm1b,xzm1b + 32);
160 square(b0,a0);
161 square(b0 + 32,a0 + 32);
162 mult(b1,a1,a0 + 32);
163 mult(b1 + 32,a1 + 32,a0);
164 add(c1,b1,b1 + 32);
165 sub(c1 + 32,b1,b1 + 32);
166 square(r,c1 + 32);
167 sub(s,b0,b0 + 32);
168 mult121665(t,s);
169 add(u,t,b0);
170 mult(xznb,b0,b0 + 32);
171 mult(xznb + 32,s,u);
172 square(xzn1b,c1);
173 mult(xzn1b + 32,r,work);
174 select(xzm,xzm1,xznb,xzn1b,b);
175 }
176
177 for (j = 0;j < 64;++j) work[j] = xzm[j];
178}
179
180static void recip(unsigned int out[32],const unsigned int z[32])
181{
182 unsigned int z2[32];
183 unsigned int z9[32];
184 unsigned int z11[32];
185 unsigned int z2_5_0[32];
186 unsigned int z2_10_0[32];
187 unsigned int z2_20_0[32];
188 unsigned int z2_50_0[32];
189 unsigned int z2_100_0[32];
190 unsigned int t0[32];
191 unsigned int t1[32];
192 int i;
193
194 /* 2 */ square(z2,z);
195 /* 4 */ square(t1,z2);
196 /* 8 */ square(t0,t1);
197 /* 9 */ mult(z9,t0,z);
198 /* 11 */ mult(z11,z9,z2);
199 /* 22 */ square(t0,z11);
200 /* 2^5 - 2^0 = 31 */ mult(z2_5_0,t0,z9);
201
202 /* 2^6 - 2^1 */ square(t0,z2_5_0);
203 /* 2^7 - 2^2 */ square(t1,t0);
204 /* 2^8 - 2^3 */ square(t0,t1);
205 /* 2^9 - 2^4 */ square(t1,t0);
206 /* 2^10 - 2^5 */ square(t0,t1);
207 /* 2^10 - 2^0 */ mult(z2_10_0,t0,z2_5_0);
208
209 /* 2^11 - 2^1 */ square(t0,z2_10_0);
210 /* 2^12 - 2^2 */ square(t1,t0);
211 /* 2^20 - 2^10 */ for (i = 2;i < 10;i += 2) { square(t0,t1); square(t1,t0); }
212 /* 2^20 - 2^0 */ mult(z2_20_0,t1,z2_10_0);
213
214 /* 2^21 - 2^1 */ square(t0,z2_20_0);
215 /* 2^22 - 2^2 */ square(t1,t0);
216 /* 2^40 - 2^20 */ for (i = 2;i < 20;i += 2) { square(t0,t1); square(t1,t0); }
217 /* 2^40 - 2^0 */ mult(t0,t1,z2_20_0);
218
219 /* 2^41 - 2^1 */ square(t1,t0);
220 /* 2^42 - 2^2 */ square(t0,t1);
221 /* 2^50 - 2^10 */ for (i = 2;i < 10;i += 2) { square(t1,t0); square(t0,t1); }
222 /* 2^50 - 2^0 */ mult(z2_50_0,t0,z2_10_0);
223
224 /* 2^51 - 2^1 */ square(t0,z2_50_0);
225 /* 2^52 - 2^2 */ square(t1,t0);
226 /* 2^100 - 2^50 */ for (i = 2;i < 50;i += 2) { square(t0,t1); square(t1,t0); }
227 /* 2^100 - 2^0 */ mult(z2_100_0,t1,z2_50_0);
228
229 /* 2^101 - 2^1 */ square(t1,z2_100_0);
230 /* 2^102 - 2^2 */ square(t0,t1);
231 /* 2^200 - 2^100 */ for (i = 2;i < 100;i += 2) { square(t1,t0); square(t0,t1); }
232 /* 2^200 - 2^0 */ mult(t1,t0,z2_100_0);
233
234 /* 2^201 - 2^1 */ square(t0,t1);
235 /* 2^202 - 2^2 */ square(t1,t0);
236 /* 2^250 - 2^50 */ for (i = 2;i < 50;i += 2) { square(t0,t1); square(t1,t0); }
237 /* 2^250 - 2^0 */ mult(t0,t1,z2_50_0);
238
239 /* 2^251 - 2^1 */ square(t1,t0);
240 /* 2^252 - 2^2 */ square(t0,t1);
241 /* 2^253 - 2^3 */ square(t1,t0);
242 /* 2^254 - 2^4 */ square(t0,t1);
243 /* 2^255 - 2^5 */ square(t1,t0);
244 /* 2^255 - 21 */ mult(out,t1,z11);
245}
246
247int crypto_scalarmult_curve25519(unsigned char *q,
248 const unsigned char *n,
249 const unsigned char *p)
250{
251 unsigned int work[96];
252 unsigned char e[32];
253 unsigned int i;
254 for (i = 0;i < 32;++i) e[i] = n[i];
255 e[0] &= 248;
256 e[31] &= 127;
257 e[31] |= 64;
258 for (i = 0;i < 32;++i) work[i] = p[i];
259 mainloop(work,e);
260 recip(work + 32,work + 32);
261 mult(work + 64,work,work + 32);
262 freeze(work + 64);
263 for (i = 0;i < 32;++i) q[i] = work[64 + i];
264 return 0;
265}
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 8b807c10a..c5f658d77 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keyscan.c,v 1.87 2013/05/17 00:13:14 djm Exp $ */ 1/* $OpenBSD: ssh-keyscan.c,v 1.88 2013/11/02 21:59:15 markus Exp $ */
2/* 2/*
3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. 3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
4 * 4 *
@@ -254,6 +254,7 @@ keygrab_ssh2(con *c)
254 c->c_kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; 254 c->c_kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
255 c->c_kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; 255 c->c_kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
256 c->c_kex->kex[KEX_ECDH_SHA2] = kexecdh_client; 256 c->c_kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
257 c->c_kex->kex[KEX_C25519_SHA256] = kexc25519_client;
257 c->c_kex->verify_host_key = hostjump; 258 c->c_kex->verify_host_key = hostjump;
258 259
259 if (!(j = setjmp(kexjmp))) { 260 if (!(j = setjmp(kexjmp))) {
diff --git a/sshconnect2.c b/sshconnect2.c
index 70e3cd8c9..1f6160e86 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.198 2013/06/05 12:52:38 dtucker Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.199 2013/11/02 21:59:15 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -208,6 +208,7 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
208 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; 208 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
209 kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; 209 kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
210 kex->kex[KEX_ECDH_SHA2] = kexecdh_client; 210 kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
211 kex->kex[KEX_C25519_SHA256] = kexc25519_client;
211 kex->client_version_string=client_version_string; 212 kex->client_version_string=client_version_string;
212 kex->server_version_string=server_version_string; 213 kex->server_version_string=server_version_string;
213 kex->verify_host_key=&verify_host_key_callback; 214 kex->verify_host_key=&verify_host_key_callback;
diff --git a/sshd.c b/sshd.c
index d4349f618..8a62fc1a6 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.409 2013/10/23 23:35:32 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.410 2013/11/02 21:59:15 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2451,6 +2451,7 @@ do_ssh2_kex(void)
2451 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; 2451 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
2452 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; 2452 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
2453 kex->kex[KEX_ECDH_SHA2] = kexecdh_server; 2453 kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
2454 kex->kex[KEX_C25519_SHA256] = kexc25519_server;
2454 kex->server = 1; 2455 kex->server = 1;
2455 kex->client_version_string=client_version_string; 2456 kex->client_version_string=client_version_string;
2456 kex->server_version_string=server_version_string; 2457 kex->server_version_string=server_version_string;