components/openssh/patches/024-disable_ed25519.patch
changeset 5025 bdd7dc7d2af4
parent 4503 bf30d46ab06e
child 5036 06e4fcc325a1
equal deleted inserted replaced
5023:93fb5351ff40 5025:bdd7dc7d2af4
     4 #
     4 #
     5 # Patch offered upstream but rejected:
     5 # Patch offered upstream but rejected:
     6 #     https://bugzilla.mindrot.org/show_bug.cgi?id=2376
     6 #     https://bugzilla.mindrot.org/show_bug.cgi?id=2376
     7 #
     7 #
     8 diff -pur old/Makefile.in new/Makefile.in
     8 diff -pur old/Makefile.in new/Makefile.in
     9 --- old/Makefile.in	2015-05-12 06:57:55.737824435 -0700
     9 --- old/Makefile.in
    10 +++ new/Makefile.in	2015-05-12 06:57:55.859410671 -0700
    10 +++ new/Makefile.in
    11 @@ -155,7 +155,7 @@ $(SSHDOBJS): Makefile.in config.h
    11 @@ -155,7 +155,7 @@ $(SSHDOBJS): Makefile.in config.h
    12  	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
    12  	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
    13  
    13  
    14  LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
    14  LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
    15 -$(LIBCOMPAT): always
    15 -$(LIBCOMPAT): always
    16 +$(LIBCOMPAT): always libssh.a
    16 +$(LIBCOMPAT): always libssh.a
    17  	(cd openbsd-compat && $(MAKE))
    17  	(cd openbsd-compat && $(MAKE))
    18  always:
    18  always:
    19  
    19  
    20 diff -pur old/authfd.c new/authfd.c
    20 diff -pur old/authfd.c new/authfd.c
    21 --- old/authfd.c	2015-03-16 22:49:20.000000000 -0700
    21 --- old/authfd.c
    22 +++ new/authfd.c	2015-05-12 06:57:55.860206664 -0700
    22 +++ new/authfd.c
    23 @@ -569,8 +569,10 @@ ssh_add_identity_constrained(int sock, s
    23 @@ -565,8 +565,10 @@ ssh_add_identity_constrained(int sock, s
    24  	case KEY_ECDSA:
    24  	case KEY_ECDSA:
    25  	case KEY_ECDSA_CERT:
    25  	case KEY_ECDSA_CERT:
    26  #endif
    26  #endif
    27 +#ifndef WITHOUT_ED25519
    27 +#ifndef WITHOUT_ED25519
    28  	case KEY_ED25519:
    28  	case KEY_ED25519:
    30 +#endif /* WITHOUT_ED25519 */
    30 +#endif /* WITHOUT_ED25519 */
    31  		type = constrained ?
    31  		type = constrained ?
    32  		    SSH2_AGENTC_ADD_ID_CONSTRAINED :
    32  		    SSH2_AGENTC_ADD_ID_CONSTRAINED :
    33  		    SSH2_AGENTC_ADD_IDENTITY;
    33  		    SSH2_AGENTC_ADD_IDENTITY;
    34 diff -pur old/authfile.c new/authfile.c
    34 diff -pur old/authfile.c new/authfile.c
    35 --- old/authfile.c	2015-03-16 22:49:20.000000000 -0700
    35 --- old/authfile.c
    36 +++ new/authfile.c	2015-05-12 06:57:55.860669228 -0700
    36 +++ new/authfile.c
    37 @@ -446,8 +446,10 @@ sshkey_load_private_cert(int type, const
    37 @@ -449,7 +449,9 @@ sshkey_load_private_cert(int type, const
    38  	case KEY_RSA:
       
    39  	case KEY_DSA:
    38  	case KEY_DSA:
    40  	case KEY_ECDSA:
    39  	case KEY_ECDSA:
    41 -	case KEY_ED25519:
    40  #endif /* WITH_OPENSSL */
    42  #endif /* WITH_OPENSSL */
    41 +#ifndef WITHOUT_ED25519
    43 +#ifndef WITHOUT_ED25519
    42  	case KEY_ED25519:
    44 +	case KEY_ED25519:
       
    45 +#endif /* WITHOUT_ED25519 */
    43 +#endif /* WITHOUT_ED25519 */
    46  	case KEY_UNSPEC:
    44  	case KEY_UNSPEC:
    47  		break;
    45  		break;
    48  	default:
    46  	default:
    49 diff -pur old/dns.c new/dns.c
    47 diff -pur old/dns.c new/dns.c
    50 --- old/dns.c	2015-03-16 22:49:20.000000000 -0700
    48 --- old/dns.c
    51 +++ new/dns.c	2015-05-12 06:57:55.861065113 -0700
    49 +++ new/dns.c
    52 @@ -100,11 +100,13 @@ dns_read_key(u_int8_t *algorithm, u_int8
    50 @@ -100,11 +100,13 @@ dns_read_key(u_int8_t *algorithm, u_int8
    53  		if (!*digest_type)
    51  		if (!*digest_type)
    54  			*digest_type = SSHFP_HASH_SHA256;
    52  			*digest_type = SSHFP_HASH_SHA256;
    55  		break;
    53  		break;
    56 +#ifndef WITHOUT_ED25519
    54 +#ifndef WITHOUT_ED25519
    62 +#endif /* WITHOUT_ED25519 */
    60 +#endif /* WITHOUT_ED25519 */
    63  	default:
    61  	default:
    64  		*algorithm = SSHFP_KEY_RESERVED; /* 0 */
    62  		*algorithm = SSHFP_KEY_RESERVED; /* 0 */
    65  		*digest_type = SSHFP_HASH_RESERVED; /* 0 */
    63  		*digest_type = SSHFP_HASH_RESERVED; /* 0 */
    66 diff -pur old/dns.h new/dns.h
    64 diff -pur old/dns.h new/dns.h
    67 --- old/dns.h	2015-03-16 22:49:20.000000000 -0700
    65 --- old/dns.h
    68 +++ new/dns.h	2015-05-12 06:57:55.861358245 -0700
    66 +++ new/dns.h
    69 @@ -33,7 +33,9 @@ enum sshfp_types {
    67 @@ -33,7 +33,9 @@ enum sshfp_types {
    70  	SSHFP_KEY_RSA = 1,
    68  	SSHFP_KEY_RSA = 1,
    71  	SSHFP_KEY_DSA = 2,
    69  	SSHFP_KEY_DSA = 2,
    72  	SSHFP_KEY_ECDSA = 3,
    70  	SSHFP_KEY_ECDSA = 3,
    73 +#ifndef WITHOUT_ED25519
    71 -	SSHFP_KEY_ED25519 = 4
    74  	SSHFP_KEY_ED25519 = 4 
    72 +#ifndef WITHOUT_ED25519
       
    73 + 	SSHFP_KEY_ED25519 = 4 
    75 +#endif /* WITHOUT_ED25519 */
    74 +#endif /* WITHOUT_ED25519 */
    76  };
    75  };
    77  
    76  
    78  enum sshfp_hashes {
    77  enum sshfp_hashes {
    79 diff -pur old/ed25519.c new/ed25519.c
    78 diff -pur old/ed25519.c new/ed25519.c
    80 --- old/ed25519.c	2015-03-16 22:49:20.000000000 -0700
    79 --- old/ed25519.c
    81 +++ new/ed25519.c	2015-05-12 06:57:55.861707517 -0700
    80 +++ new/ed25519.c
    82 @@ -7,6 +7,7 @@
    81 @@ -7,6 +7,7 @@
    83   */
    82   */
    84  
    83  
    85  #include "includes.h"
    84  #include "includes.h"
    86 +#ifndef WITHOUT_ED25519
    85 +#ifndef WITHOUT_ED25519
    91    }
    90    }
    92    return ret;
    91    return ret;
    93  }
    92  }
    94 +#endif /* WITHOUT_ED25519 */
    93 +#endif /* WITHOUT_ED25519 */
    95 diff -pur old/fe25519.c new/fe25519.c
    94 diff -pur old/fe25519.c new/fe25519.c
    96 --- old/fe25519.c	2015-03-16 22:49:20.000000000 -0700
    95 --- old/fe25519.c
    97 +++ new/fe25519.c	2015-05-12 06:57:55.862124169 -0700
    96 +++ new/fe25519.c
    98 @@ -8,6 +8,7 @@
    97 @@ -8,6 +8,7 @@
    99  
    98  
   100  #include "includes.h"
    99  #include "includes.h"
   101  
   100  
   102 +#ifndef WITHOUT_ED25519
   101 +#ifndef WITHOUT_ED25519
   107  	/* 2^252 - 2^2 */ fe25519_square(&t,&t);
   106  	/* 2^252 - 2^2 */ fe25519_square(&t,&t);
   108  	/* 2^252 - 3 */ fe25519_mul(r,&t,x);
   107  	/* 2^252 - 3 */ fe25519_mul(r,&t,x);
   109  }
   108  }
   110 +#endif /* WITHOUT_ED25519 */
   109 +#endif /* WITHOUT_ED25519 */
   111 diff -pur old/fe25519.h new/fe25519.h
   110 diff -pur old/fe25519.h new/fe25519.h
   112 --- old/fe25519.h	2015-03-16 22:49:20.000000000 -0700
   111 --- old/fe25519.h
   113 +++ new/fe25519.h	2015-05-12 06:57:55.862460867 -0700
   112 +++ new/fe25519.h
   114 @@ -8,6 +8,7 @@
   113 @@ -8,6 +8,7 @@
   115  
   114  
   116  #ifndef FE25519_H
   115  #ifndef FE25519_H
   117  #define FE25519_H
   116  #define FE25519_H
   118 +#ifndef WITHOUT_ED25519
   117 +#ifndef WITHOUT_ED25519
   124  void fe25519_pow2523(fe25519 *r, const fe25519 *x);
   123  void fe25519_pow2523(fe25519 *r, const fe25519 *x);
   125  
   124  
   126 +#endif /* WITHOUT_ED25519 */
   125 +#endif /* WITHOUT_ED25519 */
   127  #endif
   126  #endif
   128 diff -pur old/ge25519.c new/ge25519.c
   127 diff -pur old/ge25519.c new/ge25519.c
   129 --- old/ge25519.c	2015-03-16 22:49:20.000000000 -0700
   128 --- old/ge25519.c
   130 +++ new/ge25519.c	2015-05-12 06:57:55.862878000 -0700
   129 +++ new/ge25519.c
   131 @@ -7,6 +7,7 @@
   130 @@ -7,6 +7,7 @@
   132   */
   131   */
   133  
   132  
   134  #include "includes.h"
   133  #include "includes.h"
   135 +#ifndef WITHOUT_ED25519
   134 +#ifndef WITHOUT_ED25519
   140      ge25519_mixadd2(r, &t);
   139      ge25519_mixadd2(r, &t);
   141    }
   140    }
   142  }
   141  }
   143 +#endif /* WITHOUT_ED25519 */
   142 +#endif /* WITHOUT_ED25519 */
   144 diff -pur old/ge25519.h new/ge25519.h
   143 diff -pur old/ge25519.h new/ge25519.h
   145 --- old/ge25519.h	2015-03-16 22:49:20.000000000 -0700
   144 --- old/ge25519.h
   146 +++ new/ge25519.h	2015-05-12 06:57:55.863212105 -0700
   145 +++ new/ge25519.h
   147 @@ -8,6 +8,7 @@
   146 @@ -8,6 +8,7 @@
   148  
   147  
   149  #ifndef GE25519_H
   148  #ifndef GE25519_H
   150  #define GE25519_H
   149  #define GE25519_H
   151 +#ifndef WITHOUT_ED25519
   150 +#ifndef WITHOUT_ED25519
   157  void ge25519_scalarmult_base(ge25519 *r, const sc25519 *s);
   156  void ge25519_scalarmult_base(ge25519 *r, const sc25519 *s);
   158  
   157  
   159 +#endif /* WITHOUT_ED25519 */
   158 +#endif /* WITHOUT_ED25519 */
   160  #endif
   159  #endif
   161 diff -pur old/kex.c new/kex.c
   160 diff -pur old/kex.c new/kex.c
   162 --- old/kex.c	2015-05-12 06:57:55.741193024 -0700
   161 --- old/kex.c
   163 +++ new/kex.c	2015-05-12 07:00:10.308904895 -0700
   162 +++ new/kex.c
   164 @@ -96,9 +96,11 @@ static const struct kexalg kexalgs[] = {
   163 @@ -96,9 +96,11 @@ static const struct kexalg kexalgs[] = {
   165  # endif /* OPENSSL_HAS_NISTP521 */
   164  # endif /* OPENSSL_HAS_NISTP521 */
   166  #endif /* OPENSSL_HAS_ECC */
   165  #endif /* OPENSSL_HAS_ECC */
   167  #endif /* WITH_OPENSSL */
   166  #endif /* WITH_OPENSSL */
   168 +#ifndef WITHOUT_ED25519
   167 +#ifndef WITHOUT_ED25519
   172 +#endif /* WITHOUT_ED25519 */
   171 +#endif /* WITHOUT_ED25519 */
   173  #ifdef GSSAPI
   172  #ifdef GSSAPI
   174  	{ KEX_GSS_GEX_SHA1_ID, KEX_GSS_GEX_SHA1, 0, SSH_DIGEST_SHA1 },
   173  	{ KEX_GSS_GEX_SHA1_ID, KEX_GSS_GEX_SHA1, 0, SSH_DIGEST_SHA1 },
   175  	{ KEX_GSS_GRP1_SHA1_ID, KEX_GSS_GRP1_SHA1, 0, SSH_DIGEST_SHA1 },
   174  	{ KEX_GSS_GRP1_SHA1_ID, KEX_GSS_GRP1_SHA1, 0, SSH_DIGEST_SHA1 },
   176 diff -pur old/kex.h new/kex.h
   175 diff -pur old/kex.h new/kex.h
   177 --- old/kex.h	2015-05-12 06:57:55.741694192 -0700
   176 --- old/kex.h
   178 +++ new/kex.h	2015-05-12 07:01:49.320801815 -0700
   177 +++ new/kex.h
   179 @@ -58,13 +58,17 @@
   178 @@ -58,13 +58,17 @@
   180  #define	KEX_ECDH_SHA2_NISTP256	"ecdh-sha2-nistp256"
   179  #define	KEX_ECDH_SHA2_NISTP256	"ecdh-sha2-nistp256"
   181  #define	KEX_ECDH_SHA2_NISTP384	"ecdh-sha2-nistp384"
   180  #define	KEX_ECDH_SHA2_NISTP384	"ecdh-sha2-nistp384"
   182  #define	KEX_ECDH_SHA2_NISTP521	"ecdh-sha2-nistp521"
   181  #define	KEX_ECDH_SHA2_NISTP521	"ecdh-sha2-nistp521"
   183 +#ifndef WITHOUT_ED25519
   182 +#ifndef WITHOUT_ED25519
   202  	KEX_C25519_SHA256,
   201  	KEX_C25519_SHA256,
   203 +#endif /* WITHOUT_ED25519 */
   202 +#endif /* WITHOUT_ED25519 */
   204  	KEX_GSS_GRP1_SHA1,
   203  	KEX_GSS_GRP1_SHA1,
   205  	KEX_GSS_GRP14_SHA1,
   204  	KEX_GSS_GRP14_SHA1,
   206  	KEX_GSS_GEX_SHA1,
   205  	KEX_GSS_GEX_SHA1,
   207 @@ -160,8 +166,10 @@ struct kex {
   206 @@ -161,8 +167,10 @@ struct kex {
   208  	u_int	min, max, nbits;	/* GEX */
   207  	u_int	min, max, nbits;	/* GEX */
   209  	EC_KEY	*ec_client_key;		/* ECDH */
   208  	EC_KEY	*ec_client_key;		/* ECDH */
   210  	const EC_GROUP *ec_group;	/* ECDH */
   209  	const EC_GROUP *ec_group;	/* ECDH */
   211 +#ifndef WITHOUT_ED25519
   210 +#ifndef WITHOUT_ED25519
   212  	u_char c25519_client_key[CURVE25519_SIZE]; /* 25519 */
   211  	u_char c25519_client_key[CURVE25519_SIZE]; /* 25519 */
   213  	u_char c25519_client_pubkey[CURVE25519_SIZE]; /* 25519 */
   212  	u_char c25519_client_pubkey[CURVE25519_SIZE]; /* 25519 */
   214 +#endif /* WITHOUT_ED25519 */
   213 +#endif /* WITHOUT_ED25519 */
   215  };
   214  };
   216  
   215  
   217  int	 kex_names_valid(const char *);
   216  int	 kex_names_valid(const char *);
   218 @@ -188,8 +196,10 @@ int	 kexgex_client(struct ssh *);
   217 @@ -191,8 +199,10 @@ int	 kexgex_client(struct ssh *);
   219  int	 kexgex_server(struct ssh *);
   218  int	 kexgex_server(struct ssh *);
   220  int	 kexecdh_client(struct ssh *);
   219  int	 kexecdh_client(struct ssh *);
   221  int	 kexecdh_server(struct ssh *);
   220  int	 kexecdh_server(struct ssh *);
   222 +#ifndef WITHOUT_ED25519
   221 +#ifndef WITHOUT_ED25519
   223  int	 kexc25519_client(struct ssh *);
   222  int	 kexc25519_client(struct ssh *);
   224  int	 kexc25519_server(struct ssh *);
   223  int	 kexc25519_server(struct ssh *);
   225 +#endif /* WITHOUT_ED25519 */
   224 +#endif /* WITHOUT_ED25519 */
   226  #ifdef GSSAPI
   225  #ifdef GSSAPI
   227  int	 kexgss_client(Kex *);
   226  int	 kexgss_client(struct ssh *);
   228  void	 kexgss_server(Kex *);
   227  int	 kexgss_server(struct ssh *);
   229 @@ -210,6 +220,7 @@ int kex_ecdh_hash(int, const EC_GROUP *,
   228 @@ -213,6 +223,7 @@ int kex_ecdh_hash(int, const EC_GROUP *,
   230      const u_char *, size_t, const u_char *, size_t, const u_char *, size_t,
   229      const u_char *, size_t, const u_char *, size_t, const u_char *, size_t,
   231      const EC_POINT *, const EC_POINT *, const BIGNUM *, u_char *, size_t *);
   230      const EC_POINT *, const EC_POINT *, const BIGNUM *, u_char *, size_t *);
   232  
   231  
   233 +#ifndef WITHOUT_ED25519
   232 +#ifndef WITHOUT_ED25519
   234  int	 kex_c25519_hash(int, const char *, const char *, const char *, size_t,
   233  int	 kex_c25519_hash(int, const char *, const char *, const char *, size_t,
   235      const char *, size_t, const u_char *, size_t, const u_char *, const u_char *,
   234      const char *, size_t, const u_char *, size_t, const u_char *, const u_char *,
   236      const u_char *, size_t, u_char *, size_t *);
   235      const u_char *, size_t, u_char *, size_t *);
   237 @@ -221,6 +232,7 @@ int	kexc25519_shared_key(const u_char ke
   236 @@ -224,6 +235,7 @@ int	kexc25519_shared_key(const u_char ke
   238      const u_char pub[CURVE25519_SIZE], struct sshbuf *out)
   237      const u_char pub[CURVE25519_SIZE], struct sshbuf *out)
   239  	__attribute__((__bounded__(__minbytes__, 1, CURVE25519_SIZE)))
   238  	__attribute__((__bounded__(__minbytes__, 1, CURVE25519_SIZE)))
   240  	__attribute__((__bounded__(__minbytes__, 2, CURVE25519_SIZE)));
   239  	__attribute__((__bounded__(__minbytes__, 2, CURVE25519_SIZE)));
   241 +#endif /* WITHOUT_ED25519 */
   240 +#endif /* WITHOUT_ED25519 */
   242  
   241  
   243  int
   242  int
   244  derive_ssh1_session_id(BIGNUM *, BIGNUM *, u_int8_t[8], u_int8_t[16]);
   243  derive_ssh1_session_id(BIGNUM *, BIGNUM *, u_int8_t[8], u_int8_t[16]);
   245 diff -pur old/kexc25519.c new/kexc25519.c
   244 diff -pur old/kexc25519.c new/kexc25519.c
   246 --- old/kexc25519.c	2015-03-16 22:49:20.000000000 -0700
   245 --- old/kexc25519.c
   247 +++ new/kexc25519.c	2015-05-12 06:57:55.865837542 -0700
   246 +++ new/kexc25519.c
   248 @@ -27,6 +27,7 @@
   247 @@ -27,6 +27,7 @@
   249  
   248  
   250  #include "includes.h"
   249  #include "includes.h"
   251  
   250  
   252 +#ifndef WITHOUT_ED25519
   251 +#ifndef WITHOUT_ED25519
   253  #include <sys/types.h>
   252  #include <sys/types.h>
   254  
   253  
   255  #include <signal.h>
   254  #include <signal.h>
   256 @@ -126,3 +127,4 @@ kex_c25519_hash(
   255 @@ -131,3 +132,4 @@ kex_c25519_hash(
   257  #endif
   256  #endif
   258  	return 0;
   257  	return 0;
   259  }
   258  }
   260 +#endif /* WITHOUT_ED25519 */
   259 +#endif /* WITHOUT_ED25519 */
   261 diff -pur old/kexc25519c.c new/kexc25519c.c
   260 diff -pur old/kexc25519c.c new/kexc25519c.c
   262 --- old/kexc25519c.c	2015-03-16 22:49:20.000000000 -0700
   261 --- old/kexc25519c.c
   263 +++ new/kexc25519c.c	2015-05-12 06:57:55.866212606 -0700
   262 +++ new/kexc25519c.c
   264 @@ -27,6 +27,7 @@
   263 @@ -27,6 +27,7 @@
   265  
   264  
   266  #include "includes.h"
   265  #include "includes.h"
   267  
   266  
   268 +#ifndef WITHOUT_ED25519
   267 +#ifndef WITHOUT_ED25519
   273  	sshbuf_free(shared_secret);
   272  	sshbuf_free(shared_secret);
   274  	return r;
   273  	return r;
   275  }
   274  }
   276 +#endif /* WITHOUT_ED25519 */
   275 +#endif /* WITHOUT_ED25519 */
   277 diff -pur old/kexc25519s.c new/kexc25519s.c
   276 diff -pur old/kexc25519s.c new/kexc25519s.c
   278 --- old/kexc25519s.c	2015-03-16 22:49:20.000000000 -0700
   277 --- old/kexc25519s.c
   279 +++ new/kexc25519s.c	2015-05-12 06:57:55.866584623 -0700
   278 +++ new/kexc25519s.c
   280 @@ -26,6 +26,8 @@
   279 @@ -26,6 +26,8 @@
   281  
   280  
   282  #include "includes.h"
   281  #include "includes.h"
   283  
   282  
   284 +#ifndef WITHOUT_ED25519
   283 +#ifndef WITHOUT_ED25519
   285 +
   284 +
   286  #include <sys/types.h>
   285  #include <sys/types.h>
       
   286  #include <stdio.h>
   287  #include <string.h>
   287  #include <string.h>
   288  #include <signal.h>
   288 @@ -157,3 +159,4 @@ out:
   289 @@ -156,3 +158,4 @@ out:
       
   290  	sshbuf_free(shared_secret);
   289  	sshbuf_free(shared_secret);
   291  	return r;
   290  	return r;
   292  }
   291  }
   293 +#endif /* WITHOUT_ED25519 */
   292 +#endif /* WITHOUT_ED25519 */
   294 diff -pur old/monitor.c new/monitor.c
   293 diff -pur old/monitor.c new/monitor.c
   295 --- old/monitor.c	2015-05-12 06:57:55.743678816 -0700
   294 --- old/monitor.c
   296 +++ new/monitor.c	2015-05-12 07:02:27.111640142 -0700
   295 +++ new/monitor.c
   297 @@ -1937,7 +1937,9 @@ monitor_apply_keystate(struct monitor *p
   296 @@ -1941,7 +1941,9 @@ monitor_apply_keystate(struct monitor *p
   298  		kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
   297  		kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
   299  # endif
   298  # endif
   300  #endif /* WITH_OPENSSL */
   299  #endif /* WITH_OPENSSL */
   301 +#ifndef WITHOUT_ED25519
   300 +#ifndef WITHOUT_ED25519
   302  		kex->kex[KEX_C25519_SHA256] = kexc25519_server;
   301  		kex->kex[KEX_C25519_SHA256] = kexc25519_server;
   303 +#endif /* WITHOUT_ED25519 */
   302 +#endif /* WITHOUT_ED25519 */
   304  #ifdef GSSAPI
   303  #ifdef GSSAPI
   305  		if (options.gss_keyex) {
   304  		if (options.gss_keyex) {
   306  			kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
   305  			kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
   307 diff -pur old/myproposal.h new/myproposal.h
   306 diff -pur old/myproposal.h new/myproposal.h
   308 --- old/myproposal.h	2015-03-16 22:49:20.000000000 -0700
   307 --- old/myproposal.h
   309 +++ new/myproposal.h	2015-06-05 02:29:36.569958448 -0700
   308 +++ new/myproposal.h
   310 @@ -59,6 +59,20 @@
   309 @@ -59,6 +59,20 @@
   311  # define HOSTKEY_ECDSA_METHODS
   310  # define HOSTKEY_ECDSA_METHODS
   312  #endif
   311  #endif
   313  
   312  
   314 +#ifndef WITHOUT_ED25519
   313 +#ifndef WITHOUT_ED25519
   325 +# define HOSTKEY_CURVE25519_METHODS
   324 +# define HOSTKEY_CURVE25519_METHODS
   326 +#endif /* WITHOUT_ED25519 */
   325 +#endif /* WITHOUT_ED25519 */
   327 +
   326 +
   328  #ifdef OPENSSL_HAVE_EVPGCM
   327  #ifdef OPENSSL_HAVE_EVPGCM
   329  # define AESGCM_CIPHER_MODES \
   328  # define AESGCM_CIPHER_MODES \
   330  	"[email protected],[email protected],"
   329  	",[email protected],[email protected]"
   331 @@ -78,11 +92,6 @@
   330 @@ -78,11 +92,6 @@
   332  #endif
   331  #endif
   333  
   332  
   334  #ifdef WITH_OPENSSL
   333  #ifdef WITH_OPENSSL
   335 -# ifdef HAVE_EVP_SHA256
   334 -# ifdef HAVE_EVP_SHA256
   336 -#  define KEX_CURVE25519_METHODS "[email protected],"
   335 -#  define KEX_CURVE25519_METHODS "[email protected],"
   337 -# else
   336 -# else
   338 -#  define KEX_CURVE25519_METHODS ""
   337 -#  define KEX_CURVE25519_METHODS ""
   339 -# endif
   338 -# endif
   340  #define KEX_SERVER_KEX \
   339  #define KEX_COMMON_KEX \
   341  	KEX_CURVE25519_METHODS \
   340  	KEX_CURVE25519_METHODS \
   342  	KEX_ECDH_METHODS \
   341  	KEX_ECDH_METHODS \
   343 @@ -95,13 +104,13 @@
   342 @@ -97,10 +106,10 @@
   344  
   343  
   345  #define	KEX_DEFAULT_PK_ALG	\
   344  #define	KEX_DEFAULT_PK_ALG	\
   346  	HOSTKEY_ECDSA_CERT_METHODS \
   345  	HOSTKEY_ECDSA_CERT_METHODS \
   347 -	"[email protected]," \
   346 -	"[email protected]," \
   348 +	HOSTKEY_CURVE25519_CERT_METHODS \
   347 +	HOSTKEY_CURVE25519_CERT_METHODS \
   349  	"[email protected]," \
   348  	"[email protected]," \
   350  	"[email protected]," \
       
   351  	"[email protected]," \
       
   352  	"[email protected]," \
       
   353  	HOSTKEY_ECDSA_METHODS \
   349  	HOSTKEY_ECDSA_METHODS \
   354 -	"ssh-ed25519," \
   350 -	"ssh-ed25519," \
   355 +	HOSTKEY_CURVE25519_METHODS \
   351 +	HOSTKEY_CURVE25519_METHODS \
   356  	"ssh-rsa," \
   352  	"ssh-rsa" \
   357  	"ssh-dss"
   353  
   358  
   354  /* the actual algorithms */
   359 @@ -143,10 +152,10 @@
   355 @@ -141,10 +150,10 @@
   360  #else
   356  #else
   361  
   357  
   362  #define KEX_SERVER_KEX		\
   358  #define KEX_SERVER_KEX		\
   363 -	"[email protected]"
   359 -	"[email protected]"
   364 +	KEX_CURVE25519_METHODS
   360 +	KEX_CURVE25519_METHODS
   366 -	"[email protected]," \
   362 -	"[email protected]," \
   367 -	"ssh-ed25519"
   363 -	"ssh-ed25519"
   368 +	HOSTKEY_CURVE25519_CERT_METHODS \
   364 +	HOSTKEY_CURVE25519_CERT_METHODS \
   369 +	HOSTKEY_CURVE25519_METHODS
   365 +	HOSTKEY_CURVE25519_METHODS
   370  #define	KEX_SERVER_ENCRYPT \
   366  #define	KEX_SERVER_ENCRYPT \
   371  	"aes128-ctr,aes192-ctr,aes256-ctr," \
   367  	"[email protected]," \
   372  	"[email protected]"
   368  	"aes128-ctr,aes192-ctr,aes256-ctr"
   373 diff -pur old/openbsd-compat/Makefile.in new/openbsd-compat/Makefile.in
   369 diff -pur old/openbsd-compat/Makefile.in new/openbsd-compat/Makefile.in
   374 --- old/openbsd-compat/Makefile.in	2015-03-16 22:49:20.000000000 -0700
   370 --- old/openbsd-compat/Makefile.in
   375 +++ new/openbsd-compat/Makefile.in	2015-05-12 06:57:55.869383953 -0700
   371 +++ new/openbsd-compat/Makefile.in
   376 @@ -32,7 +32,7 @@ $(OPENBSD): ../config.h
   372 @@ -32,7 +32,7 @@ $(OPENBSD): ../config.h
   377  $(PORTS): ../config.h
   373  $(PORTS): ../config.h
   378  
   374  
   379  libopenbsd-compat.a:  $(COMPAT) $(OPENBSD) $(PORTS)
   375  libopenbsd-compat.a:  $(COMPAT) $(OPENBSD) $(PORTS)
   380 -	$(AR) rv $@ $(COMPAT) $(OPENBSD) $(PORTS)
   376 -	$(AR) rv $@ $(COMPAT) $(OPENBSD) $(PORTS)
   381 +	$(AR) rv $@ $(COMPAT) $(OPENBSD) $(PORTS) ../hash.o ../blocks.o
   377 +	$(AR) rv $@ $(COMPAT) $(OPENBSD) $(PORTS) ../hash.o ../blocks.o
   382  	$(RANLIB) $@
   378  	$(RANLIB) $@
   383  
   379  
   384  clean:
   380  clean:
   385 diff -pur old/pathnames.h new/pathnames.h
   381 diff -pur old/pathnames.h new/pathnames.h
   386 --- old/pathnames.h	2015-03-16 22:49:20.000000000 -0700
   382 --- old/pathnames.h
   387 +++ new/pathnames.h	2015-05-12 06:57:55.869773325 -0700
   383 +++ new/pathnames.h
   388 @@ -39,7 +39,9 @@
   384 @@ -39,7 +39,9 @@
   389  #define _PATH_HOST_KEY_FILE		SSHDIR "/ssh_host_key"
   385  #define _PATH_HOST_KEY_FILE		SSHDIR "/ssh_host_key"
   390  #define _PATH_HOST_DSA_KEY_FILE		SSHDIR "/ssh_host_dsa_key"
   386  #define _PATH_HOST_DSA_KEY_FILE		SSHDIR "/ssh_host_dsa_key"
   391  #define _PATH_HOST_ECDSA_KEY_FILE	SSHDIR "/ssh_host_ecdsa_key"
   387  #define _PATH_HOST_ECDSA_KEY_FILE	SSHDIR "/ssh_host_ecdsa_key"
   392 +#ifndef WITHOUT_ED25519
   388 +#ifndef WITHOUT_ED25519
   404 +#endif /* WITHOUT_ED25519 */
   400 +#endif /* WITHOUT_ED25519 */
   405  
   401  
   406  /*
   402  /*
   407   * Configuration file in user's home directory.  This file need not be
   403   * Configuration file in user's home directory.  This file need not be
   408 diff -pur old/readconf.c new/readconf.c
   404 diff -pur old/readconf.c new/readconf.c
   409 --- old/readconf.c	2015-05-12 06:57:55.746561528 -0700
   405 --- old/readconf.c
   410 +++ new/readconf.c	2015-05-12 06:57:55.870873194 -0700
   406 +++ new/readconf.c
   411 @@ -1848,8 +1848,10 @@ fill_default_options(Options * options)
   407 @@ -1846,8 +1846,10 @@ fill_default_options(Options * options)
   412  			add_identity_file(options, "~/",
   408  			add_identity_file(options, "~/",
   413  			    _PATH_SSH_CLIENT_ID_ECDSA, 0);
   409  			    _PATH_SSH_CLIENT_ID_ECDSA, 0);
   414  #endif
   410  #endif
   415 +#ifndef WITHOUT_ED25519
   411 +#ifndef WITHOUT_ED25519
   416  			add_identity_file(options, "~/",
   412  			add_identity_file(options, "~/",
   418 +#endif /* WITHOUT_ED25519 */
   414 +#endif /* WITHOUT_ED25519 */
   419  		}
   415  		}
   420  	}
   416  	}
   421  	if (options->escape_char == -1)
   417  	if (options->escape_char == -1)
   422 diff -pur old/servconf.c new/servconf.c
   418 diff -pur old/servconf.c new/servconf.c
   423 --- old/servconf.c	2015-05-12 06:57:55.748493685 -0700
   419 --- old/servconf.c
   424 +++ new/servconf.c	2015-05-12 06:57:55.872093181 -0700
   420 +++ new/servconf.c
   425 @@ -216,8 +216,10 @@ fill_default_server_options(ServerOption
   421 @@ -222,8 +222,10 @@ fill_default_server_options(ServerOption
   426  			options->host_key_files[options->num_host_key_files++] =
   422  			options->host_key_files[options->num_host_key_files++] =
   427  			    _PATH_HOST_ECDSA_KEY_FILE;
   423  			    _PATH_HOST_ECDSA_KEY_FILE;
   428  #endif
   424  #endif
   429 +#ifndef WITHOUT_ED25519
   425 +#ifndef WITHOUT_ED25519
   430  			options->host_key_files[options->num_host_key_files++] =
   426  			options->host_key_files[options->num_host_key_files++] =
   432 +#endif /* WITHOUT_ED25519 */
   428 +#endif /* WITHOUT_ED25519 */
   433  		}
   429  		}
   434  	}
   430  	}
   435  	/* No certificates by default */
   431  	/* No certificates by default */
   436 diff -pur old/smult_curve25519_ref.c new/smult_curve25519_ref.c
   432 diff -pur old/smult_curve25519_ref.c new/smult_curve25519_ref.c
   437 --- old/smult_curve25519_ref.c	2015-03-16 22:49:20.000000000 -0700
   433 --- old/smult_curve25519_ref.c
   438 +++ new/smult_curve25519_ref.c	2015-05-12 06:57:55.872682983 -0700
   434 +++ new/smult_curve25519_ref.c
   439 @@ -6,6 +6,8 @@ Public domain.
   435 @@ -6,6 +6,8 @@ Public domain.
   440  Derived from public domain code by D. J. Bernstein.
   436  Derived from public domain code by D. J. Bernstein.
   441  */
   437  */
   442  
   438  
   443 +#ifndef WITHOUT_ED25519
   439 +#ifndef WITHOUT_ED25519
   449    for (i = 0;i < 32;++i) q[i] = work[64 + i];
   445    for (i = 0;i < 32;++i) q[i] = work[64 + i];
   450    return 0;
   446    return 0;
   451  }
   447  }
   452 +#endif /* WITHOUT_ED25519 */
   448 +#endif /* WITHOUT_ED25519 */
   453 diff -pur old/ssh-add.0 new/ssh-add.0
   449 diff -pur old/ssh-add.0 new/ssh-add.0
   454 --- old/ssh-add.0	2015-03-17 21:26:35.000000000 -0700
   450 --- old/ssh-add.0
   455 +++ new/ssh-add.0	2015-05-12 07:37:37.356166396 -0700
   451 +++ new/ssh-add.0
   456 @@ -11,7 +11,7 @@ SYNOPSIS
   452 @@ -11,7 +11,7 @@ SYNOPSIS
   457  DESCRIPTION
   453  DESCRIPTION
   458       ssh-add adds private key identities to the authentication agent,
   454       ssh-add adds private key identities to the authentication agent,
   459       ssh-agent(1).  When run without arguments, it adds the files
   455       ssh-agent(1).  When run without arguments, it adds the files
   460 -     ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and
   456 -     ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and
   461 +     ~/.ssh/id_rsa, ~/.ssh/id_dsa, and
   457 +     ~/.ssh/id_rsa, ~/.ssh/id_dsa, and
   462       ~/.ssh/identity.  After loading a private key, ssh-add will try to load
   458       ~/.ssh/identity.  After loading a private key, ssh-add will try to load
   463       corresponding certificate information from the filename obtained by
   459       corresponding certificate information from the filename obtained by
   464       appending -cert.pub to the name of the private key file.  Alternative
   460       appending -cert.pub to the name of the private key file.  Alternative
   465 @@ -96,14 +96,6 @@ FILES
   461 @@ -97,14 +97,6 @@ FILES
   466               Contains the protocol version 2 DSA authentication identity of
   462               Contains the protocol version 2 DSA authentication identity of
   467               the user.
   463               the user.
   468  
   464  
   469 -     ~/.ssh/id_ecdsa
   465 -     ~/.ssh/id_ecdsa
   470 -             Contains the protocol version 2 ECDSA authentication identity of
   466 -             Contains the protocol version 2 ECDSA authentication identity of
   476 -
   472 -
   477       ~/.ssh/id_rsa
   473       ~/.ssh/id_rsa
   478               Contains the protocol version 2 RSA authentication identity of
   474               Contains the protocol version 2 RSA authentication identity of
   479               the user.
   475               the user.
   480 diff -pur old/ssh-add.1 new/ssh-add.1
   476 diff -pur old/ssh-add.1 new/ssh-add.1
   481 --- old/ssh-add.1	2015-03-16 22:49:20.000000000 -0700
   477 --- old/ssh-add.1
   482 +++ new/ssh-add.1	2015-05-12 07:47:42.099918141 -0700
   478 +++ new/ssh-add.1
   483 @@ -58,8 +58,6 @@ adds private key identities to the authe
   479 @@ -58,8 +58,6 @@ adds private key identities to the authe
   484  When run without arguments, it adds the files
   480  When run without arguments, it adds the files
   485  .Pa ~/.ssh/id_rsa ,
   481  .Pa ~/.ssh/id_rsa ,
   486  .Pa ~/.ssh/id_dsa ,
   482  .Pa ~/.ssh/id_dsa ,
   487 -.Pa ~/.ssh/id_ecdsa ,
   483 -.Pa ~/.ssh/id_ecdsa ,
   488 -.Pa ~/.ssh/id_ed25519
   484 -.Pa ~/.ssh/id_ed25519
   489  and
   485  and
   490  .Pa ~/.ssh/identity .
   486  .Pa ~/.ssh/identity .
   491  After loading a private key,
   487  After loading a private key,
   492 @@ -177,10 +175,6 @@ socket used to communicate with the agen
   488 @@ -178,10 +176,6 @@ socket used to communicate with the agen
   493  Contains the protocol version 1 RSA authentication identity of the user.
   489  Contains the protocol version 1 RSA authentication identity of the user.
   494  .It Pa ~/.ssh/id_dsa
   490  .It Pa ~/.ssh/id_dsa
   495  Contains the protocol version 2 DSA authentication identity of the user.
   491  Contains the protocol version 2 DSA authentication identity of the user.
   496 -.It Pa ~/.ssh/id_ecdsa
   492 -.It Pa ~/.ssh/id_ecdsa
   497 -Contains the protocol version 2 ECDSA authentication identity of the user.
   493 -Contains the protocol version 2 ECDSA authentication identity of the user.
   499 -Contains the protocol version 2 Ed25519 authentication identity of the user.
   495 -Contains the protocol version 2 Ed25519 authentication identity of the user.
   500  .It Pa ~/.ssh/id_rsa
   496  .It Pa ~/.ssh/id_rsa
   501  Contains the protocol version 2 RSA authentication identity of the user.
   497  Contains the protocol version 2 RSA authentication identity of the user.
   502  .El
   498  .El
   503 diff -pur old/ssh-add.c new/ssh-add.c
   499 diff -pur old/ssh-add.c new/ssh-add.c
   504 --- old/ssh-add.c	2015-03-16 22:49:20.000000000 -0700
   500 --- old/ssh-add.c
   505 +++ new/ssh-add.c	2015-05-12 06:57:55.873128238 -0700
   501 +++ new/ssh-add.c
   506 @@ -78,7 +78,9 @@ static char *default_files[] = {
   502 @@ -78,7 +78,9 @@ static char *default_files[] = {
   507  	_PATH_SSH_CLIENT_ID_ECDSA,
   503  	_PATH_SSH_CLIENT_ID_ECDSA,
   508  #endif
   504  #endif
   509  #endif /* WITH_OPENSSL */
   505  #endif /* WITH_OPENSSL */
   510 +#ifndef WITHOUT_ED25519
   506 -	_PATH_SSH_CLIENT_ID_ED25519,
   511  	_PATH_SSH_CLIENT_ID_ED25519,
   507 +#ifndef WITHOUT_ED25519
   512 +#endif /* WITHOUT_ED25519 */
   508 + 	_PATH_SSH_CLIENT_ID_ED25519,
       
   509 +#endif /* WITHOUT_ED25519 */
       
   510  #ifdef WITH_SSH1
   513  	_PATH_SSH_CLIENT_IDENTITY,
   511  	_PATH_SSH_CLIENT_IDENTITY,
   514  	NULL
   512  #endif
   515  };
       
   516 diff -pur old/ssh-agent.0 new/ssh-agent.0
   513 diff -pur old/ssh-agent.0 new/ssh-agent.0
   517 --- old/ssh-agent.0	2015-03-17 21:26:35.000000000 -0700
   514 --- old/ssh-agent.0
   518 +++ new/ssh-agent.0	2015-05-12 07:37:55.617194120 -0700
   515 +++ new/ssh-agent.0
   519 @@ -10,7 +10,7 @@ SYNOPSIS
   516 @@ -10,7 +10,7 @@ SYNOPSIS
   520  
   517  
   521  DESCRIPTION
   518  DESCRIPTION
   522       ssh-agent is a program to hold private keys used for public key
   519       ssh-agent is a program to hold private keys used for public key
   523 -     authentication (RSA, DSA, ECDSA, Ed25519).  ssh-agent is usually started
   520 -     authentication (RSA, DSA, ECDSA, Ed25519).  ssh-agent is usually started
   524 +     authentication (RSA, DSA).  ssh-agent is usually started
   521 +     authentication (RSA, DSA).  ssh-agent is usually started
   525       in the beginning of an X-session or a login session, and all other
   522       in the beginning of an X-session or a login session, and all other
   526       windows or programs are started as clients to the ssh-agent program.
   523       windows or programs are started as clients to the ssh-agent program.
   527       Through use of environment variables the agent can be located and
   524       Through use of environment variables the agent can be located and
   528 diff -pur old/ssh-agent.1 new/ssh-agent.1
   525 diff -pur old/ssh-agent.1 new/ssh-agent.1
   529 --- old/ssh-agent.1	2015-03-16 22:49:20.000000000 -0700
   526 --- old/ssh-agent.1
   530 +++ new/ssh-agent.1	2015-05-12 07:47:53.707510271 -0700
   527 +++ new/ssh-agent.1
   531 @@ -54,7 +54,7 @@
   528 @@ -54,7 +54,7 @@
   532  .Sh DESCRIPTION
   529  .Sh DESCRIPTION
   533  .Nm
   530  .Nm
   534  is a program to hold private keys used for public key authentication
   531  is a program to hold private keys used for public key authentication
   535 -(RSA, DSA, ECDSA, Ed25519).
   532 -(RSA, DSA, ECDSA, Ed25519).
   536 +(RSA, DSA).
   533 +(RSA, DSA).
   537  .Nm
   534  .Nm
   538  is usually started in the beginning of an X-session or a login session, and
   535  is usually started in the beginning of an X-session or a login session, and
   539  all other windows or programs are started as clients to the ssh-agent
   536  all other windows or programs are started as clients to the ssh-agent
   540 diff -pur old/ssh-ed25519.c new/ssh-ed25519.c
   537 diff -pur old/ssh-ed25519.c new/ssh-ed25519.c
   541 --- old/ssh-ed25519.c	2015-03-16 22:49:20.000000000 -0700
   538 --- old/ssh-ed25519.c
   542 +++ new/ssh-ed25519.c	2015-05-12 06:57:55.873512963 -0700
   539 +++ new/ssh-ed25519.c
   543 @@ -17,6 +17,8 @@
   540 @@ -17,6 +17,8 @@
   544  
   541  
   545  #include "includes.h"
   542  #include "includes.h"
   546  
   543  
   547 +#ifndef WITHOUT_ED25519
   544 +#ifndef WITHOUT_ED25519
   553  	free(ktype);
   550  	free(ktype);
   554  	return r;
   551  	return r;
   555  }
   552  }
   556 +#endif /* WITHOUT_ED25519 */
   553 +#endif /* WITHOUT_ED25519 */
   557 diff -pur old/ssh-keygen.0 new/ssh-keygen.0
   554 diff -pur old/ssh-keygen.0 new/ssh-keygen.0
   558 --- old/ssh-keygen.0	2015-03-17 21:26:35.000000000 -0700
   555 --- old/ssh-keygen.0
   559 +++ new/ssh-keygen.0	2015-05-12 07:40:51.445122062 -0700
   556 +++ new/ssh-keygen.0
   560 @@ -4,7 +4,7 @@ NAME
   557 @@ -4,7 +4,7 @@ NAME
   561       ssh-keygen M-bM-^@M-^S authentication key generation, management and conversion
   558       ssh-keygen M-bM-^@M-^S authentication key generation, management and conversion
   562  
   559  
   563  SYNOPSIS
   560  SYNOPSIS
   564 -     ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]
   561 -     ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]
   601               SSH protocol 2 key when the -o flag is set), this option
   598               SSH protocol 2 key when the -o flag is set), this option
   602               specifies the number of KDF (key derivation function) rounds
   599               specifies the number of KDF (key derivation function) rounds
   603               used.  Higher numbers result in slower passphrase verification
   600               used.  Higher numbers result in slower passphrase verification
   604 @@ -103,12 +103,7 @@ DESCRIPTION
   601 @@ -103,12 +103,7 @@ DESCRIPTION
   605               Specifies the number of bits in the key to create.  For RSA keys,
   602               Specifies the number of bits in the key to create.  For RSA keys,
   606               the minimum size is 768 bits and the default is 2048 bits.
   603               the minimum size is 1024 bits and the default is 2048 bits.
   607               Generally, 2048 bits is considered sufficient.  DSA keys must be
   604               Generally, 2048 bits is considered sufficient.  DSA keys must be
   608 -             exactly 1024 bits as specified by FIPS 186-2.  For ECDSA keys,
   605 -             exactly 1024 bits as specified by FIPS 186-2.  For ECDSA keys,
   609 -             the -b flag determines the key length by selecting from one of
   606 -             the -b flag determines the key length by selecting from one of
   610 -             three elliptic curve sizes: 256, 384 or 521 bits.  Attempting to
   607 -             three elliptic curve sizes: 256, 384 or 521 bits.  Attempting to
   611 -             use bit lengths other than these three values for ECDSA keys will
   608 -             use bit lengths other than these three values for ECDSA keys will
   659 +             Contains the protocol version 2 DSA or RSA public
   656 +             Contains the protocol version 2 DSA or RSA public
   660               key for authentication.  The contents of this file should be
   657               key for authentication.  The contents of this file should be
   661               added to ~/.ssh/authorized_keys on all machines where the user
   658               added to ~/.ssh/authorized_keys on all machines where the user
   662               wishes to log in using public key authentication.  There is no
   659               wishes to log in using public key authentication.  There is no
   663 diff -pur old/ssh-keygen.1 new/ssh-keygen.1
   660 diff -pur old/ssh-keygen.1 new/ssh-keygen.1
   664 --- old/ssh-keygen.1	2015-03-16 22:49:20.000000000 -0700
   661 --- old/ssh-keygen.1
   665 +++ new/ssh-keygen.1	2015-05-12 07:49:52.125219558 -0700
   662 +++ new/ssh-keygen.1
   666 @@ -46,7 +46,7 @@
   663 @@ -46,7 +46,7 @@
   667  .Nm ssh-keygen
   664  .Nm ssh-keygen
   668  .Op Fl q
   665  .Op Fl q
   669  .Op Fl b Ar bits
   666  .Op Fl b Ar bits
   670 -.Op Fl t Cm dsa | ecdsa | ed25519 | rsa | rsa1
   667 -.Op Fl t Cm dsa | ecdsa | ed25519 | rsa | rsa1
   707 +When saving a new-format private key (i.e. SSH protocol
   704 +When saving a new-format private key (i.e. SSH protocol
   708  2 key when the
   705  2 key when the
   709  .Fl o
   706  .Fl o
   710  flag is set), this option specifies the number of KDF (key derivation function)
   707  flag is set), this option specifies the number of KDF (key derivation function)
   711 @@ -247,15 +245,6 @@ Specifies the number of bits in the key
   708 @@ -247,15 +245,6 @@ Specifies the number of bits in the key
   712  For RSA keys, the minimum size is 768 bits and the default is 2048 bits.
   709  For RSA keys, the minimum size is 1024 bits and the default is 2048 bits.
   713  Generally, 2048 bits is considered sufficient.
   710  Generally, 2048 bits is considered sufficient.
   714  DSA keys must be exactly 1024 bits as specified by FIPS 186-2.
   711  DSA keys must be exactly 1024 bits as specified by FIPS 186-2.
   715 -For ECDSA keys, the
   712 -For ECDSA keys, the
   716 -.Fl b
   713 -.Fl b
   717 -flag determines the key length by selecting from one of three elliptic
   714 -flag determines the key length by selecting from one of three elliptic
   771 +Contains the protocol version 2 DSA or RSA
   768 +Contains the protocol version 2 DSA or RSA
   772  public key for authentication.
   769  public key for authentication.
   773  The contents of this file should be added to
   770  The contents of this file should be added to
   774  .Pa ~/.ssh/authorized_keys
   771  .Pa ~/.ssh/authorized_keys
   775 diff -pur old/ssh-keygen.c new/ssh-keygen.c
   772 diff -pur old/ssh-keygen.c new/ssh-keygen.c
   776 --- old/ssh-keygen.c	2015-03-16 22:49:20.000000000 -0700
   773 --- old/ssh-keygen.c
   777 +++ new/ssh-keygen.c	2015-05-12 06:57:55.874834232 -0700
   774 +++ new/ssh-keygen.c
   778 @@ -214,7 +214,11 @@ type_bits_valid(int type, const char *na
   775 @@ -217,7 +217,11 @@ type_bits_valid(int type, const char *na
   779  	}
   776  		fatal("key bits exceeds maximum %d", maxbits);
   780  	if (type == KEY_DSA && *bitsp != 1024)
   777  	if (type == KEY_DSA && *bitsp != 1024)
   781  		fatal("DSA keys must be 1024 bits");
   778  		fatal("DSA keys must be 1024 bits");
   782 -	else if (type != KEY_ECDSA && type != KEY_ED25519 && *bitsp < 768)
   779 -	else if (type != KEY_ECDSA && type != KEY_ED25519 && *bitsp < 1024)
   783 +	else if (type != KEY_ECDSA &&
   780 +	else if (type != KEY_ECDSA &&
   784 +#ifndef WITHOUT_ED25519
   781 +#ifndef WITHOUT_ED25519
   785 +		 type != KEY_ED25519 &&
   782 +		 type != KEY_ED25519 &&
   786 +#endif /* WITHOUT_ED25519 */
   783 +#endif /* WITHOUT_ED25519 */
   787 +		 *bitsp < 768)
   784 +		 *bitsp < 1024)
   788  		fatal("Key must at least be 768 bits");
   785  		fatal("Key must at least be 1024 bits");
   789  	else if (type == KEY_ECDSA && sshkey_ecdsa_bits_to_nid(*bitsp) == -1)
   786  	else if (type == KEY_ECDSA && sshkey_ecdsa_bits_to_nid(*bitsp) == -1)
   790  		fatal("Invalid ECDSA key length - valid lengths are "
   787  		fatal("Invalid ECDSA key length - valid lengths are "
   791 @@ -251,10 +255,12 @@ ask_filename(struct passwd *pw, const ch
   788 @@ -252,10 +256,12 @@ ask_filename(struct passwd *pw, const ch
   792  		case KEY_RSA:
   789  		case KEY_RSA:
   793  			name = _PATH_SSH_CLIENT_ID_RSA;
   790  			name = _PATH_SSH_CLIENT_ID_RSA;
   794  			break;
   791  			break;
   795 +#ifndef WITHOUT_ED25519
   792 +#ifndef WITHOUT_ED25519
   796  		case KEY_ED25519:
   793  		case KEY_ED25519:
   797  		case KEY_ED25519_CERT:
   794  		case KEY_ED25519_CERT:
   798  			name = _PATH_SSH_CLIENT_ID_ED25519;
   795  			name = _PATH_SSH_CLIENT_ID_ED25519;
   799  			break;
   796  			break;
   800 +#endif /* WITHOUT_ED25519 */
   797 +#endif /* WITHOUT_ED25519 */
   801  		default:
   798  		default:
   802  			fprintf(stderr, "bad key type\n");
   799  			fatal("bad key type");
   803  			exit(1);
   800  		}
   804 @@ -954,7 +960,9 @@ do_gen_all_hostkeys(struct passwd *pw)
   801 @@ -939,7 +945,9 @@ do_gen_all_hostkeys(struct passwd *pw)
   805  #ifdef OPENSSL_HAS_ECC
       
   806  		{ "ecdsa", "ECDSA",_PATH_HOST_ECDSA_KEY_FILE },
   802  		{ "ecdsa", "ECDSA",_PATH_HOST_ECDSA_KEY_FILE },
   807  #endif
   803  #endif /* OPENSSL_HAS_ECC */
   808 +#ifndef WITHOUT_ED25519
   804  #endif /* WITH_OPENSSL */
   809  		{ "ed25519", "ED25519",_PATH_HOST_ED25519_KEY_FILE },
   805 -		{ "ed25519", "ED25519",_PATH_HOST_ED25519_KEY_FILE },
       
   806 +#ifndef WITHOUT_ED25519
       
   807 + 		{ "ed25519", "ED25519",_PATH_HOST_ED25519_KEY_FILE },
   810 +#endif /* WITHOUT_ED25519 */
   808 +#endif /* WITHOUT_ED25519 */
   811  		{ NULL, NULL, NULL }
   809  		{ NULL, NULL, NULL }
   812  	};
   810  	};
   813  
   811  
   814 @@ -1643,7 +1651,10 @@ do_ca_sign(struct passwd *pw, int argc,
   812 @@ -1605,7 +1613,10 @@ do_ca_sign(struct passwd *pw, int argc,
   815  			fatal("%s: unable to open \"%s\": %s",
   813  			fatal("%s: unable to open \"%s\": %s",
   816  			    __func__, tmp, ssh_err(r));
   814  			    __func__, tmp, ssh_err(r));
   817  		if (public->type != KEY_RSA && public->type != KEY_DSA &&
   815  		if (public->type != KEY_RSA && public->type != KEY_DSA &&
   818 -		    public->type != KEY_ECDSA && public->type != KEY_ED25519)
   816 -		    public->type != KEY_ECDSA && public->type != KEY_ED25519)
   819 +#ifndef WITHOUT_ED25519
   817 +#ifndef WITHOUT_ED25519
   821 +#endif /* WITHOUT_ED25519 */
   819 +#endif /* WITHOUT_ED25519 */
   822 +		    public->type != KEY_ECDSA)
   820 +		    public->type != KEY_ECDSA)
   823  			fatal("%s: key \"%s\" type %s cannot be certified",
   821  			fatal("%s: key \"%s\" type %s cannot be certified",
   824  			    __func__, tmp, sshkey_type(public));
   822  			    __func__, tmp, sshkey_type(public));
   825  
   823  
   826 @@ -2558,8 +2569,10 @@ main(int argc, char **argv)
   824 @@ -2502,8 +2513,10 @@ main(int argc, char **argv)
   827  			    _PATH_HOST_DSA_KEY_FILE, rr_hostname);
   825  			    _PATH_HOST_DSA_KEY_FILE, rr_hostname);
   828  			n += do_print_resource_record(pw,
   826  			n += do_print_resource_record(pw,
   829  			    _PATH_HOST_ECDSA_KEY_FILE, rr_hostname);
   827  			    _PATH_HOST_ECDSA_KEY_FILE, rr_hostname);
   830 +#ifndef WITHOUT_ED25519
   828 +#ifndef WITHOUT_ED25519
   831  			n += do_print_resource_record(pw,
   829  			n += do_print_resource_record(pw,
   833 +#endif /* WITHOUT_ED25519 */
   831 +#endif /* WITHOUT_ED25519 */
   834  			if (n == 0)
   832  			if (n == 0)
   835  				fatal("no keys found.");
   833  				fatal("no keys found.");
   836  			exit(0);
   834  			exit(0);
   837 diff -pur old/ssh-keyscan.0 new/ssh-keyscan.0
   835 diff -pur old/ssh-keyscan.0 new/ssh-keyscan.0
   838 --- old/ssh-keyscan.0	2015-03-17 21:26:35.000000000 -0700
   836 --- old/ssh-keyscan.0
   839 +++ new/ssh-keyscan.0	2015-05-12 07:42:45.592281964 -0700
   837 +++ new/ssh-keyscan.0
   840 @@ -48,9 +48,9 @@ DESCRIPTION
   838 @@ -48,9 +48,9 @@ DESCRIPTION
   841       -t type
   839       -t type
   842               Specifies the type of the key to fetch from the scanned hosts.
   840               Specifies the type of the key to fetch from the scanned hosts.
   843               The possible values are M-bM-^@M-^\rsa1M-bM-^@M-^] for protocol version 1 and M-bM-^@M-^\dsaM-bM-^@M-^],
   841               The possible values are M-bM-^@M-^\rsa1M-bM-^@M-^] for protocol version 1 and M-bM-^@M-^\dsaM-bM-^@M-^],
   844 -             M-bM-^@M-^\ecdsaM-bM-^@M-^], M-bM-^@M-^\ed25519M-bM-^@M-^], or M-bM-^@M-^\rsaM-bM-^@M-^] for protocol version 2.  Multiple
   842 -             M-bM-^@M-^\ecdsaM-bM-^@M-^], M-bM-^@M-^\ed25519M-bM-^@M-^], or M-bM-^@M-^\rsaM-bM-^@M-^] for protocol version 2.  Multiple
   872 +     $ ssh-keyscan -t rsa,dsa -f ssh_hosts | \
   870 +     $ ssh-keyscan -t rsa,dsa -f ssh_hosts | \
   873               sort -u - ssh_known_hosts | diff ssh_known_hosts -
   871               sort -u - ssh_known_hosts | diff ssh_known_hosts -
   874  
   872  
   875  SEE ALSO
   873  SEE ALSO
   876 diff -pur old/ssh-keyscan.1 new/ssh-keyscan.1
   874 diff -pur old/ssh-keyscan.1 new/ssh-keyscan.1
   877 --- old/ssh-keyscan.1	2015-03-16 22:49:20.000000000 -0700
   875 --- old/ssh-keyscan.1
   878 +++ new/ssh-keyscan.1	2015-05-12 07:50:53.173745820 -0700
   876 +++ new/ssh-keyscan.1
   879 @@ -90,18 +90,13 @@ Specifies the type of the key to fetch f
   877 @@ -90,18 +90,13 @@ Specifies the type of the key to fetch f
   880  The possible values are
   878  The possible values are
   881  .Dq rsa1
   879  .Dq rsa1
   882  for protocol version 1 and
   880  for protocol version 1 and
   883 -.Dq dsa ,
   881 -.Dq dsa ,
   925 +$ ssh-keyscan -t rsa,dsa -f ssh_hosts | \e
   923 +$ ssh-keyscan -t rsa,dsa -f ssh_hosts | \e
   926  	sort -u - ssh_known_hosts | diff ssh_known_hosts -
   924  	sort -u - ssh_known_hosts | diff ssh_known_hosts -
   927  .Ed
   925  .Ed
   928  .Sh SEE ALSO
   926  .Sh SEE ALSO
   929 diff -pur old/ssh-keyscan.c new/ssh-keyscan.c
   927 diff -pur old/ssh-keyscan.c new/ssh-keyscan.c
   930 --- old/ssh-keyscan.c	2015-03-16 22:49:20.000000000 -0700
   928 --- old/ssh-keyscan.c
   931 +++ new/ssh-keyscan.c	2015-05-12 06:57:55.875467494 -0700
   929 +++ new/ssh-keyscan.c
   932 @@ -286,7 +286,9 @@ keygrab_ssh2(con *c)
   930 @@ -286,7 +286,9 @@ keygrab_ssh2(con *c)
   933  	c->c_ssh->kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
   931  	c->c_ssh->kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
   934  # endif
   932  # endif
   935  #endif
   933  #endif
   936 +#ifndef WITHOUT_ED25519
   934 +#ifndef WITHOUT_ED25519
   937  	c->c_ssh->kex->kex[KEX_C25519_SHA256] = kexc25519_client;
   935  	c->c_ssh->kex->kex[KEX_C25519_SHA256] = kexc25519_client;
   938 +#endif /* WITHOUT_ED25519 */
   936 +#endif /* WITHOUT_ED25519 */
   939  	ssh_set_verify_host_key_callback(c->c_ssh, key_print_wrapper);
   937  	ssh_set_verify_host_key_callback(c->c_ssh, key_print_wrapper);
   940  	/*
   938  	/*
   941  	 * do the key-exchange until an error occurs or until
   939  	 * do the key-exchange until an error occurs or until
   942 @@ -609,10 +611,15 @@ do_host(char *host)
   940 @@ -612,10 +614,15 @@ do_host(char *host)
   943  {
   941  {
   944  	char *name = strnnsep(&host, " \t\n");
   942  	char *name = strnnsep(&host, " \t\n");
   945  	int j;
   943  	int j;
   946 +#ifndef WITHOUT_ED25519
   944 +#ifndef WITHOUT_ED25519
   947 +	int max_kt = KT_ED25519;
   945 +	int max_kt = KT_ED25519;
   954 -	for (j = KT_RSA1; j <= KT_ED25519; j *= 2) {
   952 -	for (j = KT_RSA1; j <= KT_ED25519; j *= 2) {
   955 +	for (j = KT_RSA1; j <= max_kt; j *= 2) {
   953 +	for (j = KT_RSA1; j <= max_kt; j *= 2) {
   956  		if (get_keytypes & j) {
   954  		if (get_keytypes & j) {
   957  			while (ncon >= MAXCON)
   955  			while (ncon >= MAXCON)
   958  				conloop();
   956  				conloop();
   959 @@ -716,9 +723,11 @@ main(int argc, char **argv)
   957 @@ -719,9 +726,11 @@ main(int argc, char **argv)
   960  				case KEY_RSA:
   958  				case KEY_RSA:
   961  					get_keytypes |= KT_RSA;
   959  					get_keytypes |= KT_RSA;
   962  					break;
   960  					break;
   963 +#ifndef WITHOUT_ED25519
   961 +#ifndef WITHOUT_ED25519
   964  				case KEY_ED25519:
   962  				case KEY_ED25519:
   967 +#endif /* WITHOUT_ED25519 */
   965 +#endif /* WITHOUT_ED25519 */
   968  				case KEY_UNSPEC:
   966  				case KEY_UNSPEC:
   969  					fatal("unknown key type %s", tname);
   967  					fatal("unknown key type %s", tname);
   970  				}
   968  				}
   971 diff -pur old/ssh-keysign.0 new/ssh-keysign.0
   969 diff -pur old/ssh-keysign.0 new/ssh-keysign.0
   972 --- old/ssh-keysign.0	2015-03-17 21:26:36.000000000 -0700
   970 --- old/ssh-keysign.0
   973 +++ new/ssh-keysign.0	2015-05-12 07:42:57.261187576 -0700
   971 +++ new/ssh-keysign.0
   974 @@ -24,8 +24,6 @@ FILES
   972 @@ -24,8 +24,6 @@ FILES
   975               Controls whether ssh-keysign is enabled.
   973               Controls whether ssh-keysign is enabled.
   976  
   974  
   977       /etc/ssh/ssh_host_dsa_key
   975       /etc/ssh/ssh_host_dsa_key
   978 -     /etc/ssh/ssh_host_ecdsa_key
   976 -     /etc/ssh/ssh_host_ecdsa_key
   988 -     /etc/ssh/ssh_host_ed25519_key-cert.pub
   986 -     /etc/ssh/ssh_host_ed25519_key-cert.pub
   989       /etc/ssh/ssh_host_rsa_key-cert.pub
   987       /etc/ssh/ssh_host_rsa_key-cert.pub
   990               If these files exist they are assumed to contain public
   988               If these files exist they are assumed to contain public
   991               certificate information corresponding with the private keys
   989               certificate information corresponding with the private keys
   992 diff -pur old/ssh-keysign.8 new/ssh-keysign.8
   990 diff -pur old/ssh-keysign.8 new/ssh-keysign.8
   993 --- old/ssh-keysign.8	2015-05-12 06:57:55.609219058 -0700
   991 --- old/ssh-keysign.8
   994 +++ new/ssh-keysign.8	2015-05-12 07:52:35.880504667 -0700
   992 +++ new/ssh-keysign.8
   995 @@ -62,8 +62,6 @@ Controls whether
   993 @@ -62,8 +62,6 @@ Controls whether
   996  is enabled.
   994  is enabled.
   997  .Pp
   995  .Pp
   998  .It Pa /etc/ssh/ssh_host_dsa_key
   996  .It Pa /etc/ssh/ssh_host_dsa_key
   999 -.It Pa /etc/ssh/ssh_host_ecdsa_key
   997 -.It Pa /etc/ssh/ssh_host_ecdsa_key
  1009 -.It Pa /etc/ssh/ssh_host_ed25519_key-cert.pub
  1007 -.It Pa /etc/ssh/ssh_host_ed25519_key-cert.pub
  1010  .It Pa /etc/ssh/ssh_host_rsa_key-cert.pub
  1008  .It Pa /etc/ssh/ssh_host_rsa_key-cert.pub
  1011  If these files exist they are assumed to contain public certificate
  1009  If these files exist they are assumed to contain public certificate
  1012  information corresponding with the private keys above.
  1010  information corresponding with the private keys above.
  1013 diff -pur old/ssh-keysign.c new/ssh-keysign.c
  1011 diff -pur old/ssh-keysign.c new/ssh-keysign.c
  1014 --- old/ssh-keysign.c	2015-03-16 22:49:20.000000000 -0700
  1012 --- old/ssh-keysign.c
  1015 +++ new/ssh-keysign.c	2015-05-25 04:37:07.788045828 -0700
  1013 +++ new/ssh-keysign.c
  1016 @@ -168,7 +168,7 @@ main(int argc, char **argv)
  1014 @@ -168,7 +168,7 @@ main(int argc, char **argv)
  1017  {
  1015  {
  1018  	struct sshbuf *b;
  1016  	struct sshbuf *b;
  1019  	Options options;
  1017  	Options options;
  1020 -#define NUM_KEYTYPES 4
  1018 -#define NUM_KEYTYPES 4
  1021 +#define NUM_KEYTYPES 3
  1019 +#define NUM_KEYTYPES 3
  1022  	struct sshkey *keys[NUM_KEYTYPES], *key = NULL;
  1020  	struct sshkey *keys[NUM_KEYTYPES], *key = NULL;
  1023  	struct passwd *pw;
  1021  	struct passwd *pw;
  1024  	int r, key_fd[NUM_KEYTYPES], i, found, version = 2, fd;
  1022  	int r, key_fd[NUM_KEYTYPES], i, found, version = 2, fd;
  1025 @@ -189,7 +189,9 @@ main(int argc, char **argv)
  1023 @@ -190,7 +190,9 @@ main(int argc, char **argv)
  1026  	i = 0;
  1024  	/* XXX This really needs to read sshd_config for the paths */
  1027  	key_fd[i++] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
  1025  	key_fd[i++] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
  1028  	key_fd[i++] = open(_PATH_HOST_ECDSA_KEY_FILE, O_RDONLY);
  1026  	key_fd[i++] = open(_PATH_HOST_ECDSA_KEY_FILE, O_RDONLY);
  1029 +#ifndef WITHOUT_ED25519
  1027 +#ifndef WITHOUT_ED25519
  1030  	key_fd[i++] = open(_PATH_HOST_ED25519_KEY_FILE, O_RDONLY);
  1028  	key_fd[i++] = open(_PATH_HOST_ED25519_KEY_FILE, O_RDONLY);
  1031 +#endif /* WITHOUT_ED25519 */
  1029 +#endif /* WITHOUT_ED25519 */
  1032  	key_fd[i++] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
  1030  	key_fd[i++] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
  1033  
  1031  
  1034  	original_real_uid = getuid();	/* XXX readconf.c needs this */
  1032  	original_real_uid = getuid();	/* XXX readconf.c needs this */
  1035 diff -pur old/ssh.0 new/ssh.0
  1033 diff -pur old/ssh.0 new/ssh.0
  1036 --- old/ssh.0	2015-03-17 21:26:35.000000000 -0700
  1034 --- old/ssh.0
  1037 +++ new/ssh.0	2015-05-12 07:44:32.393217723 -0700
  1035 +++ new/ssh.0
  1038 @@ -141,8 +141,8 @@ DESCRIPTION
  1036 @@ -140,8 +140,8 @@ DESCRIPTION
  1039       -i identity_file
  1037       -i identity_file
  1040               Selects a file from which the identity (private key) for public
  1038               Selects a file from which the identity (private key) for public
  1041               key authentication is read.  The default is ~/.ssh/identity for
  1039               key authentication is read.  The default is ~/.ssh/identity for
  1042 -             protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa,
  1040 -             protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa,
  1043 -             ~/.ssh/id_ed25519 and ~/.ssh/id_rsa for protocol version 2.
  1041 -             ~/.ssh/id_ed25519 and ~/.ssh/id_rsa for protocol version 2.
  1044 +             protocol version 1, and ~/.ssh/id_dsa
  1042 +             protocol version 1, and ~/.ssh/id_dsa
  1045 +             and ~/.ssh/id_rsa for protocol version 2.
  1043 +             and ~/.ssh/id_rsa for protocol version 2.
  1046               Identity files may also be specified on a per-host basis in the
  1044               Identity files may also be specified on a per-host basis in the
  1047               configuration file.  It is possible to have multiple -i options
  1045               configuration file.  It is possible to have multiple -i options
  1048               (and multiple identities specified in configuration files).  ssh
  1046               (and multiple identities specified in configuration files).  ssh
  1049 @@ -451,7 +451,7 @@ AUTHENTICATION
  1047 @@ -463,7 +463,7 @@ AUTHENTICATION
  1050       creates a public/private key pair for authentication purposes.  The
  1048       creates a public/private key pair for authentication purposes.  The
  1051       server knows the public key, and only the user knows the private key.
  1049       server knows the public key, and only the user knows the private key.
  1052       ssh implements public key authentication protocol automatically, using
  1050       ssh implements public key authentication protocol automatically, using
  1053 -     one of the DSA, ECDSA, Ed25519 or RSA algorithms.  Protocol 1 is
  1051 -     one of the DSA, ECDSA, Ed25519 or RSA algorithms.  Protocol 1 is
  1054 +     one of the DSA or RSA algorithms.  Protocol 1 is
  1052 +     one of the DSA or RSA algorithms.  Protocol 1 is
  1055       restricted to using only RSA keys, but protocol 2 may use any.  The
  1053       restricted to using only RSA keys, but protocol 2 may use any.  The
  1056       HISTORY section of ssl(8) contains a brief discussion of the DSA and RSA
  1054       HISTORY section of ssl(8) contains a brief discussion of the DSA and RSA
  1057       algorithms.
  1055       algorithms.
  1058 @@ -464,11 +464,9 @@ AUTHENTICATION
  1056 @@ -476,11 +476,9 @@ AUTHENTICATION
  1059  
  1057  
  1060       The user creates his/her key pair by running ssh-keygen(1).  This stores
  1058       The user creates his/her key pair by running ssh-keygen(1).  This stores
  1061       the private key in ~/.ssh/identity (protocol 1), ~/.ssh/id_dsa (protocol
  1059       the private key in ~/.ssh/identity (protocol 1), ~/.ssh/id_dsa (protocol
  1062 -     2 DSA), ~/.ssh/id_ecdsa (protocol 2 ECDSA), ~/.ssh/id_ed25519 (protocol 2
  1060 -     2 DSA), ~/.ssh/id_ecdsa (protocol 2 ECDSA), ~/.ssh/id_ed25519 (protocol 2
  1063 -     Ed25519), or ~/.ssh/id_rsa (protocol 2 RSA) and stores the public key in
  1061 -     Ed25519), or ~/.ssh/id_rsa (protocol 2 RSA) and stores the public key in
  1068 +     ~/.ssh/identity.pub (protocol 1), ~/.ssh/id_dsa.pub (protocol 2 DSA)
  1066 +     ~/.ssh/identity.pub (protocol 1), ~/.ssh/id_dsa.pub (protocol 2 DSA)
  1069 +     or ~/.ssh/id_rsa.pub (protocol 2 RSA) in the user's home
  1067 +     or ~/.ssh/id_rsa.pub (protocol 2 RSA) in the user's home
  1070       directory.  The user should then copy the public key to
  1068       directory.  The user should then copy the public key to
  1071       ~/.ssh/authorized_keys in his/her home directory on the remote machine.
  1069       ~/.ssh/authorized_keys in his/her home directory on the remote machine.
  1072       The authorized_keys file corresponds to the conventional ~/.rhosts file,
  1070       The authorized_keys file corresponds to the conventional ~/.rhosts file,
  1073 @@ -804,7 +802,7 @@ FILES
  1071 @@ -825,7 +823,7 @@ FILES
  1074               for the user, and not accessible by others.
  1072               for the user, and not accessible by others.
  1075  
  1073  
  1076       ~/.ssh/authorized_keys
  1074       ~/.ssh/authorized_keys
  1077 -             Lists the public keys (DSA, ECDSA, Ed25519, RSA) that can be used
  1075 -             Lists the public keys (DSA, ECDSA, Ed25519, RSA) that can be used
  1078 +             Lists the public keys (DSA, RSA) that can be used
  1076 +             Lists the public keys (DSA, RSA) that can be used
  1079               for logging in as this user.  The format of this file is
  1077               for logging in as this user.  The format of this file is
  1080               described in the sshd(8) manual page.  This file is not highly
  1078               described in the sshd(8) manual page.  This file is not highly
  1081               sensitive, but the recommended permissions are read/write for the
  1079               sensitive, but the recommended permissions are read/write for the
  1082 @@ -822,8 +820,6 @@ FILES
  1080 @@ -843,8 +841,6 @@ FILES
  1083  
  1081  
  1084       ~/.ssh/identity
  1082       ~/.ssh/identity
  1085       ~/.ssh/id_dsa
  1083       ~/.ssh/id_dsa
  1086 -     ~/.ssh/id_ecdsa
  1084 -     ~/.ssh/id_ecdsa
  1087 -     ~/.ssh/id_ed25519
  1085 -     ~/.ssh/id_ed25519
  1088       ~/.ssh/id_rsa
  1086       ~/.ssh/id_rsa
  1089               Contains the private key for authentication.  These files contain
  1087               Contains the private key for authentication.  These files contain
  1090               sensitive data and should be readable by the user but not
  1088               sensitive data and should be readable by the user but not
  1091 @@ -835,8 +831,6 @@ FILES
  1089 @@ -856,8 +852,6 @@ FILES
  1092  
  1090  
  1093       ~/.ssh/identity.pub
  1091       ~/.ssh/identity.pub
  1094       ~/.ssh/id_dsa.pub
  1092       ~/.ssh/id_dsa.pub
  1095 -     ~/.ssh/id_ecdsa.pub
  1093 -     ~/.ssh/id_ecdsa.pub
  1096 -     ~/.ssh/id_ed25519.pub
  1094 -     ~/.ssh/id_ed25519.pub
  1097       ~/.ssh/id_rsa.pub
  1095       ~/.ssh/id_rsa.pub
  1098               Contains the public key for authentication.  These files are not
  1096               Contains the public key for authentication.  These files are not
  1099               sensitive and can (but need not) be readable by anyone.
  1097               sensitive and can (but need not) be readable by anyone.
  1100 @@ -867,8 +861,6 @@ FILES
  1098 @@ -888,8 +882,6 @@ FILES
  1101  
  1099  
  1102       /etc/ssh/ssh_host_key
  1100       /etc/ssh/ssh_host_key
  1103       /etc/ssh/ssh_host_dsa_key
  1101       /etc/ssh/ssh_host_dsa_key
  1104 -     /etc/ssh/ssh_host_ecdsa_key
  1102 -     /etc/ssh/ssh_host_ecdsa_key
  1105 -     /etc/ssh/ssh_host_ed25519_key
  1103 -     /etc/ssh/ssh_host_ed25519_key
  1106       /etc/ssh/ssh_host_rsa_key
  1104       /etc/ssh/ssh_host_rsa_key
  1107               These files contain the private parts of the host keys and are
  1105               These files contain the private parts of the host keys and are
  1108               used for host-based authentication.  If protocol version 1 is
  1106               used for host-based authentication.  If protocol version 1 is
  1109 diff -pur old/ssh.1 new/ssh.1
  1107 diff -pur old/ssh.1 new/ssh.1
  1110 --- old/ssh.1	2015-03-16 22:49:20.000000000 -0700
  1108 --- old/ssh.1
  1111 +++ new/ssh.1	2015-05-12 07:51:38.403098490 -0700
  1109 +++ new/ssh.1
  1112 @@ -274,9 +274,7 @@ public key authentication is read.
  1110 @@ -292,9 +292,7 @@ public key authentication is read.
  1113  The default is
  1111  The default is
  1114  .Pa ~/.ssh/identity
  1112  .Pa ~/.ssh/identity
  1115  for protocol version 1, and
  1113  for protocol version 1, and
  1116 -.Pa ~/.ssh/id_dsa ,
  1114 -.Pa ~/.ssh/id_dsa ,
  1117 -.Pa ~/.ssh/id_ecdsa ,
  1115 -.Pa ~/.ssh/id_ecdsa ,
  1118 -.Pa ~/.ssh/id_ed25519
  1116 -.Pa ~/.ssh/id_ed25519
  1119 +.Pa ~/.ssh/id_dsa
  1117 +.Pa ~/.ssh/id_dsa
  1120  and
  1118  and
  1121  .Pa ~/.ssh/id_rsa
  1119  .Pa ~/.ssh/id_rsa
  1122  for protocol version 2.
  1120  for protocol version 2.
  1123 @@ -761,7 +759,7 @@ key pair for authentication purposes.
  1121 @@ -848,7 +846,7 @@ key pair for authentication purposes.
  1124  The server knows the public key, and only the user knows the private key.
  1122  The server knows the public key, and only the user knows the private key.
  1125  .Nm
  1123  .Nm
  1126  implements public key authentication protocol automatically,
  1124  implements public key authentication protocol automatically,
  1127 -using one of the DSA, ECDSA, Ed25519 or RSA algorithms.
  1125 -using one of the DSA, ECDSA, Ed25519 or RSA algorithms.
  1128 +using one of the DSA or RSA algorithms.
  1126 +using one of the DSA or RSA algorithms.
  1129  Protocol 1 is restricted to using only RSA keys,
  1127  Protocol 1 is restricted to using only RSA keys,
  1130  but protocol 2 may use any.
  1128  but protocol 2 may use any.
  1131  The HISTORY section of
  1129  The HISTORY section of
  1132 @@ -786,10 +784,6 @@ This stores the private key in
  1130 @@ -873,10 +871,6 @@ This stores the private key in
  1133  (protocol 1),
  1131  (protocol 1),
  1134  .Pa ~/.ssh/id_dsa
  1132  .Pa ~/.ssh/id_dsa
  1135  (protocol 2 DSA),
  1133  (protocol 2 DSA),
  1136 -.Pa ~/.ssh/id_ecdsa
  1134 -.Pa ~/.ssh/id_ecdsa
  1137 -(protocol 2 ECDSA),
  1135 -(protocol 2 ECDSA),
  1138 -.Pa ~/.ssh/id_ed25519
  1136 -.Pa ~/.ssh/id_ed25519
  1139 -(protocol 2 Ed25519),
  1137 -(protocol 2 Ed25519),
  1140  or
  1138  or
  1141  .Pa ~/.ssh/id_rsa
  1139  .Pa ~/.ssh/id_rsa
  1142  (protocol 2 RSA)
  1140  (protocol 2 RSA)
  1143 @@ -798,10 +792,6 @@ and stores the public key in
  1141 @@ -885,10 +879,6 @@ and stores the public key in
  1144  (protocol 1),
  1142  (protocol 1),
  1145  .Pa ~/.ssh/id_dsa.pub
  1143  .Pa ~/.ssh/id_dsa.pub
  1146  (protocol 2 DSA),
  1144  (protocol 2 DSA),
  1147 -.Pa ~/.ssh/id_ecdsa.pub
  1145 -.Pa ~/.ssh/id_ecdsa.pub
  1148 -(protocol 2 ECDSA),
  1146 -(protocol 2 ECDSA),
  1149 -.Pa ~/.ssh/id_ed25519.pub
  1147 -.Pa ~/.ssh/id_ed25519.pub
  1150 -(protocol 2 Ed25519),
  1148 -(protocol 2 Ed25519),
  1151  or
  1149  or
  1152  .Pa ~/.ssh/id_rsa.pub
  1150  .Pa ~/.ssh/id_rsa.pub
  1153  (protocol 2 RSA)
  1151  (protocol 2 RSA)
  1154 @@ -1341,7 +1331,7 @@ secret, but the recommended permissions
  1152 @@ -1444,7 +1434,7 @@ secret, but the recommended permissions
  1155  and not accessible by others.
  1153  and not accessible by others.
  1156  .Pp
  1154  .Pp
  1157  .It Pa ~/.ssh/authorized_keys
  1155  .It Pa ~/.ssh/authorized_keys
  1158 -Lists the public keys (DSA, ECDSA, Ed25519, RSA)
  1156 -Lists the public keys (DSA, ECDSA, Ed25519, RSA)
  1159 +Lists the public keys (DSA, RSA)
  1157 +Lists the public keys (DSA, RSA)
  1160  that can be used for logging in as this user.
  1158  that can be used for logging in as this user.
  1161  The format of this file is described in the
  1159  The format of this file is described in the
  1162  .Xr sshd 8
  1160  .Xr sshd 8
  1163 @@ -1363,8 +1353,6 @@ above.
  1161 @@ -1466,8 +1456,6 @@ above.
  1164  .Pp
  1162  .Pp
  1165  .It Pa ~/.ssh/identity
  1163  .It Pa ~/.ssh/identity
  1166  .It Pa ~/.ssh/id_dsa
  1164  .It Pa ~/.ssh/id_dsa
  1167 -.It Pa ~/.ssh/id_ecdsa
  1165 -.It Pa ~/.ssh/id_ecdsa
  1168 -.It Pa ~/.ssh/id_ed25519
  1166 -.It Pa ~/.ssh/id_ed25519
  1169  .It Pa ~/.ssh/id_rsa
  1167  .It Pa ~/.ssh/id_rsa
  1170  Contains the private key for authentication.
  1168  Contains the private key for authentication.
  1171  These files
  1169  These files
  1172 @@ -1378,8 +1366,6 @@ sensitive part of this file using 3DES.
  1170 @@ -1481,8 +1469,6 @@ sensitive part of this file using 3DES.
  1173  .Pp
  1171  .Pp
  1174  .It Pa ~/.ssh/identity.pub
  1172  .It Pa ~/.ssh/identity.pub
  1175  .It Pa ~/.ssh/id_dsa.pub
  1173  .It Pa ~/.ssh/id_dsa.pub
  1176 -.It Pa ~/.ssh/id_ecdsa.pub
  1174 -.It Pa ~/.ssh/id_ecdsa.pub
  1177 -.It Pa ~/.ssh/id_ed25519.pub
  1175 -.It Pa ~/.ssh/id_ed25519.pub
  1178  .It Pa ~/.ssh/id_rsa.pub
  1176  .It Pa ~/.ssh/id_rsa.pub
  1179  Contains the public key for authentication.
  1177  Contains the public key for authentication.
  1180  These files are not
  1178  These files are not
  1181 @@ -1418,8 +1404,6 @@ The file format and configuration option
  1179 @@ -1521,8 +1507,6 @@ The file format and configuration option
  1182  .Pp
  1180  .Pp
  1183  .It Pa /etc/ssh/ssh_host_key
  1181  .It Pa /etc/ssh/ssh_host_key
  1184  .It Pa /etc/ssh/ssh_host_dsa_key
  1182  .It Pa /etc/ssh/ssh_host_dsa_key
  1185 -.It Pa /etc/ssh/ssh_host_ecdsa_key
  1183 -.It Pa /etc/ssh/ssh_host_ecdsa_key
  1186 -.It Pa /etc/ssh/ssh_host_ed25519_key
  1184 -.It Pa /etc/ssh/ssh_host_ed25519_key
  1187  .It Pa /etc/ssh/ssh_host_rsa_key
  1185  .It Pa /etc/ssh/ssh_host_rsa_key
  1188  These files contain the private parts of the host keys
  1186  These files contain the private parts of the host keys
  1189  and are used for host-based authentication.
  1187  and are used for host-based authentication.
  1190 diff -pur old/ssh.c new/ssh.c
  1188 diff -pur old/ssh.c new/ssh.c
  1191 --- old/ssh.c	2015-03-16 22:49:20.000000000 -0700
  1189 --- old/ssh.c
  1192 +++ new/ssh.c	2015-05-12 06:57:55.876878130 -0700
  1190 +++ new/ssh.c
  1193 @@ -1234,8 +1234,10 @@ main(int ac, char **av)
  1191 @@ -1233,8 +1233,10 @@ main(int ac, char **av)
  1194  		sensitive_data.keys[1] = key_load_private_cert(KEY_ECDSA,
  1192  		sensitive_data.keys[1] = key_load_private_cert(KEY_ECDSA,
  1195  		    _PATH_HOST_ECDSA_KEY_FILE, "", NULL);
  1193  		    _PATH_HOST_ECDSA_KEY_FILE, "", NULL);
  1196  #endif
  1194  #endif
  1197 +#ifndef WITHOUT_ED25519
  1195 +#ifndef WITHOUT_ED25519
  1198  		sensitive_data.keys[2] = key_load_private_cert(KEY_ED25519,
  1196  		sensitive_data.keys[2] = key_load_private_cert(KEY_ED25519,
  1199  		    _PATH_HOST_ED25519_KEY_FILE, "", NULL);
  1197  		    _PATH_HOST_ED25519_KEY_FILE, "", NULL);
  1200 +#endif /* WITHOUT_ED25519 */
  1198 +#endif /* WITHOUT_ED25519 */
  1201  		sensitive_data.keys[3] = key_load_private_cert(KEY_RSA,
  1199  		sensitive_data.keys[3] = key_load_private_cert(KEY_RSA,
  1202  		    _PATH_HOST_RSA_KEY_FILE, "", NULL);
  1200  		    _PATH_HOST_RSA_KEY_FILE, "", NULL);
  1203  		sensitive_data.keys[4] = key_load_private_cert(KEY_DSA,
  1201  		sensitive_data.keys[4] = key_load_private_cert(KEY_DSA,
  1204 @@ -1244,8 +1246,10 @@ main(int ac, char **av)
  1202 @@ -1243,8 +1245,10 @@ main(int ac, char **av)
  1205  		sensitive_data.keys[5] = key_load_private_type(KEY_ECDSA,
  1203  		sensitive_data.keys[5] = key_load_private_type(KEY_ECDSA,
  1206  		    _PATH_HOST_ECDSA_KEY_FILE, "", NULL, NULL);
  1204  		    _PATH_HOST_ECDSA_KEY_FILE, "", NULL, NULL);
  1207  #endif
  1205  #endif
  1208 +#ifndef WITHOUT_ED25519
  1206 +#ifndef WITHOUT_ED25519
  1209  		sensitive_data.keys[6] = key_load_private_type(KEY_ED25519,
  1207  		sensitive_data.keys[6] = key_load_private_type(KEY_ED25519,
  1210  		    _PATH_HOST_ED25519_KEY_FILE, "", NULL, NULL);
  1208  		    _PATH_HOST_ED25519_KEY_FILE, "", NULL, NULL);
  1211 +#endif /* WITHOUT_ED25519 */
  1209 +#endif /* WITHOUT_ED25519 */
  1212  		sensitive_data.keys[7] = key_load_private_type(KEY_RSA,
  1210  		sensitive_data.keys[7] = key_load_private_type(KEY_RSA,
  1213  		    _PATH_HOST_RSA_KEY_FILE, "", NULL, NULL);
  1211  		    _PATH_HOST_RSA_KEY_FILE, "", NULL, NULL);
  1214  		sensitive_data.keys[8] = key_load_private_type(KEY_DSA,
  1212  		sensitive_data.keys[8] = key_load_private_type(KEY_DSA,
  1215 @@ -1262,8 +1266,10 @@ main(int ac, char **av)
  1213 @@ -1261,8 +1265,10 @@ main(int ac, char **av)
  1216  			sensitive_data.keys[1] = key_load_cert(
  1214  			sensitive_data.keys[1] = key_load_cert(
  1217  			    _PATH_HOST_ECDSA_KEY_FILE);
  1215  			    _PATH_HOST_ECDSA_KEY_FILE);
  1218  #endif
  1216  #endif
  1219 +#ifndef WITHOUT_ED25519
  1217 +#ifndef WITHOUT_ED25519
  1220  			sensitive_data.keys[2] = key_load_cert(
  1218  			sensitive_data.keys[2] = key_load_cert(
  1221  			    _PATH_HOST_ED25519_KEY_FILE);
  1219  			    _PATH_HOST_ED25519_KEY_FILE);
  1222 +#endif /* WITHOUT_ED25519 */
  1220 +#endif /* WITHOUT_ED25519 */
  1223  			sensitive_data.keys[3] = key_load_cert(
  1221  			sensitive_data.keys[3] = key_load_cert(
  1224  			    _PATH_HOST_RSA_KEY_FILE);
  1222  			    _PATH_HOST_RSA_KEY_FILE);
  1225  			sensitive_data.keys[4] = key_load_cert(
  1223  			sensitive_data.keys[4] = key_load_cert(
  1226 @@ -1272,8 +1278,10 @@ main(int ac, char **av)
  1224 @@ -1271,8 +1277,10 @@ main(int ac, char **av)
  1227  			sensitive_data.keys[5] = key_load_public(
  1225  			sensitive_data.keys[5] = key_load_public(
  1228  			    _PATH_HOST_ECDSA_KEY_FILE, NULL);
  1226  			    _PATH_HOST_ECDSA_KEY_FILE, NULL);
  1229  #endif
  1227  #endif
  1230 +#ifndef WITHOUT_ED25519
  1228 +#ifndef WITHOUT_ED25519
  1231  			sensitive_data.keys[6] = key_load_public(
  1229  			sensitive_data.keys[6] = key_load_public(
  1233 +#endif /* WITHOUT_ED25519 */
  1231 +#endif /* WITHOUT_ED25519 */
  1234  			sensitive_data.keys[7] = key_load_public(
  1232  			sensitive_data.keys[7] = key_load_public(
  1235  			    _PATH_HOST_RSA_KEY_FILE, NULL);
  1233  			    _PATH_HOST_RSA_KEY_FILE, NULL);
  1236  			sensitive_data.keys[8] = key_load_public(
  1234  			sensitive_data.keys[8] = key_load_public(
  1237 diff -pur old/ssh_api.c new/ssh_api.c
  1235 diff -pur old/ssh_api.c new/ssh_api.c
  1238 --- old/ssh_api.c	2015-03-16 22:49:20.000000000 -0700
  1236 --- old/ssh_api.c
  1239 +++ new/ssh_api.c	2015-05-12 06:57:55.877368137 -0700
  1237 +++ new/ssh_api.c
  1240 @@ -109,7 +109,9 @@ ssh_init(struct ssh **sshp, int is_serve
  1238 @@ -109,7 +109,9 @@ ssh_init(struct ssh **sshp, int is_serve
  1241  		ssh->kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
  1239  		ssh->kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
  1242  # endif
  1240  # endif
  1243  #endif /* WITH_OPENSSL */
  1241  #endif /* WITH_OPENSSL */
  1244 +#ifndef WITHOUT_ED25519
  1242 +#ifndef WITHOUT_ED25519
  1256 +#endif /* WITHOUT_ED25519 */
  1254 +#endif /* WITHOUT_ED25519 */
  1257  		ssh->kex->verify_host_key =&_ssh_verify_host_key;
  1255  		ssh->kex->verify_host_key =&_ssh_verify_host_key;
  1258  	}
  1256  	}
  1259  	*sshp = ssh;
  1257  	*sshp = ssh;
  1260 diff -pur old/ssh_config.0 new/ssh_config.0
  1258 diff -pur old/ssh_config.0 new/ssh_config.0
  1261 --- old/ssh_config.0	2015-03-17 21:26:36.000000000 -0700
  1259 --- old/ssh_config.0
  1262 +++ new/ssh_config.0	2015-05-12 07:45:14.754320503 -0700
  1260 +++ new/ssh_config.0
  1263 @@ -443,14 +443,8 @@ DESCRIPTION
  1261 @@ -444,13 +444,8 @@ DESCRIPTION
  1264               client wants to use in order of preference.  The default for this
  1262               specified key types will be appended to the default set instead
  1265               option is:
  1263               of replacing them.  The default for this option is:
  1266  
  1264  
  1267 -                [email protected],
  1265 -                [email protected],
  1268 -                [email protected],
  1266 -                [email protected],
  1269 -                [email protected],
  1267 -                [email protected],
  1270 -                [email protected],
  1268 -                [email protected],
  1271                  [email protected],[email protected],
  1269                  [email protected],
  1272                  [email protected],[email protected],
       
  1273 -                ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
  1270 -                ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
  1274 -                ssh-ed25519,ssh-rsa,ssh-dss
  1271 -                ssh-ed25519,ssh-rsa
       
  1272 +                ssh-rsa
       
  1273  
       
  1274               The -Q option of ssh(1) may be used to list supported key types.
       
  1275  
       
  1276 @@ -461,13 +456,8 @@ DESCRIPTION
       
  1277               key types will be appended to the default set instead of
       
  1278               replacing them.  The default for this option is:
       
  1279  
       
  1280 -                [email protected],
       
  1281 -                [email protected],
       
  1282 -                [email protected],
       
  1283 -                [email protected],
       
  1284                  [email protected],
       
  1285 -                ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
       
  1286 -                ssh-ed25519,ssh-rsa
       
  1287 +                ssh-rsa
  1275  
  1288  
  1276               If hostkeys are known for the destination host then this default
  1289               If hostkeys are known for the destination host then this default
  1277               is modified to prefer their algorithms.
  1290               is modified to prefer their algorithms.
  1278 @@ -486,10 +480,10 @@ DESCRIPTION
  1291 @@ -503,10 +493,10 @@ DESCRIPTION
  1279               default is M-bM-^@M-^\noM-bM-^@M-^].
  1292               default is M-bM-^@M-^\noM-bM-^@M-^].
  1280  
  1293  
  1281       IdentityFile
  1294       IdentityFile
  1282 -             Specifies a file from which the user's DSA, ECDSA, Ed25519 or RSA
  1295 -             Specifies a file from which the user's DSA, ECDSA, Ed25519 or RSA
  1283 +             Specifies a file from which the user's DSA or RSA
  1296 +             Specifies a file from which the user's DSA or RSA
  1287 +             for protocol version 1, and ~/.ssh/id_dsa
  1300 +             for protocol version 1, and ~/.ssh/id_dsa
  1288 +             and ~/.ssh/id_rsa for protocol version 2.
  1301 +             and ~/.ssh/id_rsa for protocol version 2.
  1289               Additionally, any identities represented by the authentication
  1302               Additionally, any identities represented by the authentication
  1290               agent will be used for authentication unless IdentitiesOnly is
  1303               agent will be used for authentication unless IdentitiesOnly is
  1291               set.  ssh(1) will try to load certificate information from the
  1304               set.  ssh(1) will try to load certificate information from the
  1292 @@ -549,7 +543,6 @@ DESCRIPTION
  1305 @@ -569,7 +559,6 @@ DESCRIPTION
  1293               Specifies the available KEX (Key Exchange) algorithms.  Multiple
  1306               will be appended to the default set instead of replacing them.
  1294               algorithms must be comma-separated.  The default is:
  1307               The default is:
  1295  
  1308  
  1296 -                   [email protected],
  1309 -                   [email protected],
  1297                     ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
  1310                     ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
  1298                     diffie-hellman-group-exchange-sha256,
  1311                     diffie-hellman-group-exchange-sha256,
  1299                     diffie-hellman-group14-sha1,
  1312                     diffie-hellman-group-exchange-sha1,
       
  1313 @@ -727,13 +716,8 @@ DESCRIPTION
       
  1314               types after it will be appended to the default instead of
       
  1315               replacing it.  The default for this option is:
       
  1316  
       
  1317 -                [email protected],
       
  1318 -                [email protected],
       
  1319 -                [email protected],
       
  1320 -                [email protected],
       
  1321                  [email protected],
       
  1322 -                ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
       
  1323 -                ssh-ed25519,ssh-rsa
       
  1324 +                ssh-rsa
       
  1325  
       
  1326               The -Q option of ssh(1) may be used to list supported key types.
       
  1327  
  1300 diff -pur old/ssh_config.5 new/ssh_config.5
  1328 diff -pur old/ssh_config.5 new/ssh_config.5
  1301 --- old/ssh_config.5	2015-05-12 06:57:55.750682668 -0700
  1329 --- old/ssh_config.5
  1302 +++ new/ssh_config.5	2015-05-12 07:52:05.483411337 -0700
  1330 +++ new/ssh_config.5
  1303 @@ -807,14 +807,8 @@ Specifies the protocol version 2 host ke
  1331 @@ -806,13 +806,8 @@ character, then the specified key types
  1304  that the client wants to use in order of preference.
  1332  instead of replacing them.
  1305  The default for this option is:
  1333  The default for this option is:
  1306  .Bd -literal -offset 3n
  1334  .Bd -literal -offset 3n
  1307 [email protected],
  1335 [email protected],
  1308 [email protected],
  1336 [email protected],
  1309 [email protected],
  1337 [email protected],
  1310 [email protected],
  1338 [email protected],
  1311  [email protected],[email protected],
  1339  [email protected],
  1312  [email protected],[email protected],
       
  1313 -ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
  1340 -ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
  1314 -ssh-ed25519,ssh-rsa,ssh-dss
  1341 -ssh-ed25519,ssh-rsa
       
  1342 +ssh-rsa
       
  1343  .Ed
       
  1344  .Pp
       
  1345  The
       
  1346 @@ -829,13 +824,8 @@ character, then the specified key types
       
  1347  instead of replacing them.
       
  1348  The default for this option is:
       
  1349  .Bd -literal -offset 3n
       
  1350 [email protected],
       
  1351 [email protected],
       
  1352 [email protected],
       
  1353 [email protected],
       
  1354  [email protected],
       
  1355 -ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
       
  1356 -ssh-ed25519,ssh-rsa
       
  1357 +ssh-rsa
  1315  .Ed
  1358  .Ed
  1316  .Pp
  1359  .Pp
  1317  If hostkeys are known for the destination host then this default is modified
  1360  If hostkeys are known for the destination host then this default is modified
  1318 @@ -869,14 +863,12 @@ offers many different identities.
  1361 @@ -890,14 +880,12 @@ offers many different identities.
  1319  The default is
  1362  The default is
  1320  .Dq no .
  1363  .Dq no .
  1321  .It Cm IdentityFile
  1364  .It Cm IdentityFile
  1322 -Specifies a file from which the user's DSA, ECDSA, Ed25519 or RSA authentication
  1365 -Specifies a file from which the user's DSA, ECDSA, Ed25519 or RSA authentication
  1323 +Specifies a file from which the user's DSA or RSA authentication
  1366 +Specifies a file from which the user's DSA or RSA authentication
  1329 -.Pa ~/.ssh/id_ecdsa ,
  1372 -.Pa ~/.ssh/id_ecdsa ,
  1330 -.Pa ~/.ssh/id_ed25519
  1373 -.Pa ~/.ssh/id_ed25519
  1331  and
  1374  and
  1332  .Pa ~/.ssh/id_rsa
  1375  .Pa ~/.ssh/id_rsa
  1333  for protocol version 2.
  1376  for protocol version 2.
  1334 @@ -989,7 +981,6 @@ Specifies the available KEX (Key Exchang
  1377 @@ -1014,7 +1002,6 @@ character, then the specified methods wi
  1335  Multiple algorithms must be comma-separated.
  1378  instead of replacing them.
  1336  The default is:
  1379  The default is:
  1337  .Bd -literal -offset indent
  1380  .Bd -literal -offset indent
  1338 [email protected],
  1381 [email protected],
  1339  ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
  1382  ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
  1340  diffie-hellman-group-exchange-sha256,
  1383  diffie-hellman-group-exchange-sha256,
  1341  diffie-hellman-group14-sha1,
  1384  diffie-hellman-group-exchange-sha1,
       
  1385 @@ -1259,13 +1246,8 @@ character, then the key types after it w
       
  1386  instead of replacing it.
       
  1387  The default for this option is:
       
  1388  .Bd -literal -offset 3n
       
  1389 [email protected],
       
  1390 [email protected],
       
  1391 [email protected],
       
  1392 [email protected],
       
  1393  [email protected],
       
  1394 -ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
       
  1395 -ssh-ed25519,ssh-rsa
       
  1396 +ssh-rsa
       
  1397  .Ed
       
  1398  .Pp
       
  1399  The
  1342 diff -pur old/sshconnect.c new/sshconnect.c
  1400 diff -pur old/sshconnect.c new/sshconnect.c
  1343 --- old/sshconnect.c	2015-03-16 22:49:20.000000000 -0700
  1401 --- old/sshconnect.c
  1344 +++ new/sshconnect.c	2015-05-12 06:57:55.878078115 -0700
  1402 +++ new/sshconnect.c
  1345 @@ -1391,7 +1391,9 @@ show_other_keys(struct hostkeys *hostkey
  1403 @@ -1392,7 +1392,9 @@ show_other_keys(struct hostkeys *hostkey
  1346  		KEY_RSA,
  1404  		KEY_RSA,
  1347  		KEY_DSA,
  1405  		KEY_DSA,
  1348  		KEY_ECDSA,
  1406  		KEY_ECDSA,
  1349 +#ifndef WITHOUT_ED25519
  1407 +#ifndef WITHOUT_ED25519
  1350  		KEY_ED25519,
  1408  		KEY_ED25519,
  1351 +#endif /* WITHOUT_ED25519 */
  1409 +#endif /* WITHOUT_ED25519 */
  1352  		-1
  1410  		-1
  1353  	};
  1411  	};
  1354  	int i, ret = 0;
  1412  	int i, ret = 0;
  1355 diff -pur old/sshconnect2.c new/sshconnect2.c
  1413 diff -pur old/sshconnect2.c new/sshconnect2.c
  1356 --- old/sshconnect2.c	2015-05-12 06:57:55.751927078 -0700
  1414 --- old/sshconnect2.c
  1357 +++ new/sshconnect2.c	2015-05-12 07:03:03.597484825 -0700
  1415 +++ new/sshconnect2.c
  1358 @@ -254,7 +254,9 @@ ssh_kex2(char *host, struct sockaddr *ho
  1416 @@ -247,7 +247,9 @@ ssh_kex2(char *host, struct sockaddr *ho
  1359  	kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
  1417  	kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
  1360  # endif
  1418  # endif
  1361  #endif
  1419  #endif
  1362 +#ifndef WITHOUT_ED25519
  1420 +#ifndef WITHOUT_ED25519
  1363  	kex->kex[KEX_C25519_SHA256] = kexc25519_client;
  1421  	kex->kex[KEX_C25519_SHA256] = kexc25519_client;
  1364 +#endif /* WITHOUT_ED25519 */
  1422 +#endif /* WITHOUT_ED25519 */
  1365  #ifdef GSSAPI
  1423  #ifdef GSSAPI
  1366  	if (options.gss_keyex) {
  1424  	if (options.gss_keyex) {
  1367  		kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_client;
  1425  		kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_client;
  1368 diff -pur old/sshd.0 new/sshd.0
  1426 diff -pur old/sshd.0 new/sshd.0
  1369 --- old/sshd.0	2015-03-17 21:26:35.000000000 -0700
  1427 --- old/sshd.0
  1370 +++ new/sshd.0	2015-05-12 07:46:43.700877984 -0700
  1428 +++ new/sshd.0
  1371 @@ -81,8 +81,7 @@ DESCRIPTION
  1429 @@ -81,8 +81,7 @@ DESCRIPTION
  1372               be given if sshd is not run as root (as the normal host key files
  1430               be given if sshd is not run as root (as the normal host key files
  1373               are normally not readable by anyone but root).  The default is
  1431               are normally not readable by anyone but root).  The default is
  1374               /etc/ssh/ssh_host_key for protocol version 1, and
  1432               /etc/ssh/ssh_host_key for protocol version 1, and
  1375 -             /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key.
  1433 -             /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key.
  1376 -             /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key for
  1434 -             /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key for
  1377 +             /etc/ssh/ssh_host_dsa_key and /etc/ssh/ssh_host_rsa_key for
  1435 +             /etc/ssh/ssh_host_dsa_key and /etc/ssh/ssh_host_rsa_key for
  1378               protocol version 2.  It is possible to have multiple host key
  1436               protocol version 2.  It is possible to have multiple host key
  1379               files for the different protocol versions and host key
  1437               files for the different protocol versions and host key
  1380               algorithms.
  1438               algorithms.
  1381 @@ -147,7 +146,7 @@ DESCRIPTION
  1439 @@ -146,7 +145,7 @@ DESCRIPTION
  1382  AUTHENTICATION
  1440  AUTHENTICATION
  1383       The OpenSSH SSH daemon supports SSH protocols 1 and 2.  The default is to
  1441       The OpenSSH SSH daemon supports SSH protocols 1 and 2.  The default is to
  1384       use protocol 2 only, though this can be changed via the Protocol option
  1442       use protocol 2 only, though this can be changed via the Protocol option
  1385 -     in sshd_config(5).  Protocol 2 supports DSA, ECDSA, Ed25519 and RSA keys;
  1443 -     in sshd_config(5).  Protocol 2 supports DSA, ECDSA, Ed25519 and RSA keys;
  1386 +     in sshd_config(5).  Protocol 2 supports DSA and RSA keys;
  1444 +     in sshd_config(5).  Protocol 2 supports DSA and RSA keys;
  1387       protocol 1 only supports RSA keys.  For both protocols, each host has a
  1445       protocol 1 only supports RSA keys.  For both protocols, each host has a
  1388       host-specific key, normally 2048 bits, used to identify the host.
  1446       host-specific key, normally 2048 bits, used to identify the host.
  1389  
  1447  
  1390 @@ -278,15 +277,13 @@ AUTHORIZED_KEYS FILE FORMAT
  1448 @@ -279,15 +278,13 @@ AUTHORIZED_KEYS FILE FORMAT
  1391       starts with a number).  The bits, exponent, modulus, and comment fields
  1449       starts with a number).  The bits, exponent, modulus, and comment fields
  1392       give the RSA key for protocol version 1; the comment field is not used
  1450       give the RSA key for protocol version 1; the comment field is not used
  1393       for anything (but may be convenient for the user to identify the key).
  1451       for anything (but may be convenient for the user to identify the key).
  1394 -     For protocol version 2 the keytype is M-bM-^@M-^\ecdsa-sha2-nistp256M-bM-^@M-^],
  1452 -     For protocol version 2 the keytype is M-bM-^@M-^\ecdsa-sha2-nistp256M-bM-^@M-^],
  1395 -     M-bM-^@M-^\ecdsa-sha2-nistp384M-bM-^@M-^], M-bM-^@M-^\ecdsa-sha2-nistp521M-bM-^@M-^], M-bM-^@M-^\ssh-ed25519M-bM-^@M-^], M-bM-^@M-^\ssh-dssM-bM-^@M-^] or
  1453 -     M-bM-^@M-^\ecdsa-sha2-nistp384M-bM-^@M-^], M-bM-^@M-^\ecdsa-sha2-nistp521M-bM-^@M-^], M-bM-^@M-^\ssh-ed25519M-bM-^@M-^], M-bM-^@M-^\ssh-dssM-bM-^@M-^] or
  1403 -     identity.pub, id_dsa.pub, id_ecdsa.pub, id_ed25519.pub, or the id_rsa.pub
  1461 -     identity.pub, id_dsa.pub, id_ecdsa.pub, id_ed25519.pub, or the id_rsa.pub
  1404 +     identity.pub, id_dsa.pub or the id_rsa.pub
  1462 +     identity.pub, id_dsa.pub or the id_rsa.pub
  1405       file and edit it.
  1463       file and edit it.
  1406  
  1464  
  1407       sshd enforces a minimum RSA key modulus size for protocol 1 and protocol
  1465       sshd enforces a minimum RSA key modulus size for protocol 1 and protocol
  1408 @@ -513,7 +510,7 @@ FILES
  1466 @@ -514,7 +511,7 @@ FILES
  1409               for the user, and not accessible by others.
  1467               for the user, and not accessible by others.
  1410  
  1468  
  1411       ~/.ssh/authorized_keys
  1469       ~/.ssh/authorized_keys
  1412 -             Lists the public keys (DSA, ECDSA, Ed25519, RSA) that can be used
  1470 -             Lists the public keys (DSA, ECDSA, Ed25519, RSA) that can be used
  1413 +             Lists the public keys (DSA, RSA) that can be used
  1471 +             Lists the public keys (DSA, RSA) that can be used
  1414               for logging in as this user.  The format of this file is
  1472               for logging in as this user.  The format of this file is
  1415               described above.  The content of the file is not highly
  1473               described above.  The content of the file is not highly
  1416               sensitive, but the recommended permissions are read/write for the
  1474               sensitive, but the recommended permissions are read/write for the
  1417 @@ -569,8 +566,6 @@ FILES
  1475 @@ -570,8 +567,6 @@ FILES
  1418  
  1476  
  1419       /etc/ssh/ssh_host_key
  1477       /etc/ssh/ssh_host_key
  1420       /etc/ssh/ssh_host_dsa_key
  1478       /etc/ssh/ssh_host_dsa_key
  1421 -     /etc/ssh/ssh_host_ecdsa_key
  1479 -     /etc/ssh/ssh_host_ecdsa_key
  1422 -     /etc/ssh/ssh_host_ed25519_key
  1480 -     /etc/ssh/ssh_host_ed25519_key
  1423       /etc/ssh/ssh_host_rsa_key
  1481       /etc/ssh/ssh_host_rsa_key
  1424               These files contain the private parts of the host keys.  These
  1482               These files contain the private parts of the host keys.  These
  1425               files should only be owned by root, readable only by root, and
  1483               files should only be owned by root, readable only by root, and
  1426 @@ -579,8 +574,6 @@ FILES
  1484 @@ -580,8 +575,6 @@ FILES
  1427  
  1485  
  1428       /etc/ssh/ssh_host_key.pub
  1486       /etc/ssh/ssh_host_key.pub
  1429       /etc/ssh/ssh_host_dsa_key.pub
  1487       /etc/ssh/ssh_host_dsa_key.pub
  1430 -     /etc/ssh/ssh_host_ecdsa_key.pub
  1488 -     /etc/ssh/ssh_host_ecdsa_key.pub
  1431 -     /etc/ssh/ssh_host_ed25519_key.pub
  1489 -     /etc/ssh/ssh_host_ed25519_key.pub
  1432       /etc/ssh/ssh_host_rsa_key.pub
  1490       /etc/ssh/ssh_host_rsa_key.pub
  1433               These files contain the public parts of the host keys.  These
  1491               These files contain the public parts of the host keys.  These
  1434               files should be world-readable but writable only by root.  Their
  1492               files should be world-readable but writable only by root.  Their
  1435 diff -pur old/sshd.8 new/sshd.8
  1493 diff -pur old/sshd.8 new/sshd.8
  1436 --- old/sshd.8	2015-05-12 06:57:55.682941332 -0700
  1494 --- old/sshd.8
  1437 +++ new/sshd.8	2015-05-12 07:53:14.229250081 -0700
  1495 +++ new/sshd.8
  1438 @@ -172,8 +172,6 @@ The default is
  1496 @@ -172,8 +172,6 @@ The default is
  1439  .Pa /etc/ssh/ssh_host_key
  1497  .Pa /etc/ssh/ssh_host_key
  1440  for protocol version 1, and
  1498  for protocol version 1, and
  1441  .Pa /etc/ssh/ssh_host_dsa_key ,
  1499  .Pa /etc/ssh/ssh_host_dsa_key ,
  1442 -.Pa /etc/ssh/ssh_host_ecdsa_key .
  1500 -.Pa /etc/ssh/ssh_host_ecdsa_key .
  1443 -.Pa /etc/ssh/ssh_host_ed25519_key
  1501 -.Pa /etc/ssh/ssh_host_ed25519_key
  1444  and
  1502  and
  1445  .Pa /etc/ssh/ssh_host_rsa_key
  1503  .Pa /etc/ssh/ssh_host_rsa_key
  1446  for protocol version 2.
  1504  for protocol version 2.
  1447 @@ -278,7 +276,7 @@ though this can be changed via the
  1505 @@ -275,7 +273,7 @@ though this can be changed via the
  1448  .Cm Protocol
  1506  .Cm Protocol
  1449  option in
  1507  option in
  1450  .Xr sshd_config 4 .
  1508  .Xr sshd_config 4 .
  1451 -Protocol 2 supports DSA, ECDSA, Ed25519 and RSA keys;
  1509 -Protocol 2 supports DSA, ECDSA, Ed25519 and RSA keys;
  1452 +Protocol 2 supports DSA and RSA keys;
  1510 +Protocol 2 supports DSA and RSA keys;
  1453  protocol 1 only supports RSA keys.
  1511  protocol 1 only supports RSA keys.
  1454  For both protocols,
  1512  For both protocols,
  1455  each host has a host-specific key,
  1513  each host has a host-specific key,
  1456 @@ -492,10 +490,6 @@ protocol version 1; the
  1514 @@ -491,10 +489,6 @@ protocol version 1; the
  1457  comment field is not used for anything (but may be convenient for the
  1515  comment field is not used for anything (but may be convenient for the
  1458  user to identify the key).
  1516  user to identify the key).
  1459  For protocol version 2 the keytype is
  1517  For protocol version 2 the keytype is
  1460 -.Dq ecdsa-sha2-nistp256 ,
  1518 -.Dq ecdsa-sha2-nistp256 ,
  1461 -.Dq ecdsa-sha2-nistp384 ,
  1519 -.Dq ecdsa-sha2-nistp384 ,
  1462 -.Dq ecdsa-sha2-nistp521 ,
  1520 -.Dq ecdsa-sha2-nistp521 ,
  1463 -.Dq ssh-ed25519 ,
  1521 -.Dq ssh-ed25519 ,
  1464  .Dq ssh-dss
  1522  .Dq ssh-dss
  1465  or
  1523  or
  1466  .Dq ssh-rsa .
  1524  .Dq ssh-rsa .
  1467 @@ -507,8 +501,6 @@ keys up to 16 kilobits.
  1525 @@ -506,8 +500,6 @@ keys up to 16 kilobits.
  1468  You don't want to type them in; instead, copy the
  1526  You don't want to type them in; instead, copy the
  1469  .Pa identity.pub ,
  1527  .Pa identity.pub ,
  1470  .Pa id_dsa.pub ,
  1528  .Pa id_dsa.pub ,
  1471 -.Pa id_ecdsa.pub ,
  1529 -.Pa id_ecdsa.pub ,
  1472 -.Pa id_ed25519.pub ,
  1530 -.Pa id_ed25519.pub ,
  1473  or the
  1531  or the
  1474  .Pa id_rsa.pub
  1532  .Pa id_rsa.pub
  1475  file and edit it.
  1533  file and edit it.
  1476 @@ -808,7 +800,7 @@ secret, but the recommended permissions
  1534 @@ -807,7 +799,7 @@ secret, but the recommended permissions
  1477  and not accessible by others.
  1535  and not accessible by others.
  1478  .Pp
  1536  .Pp
  1479  .It Pa ~/.ssh/authorized_keys
  1537  .It Pa ~/.ssh/authorized_keys
  1480 -Lists the public keys (DSA, ECDSA, Ed25519, RSA)
  1538 -Lists the public keys (DSA, ECDSA, Ed25519, RSA)
  1481 +Lists the public keys (DSA, RSA)
  1539 +Lists the public keys (DSA, RSA)
  1482  that can be used for logging in as this user.
  1540  that can be used for logging in as this user.
  1483  The format of this file is described above.
  1541  The format of this file is described above.
  1484  The content of the file is not highly sensitive, but the recommended
  1542  The content of the file is not highly sensitive, but the recommended
  1485 @@ -882,8 +874,6 @@ rlogin/rsh.
  1543 @@ -881,8 +873,6 @@ rlogin/rsh.
  1486  .Pp
  1544  .Pp
  1487  .It Pa /etc/ssh/ssh_host_key
  1545  .It Pa /etc/ssh/ssh_host_key
  1488  .It Pa /etc/ssh/ssh_host_dsa_key
  1546  .It Pa /etc/ssh/ssh_host_dsa_key
  1489 -.It Pa /etc/ssh/ssh_host_ecdsa_key
  1547 -.It Pa /etc/ssh/ssh_host_ecdsa_key
  1490 -.It Pa /etc/ssh/ssh_host_ed25519_key
  1548 -.It Pa /etc/ssh/ssh_host_ed25519_key
  1491  .It Pa /etc/ssh/ssh_host_rsa_key
  1549  .It Pa /etc/ssh/ssh_host_rsa_key
  1492  These files contain the private parts of the host keys.
  1550  These files contain the private parts of the host keys.
  1493  These files should only be owned by root, readable only by root, and not
  1551  These files should only be owned by root, readable only by root, and not
  1494 @@ -894,8 +884,6 @@ does not start if these files are group/
  1552 @@ -893,8 +883,6 @@ does not start if these files are group/
  1495  .Pp
  1553  .Pp
  1496  .It Pa /etc/ssh/ssh_host_key.pub
  1554  .It Pa /etc/ssh/ssh_host_key.pub
  1497  .It Pa /etc/ssh/ssh_host_dsa_key.pub
  1555  .It Pa /etc/ssh/ssh_host_dsa_key.pub
  1498 -.It Pa /etc/ssh/ssh_host_ecdsa_key.pub
  1556 -.It Pa /etc/ssh/ssh_host_ecdsa_key.pub
  1499 -.It Pa /etc/ssh/ssh_host_ed25519_key.pub
  1557 -.It Pa /etc/ssh/ssh_host_ed25519_key.pub
  1500  .It Pa /etc/ssh/ssh_host_rsa_key.pub
  1558  .It Pa /etc/ssh/ssh_host_rsa_key.pub
  1501  These files contain the public parts of the host keys.
  1559  These files contain the public parts of the host keys.
  1502  These files should be world-readable but writable only by
  1560  These files should be world-readable but writable only by
  1503 diff -pur old/sshd.c new/sshd.c
  1561 diff -pur old/sshd.c new/sshd.c
  1504 --- old/sshd.c	2015-05-12 06:57:55.753246429 -0700
  1562 --- old/sshd.c
  1505 +++ new/sshd.c	2015-05-12 07:03:44.715843663 -0700
  1563 +++ new/sshd.c
  1506 @@ -803,7 +803,9 @@ list_hostkey_types(void)
  1564 @@ -811,7 +811,9 @@ list_hostkey_types(void)
  1507  		case KEY_RSA:
  1565  		case KEY_RSA:
  1508  		case KEY_DSA:
  1566  		case KEY_DSA:
  1509  		case KEY_ECDSA:
  1567  		case KEY_ECDSA:
  1510 +#ifndef WITHOUT_ED25519
  1568 +#ifndef WITHOUT_ED25519
  1511  		case KEY_ED25519:
  1569  		case KEY_ED25519:
  1512 +#endif /* WITHOUT_ED25519 */
  1570 +#endif /* WITHOUT_ED25519 */
  1513  			if (buffer_len(&b) > 0)
  1571  			if (buffer_len(&b) > 0)
  1514  				buffer_append(&b, ",", 1);
  1572  				buffer_append(&b, ",", 1);
  1515  			p = key_ssh_name(key);
  1573  			p = key_ssh_name(key);
  1516 @@ -820,7 +822,9 @@ list_hostkey_types(void)
  1574 @@ -826,7 +828,9 @@ list_hostkey_types(void)
  1517  		case KEY_RSA_CERT:
  1575  		case KEY_RSA_CERT:
  1518  		case KEY_DSA_CERT:
  1576  		case KEY_DSA_CERT:
  1519  		case KEY_ECDSA_CERT:
  1577  		case KEY_ECDSA_CERT:
  1520 +#ifndef WITHOUT_ED25519
  1578 +#ifndef WITHOUT_ED25519
  1521  		case KEY_ED25519_CERT:
  1579  		case KEY_ED25519_CERT:
  1522 +#endif /* WITHOUT_ED25519 */
  1580 +#endif /* WITHOUT_ED25519 */
  1523  			if (buffer_len(&b) > 0)
  1581  			if (buffer_len(&b) > 0)
  1524  				buffer_append(&b, ",", 1);
  1582  				buffer_append(&b, ",", 1);
  1525  			p = key_ssh_name(key);
  1583  			p = key_ssh_name(key);
  1526 @@ -848,7 +852,9 @@ get_hostkey_by_type(int type, int nid, i
  1584 @@ -852,7 +856,9 @@ get_hostkey_by_type(int type, int nid, i
  1527  		case KEY_RSA_CERT:
  1585  		case KEY_RSA_CERT:
  1528  		case KEY_DSA_CERT:
  1586  		case KEY_DSA_CERT:
  1529  		case KEY_ECDSA_CERT:
  1587  		case KEY_ECDSA_CERT:
  1530 +#ifndef WITHOUT_ED25519
  1588 +#ifndef WITHOUT_ED25519
  1531  		case KEY_ED25519_CERT:
  1589  		case KEY_ED25519_CERT:
  1532 +#endif /* WITHOUT_ED25519 */
  1590 +#endif /* WITHOUT_ED25519 */
  1533  			key = sensitive_data.host_certificates[i];
  1591  			key = sensitive_data.host_certificates[i];
  1534  			break;
  1592  			break;
  1535  		default:
  1593  		default:
  1536 @@ -1798,7 +1804,9 @@ main(int ac, char **av)
  1594 @@ -1810,7 +1816,9 @@ main(int ac, char **av)
  1537  		case KEY_RSA:
  1595  		case KEY_RSA:
  1538  		case KEY_DSA:
  1596  		case KEY_DSA:
  1539  		case KEY_ECDSA:
  1597  		case KEY_ECDSA:
  1540 +#ifndef WITHOUT_ED25519
  1598 +#ifndef WITHOUT_ED25519
  1541  		case KEY_ED25519:
  1599  		case KEY_ED25519:
  1542 +#endif /* WITHOUT_ED25519 */
  1600 +#endif /* WITHOUT_ED25519 */
  1543  			if (have_agent || key != NULL)
  1601  			if (have_agent || key != NULL)
  1544  				sensitive_data.have_ssh2_key = 1;
  1602  				sensitive_data.have_ssh2_key = 1;
  1545  			break;
  1603  			break;
  1546 @@ -2644,7 +2652,9 @@ do_ssh2_kex(void)
  1604 @@ -2646,7 +2654,9 @@ do_ssh2_kex(void)
  1547  	kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
  1605  	kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
  1548  # endif
  1606  # endif
  1549  #endif
  1607  #endif
  1550 +#ifndef WITHOUT_ED25519
  1608 +#ifndef WITHOUT_ED25519
  1551  	kex->kex[KEX_C25519_SHA256] = kexc25519_server;
  1609  	kex->kex[KEX_C25519_SHA256] = kexc25519_server;
  1552 +#endif /* WITHOUT_ED25519 */
  1610 +#endif /* WITHOUT_ED25519 */
  1553  #ifdef GSSAPI
  1611  #ifdef GSSAPI
  1554  	if (options.gss_keyex) {
  1612  	if (options.gss_keyex) {
  1555  		kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
  1613  		kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
  1556 diff -pur old/sshd_config.0 new/sshd_config.0
  1614 diff -pur old/sshd_config.0 new/sshd_config.0
  1557 --- old/sshd_config.0	2015-03-17 21:26:36.000000000 -0700
  1615 --- old/sshd_config.0
  1558 +++ new/sshd_config.0	2015-05-12 07:47:28.488941581 -0700
  1616 +++ new/sshd_config.0
  1559 @@ -375,12 +375,11 @@ DESCRIPTION
  1617 @@ -403,13 +403,8 @@ DESCRIPTION
       
  1618               specified key types will be appended to the default set instead
       
  1619               of replacing them.  The default for this option is:
       
  1620  
       
  1621 -                [email protected],
       
  1622 -                [email protected],
       
  1623 -                [email protected],
       
  1624 -                [email protected],
       
  1625                  [email protected],
       
  1626 -                ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
       
  1627 -                ssh-ed25519,ssh-rsa
       
  1628 +                ssh-rsa
       
  1629  
       
  1630               The -Q option of ssh(1) may be used to list supported key types.
       
  1631  
       
  1632 @@ -438,8 +433,7 @@ DESCRIPTION
  1560       HostKey
  1633       HostKey
  1561               Specifies a file containing a private host key used by SSH.  The
  1634               Specifies a file containing a private host key used by SSH.  The
  1562               default is /etc/ssh/ssh_host_key for protocol version 1, and
  1635               default is /etc/ssh/ssh_host_key for protocol version 1, and
  1563 -             /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key,
  1636 -             /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key,
  1564 -             /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key for
  1637 -             /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key for
  1565 +             /etc/ssh/ssh_host_dsa_key and /etc/ssh/ssh_host_rsa_key for
  1638 +             /etc/ssh/ssh_host_dsa_key, and /etc/ssh/ssh_host_rsa_key for
  1566               protocol version 2.  Note that sshd(8) will refuse to use a file
  1639               protocol version 2.
  1567               if it is group/world-accessible.  It is possible to have multiple
  1640  
  1568 -             host key files.  M-bM-^@M-^\rsa1M-bM-^@M-^] keys are used for version 1 and M-bM-^@M-^\dsaM-bM-^@M-^],
  1641               Note that sshd(8) will refuse to use a file if it is group/world-
  1569 -             M-bM-^@M-^\ecdsaM-bM-^@M-^], M-bM-^@M-^\ed25519M-bM-^@M-^] or M-bM-^@M-^\rsaM-bM-^@M-^] are used for version 2 of the SSH
  1642 @@ -447,7 +441,7 @@ DESCRIPTION
  1570 +             host key files.  M-bM-^@M-^\rsa1M-bM-^@M-^] keys are used for version 1 and M-bM-^@M-^\dsaM-bM-^@M-^]
  1643               of the keys are actually used by sshd(8).
  1571 +             or M-bM-^@M-^\rsaM-bM-^@M-^] are used for version 2 of the SSH
  1644  
  1572               protocol.  It is also possible to specify public host key files
  1645               It is possible to have multiple host key files.  M-bM-^@M-^\rsa1M-bM-^@M-^] keys are
  1573               instead.  In this case operations on the private key will be
  1646 -             used for version 1 and M-bM-^@M-^\dsaM-bM-^@M-^], M-bM-^@M-^\ecdsaM-bM-^@M-^], M-bM-^@M-^\ed25519M-bM-^@M-^] or M-bM-^@M-^\rsaM-bM-^@M-^] are
  1574               delegated to an ssh-agent(1).
  1647 +             used for version 1 and M-bM-^@M-^\dsaM-bM-^@M-^], or M-bM-^@M-^\rsaM-bM-^@M-^] are
  1575 @@ -448,7 +447,6 @@ DESCRIPTION
  1648               used for version 2 of the SSH protocol.  It is also possible to
  1576               algorithms must be comma-separated.  The supported algorithms
  1649               specify public host key files instead.  In this case operations
  1577               are:
  1650               on the private key will be delegated to an ssh-agent(1).
       
  1651 @@ -462,13 +456,8 @@ DESCRIPTION
       
  1652               Specifies the protocol version 2 host key algorithms that the
       
  1653               server offers.  The default for this option is:
       
  1654  
       
  1655 -                [email protected],
       
  1656 -                [email protected],
       
  1657 -                [email protected],
       
  1658 -                [email protected],
       
  1659                  [email protected],
       
  1660 -                ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
       
  1661 -                ssh-ed25519,ssh-rsa
       
  1662 +                ssh-rsa
       
  1663  
       
  1664               The list of available key types may also be obtained using the -Q
       
  1665               option of ssh(1) with an argument of M-bM-^@M-^\keyM-bM-^@M-^].
       
  1666 @@ -532,7 +521,6 @@ DESCRIPTION
       
  1667               will be appended to the default set instead of replacing them.
       
  1668               The supported algorithms are:
  1578  
  1669  
  1579 -                   [email protected]
  1670 -                   [email protected]
  1580                     diffie-hellman-group1-sha1
  1671                     diffie-hellman-group1-sha1
  1581                     diffie-hellman-group14-sha1
  1672                     diffie-hellman-group14-sha1
  1582                     diffie-hellman-group-exchange-sha1
  1673                     diffie-hellman-group-exchange-sha1
  1583 @@ -459,7 +457,6 @@ DESCRIPTION
  1674 @@ -543,7 +531,6 @@ DESCRIPTION
  1584  
  1675  
  1585               The default is:
  1676               The default is:
  1586  
  1677  
  1587 -                   [email protected],
  1678 -                   [email protected],
  1588                     ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
  1679                     ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
  1589                     diffie-hellman-group-exchange-sha256,
  1680                     diffie-hellman-group-exchange-sha256,
  1590                     diffie-hellman-group14-sha1
  1681                     diffie-hellman-group14-sha1
       
  1682 @@ -787,13 +774,8 @@ DESCRIPTION
       
  1683               specified key types will be appended to the default set instead
       
  1684               of replacing them.  The default for this option is:
       
  1685  
       
  1686 -                [email protected],
       
  1687 -                [email protected],
       
  1688 -                [email protected],
       
  1689 -                [email protected],
       
  1690                  [email protected],
       
  1691 -                ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
       
  1692 -                ssh-ed25519,ssh-rsa
       
  1693 +                ssh-rsa
       
  1694  
       
  1695               The -Q option of ssh(1) may be used to list supported key types.
       
  1696  
  1591 diff -pur old/sshd_config.5 new/sshd_config.5
  1697 diff -pur old/sshd_config.5 new/sshd_config.5
  1592 --- old/sshd_config.5	2015-05-12 06:57:55.754541097 -0700
  1698 --- old/sshd_config.5
  1593 +++ new/sshd_config.5	2015-05-12 07:52:26.170307089 -0700
  1699 +++ new/sshd_config.5
  1594 @@ -628,8 +628,6 @@ The default is
  1700 @@ -712,8 +712,6 @@ The default is
  1595  .Pa /etc/ssh/ssh_host_key
  1701  .Pa /etc/ssh/ssh_host_key
  1596  for protocol version 1, and
  1702  for protocol version 1, and
  1597  .Pa /etc/ssh/ssh_host_dsa_key ,
  1703  .Pa /etc/ssh/ssh_host_dsa_key ,
  1598 -.Pa /etc/ssh/ssh_host_ecdsa_key ,
  1704 -.Pa /etc/ssh/ssh_host_ecdsa_key ,
  1599 -.Pa /etc/ssh/ssh_host_ed25519_key
  1705 -.Pa /etc/ssh/ssh_host_ed25519_key
  1600  and
  1706  and
  1601  .Pa /etc/ssh/ssh_host_rsa_key
  1707  .Pa /etc/ssh/ssh_host_rsa_key
  1602  for protocol version 2.
  1708  for protocol version 2.
  1603 @@ -640,8 +638,6 @@ It is possible to have multiple host key
  1709 @@ -730,8 +728,6 @@ It is possible to have multiple host key
  1604  .Dq rsa1
  1710  .Dq rsa1
  1605  keys are used for version 1 and
  1711  keys are used for version 1 and
  1606  .Dq dsa ,
  1712  .Dq dsa ,
  1607 -.Dq ecdsa ,
  1713 -.Dq ecdsa ,
  1608 -.Dq ed25519
  1714 -.Dq ed25519
  1609  or
  1715  or
  1610  .Dq rsa
  1716  .Dq rsa
  1611  are used for version 2 of the SSH protocol.
  1717  are used for version 2 of the SSH protocol.
  1612 @@ -764,8 +760,6 @@ The supported algorithms are:
  1718 @@ -878,8 +874,6 @@ The supported algorithms are:
  1613  .Pp
  1719  .Pp
  1614  .Bl -item -compact -offset indent
  1720  .Bl -item -compact -offset indent
  1615  .It
  1721  .It
  1616 [email protected]
  1722 [email protected]
  1617 -.It
  1723 -.It
  1618  diffie-hellman-group1-sha1
  1724  diffie-hellman-group1-sha1
  1619  .It
  1725  .It
  1620  diffie-hellman-group14-sha1
  1726  diffie-hellman-group14-sha1
  1621 @@ -783,7 +777,6 @@ ecdh-sha2-nistp521
  1727 @@ -897,7 +891,6 @@ ecdh-sha2-nistp521
  1622  .Pp
  1728  .Pp
  1623  The default is:
  1729  The default is:
  1624  .Bd -literal -offset indent
  1730  .Bd -literal -offset indent
  1625 [email protected],
  1731 [email protected],
  1626  ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
  1732  ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
  1627  diffie-hellman-group-exchange-sha256,
  1733  diffie-hellman-group-exchange-sha256,
  1628  diffie-hellman-group14-sha1
  1734  diffie-hellman-group14-sha1
  1629 diff -pur old/sshkey.c new/sshkey.c
  1735 diff -pur old/sshkey.c new/sshkey.c
  1630 --- old/sshkey.c	2015-05-12 06:57:55.756061267 -0700
  1736 --- old/sshkey.c
  1631 +++ new/sshkey.c	2015-05-27 03:34:57.475875579 -0700
  1737 +++ new/sshkey.c
  1632 @@ -85,9 +85,11 @@ struct keytype {
  1738 @@ -85,9 +85,11 @@ struct keytype {
  1633  	int cert;
  1739  	int cert;
  1634  };
  1740  };
  1635  static const struct keytype keytypes[] = {
  1741  static const struct keytype keytypes[] = {
  1636 +#ifndef WITHOUT_ED25519
  1742 +#ifndef WITHOUT_ED25519
  1639  	    KEY_ED25519_CERT, 0, 1 },
  1745  	    KEY_ED25519_CERT, 0, 1 },
  1640 +#endif /* WITHOUT_ED25519 */
  1746 +#endif /* WITHOUT_ED25519 */
  1641  #ifdef WITH_OPENSSL
  1747  #ifdef WITH_OPENSSL
  1642  	{ NULL, "RSA1", KEY_RSA1, 0, 0 },
  1748  	{ NULL, "RSA1", KEY_RSA1, 0, 0 },
  1643  	{ "ssh-rsa", "RSA", KEY_RSA, 0, 0 },
  1749  	{ "ssh-rsa", "RSA", KEY_RSA, 0, 0 },
  1644 @@ -284,8 +286,10 @@ sshkey_size(const struct sshkey *k)
  1750 @@ -278,8 +280,10 @@ sshkey_size(const struct sshkey *k)
  1645  	case KEY_ECDSA_CERT:
  1751  	case KEY_ECDSA_CERT:
  1646  		return sshkey_curve_nid_to_bits(k->ecdsa_nid);
  1752  		return sshkey_curve_nid_to_bits(k->ecdsa_nid);
  1647  #endif /* WITH_OPENSSL */
  1753  #endif /* WITH_OPENSSL */
  1648 +#ifndef WITHOUT_ED25519
  1754 +#ifndef WITHOUT_ED25519
  1649  	case KEY_ED25519:
  1755  	case KEY_ED25519:
  1650  	case KEY_ED25519_CERT:
  1756  	case KEY_ED25519_CERT:
  1651 +#endif /* WITHOUT_ED25519 */
  1757 +#endif /* WITHOUT_ED25519 */
  1652  		return 256;	/* XXX */
  1758  		return 256;	/* XXX */
  1653  	}
  1759  	}
  1654  	return 0;
  1760  	return 0;
  1655 @@ -310,7 +314,9 @@ sshkey_type_is_valid_ca(int type)
  1761 @@ -292,7 +296,9 @@ sshkey_type_is_valid_ca(int type)
  1656  	case KEY_RSA:
  1762  	case KEY_RSA:
  1657  	case KEY_DSA:
  1763  	case KEY_DSA:
  1658  	case KEY_ECDSA:
  1764  	case KEY_ECDSA:
  1659 +#ifndef WITHOUT_ED25519
  1765 +#ifndef WITHOUT_ED25519
  1660  	case KEY_ED25519:
  1766  	case KEY_ED25519:
  1661 +#endif /* WITHOUT_ED25519 */
  1767 +#endif /* WITHOUT_ED25519 */
  1662  		return 1;
  1768  		return 1;
  1663  	default:
  1769  	default:
  1664  		return 0;
  1770  		return 0;
  1665 @@ -338,8 +344,10 @@ sshkey_type_plain(int type)
  1771 @@ -318,8 +324,10 @@ sshkey_type_plain(int type)
  1666  		return KEY_DSA;
  1772  		return KEY_DSA;
  1667  	case KEY_ECDSA_CERT:
  1773  	case KEY_ECDSA_CERT:
  1668  		return KEY_ECDSA;
  1774  		return KEY_ECDSA;
  1669 +#ifndef WITHOUT_ED25519
  1775 +#ifndef WITHOUT_ED25519
  1670  	case KEY_ED25519_CERT:
  1776  	case KEY_ED25519_CERT:
  1671  		return KEY_ED25519;
  1777  		return KEY_ED25519;
  1672 +#endif /* WITHOUT_ED25519 */
  1778 +#endif /* WITHOUT_ED25519 */
  1673  	default:
  1779  	default:
  1674  		return type;
  1780  		return type;
  1675  	}
  1781  	}
  1676 @@ -492,8 +500,10 @@ sshkey_new(int type)
  1782 @@ -472,8 +480,10 @@ sshkey_new(int type)
  1677  	k->dsa = NULL;
  1783  	k->dsa = NULL;
  1678  	k->rsa = NULL;
  1784  	k->rsa = NULL;
  1679  	k->cert = NULL;
  1785  	k->cert = NULL;
  1680 +#ifndef WITHOUT_ED25519
  1786 +#ifndef WITHOUT_ED25519
  1681  	k->ed25519_sk = NULL;
  1787  	k->ed25519_sk = NULL;
  1682  	k->ed25519_pk = NULL;
  1788  	k->ed25519_pk = NULL;
  1683 +#endif /* WITHOUT_ED25519 */
  1789 +#endif /* WITHOUT_ED25519 */
  1684  	switch (k->type) {
  1790  	switch (k->type) {
  1685  #ifdef WITH_OPENSSL
  1791  #ifdef WITH_OPENSSL
  1686  	case KEY_RSA1:
  1792  	case KEY_RSA1:
  1687 @@ -530,10 +540,12 @@ sshkey_new(int type)
  1793 @@ -508,10 +518,12 @@ sshkey_new(int type)
  1688  		/* Cannot do anything until we know the group */
  1794  		/* Cannot do anything until we know the group */
  1689  		break;
  1795  		break;
  1690  #endif /* WITH_OPENSSL */
  1796  #endif /* WITH_OPENSSL */
  1691 +#ifndef WITHOUT_ED25519
  1797 +#ifndef WITHOUT_ED25519
  1692  	case KEY_ED25519:
  1798  	case KEY_ED25519:
  1695  		break;
  1801  		break;
  1696 +#endif /* WITHOUT_ED25519 */
  1802 +#endif /* WITHOUT_ED25519 */
  1697  	case KEY_UNSPEC:
  1803  	case KEY_UNSPEC:
  1698  		break;
  1804  		break;
  1699  	default:
  1805  	default:
  1700 @@ -582,10 +594,12 @@ sshkey_add_private(struct sshkey *k)
  1806 @@ -558,10 +570,12 @@ sshkey_add_private(struct sshkey *k)
  1701  		/* Cannot do anything until we know the group */
  1807  		/* Cannot do anything until we know the group */
  1702  		break;
  1808  		break;
  1703  #endif /* WITH_OPENSSL */
  1809  #endif /* WITH_OPENSSL */
  1704 +#ifndef WITHOUT_ED25519
  1810 +#ifndef WITHOUT_ED25519
  1705  	case KEY_ED25519:
  1811  	case KEY_ED25519:
  1708  		break;
  1814  		break;
  1709 +#endif /* WITHOUT_ED25519 */
  1815 +#endif /* WITHOUT_ED25519 */
  1710  	case KEY_UNSPEC:
  1816  	case KEY_UNSPEC:
  1711  		break;
  1817  		break;
  1712  	default:
  1818  	default:
  1713 @@ -639,6 +653,7 @@ sshkey_free(struct sshkey *k)
  1819 @@ -613,6 +627,7 @@ sshkey_free(struct sshkey *k)
  1714  		break;
  1820  		break;
  1715  # endif /* OPENSSL_HAS_ECC */
  1821  # endif /* OPENSSL_HAS_ECC */
  1716  #endif /* WITH_OPENSSL */
  1822  #endif /* WITH_OPENSSL */
  1717 +#ifndef WITHOUT_ED25519
  1823 +#ifndef WITHOUT_ED25519
  1718  	case KEY_ED25519:
  1824  	case KEY_ED25519:
  1719  	case KEY_ED25519_CERT:
  1825  	case KEY_ED25519_CERT:
  1720  		if (k->ed25519_pk) {
  1826  		if (k->ed25519_pk) {
  1721 @@ -652,6 +667,7 @@ sshkey_free(struct sshkey *k)
  1827 @@ -626,6 +641,7 @@ sshkey_free(struct sshkey *k)
  1722  			k->ed25519_sk = NULL;
  1828  			k->ed25519_sk = NULL;
  1723  		}
  1829  		}
  1724  		break;
  1830  		break;
  1725 +#endif /* WITHOUT_ED25519 */
  1831 +#endif /* WITHOUT_ED25519 */
  1726  	case KEY_UNSPEC:
  1832  	case KEY_UNSPEC:
  1727  		break;
  1833  		break;
  1728  	default:
  1834  	default:
  1729 @@ -731,10 +747,12 @@ sshkey_equal_public(const struct sshkey
  1835 @@ -703,10 +719,12 @@ sshkey_equal_public(const struct sshkey
  1730  		return 1;
  1836  		return 1;
  1731  # endif /* OPENSSL_HAS_ECC */
  1837  # endif /* OPENSSL_HAS_ECC */
  1732  #endif /* WITH_OPENSSL */
  1838  #endif /* WITH_OPENSSL */
  1733 +#ifndef WITHOUT_ED25519
  1839 +#ifndef WITHOUT_ED25519
  1734  	case KEY_ED25519:
  1840  	case KEY_ED25519:
  1737  		    memcmp(a->ed25519_pk, b->ed25519_pk, ED25519_PK_SZ) == 0;
  1843  		    memcmp(a->ed25519_pk, b->ed25519_pk, ED25519_PK_SZ) == 0;
  1738 +#endif /* WITHOUT_ED25519 */
  1844 +#endif /* WITHOUT_ED25519 */
  1739  	default:
  1845  	default:
  1740  		return 0;
  1846  		return 0;
  1741  	}
  1847  	}
  1742 @@ -773,7 +791,9 @@ to_blob_buf(const struct sshkey *key, st
  1848 @@ -749,7 +767,9 @@ to_blob_buf(const struct sshkey *key, st
  1743  	case KEY_ECDSA_CERT:
  1849  	case KEY_ECDSA_CERT:
  1744  	case KEY_RSA_CERT:
  1850  	case KEY_RSA_CERT:
  1745  #endif /* WITH_OPENSSL */
  1851  #endif /* WITH_OPENSSL */
  1746 +#ifndef WITHOUT_ED25519
  1852 +#ifndef WITHOUT_ED25519
  1747  	case KEY_ED25519_CERT:
  1853  	case KEY_ED25519_CERT:
  1748 +#endif /* WITHOUT_ED25519 */
  1854 +#endif /* WITHOUT_ED25519 */
  1749  		/* Use the existing blob */
  1855  		/* Use the existing blob */
  1750  		/* XXX modified flag? */
  1856  		/* XXX modified flag? */
  1751  		if ((ret = sshbuf_putb(b, key->cert->certblob)) != 0)
  1857  		if ((ret = sshbuf_putb(b, key->cert->certblob)) != 0)
  1752 @@ -810,6 +830,7 @@ to_blob_buf(const struct sshkey *key, st
  1858 @@ -786,6 +806,7 @@ to_blob_buf(const struct sshkey *key, st
  1753  			return ret;
  1859  			return ret;
  1754  		break;
  1860  		break;
  1755  #endif /* WITH_OPENSSL */
  1861  #endif /* WITH_OPENSSL */
  1756 +#ifndef WITHOUT_ED25519
  1862 +#ifndef WITHOUT_ED25519
  1757  	case KEY_ED25519:
  1863  	case KEY_ED25519:
  1758  		if (key->ed25519_pk == NULL)
  1864  		if (key->ed25519_pk == NULL)
  1759  			return SSH_ERR_INVALID_ARGUMENT;
  1865  			return SSH_ERR_INVALID_ARGUMENT;
  1760 @@ -818,6 +839,7 @@ to_blob_buf(const struct sshkey *key, st
  1866 @@ -794,6 +815,7 @@ to_blob_buf(const struct sshkey *key, st
  1761  		    key->ed25519_pk, ED25519_PK_SZ)) != 0)
  1867  		    key->ed25519_pk, ED25519_PK_SZ)) != 0)
  1762  			return ret;
  1868  			return ret;
  1763  		break;
  1869  		break;
  1764 +#endif /* WITHOUT_ED25519 */
  1870 +#endif /* WITHOUT_ED25519 */
  1765  	default:
  1871  	default:
  1766  		return SSH_ERR_KEY_TYPE_UNKNOWN;
  1872  		return SSH_ERR_KEY_TYPE_UNKNOWN;
  1767  	}
  1873  	}
  1768 @@ -1291,13 +1313,17 @@ sshkey_read(struct sshkey *ret, char **c
  1874 @@ -1267,11 +1289,13 @@ sshkey_read(struct sshkey *ret, char **c
  1769  	case KEY_RSA:
  1875  	case KEY_RSA:
  1770  	case KEY_DSA:
  1876  	case KEY_DSA:
  1771  	case KEY_ECDSA:
  1877  	case KEY_ECDSA:
  1772 +#ifndef WITHOUT_ED25519
  1878 -	case KEY_ED25519:
  1773  	case KEY_ED25519:
  1879 +#ifndef WITHOUT_ED25519
  1774 +#endif /* WITHOUT_ED25519 */
  1880 + 	case KEY_ED25519:
  1775  	case KEY_DSA_CERT_V00:
  1881 +	case KEY_ED25519_CERT:
  1776  	case KEY_RSA_CERT_V00:
  1882 +#endif /* WITHOUT_ED25519 */
  1777  	case KEY_DSA_CERT:
  1883  	case KEY_DSA_CERT:
  1778  	case KEY_ECDSA_CERT:
  1884  	case KEY_ECDSA_CERT:
  1779  	case KEY_RSA_CERT:
  1885  	case KEY_RSA_CERT:
  1780 +#ifndef WITHOUT_ED25519
  1886 -	case KEY_ED25519_CERT:
  1781  	case KEY_ED25519_CERT:
       
  1782 +#endif /* WITHOUT_ED25519 */
       
  1783  		space = strchr(cp, ' ');
  1887  		space = strchr(cp, ' ');
  1784  		if (space == NULL)
  1888  		if (space == NULL)
  1785  			return SSH_ERR_INVALID_FORMAT;
  1889  			return SSH_ERR_INVALID_FORMAT;
  1786 @@ -1389,6 +1415,7 @@ sshkey_read(struct sshkey *ret, char **c
  1890 @@ -1363,6 +1387,7 @@ sshkey_read(struct sshkey *ret, char **c
  1787  		}
  1891  		}
  1788  # endif /* OPENSSL_HAS_ECC */
  1892  # endif /* OPENSSL_HAS_ECC */
  1789  #endif /* WITH_OPENSSL */
  1893  #endif /* WITH_OPENSSL */
  1790 +#ifndef WITHOUT_ED25519
  1894 +#ifndef WITHOUT_ED25519
  1791  		if (sshkey_type_plain(ret->type) == KEY_ED25519) {
  1895  		if (sshkey_type_plain(ret->type) == KEY_ED25519) {
  1792  			free(ret->ed25519_pk);
  1896  			free(ret->ed25519_pk);
  1793  			ret->ed25519_pk = k->ed25519_pk;
  1897  			ret->ed25519_pk = k->ed25519_pk;
  1794 @@ -1397,6 +1424,7 @@ sshkey_read(struct sshkey *ret, char **c
  1898 @@ -1371,6 +1396,7 @@ sshkey_read(struct sshkey *ret, char **c
  1795  			/* XXX */
  1899  			/* XXX */
  1796  #endif
  1900  #endif
  1797  		}
  1901  		}
  1798 +#endif /* WITHOUT_ED25519 */
  1902 +#endif /* WITHOUT_ED25519 */
  1799  		retval = 0;
  1903  		retval = 0;
  1800  /*XXXX*/
  1904  /*XXXX*/
  1801  		sshkey_free(k);
  1905  		sshkey_free(k);
  1802 @@ -1460,8 +1488,10 @@ sshkey_write(const struct sshkey *key, F
  1906 @@ -1662,7 +1688,8 @@ sshkey_generate(int type, u_int bits, st
  1803  	case KEY_RSA_CERT_V00:
       
  1804  	case KEY_RSA_CERT:
       
  1805  #endif /* WITH_OPENSSL */
       
  1806 +#ifndef WITHOUT_ED25519
       
  1807  	case KEY_ED25519:
       
  1808  	case KEY_ED25519_CERT:
       
  1809 +#endif /* WITHOUT_ED25519 */
       
  1810  		if ((bb = sshbuf_new()) == NULL) {
       
  1811  			ret = SSH_ERR_ALLOC_FAIL;
       
  1812  			goto out;
       
  1813 @@ -1671,7 +1701,8 @@ sshkey_generate(int type, u_int bits, st
       
  1814  	if ((k = sshkey_new(KEY_UNSPEC)) == NULL)
  1907  	if ((k = sshkey_new(KEY_UNSPEC)) == NULL)
  1815  		return SSH_ERR_ALLOC_FAIL;
  1908  		return SSH_ERR_ALLOC_FAIL;
  1816  	switch (type) {
  1909  	switch (type) {
  1817 -	case KEY_ED25519:
  1910 -	case KEY_ED25519:
  1818 +#ifndef WITHOUT_ED25519
  1911 +#ifndef WITHOUT_ED25519
  1819 +		case KEY_ED25519:
  1912 +		case KEY_ED25519:
  1820  		if ((k->ed25519_pk = malloc(ED25519_PK_SZ)) == NULL ||
  1913  		if ((k->ed25519_pk = malloc(ED25519_PK_SZ)) == NULL ||
  1821  		    (k->ed25519_sk = malloc(ED25519_SK_SZ)) == NULL) {
  1914  		    (k->ed25519_sk = malloc(ED25519_SK_SZ)) == NULL) {
  1822  			ret = SSH_ERR_ALLOC_FAIL;
  1915  			ret = SSH_ERR_ALLOC_FAIL;
  1823 @@ -1680,6 +1711,7 @@ sshkey_generate(int type, u_int bits, st
  1916 @@ -1671,6 +1698,7 @@ sshkey_generate(int type, u_int bits, st
  1824  		crypto_sign_ed25519_keypair(k->ed25519_pk, k->ed25519_sk);
  1917  		crypto_sign_ed25519_keypair(k->ed25519_pk, k->ed25519_sk);
  1825  		ret = 0;
  1918  		ret = 0;
  1826  		break;
  1919  		break;
  1827 +#endif /* WITHOUT_ED25519 */
  1920 +#endif /* WITHOUT_ED25519 */
  1828  #ifdef WITH_OPENSSL
  1921  #ifdef WITH_OPENSSL
  1829  	case KEY_DSA:
  1922  	case KEY_DSA:
  1830  		ret = dsa_generate_private_key(bits, &k->dsa);
  1923  		ret = dsa_generate_private_key(bits, &k->dsa);
  1831 @@ -1817,6 +1849,7 @@ sshkey_from_private(const struct sshkey
  1924 @@ -1806,6 +1834,7 @@ sshkey_from_private(const struct sshkey
  1832  		}
  1925  		}
  1833  		break;
  1926  		break;
  1834  #endif /* WITH_OPENSSL */
  1927  #endif /* WITH_OPENSSL */
  1835 +#ifndef WITHOUT_ED25519
  1928 +#ifndef WITHOUT_ED25519
  1836  	case KEY_ED25519:
  1929  	case KEY_ED25519:
  1837  	case KEY_ED25519_CERT:
  1930  	case KEY_ED25519_CERT:
  1838  		if ((n = sshkey_new(k->type)) == NULL)
  1931  		if ((n = sshkey_new(k->type)) == NULL)
  1839 @@ -1829,6 +1862,7 @@ sshkey_from_private(const struct sshkey
  1932 @@ -1818,6 +1847,7 @@ sshkey_from_private(const struct sshkey
  1840  			memcpy(n->ed25519_pk, k->ed25519_pk, ED25519_PK_SZ);
  1933  			memcpy(n->ed25519_pk, k->ed25519_pk, ED25519_PK_SZ);
  1841  		}
  1934  		}
  1842  		break;
  1935  		break;
  1843 +#endif /* WITHOUT_ED25519 */
  1936 +#endif /* WITHOUT_ED25519 */
  1844  	default:
  1937  	default:
  1845  		return SSH_ERR_KEY_TYPE_UNKNOWN;
  1938  		return SSH_ERR_KEY_TYPE_UNKNOWN;
  1846  	}
  1939  	}
  1847 @@ -2100,6 +2134,7 @@ sshkey_from_blob_internal(struct sshbuf
  1940 @@ -2084,6 +2114,7 @@ sshkey_from_blob_internal(struct sshbuf
  1848  		break;
  1941  		break;
  1849  # endif /* OPENSSL_HAS_ECC */
  1942  # endif /* OPENSSL_HAS_ECC */
  1850  #endif /* WITH_OPENSSL */
  1943  #endif /* WITH_OPENSSL */
  1851 +#ifndef WITHOUT_ED25519
  1944 +#ifndef WITHOUT_ED25519
  1852  	case KEY_ED25519_CERT:
  1945  	case KEY_ED25519_CERT:
  1853  		/* Skip nonce */
  1946  		/* Skip nonce */
  1854  		if (sshbuf_get_string_direct(b, NULL, NULL) != 0) {
  1947  		if (sshbuf_get_string_direct(b, NULL, NULL) != 0) {
  1855 @@ -2121,6 +2156,7 @@ sshkey_from_blob_internal(struct sshbuf
  1948 @@ -2105,6 +2136,7 @@ sshkey_from_blob_internal(struct sshbuf
  1856  		key->ed25519_pk = pk;
  1949  		key->ed25519_pk = pk;
  1857  		pk = NULL;
  1950  		pk = NULL;
  1858  		break;
  1951  		break;
  1859 +#endif /* WITHOUT_ED25519 */
  1952 +#endif /* WITHOUT_ED25519 */
  1860  	case KEY_UNSPEC:
  1953  	case KEY_UNSPEC:
  1861  		if ((key = sshkey_new(type)) == NULL) {
  1954  		if ((key = sshkey_new(type)) == NULL) {
  1862  			ret = SSH_ERR_ALLOC_FAIL;
  1955  			ret = SSH_ERR_ALLOC_FAIL;
  1863 @@ -2215,9 +2251,11 @@ sshkey_sign(const struct sshkey *key,
  1956 @@ -2197,9 +2229,11 @@ sshkey_sign(const struct sshkey *key,
  1864  	case KEY_RSA:
  1957  	case KEY_RSA:
  1865  		return ssh_rsa_sign(key, sigp, lenp, data, datalen, compat);
  1958  		return ssh_rsa_sign(key, sigp, lenp, data, datalen, compat);
  1866  #endif /* WITH_OPENSSL */
  1959  #endif /* WITH_OPENSSL */
  1867 +#ifndef WITHOUT_ED25519
  1960 +#ifndef WITHOUT_ED25519
  1868  	case KEY_ED25519:
  1961  	case KEY_ED25519:
  1870  		return ssh_ed25519_sign(key, sigp, lenp, data, datalen, compat);
  1963  		return ssh_ed25519_sign(key, sigp, lenp, data, datalen, compat);
  1871 +#endif /* WITHOUT_ED25519 */
  1964 +#endif /* WITHOUT_ED25519 */
  1872  	default:
  1965  	default:
  1873  		return SSH_ERR_KEY_TYPE_UNKNOWN;
  1966  		return SSH_ERR_KEY_TYPE_UNKNOWN;
  1874  	}
  1967  	}
  1875 @@ -2249,9 +2287,11 @@ sshkey_verify(const struct sshkey *key,
  1968 @@ -2229,9 +2263,11 @@ sshkey_verify(const struct sshkey *key,
  1876  	case KEY_RSA:
  1969  	case KEY_RSA:
  1877  		return ssh_rsa_verify(key, sig, siglen, data, dlen, compat);
  1970  		return ssh_rsa_verify(key, sig, siglen, data, dlen, compat);
  1878  #endif /* WITH_OPENSSL */
  1971  #endif /* WITH_OPENSSL */
  1879 +#ifndef WITHOUT_ED25519
  1972 +#ifndef WITHOUT_ED25519
  1880  	case KEY_ED25519:
  1973  	case KEY_ED25519:
  1882  		return ssh_ed25519_verify(key, sig, siglen, data, dlen, compat);
  1975  		return ssh_ed25519_verify(key, sig, siglen, data, dlen, compat);
  1883 +#endif /* WITHOUT_ED25519 */
  1976 +#endif /* WITHOUT_ED25519 */
  1884  	default:
  1977  	default:
  1885  		return SSH_ERR_KEY_TYPE_UNKNOWN;
  1978  		return SSH_ERR_KEY_TYPE_UNKNOWN;
  1886  	}
  1979  	}
  1887 @@ -2275,8 +2315,10 @@ sshkey_demote(const struct sshkey *k, st
  1980 @@ -2255,8 +2291,10 @@ sshkey_demote(const struct sshkey *k, st
  1888  	pk->dsa = NULL;
  1981  	pk->dsa = NULL;
  1889  	pk->ecdsa = NULL;
  1982  	pk->ecdsa = NULL;
  1890  	pk->rsa = NULL;
  1983  	pk->rsa = NULL;
  1891 +#ifndef WITHOUT_ED25519
  1984 +#ifndef WITHOUT_ED25519
  1892  	pk->ed25519_pk = NULL;
  1985  	pk->ed25519_pk = NULL;
  1893  	pk->ed25519_sk = NULL;
  1986  	pk->ed25519_sk = NULL;
  1894 +#endif /* WITHOUT_ED25519 */
  1987 +#endif /* WITHOUT_ED25519 */
  1895  
  1988  
  1896  	switch (k->type) {
  1989  	switch (k->type) {
  1897  #ifdef WITH_OPENSSL
  1990  #ifdef WITH_OPENSSL
  1898 @@ -2328,6 +2370,7 @@ sshkey_demote(const struct sshkey *k, st
  1991 @@ -2306,6 +2344,7 @@ sshkey_demote(const struct sshkey *k, st
  1899  		break;
  1992  		break;
  1900  # endif /* OPENSSL_HAS_ECC */
  1993  # endif /* OPENSSL_HAS_ECC */
  1901  #endif /* WITH_OPENSSL */
  1994  #endif /* WITH_OPENSSL */
  1902 +#ifndef WITHOUT_ED25519
  1995 +#ifndef WITHOUT_ED25519
  1903  	case KEY_ED25519_CERT:
  1996  	case KEY_ED25519_CERT:
  1904  		if ((ret = sshkey_cert_copy(k, pk)) != 0)
  1997  		if ((ret = sshkey_cert_copy(k, pk)) != 0)
  1905  			goto fail;
  1998  			goto fail;
  1906 @@ -2341,6 +2384,7 @@ sshkey_demote(const struct sshkey *k, st
  1999 @@ -2319,6 +2358,7 @@ sshkey_demote(const struct sshkey *k, st
  1907  			memcpy(pk->ed25519_pk, k->ed25519_pk, ED25519_PK_SZ);
  2000  			memcpy(pk->ed25519_pk, k->ed25519_pk, ED25519_PK_SZ);
  1908  		}
  2001  		}
  1909  		break;
  2002  		break;
  1910 +#endif /* WITHOUT_ED25519 */
  2003 +#endif /* WITHOUT_ED25519 */
  1911  	default:
  2004  	default:
  1912  		ret = SSH_ERR_KEY_TYPE_UNKNOWN;
  2005  		ret = SSH_ERR_KEY_TYPE_UNKNOWN;
  1913   fail:
  2006   fail:
  1914 @@ -2371,11 +2415,13 @@ sshkey_to_certified(struct sshkey *k, in
  2007 @@ -2347,9 +2387,11 @@ sshkey_to_certified(struct sshkey *k)
  1915  		newtype = KEY_ECDSA_CERT;
  2008  		newtype = KEY_ECDSA_CERT;
  1916  		break;
  2009  		break;
  1917  #endif /* WITH_OPENSSL */
  2010  #endif /* WITH_OPENSSL */
  1918 +#ifndef WITHOUT_ED25519
  2011 +#ifndef WITHOUT_ED25519
  1919  	case KEY_ED25519:
  2012  	case KEY_ED25519:
  1920  		if (legacy)
       
  1921  			return SSH_ERR_INVALID_ARGUMENT;
       
  1922  		newtype = KEY_ED25519_CERT;
  2013  		newtype = KEY_ED25519_CERT;
  1923  		break;
  2014  		break;
  1924 +#endif /* WITHOUT_ED25519 */
  2015 +#endif /* WITHOUT_ED25519 */
  1925  	default:
  2016  	default:
  1926  		return SSH_ERR_INVALID_ARGUMENT;
  2017  		return SSH_ERR_INVALID_ARGUMENT;
  1927  	}
  2018  	}
  1928 @@ -2458,11 +2504,13 @@ sshkey_certify(struct sshkey *k, struct
  2019 @@ -2428,11 +2470,13 @@ sshkey_certify(struct sshkey *k, struct
  1929  			goto out;
  2020  			goto out;
  1930  		break;
  2021  		break;
  1931  #endif /* WITH_OPENSSL */
  2022  #endif /* WITH_OPENSSL */
  1932 +#ifndef WITHOUT_ED25519
  2023 +#ifndef WITHOUT_ED25519
  1933  	case KEY_ED25519_CERT:
  2024  	case KEY_ED25519_CERT:
  1937  		break;
  2028  		break;
  1938 +#endif /* WITHOUT_ED25519 */
  2029 +#endif /* WITHOUT_ED25519 */
  1939  	default:
  2030  	default:
  1940  		ret = SSH_ERR_INVALID_ARGUMENT;
  2031  		ret = SSH_ERR_INVALID_ARGUMENT;
  1941  		goto out;
  2032  		goto out;
  1942 @@ -2657,6 +2705,7 @@ sshkey_private_serialize(const struct ss
  2033 @@ -2607,6 +2651,7 @@ sshkey_private_serialize(const struct ss
  1943  		break;
  2034  		break;
  1944  # endif /* OPENSSL_HAS_ECC */
  2035  # endif /* OPENSSL_HAS_ECC */
  1945  #endif /* WITH_OPENSSL */
  2036  #endif /* WITH_OPENSSL */
  1946 +#ifndef WITHOUT_ED25519
  2037 +#ifndef WITHOUT_ED25519
  1947  	case KEY_ED25519:
  2038  	case KEY_ED25519:
  1948  		if ((r = sshbuf_put_string(b, key->ed25519_pk,
  2039  		if ((r = sshbuf_put_string(b, key->ed25519_pk,
  1949  		    ED25519_PK_SZ)) != 0 ||
  2040  		    ED25519_PK_SZ)) != 0 ||
  1950 @@ -2676,6 +2725,7 @@ sshkey_private_serialize(const struct ss
  2041 @@ -2626,6 +2671,7 @@ sshkey_private_serialize(const struct ss
  1951  		    ED25519_SK_SZ)) != 0)
  2042  		    ED25519_SK_SZ)) != 0)
  1952  			goto out;
  2043  			goto out;
  1953  		break;
  2044  		break;
  1954 +#endif /* WITHOUT_ED25519 */
  2045 +#endif /* WITHOUT_ED25519 */
  1955  	default:
  2046  	default:
  1956  		r = SSH_ERR_INVALID_ARGUMENT;
  2047  		r = SSH_ERR_INVALID_ARGUMENT;
  1957  		goto out;
  2048  		goto out;
  1958 @@ -2802,6 +2852,7 @@ sshkey_private_deserialize(struct sshbuf
  2049 @@ -2750,6 +2796,7 @@ sshkey_private_deserialize(struct sshbuf
  1959  			goto out;
  2050  			goto out;
  1960  		break;
  2051  		break;
  1961  #endif /* WITH_OPENSSL */
  2052  #endif /* WITH_OPENSSL */
  1962 +#ifndef WITHOUT_ED25519
  2053 +#ifndef WITHOUT_ED25519
  1963  	case KEY_ED25519:
  2054  	case KEY_ED25519:
  1964  		if ((k = sshkey_new_private(type)) == NULL) {
  2055  		if ((k = sshkey_new_private(type)) == NULL) {
  1965  			r = SSH_ERR_ALLOC_FAIL;
  2056  			r = SSH_ERR_ALLOC_FAIL;
  1966 @@ -2832,6 +2883,7 @@ sshkey_private_deserialize(struct sshbuf
  2057 @@ -2780,6 +2827,7 @@ sshkey_private_deserialize(struct sshbuf
  1967  		k->ed25519_sk = ed25519_sk;
  2058  		k->ed25519_sk = ed25519_sk;
  1968  		ed25519_pk = ed25519_sk = NULL;
  2059  		ed25519_pk = ed25519_sk = NULL;
  1969  		break;
  2060  		break;
  1970 +#endif /* WITHOUT_ED25519 */
  2061 +#endif /* WITHOUT_ED25519 */
  1971  	default:
  2062  	default:
  1972  		r = SSH_ERR_KEY_TYPE_UNKNOWN;
  2063  		r = SSH_ERR_KEY_TYPE_UNKNOWN;
  1973  		goto out;
  2064  		goto out;
  1974 @@ -3591,9 +3643,11 @@ sshkey_private_to_fileblob(struct sshkey
  2065 @@ -3545,9 +3593,11 @@ sshkey_private_to_fileblob(struct sshkey
  1975  		return sshkey_private_pem_to_blob(key, blob,
  2066  		return sshkey_private_pem_to_blob(key, blob,
  1976  		    passphrase, comment);
  2067  		    passphrase, comment);
  1977  #endif /* WITH_OPENSSL */
  2068  #endif /* WITH_OPENSSL */
  1978 +#ifndef WITHOUT_ED25519
  2069 +#ifndef WITHOUT_ED25519
  1979  	case KEY_ED25519:
  2070  	case KEY_ED25519:
  1981  		    comment, new_format_cipher, new_format_rounds);
  2072  		    comment, new_format_cipher, new_format_rounds);
  1982 +#endif /* WITHOUT_ED25519 */
  2073 +#endif /* WITHOUT_ED25519 */
  1983  	default:
  2074  	default:
  1984  		return SSH_ERR_KEY_TYPE_UNKNOWN;
  2075  		return SSH_ERR_KEY_TYPE_UNKNOWN;
  1985  	}
  2076  	}
  1986 @@ -3899,9 +3953,11 @@ sshkey_parse_private_fileblob_type(struc
  2077 @@ -3853,9 +3903,11 @@ sshkey_parse_private_fileblob_type(struc
  1987  		return sshkey_parse_private_pem_fileblob(blob, type,
  2078  		return sshkey_parse_private_pem_fileblob(blob, type,
  1988  		    passphrase, keyp);
  2079  		    passphrase, keyp);
  1989  #endif /* WITH_OPENSSL */
  2080  #endif /* WITH_OPENSSL */
  1990 +#ifndef WITHOUT_ED25519
  2081 +#ifndef WITHOUT_ED25519
  1991  	case KEY_ED25519:
  2082  	case KEY_ED25519:
  1994 +#endif /* WITHOUT_ED25519 */
  2085 +#endif /* WITHOUT_ED25519 */
  1995  	case KEY_UNSPEC:
  2086  	case KEY_UNSPEC:
  1996  		if ((r = sshkey_parse_private2(blob, type, passphrase, keyp,
  2087  		if ((r = sshkey_parse_private2(blob, type, passphrase, keyp,
  1997  		    commentp)) == 0)
  2088  		    commentp)) == 0)
  1998 diff -pur old/sshkey.h new/sshkey.h
  2089 diff -pur old/sshkey.h new/sshkey.h
  1999 --- old/sshkey.h	2015-05-12 06:57:55.756485788 -0700
  2090 --- old/sshkey.h
  2000 +++ new/sshkey.h	2015-05-12 06:57:55.885805405 -0700
  2091 +++ new/sshkey.h
  2001 @@ -57,11 +57,15 @@ enum sshkey_types {
  2092 @@ -57,11 +57,15 @@ enum sshkey_types {
  2002  	KEY_RSA,
  2093  	KEY_RSA,
  2003  	KEY_DSA,
  2094  	KEY_DSA,
  2004  	KEY_ECDSA,
  2095  	KEY_ECDSA,
  2005 +#ifndef WITHOUT_ED25519
  2096 -	KEY_ED25519,
  2006  	KEY_ED25519,
  2097 +#ifndef WITHOUT_ED25519
       
  2098 + 	KEY_ED25519,
  2007 +#endif /* WITHOUT_ED25519 */
  2099 +#endif /* WITHOUT_ED25519 */
  2008  	KEY_RSA_CERT,
  2100  	KEY_RSA_CERT,
  2009  	KEY_DSA_CERT,
  2101  	KEY_DSA_CERT,
  2010  	KEY_ECDSA_CERT,
  2102  	KEY_ECDSA_CERT,
  2011 +#ifndef WITHOUT_ED25519
  2103 +#ifndef WITHOUT_ED25519
  2012  	KEY_ED25519_CERT,
  2104  	KEY_ED25519_CERT,
  2013 +#endif /* WITHOUT_ED25519 */
  2105 +#endif /* WITHOUT_ED25519 */
  2014  	KEY_RSA_CERT_V00,
       
  2015  	KEY_DSA_CERT_V00,
       
  2016  	KEY_NULL,
  2106  	KEY_NULL,
  2017 @@ -106,13 +110,17 @@ struct sshkey {
  2107  	KEY_UNSPEC
       
  2108  };
       
  2109 @@ -104,13 +108,17 @@ struct sshkey {
  2018  	DSA	*dsa;
  2110  	DSA	*dsa;
  2019  	int	 ecdsa_nid;	/* NID of curve */
  2111  	int	 ecdsa_nid;	/* NID of curve */
  2020  	EC_KEY	*ecdsa;
  2112  	EC_KEY	*ecdsa;
  2021 +#ifndef WITHOUT_ED25519
  2113 +#ifndef WITHOUT_ED25519
  2022  	u_char	*ed25519_sk;
  2114  	u_char	*ed25519_sk;
  2030  #define	ED25519_PK_SZ	crypto_sign_ed25519_PUBLICKEYBYTES
  2122  #define	ED25519_PK_SZ	crypto_sign_ed25519_PUBLICKEYBYTES
  2031 +#endif /* WITHOUT_ED25519 */
  2123 +#endif /* WITHOUT_ED25519 */
  2032  
  2124  
  2033  struct sshkey	*sshkey_new(int);
  2125  struct sshkey	*sshkey_new(int);
  2034  int		 sshkey_add_private(struct sshkey *);
  2126  int		 sshkey_add_private(struct sshkey *);
  2035 @@ -210,11 +218,13 @@ int ssh_ecdsa_sign(const struct sshkey *
  2127 @@ -208,11 +216,13 @@ int ssh_ecdsa_sign(const struct sshkey *
  2036  int ssh_ecdsa_verify(const struct sshkey *key,
  2128  int ssh_ecdsa_verify(const struct sshkey *key,
  2037      const u_char *signature, size_t signaturelen,
  2129      const u_char *signature, size_t signaturelen,
  2038      const u_char *data, size_t datalen, u_int compat);
  2130      const u_char *data, size_t datalen, u_int compat);
  2039 +#ifndef WITHOUT_ED25519
  2131 +#ifndef WITHOUT_ED25519
  2040  int ssh_ed25519_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
  2132  int ssh_ed25519_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,