diff options
Diffstat (limited to 'kex.h')
-rw-r--r-- | kex.h | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.h,v 1.76 2016/02/08 10:57:07 djm Exp $ */ | 1 | /* $OpenBSD: kex.h,v 1.78 2016/05/02 10:26:04 djm 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. |
@@ -51,7 +51,10 @@ | |||
51 | #define KEX_COOKIE_LEN 16 | 51 | #define KEX_COOKIE_LEN 16 |
52 | 52 | ||
53 | #define KEX_DH1 "diffie-hellman-group1-sha1" | 53 | #define KEX_DH1 "diffie-hellman-group1-sha1" |
54 | #define KEX_DH14 "diffie-hellman-group14-sha1" | 54 | #define KEX_DH14_SHA1 "diffie-hellman-group14-sha1" |
55 | #define KEX_DH14_SHA256 "diffie-hellman-group14-sha256" | ||
56 | #define KEX_DH16_SHA512 "diffie-hellman-group16-sha512" | ||
57 | #define KEX_DH18_SHA512 "diffie-hellman-group18-sha512" | ||
55 | #define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1" | 58 | #define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1" |
56 | #define KEX_DHGEX_SHA256 "diffie-hellman-group-exchange-sha256" | 59 | #define KEX_DHGEX_SHA256 "diffie-hellman-group-exchange-sha256" |
57 | #define KEX_ECDH_SHA2_NISTP256 "ecdh-sha2-nistp256" | 60 | #define KEX_ECDH_SHA2_NISTP256 "ecdh-sha2-nistp256" |
@@ -88,6 +91,9 @@ enum kex_modes { | |||
88 | enum kex_exchange { | 91 | enum kex_exchange { |
89 | KEX_DH_GRP1_SHA1, | 92 | KEX_DH_GRP1_SHA1, |
90 | KEX_DH_GRP14_SHA1, | 93 | KEX_DH_GRP14_SHA1, |
94 | KEX_DH_GRP14_SHA256, | ||
95 | KEX_DH_GRP16_SHA512, | ||
96 | KEX_DH_GRP18_SHA512, | ||
91 | KEX_DH_GEX_SHA1, | 97 | KEX_DH_GEX_SHA1, |
92 | KEX_DH_GEX_SHA256, | 98 | KEX_DH_GEX_SHA256, |
93 | KEX_ECDH_SHA2, | 99 | KEX_ECDH_SHA2, |
@@ -190,7 +196,7 @@ int kexecdh_server(struct ssh *); | |||
190 | int kexc25519_client(struct ssh *); | 196 | int kexc25519_client(struct ssh *); |
191 | int kexc25519_server(struct ssh *); | 197 | int kexc25519_server(struct ssh *); |
192 | 198 | ||
193 | int kex_dh_hash(const char *, const char *, | 199 | int kex_dh_hash(int, const char *, const char *, |
194 | const u_char *, size_t, const u_char *, size_t, const u_char *, size_t, | 200 | const u_char *, size_t, const u_char *, size_t, const u_char *, size_t, |
195 | const BIGNUM *, const BIGNUM *, const BIGNUM *, u_char *, size_t *); | 201 | const BIGNUM *, const BIGNUM *, const BIGNUM *, u_char *, size_t *); |
196 | 202 | ||
@@ -205,8 +211,9 @@ int kex_ecdh_hash(int, const EC_GROUP *, const char *, const char *, | |||
205 | const u_char *, size_t, const u_char *, size_t, const u_char *, size_t, | 211 | const u_char *, size_t, const u_char *, size_t, const u_char *, size_t, |
206 | const EC_POINT *, const EC_POINT *, const BIGNUM *, u_char *, size_t *); | 212 | const EC_POINT *, const EC_POINT *, const BIGNUM *, u_char *, size_t *); |
207 | 213 | ||
208 | int kex_c25519_hash(int, const char *, const char *, const char *, size_t, | 214 | int kex_c25519_hash(int, const char *, const char *, |
209 | const char *, size_t, const u_char *, size_t, const u_char *, const u_char *, | 215 | const u_char *, size_t, const u_char *, size_t, |
216 | const u_char *, size_t, const u_char *, const u_char *, | ||
210 | const u_char *, size_t, u_char *, size_t *); | 217 | const u_char *, size_t, u_char *, size_t *); |
211 | 218 | ||
212 | void kexc25519_keygen(u_char key[CURVE25519_SIZE], u_char pub[CURVE25519_SIZE]) | 219 | void kexc25519_keygen(u_char key[CURVE25519_SIZE], u_char pub[CURVE25519_SIZE]) |