components/openssh/patches/024-disable_ed25519.patch
author saurabh.vyas@oracle.com
Tue, 09 Jun 2015 22:31:26 -0700
changeset 4459 5a11150c7d2e
parent 4078 7cfcde36f97f
child 4503 bf30d46ab06e
permissions -rw-r--r--
21203559 problem in SERVICE/HORIZON
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4078
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     1
#
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     2
# Per Solaris crypto team recommendation, we need to remove support for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     3
# Curve25519 from OpenSSH.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     4
#
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     5
# Patch offered upstream:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     6
#     https://bugzilla.mindrot.org/show_bug.cgi?id=2376
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     7
#
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     8
diff -pur old/Makefile.in new/Makefile.in
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     9
--- old/Makefile.in	2015-03-31 21:14:02.427499635 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    10
+++ new/Makefile.in	2015-04-02 02:30:04.830658823 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    11
@@ -141,7 +141,7 @@ $(SSHDOBJS): Makefile.in config.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    12
 	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    13
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    14
 LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    15
-$(LIBCOMPAT): always
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    16
+$(LIBCOMPAT): always libssh.a
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    17
 	(cd openbsd-compat && $(MAKE))
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    18
 always:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    19
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    20
diff -pur old/authfd.c new/authfd.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    21
--- old/authfd.c	2013-12-28 22:49:56.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    22
+++ new/authfd.c	2015-04-01 01:53:06.534109950 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    23
@@ -508,8 +508,10 @@ ssh_add_identity_constrained(Authenticat
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    24
 	case KEY_DSA_CERT_V00:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    25
 	case KEY_ECDSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    26
 	case KEY_ECDSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    27
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    28
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    29
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    30
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    31
 		type = constrained ?
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    32
 		    SSH2_AGENTC_ADD_ID_CONSTRAINED :
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    33
 		    SSH2_AGENTC_ADD_IDENTITY;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    34
diff -pur old/authfile.c new/authfile.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    35
--- old/authfile.c	2013-12-28 22:50:15.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    36
+++ new/authfile.c	2015-04-01 05:27:03.024708427 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    37
@@ -597,9 +597,11 @@ key_private_to_blob(Key *key, Buffer *bl
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    38
 			    comment, new_format_cipher, new_format_rounds);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    39
 		}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    40
 		return key_private_pem_to_blob(key, blob, passphrase, comment);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    41
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    42
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    43
 		return key_private_to_blob2(key, blob, passphrase,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    44
 		    comment, new_format_cipher, new_format_rounds);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    45
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    46
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    47
 		error("%s: cannot save key type %d", __func__, key->type);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    48
 		return 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    49
@@ -1005,8 +1007,10 @@ key_parse_private_type(Buffer *blob, int
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    50
 	case KEY_ECDSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    51
 	case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    52
 		return key_parse_private_pem(blob, type, passphrase, commentp);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    53
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    54
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    55
 		return key_parse_private2(blob, type, passphrase, commentp);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    56
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    57
 	case KEY_UNSPEC:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    58
 		if ((k = key_parse_private2(blob, type, passphrase, commentp)))
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    59
 			return k;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    60
@@ -1213,7 +1217,9 @@ key_load_private_cert(int type, const ch
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    61
 	case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    62
 	case KEY_DSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    63
 	case KEY_ECDSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    64
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    65
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    66
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    67
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    68
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    69
 		error("%s: unsupported key type", __func__);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    70
diff -pur old/crypto_api.h new/crypto_api.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    71
--- old/crypto_api.h	2014-01-16 17:31:34.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    72
+++ new/crypto_api.h	2015-04-02 00:35:29.952105991 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    73
@@ -26,7 +26,7 @@ int	crypto_hashblocks_sha512(unsigned ch
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    74
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    75
 #define crypto_hash_sha512_BYTES 64U
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    76
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    77
-int	crypto_hash_sha512(unsigned char *, const unsigned char *,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    78
+extern int	crypto_hash_sha512(unsigned char *, const unsigned char *,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    79
     unsigned long long);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    80
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    81
 int	crypto_verify_32(const unsigned char *, const unsigned char *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    82
diff -pur old/ed25519.c new/ed25519.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    83
--- old/ed25519.c	2013-12-17 22:48:11.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    84
+++ new/ed25519.c	2015-04-01 09:03:04.052497535 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    85
@@ -6,6 +6,8 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    86
  * Copied from supercop-20130419/crypto_sign/ed25519/ref/ed25519.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    87
  */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    88
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    89
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    90
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    91
 #include "includes.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    92
 #include "crypto_api.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    93
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    94
@@ -142,3 +144,4 @@ int crypto_sign_ed25519_open(
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    95
   }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    96
   return ret;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    97
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    98
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    99
diff -pur old/fe25519.c new/fe25519.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   100
--- old/fe25519.c	2014-01-16 17:43:44.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   101
+++ new/fe25519.c	2015-04-01 03:48:12.251955071 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   102
@@ -6,6 +6,8 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   103
  * Copied from supercop-20130419/crypto_sign/ed25519/ref/fe25519.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   104
  */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   105
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   106
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   107
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   108
 #include "includes.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   109
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   110
 #define WINDOWSIZE 1 /* Should be 1,2, or 4 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   111
@@ -335,3 +337,5 @@ void fe25519_pow2523(fe25519 *r, const f
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   112
 	/* 2^252 - 2^2 */ fe25519_square(&t,&t);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   113
 	/* 2^252 - 3 */ fe25519_mul(r,&t,x);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   114
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   115
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   116
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   117
diff -pur old/fe25519.h new/fe25519.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   118
--- old/fe25519.h	2013-12-17 22:48:11.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   119
+++ new/fe25519.h	2015-04-01 03:47:56.992321351 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   120
@@ -9,6 +9,8 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   121
 #ifndef FE25519_H
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   122
 #define FE25519_H
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   123
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   124
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   125
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   126
 #include "crypto_api.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   127
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   128
 #define fe25519              crypto_sign_ed25519_ref_fe25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   129
@@ -67,4 +69,5 @@ void fe25519_invert(fe25519 *r, const fe
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   130
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   131
 void fe25519_pow2523(fe25519 *r, const fe25519 *x);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   132
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   133
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   134
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   135
diff -pur old/ge25519.c new/ge25519.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   136
--- old/ge25519.c	2014-01-16 17:43:44.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   137
+++ new/ge25519.c	2015-04-01 03:47:40.144323636 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   138
@@ -6,6 +6,8 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   139
  * Copied from supercop-20130419/crypto_sign/ed25519/ref/ge25519.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   140
  */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   141
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   142
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   143
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   144
 #include "includes.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   145
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   146
 #include "fe25519.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   147
@@ -319,3 +321,5 @@ void ge25519_scalarmult_base(ge25519_p3
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   148
     ge25519_mixadd2(r, &t);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   149
   }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   150
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   151
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   152
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   153
diff -pur old/ge25519.h new/ge25519.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   154
--- old/ge25519.h	2013-12-17 22:48:11.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   155
+++ new/ge25519.h	2015-04-01 03:47:22.801071311 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   156
@@ -8,6 +8,7 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   157
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   158
 #ifndef GE25519_H
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   159
 #define GE25519_H
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   160
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   161
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   162
 #include "fe25519.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   163
 #include "sc25519.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   164
@@ -40,4 +41,5 @@ void ge25519_double_scalarmult_vartime(g
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   165
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   166
 void ge25519_scalarmult_base(ge25519 *r, const sc25519 *s);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   167
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   168
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   169
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   170
diff -pur old/kex.c new/kex.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   171
--- old/kex.c	2015-03-31 21:14:02.430475216 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   172
+++ new/kex.c	2015-04-01 04:49:49.142934463 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   173
@@ -91,7 +91,7 @@ static const struct kexalg kexalgs[] = {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   174
 # endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   175
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   176
 	{ KEX_DH1, KEX_DH_GRP1_SHA1, 0, SSH_DIGEST_SHA1 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   177
-#ifdef HAVE_EVP_SHA256
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   178
+#if defined(HAVE_EVP_SHA256) && !defined(WITHOUT_ED25519)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   179
 	{ KEX_CURVE25519_SHA256, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   180
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   181
 #ifdef GSSAPI
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   182
diff -pur old/kex.h new/kex.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   183
--- old/kex.h	2015-03-31 21:14:02.430845488 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   184
+++ new/kex.h	2015-04-01 04:58:55.837357472 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   185
@@ -43,7 +43,9 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   186
 #define	KEX_ECDH_SHA2_NISTP256	"ecdh-sha2-nistp256"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   187
 #define	KEX_ECDH_SHA2_NISTP384	"ecdh-sha2-nistp384"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   188
 #define	KEX_ECDH_SHA2_NISTP521	"ecdh-sha2-nistp521"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   189
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   190
 #define	KEX_CURVE25519_SHA256	"[email protected]"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   191
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   192
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   193
 #define COMP_NONE	0
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   194
 #define COMP_ZLIB	1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   195
@@ -75,7 +77,9 @@ enum kex_exchange {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   196
 	KEX_DH_GEX_SHA1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   197
 	KEX_DH_GEX_SHA256,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   198
 	KEX_ECDH_SHA2,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   199
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   200
 	KEX_C25519_SHA256,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   201
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   202
 	KEX_GSS_GRP1_SHA1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   203
 	KEX_GSS_GRP14_SHA1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   204
 	KEX_GSS_GEX_SHA1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   205
@@ -172,8 +176,10 @@ void	 kexgex_client(Kex *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   206
 void	 kexgex_server(Kex *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   207
 void	 kexecdh_client(Kex *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   208
 void	 kexecdh_server(Kex *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   209
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   210
 void	 kexc25519_client(Kex *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   211
 void	 kexc25519_server(Kex *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   212
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   213
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   214
 #ifdef GSSAPI
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   215
 void	kexgss_client(Kex *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   216
@@ -193,6 +199,7 @@ kex_ecdh_hash(int, const EC_GROUP *, cha
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   217
     char *, int, u_char *, int, const EC_POINT *, const EC_POINT *,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   218
     const BIGNUM *, u_char **, u_int *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   219
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   220
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   221
 void
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   222
 kex_c25519_hash(int, char *, char *, char *, int,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   223
     char *, int, u_char *, int, const u_char *, const u_char *,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   224
@@ -206,6 +213,7 @@ void kexc25519_shared_key(const u_char k
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   225
     const u_char pub[CURVE25519_SIZE], Buffer *out)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   226
 	__attribute__((__bounded__(__minbytes__, 1, CURVE25519_SIZE)))
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   227
 	__attribute__((__bounded__(__minbytes__, 2, CURVE25519_SIZE)));
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   228
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   229
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   230
 void
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   231
 derive_ssh1_session_id(BIGNUM *, BIGNUM *, u_int8_t[8], u_int8_t[16]);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   232
diff -pur old/kexc25519.c new/kexc25519.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   233
--- old/kexc25519.c	2014-01-12 00:21:23.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   234
+++ new/kexc25519.c	2015-04-01 04:52:44.039054396 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   235
@@ -25,6 +25,8 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   236
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   237
  */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   238
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   239
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   240
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   241
 #include "includes.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   242
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   243
 #include <sys/types.h>
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   244
@@ -120,3 +122,5 @@ kex_c25519_hash(
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   245
 	*hash = digest;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   246
 	*hashlen = ssh_digest_bytes(hash_alg);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   247
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   248
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   249
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   250
diff -pur old/kexc25519c.c new/kexc25519c.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   251
--- old/kexc25519c.c	2014-01-12 00:21:23.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   252
+++ new/kexc25519c.c	2015-04-01 04:52:57.326754535 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   253
@@ -25,6 +25,8 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   254
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   255
  */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   256
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   257
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   258
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   259
 #include "includes.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   260
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   261
 #include <sys/types.h>
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   262
@@ -127,3 +129,5 @@ kexc25519_client(Kex *kex)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   263
 	buffer_free(&shared_secret);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   264
 	kex_finish(kex);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   265
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   266
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   267
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   268
diff -pur old/kexc25519s.c new/kexc25519s.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   269
--- old/kexc25519s.c	2014-01-12 00:21:23.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   270
+++ new/kexc25519s.c	2015-04-01 04:53:14.320854854 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   271
@@ -24,6 +24,8 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   272
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   273
  */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   274
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   275
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   276
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   277
 #include "includes.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   278
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   279
 #include <sys/types.h>
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   280
@@ -124,3 +126,5 @@ kexc25519_server(Kex *kex)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   281
 	buffer_free(&shared_secret);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   282
 	kex_finish(kex);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   283
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   284
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   285
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   286
diff -pur old/key.c new/key.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   287
--- old/key.c	2015-03-31 21:14:02.432016878 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   288
+++ new/key.c	2015-04-01 02:05:27.074044366 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   289
@@ -89,8 +89,10 @@ key_new(int type)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   290
 	k->dsa = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   291
 	k->rsa = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   292
 	k->cert = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   293
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   294
 	k->ed25519_sk = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   295
 	k->ed25519_pk = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   296
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   297
 	switch (k->type) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   298
 	case KEY_RSA1:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   299
 	case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   300
@@ -125,10 +127,12 @@ key_new(int type)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   301
 		/* Cannot do anything until we know the group */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   302
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   303
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   304
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   305
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   306
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   307
 		/* no need to prealloc */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   308
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   309
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   310
 	case KEY_UNSPEC:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   311
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   312
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   313
@@ -173,10 +177,12 @@ key_add_private(Key *k)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   314
 	case KEY_ECDSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   315
 		/* Cannot do anything until we know the group */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   316
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   317
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   318
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   319
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   320
 		/* no need to prealloc */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   321
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   322
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   323
 	case KEY_UNSPEC:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   324
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   325
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   326
@@ -239,6 +245,7 @@ key_free(Key *k)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   327
 		k->ecdsa = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   328
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   329
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   330
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   331
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   332
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   333
 		if (k->ed25519_pk) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   334
@@ -252,6 +259,7 @@ key_free(Key *k)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   335
 			k->ed25519_sk = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   336
 		}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   337
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   338
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   339
 	case KEY_UNSPEC:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   340
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   341
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   342
@@ -333,10 +341,12 @@ key_equal_public(const Key *a, const Key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   343
 		BN_CTX_free(bnctx);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   344
 		return 1;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   345
 #endif /* OPENSSL_HAS_ECC */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   346
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   347
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   348
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   349
 		return a->ed25519_pk != NULL && b->ed25519_pk != NULL &&
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   350
 		    memcmp(a->ed25519_pk, b->ed25519_pk, ED25519_PK_SZ) == 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   351
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   352
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   353
 		fatal("key_equal: bad key type %d", a->type);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   354
 	}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   355
@@ -392,7 +402,9 @@ key_fingerprint_raw(const Key *k, enum f
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   356
 	case KEY_DSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   357
 	case KEY_ECDSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   358
 	case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   359
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   360
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   361
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   362
 		key_to_blob(k, &blob, &len);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   363
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   364
 	case KEY_DSA_CERT_V00:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   365
@@ -400,7 +412,9 @@ key_fingerprint_raw(const Key *k, enum f
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   366
 	case KEY_DSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   367
 	case KEY_ECDSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   368
 	case KEY_RSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   369
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   370
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   371
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   372
 		/* We want a fingerprint of the _key_ not of the cert */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   373
 		to_blob(k, &blob, &len, 1);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   374
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   375
@@ -728,13 +742,17 @@ key_read(Key *ret, char **cpp)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   376
 	case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   377
 	case KEY_DSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   378
 	case KEY_ECDSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   379
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   380
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   381
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   382
 	case KEY_DSA_CERT_V00:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   383
 	case KEY_RSA_CERT_V00:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   384
 	case KEY_DSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   385
 	case KEY_ECDSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   386
 	case KEY_RSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   387
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   388
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   389
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   390
 		space = strchr(cp, ' ');
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   391
 		if (space == NULL) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   392
 			debug3("key_read: missing whitespace");
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   393
@@ -836,6 +854,7 @@ key_read(Key *ret, char **cpp)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   394
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   395
 		}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   396
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   397
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   398
 		if (key_type_plain(ret->type) == KEY_ED25519) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   399
 			free(ret->ed25519_pk);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   400
 			ret->ed25519_pk = k->ed25519_pk;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   401
@@ -844,6 +863,7 @@ key_read(Key *ret, char **cpp)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   402
 			/* XXX */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   403
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   404
 		}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   405
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   406
 		success = 1;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   407
 /*XXXX*/
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   408
 		key_free(k);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   409
@@ -907,11 +927,13 @@ key_write(const Key *key, FILE *f)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   410
 			return 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   411
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   412
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   413
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   414
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   415
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   416
 		if (key->ed25519_pk == NULL)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   417
 			return 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   418
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   419
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   420
 	case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   421
 	case KEY_RSA_CERT_V00:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   422
 	case KEY_RSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   423
@@ -959,7 +981,9 @@ static const struct keytype keytypes[] =
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   424
 	{ NULL, "RSA1", KEY_RSA1, 0, 0 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   425
 	{ "ssh-rsa", "RSA", KEY_RSA, 0, 0 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   426
 	{ "ssh-dss", "DSA", KEY_DSA, 0, 0 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   427
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   428
 	{ "ssh-ed25519", "ED25519", KEY_ED25519, 0, 0 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   429
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   430
 #ifdef OPENSSL_HAS_ECC
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   431
 	{ "ecdsa-sha2-nistp256", "ECDSA", KEY_ECDSA, NID_X9_62_prime256v1, 0 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   432
 	{ "ecdsa-sha2-nistp384", "ECDSA", KEY_ECDSA, NID_secp384r1, 0 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   433
@@ -983,8 +1007,10 @@ static const struct keytype keytypes[] =
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   434
 	    KEY_RSA_CERT_V00, 0, 1 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   435
 	{ "[email protected]", "DSA-CERT-V00",
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   436
 	    KEY_DSA_CERT_V00, 0, 1 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   437
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   438
 	{ "[email protected]", "ED25519-CERT",
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   439
 	    KEY_ED25519_CERT, 0, 1 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   440
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   441
 	{ "null", "null", KEY_NULL, 0, 0 },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   442
 	{ NULL, NULL, -1, -1, 0 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   443
 };
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   444
@@ -1097,7 +1123,9 @@ key_type_is_valid_ca(int type)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   445
 	case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   446
 	case KEY_DSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   447
 	case KEY_ECDSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   448
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   449
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   450
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   451
 		return 1;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   452
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   453
 		return 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   454
@@ -1117,8 +1145,10 @@ key_size(const Key *k)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   455
 	case KEY_DSA_CERT_V00:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   456
 	case KEY_DSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   457
 		return BN_num_bits(k->dsa->p);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   458
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   459
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   460
 		return 256;	/* XXX */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   461
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   462
 #ifdef OPENSSL_HAS_ECC
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   463
 	case KEY_ECDSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   464
 	case KEY_ECDSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   465
@@ -1262,11 +1292,13 @@ key_generate(int type, u_int bits)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   466
 	case KEY_RSA1:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   467
 		k->rsa = rsa_generate_private_key(bits);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   468
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   469
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   470
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   471
 		k->ed25519_pk = xmalloc(ED25519_PK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   472
 		k->ed25519_sk = xmalloc(ED25519_SK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   473
 		crypto_sign_ed25519_keypair(k->ed25519_pk, k->ed25519_sk);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   474
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   475
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   476
 	case KEY_RSA_CERT_V00:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   477
 	case KEY_DSA_CERT_V00:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   478
 	case KEY_RSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   479
@@ -1360,6 +1392,7 @@ key_from_private(const Key *k)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   480
 		    (BN_copy(n->rsa->e, k->rsa->e) == NULL))
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   481
 			fatal("key_from_private: BN_copy failed");
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   482
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   483
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   484
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   485
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   486
 		n = key_new(k->type);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   487
@@ -1368,6 +1401,7 @@ key_from_private(const Key *k)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   488
 			memcpy(n->ed25519_pk, k->ed25519_pk, ED25519_PK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   489
 		}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   490
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   491
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   492
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   493
 		fatal("key_from_private: unknown type %d", k->type);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   494
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   495
@@ -1629,6 +1663,7 @@ key_from_blob2(const u_char *blob, u_int
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   496
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   497
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   498
 #endif /* OPENSSL_HAS_ECC */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   499
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   500
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   501
 		(void)buffer_get_string_ptr_ret(&b, NULL); /* Skip nonce */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   502
 		/* FALLTHROUGH */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   503
@@ -1646,6 +1681,7 @@ key_from_blob2(const u_char *blob, u_int
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   504
 		key->ed25519_pk = pk;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   505
 		pk = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   506
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   507
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   508
 	case KEY_UNSPEC:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   509
 		key = key_new(type);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   510
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   511
@@ -1700,7 +1736,9 @@ to_blob(const Key *key, u_char **blobp,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   512
 	case KEY_DSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   513
 	case KEY_ECDSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   514
 	case KEY_RSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   515
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   516
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   517
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   518
 		/* Use the existing blob */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   519
 		buffer_append(&b, buffer_ptr(&key->cert->certblob),
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   520
 		    buffer_len(&key->cert->certblob));
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   521
@@ -1728,11 +1766,13 @@ to_blob(const Key *key, u_char **blobp,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   522
 		buffer_put_bignum2(&b, key->rsa->e);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   523
 		buffer_put_bignum2(&b, key->rsa->n);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   524
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   525
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   526
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   527
 		buffer_put_cstring(&b,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   528
 		    key_ssh_name_from_type_nid(type, key->ecdsa_nid));
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   529
 		buffer_put_string(&b, key->ed25519_pk, ED25519_PK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   530
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   531
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   532
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   533
 		error("key_to_blob: unsupported key type %d", key->type);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   534
 		buffer_free(&b);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   535
@@ -1776,9 +1816,11 @@ key_sign(
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   536
 	case KEY_RSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   537
 	case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   538
 		return ssh_rsa_sign(key, sigp, lenp, data, datalen);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   539
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   540
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   541
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   542
 		return ssh_ed25519_sign(key, sigp, lenp, data, datalen);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   543
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   544
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   545
 		error("key_sign: invalid key type %d", key->type);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   546
 		return -1;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   547
@@ -1812,9 +1854,11 @@ key_verify(
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   548
 	case KEY_RSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   549
 	case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   550
 		return ssh_rsa_verify(key, signature, signaturelen, data, datalen);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   551
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   552
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   553
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   554
 		return ssh_ed25519_verify(key, signature, signaturelen, data, datalen);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   555
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   556
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   557
 		error("key_verify: invalid key type %d", key->type);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   558
 		return -1;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   559
@@ -1834,8 +1878,10 @@ key_demote(const Key *k)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   560
 	pk->dsa = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   561
 	pk->ecdsa = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   562
 	pk->rsa = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   563
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   564
 	pk->ed25519_pk = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   565
 	pk->ed25519_sk = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   566
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   567
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   568
 	switch (k->type) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   569
 	case KEY_RSA_CERT_V00:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   570
@@ -1879,6 +1925,7 @@ key_demote(const Key *k)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   571
 			fatal("key_demote: EC_KEY_set_public_key failed");
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   572
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   573
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   574
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   575
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   576
 		key_cert_copy(k, pk);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   577
 		/* FALLTHROUGH */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   578
@@ -1888,6 +1935,7 @@ key_demote(const Key *k)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   579
 			memcpy(pk->ed25519_pk, k->ed25519_pk, ED25519_PK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   580
 		}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   581
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   582
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   583
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   584
 		fatal("key_demote: bad key type %d", k->type);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   585
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   586
@@ -1917,8 +1965,10 @@ key_type_plain(int type)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   587
 		return KEY_DSA;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   588
 	case KEY_ECDSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   589
 		return KEY_ECDSA;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   590
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   591
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   592
 		return KEY_ED25519;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   593
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   594
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   595
 		return type;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   596
 	}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   597
@@ -1944,6 +1994,7 @@ key_to_certified(Key *k, int legacy)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   598
 		k->cert = cert_new();
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   599
 		k->type = KEY_ECDSA_CERT;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   600
 		return 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   601
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   602
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   603
 		if (legacy)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   604
 			fatal("%s: legacy ED25519 certificates are not "
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   605
@@ -1951,6 +2002,7 @@ key_to_certified(Key *k, int legacy)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   606
 		k->cert = cert_new();
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   607
 		k->type = KEY_ED25519_CERT;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   608
 		return 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   609
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   610
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   611
 		error("%s: key has incorrect type %s", __func__, key_type(k));
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   612
 		return -1;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   613
@@ -2029,10 +2081,12 @@ key_certify(Key *k, Key *ca)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   614
 		buffer_put_bignum2(&k->cert->certblob, k->rsa->e);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   615
 		buffer_put_bignum2(&k->cert->certblob, k->rsa->n);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   616
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   617
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   618
 	case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   619
 		buffer_put_string(&k->cert->certblob,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   620
 		    k->ed25519_pk, ED25519_PK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   621
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   622
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   623
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   624
 		error("%s: key has incorrect type %s", __func__, key_type(k));
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   625
 		buffer_clear(&k->cert->certblob);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   626
@@ -2450,6 +2504,7 @@ key_private_serialize(const Key *key, Bu
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   627
 		buffer_put_bignum2(b, EC_KEY_get0_private_key(key->ecdsa));
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   628
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   629
 #endif /* OPENSSL_HAS_ECC */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   630
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   631
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   632
 		buffer_put_string(b, key->ed25519_pk, ED25519_PK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   633
 		buffer_put_string(b, key->ed25519_sk, ED25519_SK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   634
@@ -2462,6 +2517,7 @@ key_private_serialize(const Key *key, Bu
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   635
 		buffer_put_string(b, key->ed25519_pk, ED25519_PK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   636
 		buffer_put_string(b, key->ed25519_sk, ED25519_SK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   637
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   638
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   639
 	}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   640
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   641
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   642
@@ -2576,6 +2632,7 @@ key_private_deserialize(Buffer *blob)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   643
 		buffer_get_bignum2(blob, k->rsa->p);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   644
 		buffer_get_bignum2(blob, k->rsa->q);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   645
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   646
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   647
 	case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   648
 		k = key_new_private(type);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   649
 		k->ed25519_pk = buffer_get_string(blob, &pklen);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   650
@@ -2602,6 +2659,7 @@ key_private_deserialize(Buffer *blob)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   651
 			fatal("%s: ed25519 sklen %d != %d",
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   652
 			    __func__, sklen, ED25519_SK_SZ);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   653
 		break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   654
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   655
 	default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   656
 		free(type_name);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   657
 		buffer_clear(blob);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   658
diff -pur old/key.h new/key.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   659
--- old/key.h	2015-03-31 21:14:02.432362912 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   660
+++ new/key.h	2015-04-01 02:07:01.018270150 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   661
@@ -39,11 +39,15 @@ enum types {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   662
 	KEY_RSA,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   663
 	KEY_DSA,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   664
 	KEY_ECDSA,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   665
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   666
 	KEY_ED25519,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   667
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   668
 	KEY_RSA_CERT,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   669
 	KEY_DSA_CERT,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   670
 	KEY_ECDSA_CERT,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   671
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   672
 	KEY_ED25519_CERT,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   673
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   674
 	KEY_RSA_CERT_V00,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   675
 	KEY_DSA_CERT_V00,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   676
 	KEY_NULL,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   677
@@ -89,12 +93,16 @@ struct Key {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   678
 	void	*ecdsa;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   679
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   680
 	struct KeyCert *cert;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   681
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   682
 	u_char	*ed25519_sk;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   683
 	u_char	*ed25519_pk;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   684
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   685
 };
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   686
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   687
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   688
 #define	ED25519_SK_SZ	crypto_sign_ed25519_SECRETKEYBYTES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   689
 #define	ED25519_PK_SZ	crypto_sign_ed25519_PUBLICKEYBYTES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   690
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   691
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   692
 Key		*key_new(int);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   693
 void		 key_add_private(Key *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   694
@@ -153,8 +161,10 @@ int	 ssh_ecdsa_sign(const Key *, u_char
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   695
 int	 ssh_ecdsa_verify(const Key *, const u_char *, u_int, const u_char *, u_int);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   696
 int	 ssh_rsa_sign(const Key *, u_char **, u_int *, const u_char *, u_int);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   697
 int	 ssh_rsa_verify(const Key *, const u_char *, u_int, const u_char *, u_int);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   698
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   699
 int	 ssh_ed25519_sign(const Key *, u_char **, u_int *, const u_char *, u_int);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   700
 int	 ssh_ed25519_verify(const Key *, const u_char *, u_int, const u_char *, u_int);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   701
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   702
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   703
 #if defined(OPENSSL_HAS_ECC) && (defined(DEBUG_KEXECDH) || defined(DEBUG_PK))
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   704
 void	key_dump_ec_point(const EC_GROUP *, const EC_POINT *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   705
diff -pur old/monitor.c new/monitor.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   706
--- old/monitor.c	2015-03-31 21:14:02.433735148 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   707
+++ new/monitor.c	2015-04-01 04:54:56.314967559 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   708
@@ -1902,7 +1902,9 @@ mm_get_kex(Buffer *m)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   709
 	kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   710
 	kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   711
 	kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   712
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   713
 	kex->kex[KEX_C25519_SHA256] = kexc25519_server;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   714
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   715
 #ifdef GSSAPI
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   716
 	if (options.gss_keyex) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   717
 		kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   718
diff -pur old/myproposal.h new/myproposal.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   719
--- old/myproposal.h	2013-12-06 16:24:02.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   720
+++ new/myproposal.h	2015-04-01 02:12:36.430101847 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   721
@@ -80,6 +80,24 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   722
 # define SHA2_HMAC_MODES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   723
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   724
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   725
+#ifdef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   726
+# define KEX_DEFAULT_KEX \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   727
+	KEX_ECDH_METHODS \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   728
+	KEX_SHA256_METHODS \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   729
+	"diffie-hellman-group-exchange-sha1," \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   730
+	"diffie-hellman-group14-sha1," \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   731
+	"diffie-hellman-group1-sha1"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   732
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   733
+#define	KEX_DEFAULT_PK_ALG	\
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   734
+	HOSTKEY_ECDSA_CERT_METHODS \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   735
+	"[email protected]," \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   736
+	"[email protected]," \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   737
+	"[email protected]," \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   738
+	"[email protected]," \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   739
+	HOSTKEY_ECDSA_METHODS \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   740
+	"ssh-rsa," \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   741
+	"ssh-dss"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   742
+#else /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   743
 # define KEX_DEFAULT_KEX \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   744
 	KEX_CURVE25519_METHODS \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   745
 	KEX_ECDH_METHODS \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   746
@@ -99,6 +117,7 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   747
 	"ssh-ed25519," \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   748
 	"ssh-rsa," \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   749
 	"ssh-dss"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   750
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   751
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   752
 /* the actual algorithms */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   753
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   754
diff -pur old/openbsd-compat/Makefile.in new/openbsd-compat/Makefile.in
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   755
--- old/openbsd-compat/Makefile.in	2013-12-06 17:37:54.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   756
+++ new/openbsd-compat/Makefile.in	2015-04-02 02:29:35.165103300 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   757
@@ -18,7 +18,7 @@ LDFLAGS=-L. @LDFLAGS@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   758
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   759
 OPENBSD=base64.o basename.o bcrypt_pbkdf.o bindresvport.o blowfish.o daemon.o dirname.o fmt_scaled.o getcwd.o getgrouplist.o getopt_long.o getrrsetbyname.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o pwcache.o readpassphrase.o realpath.o rresvport.o setenv.o setproctitle.o sha2.o sigact.o strlcat.o strlcpy.o strmode.o strnlen.o strptime.o strsep.o strtonum.o strtoll.o strtoul.o strtoull.o timingsafe_bcmp.o vis.o blowfish.o bcrypt_pbkdf.o
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   760
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   761
-COMPAT=arc4random.o bsd-asprintf.o bsd-closefrom.o bsd-cray.o bsd-cygwin_util.o bsd-getpeereid.o getrrsetbyname-ldns.o bsd-misc.o bsd-nextstep.o bsd-openpty.o bsd-poll.o bsd-setres_id.o bsd-snprintf.o bsd-statvfs.o bsd-waitpid.o fake-rfc2553.o openssl-compat.o xmmap.o xcrypt.o
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   762
+COMPAT=arc4random.o bsd-asprintf.o bsd-closefrom.o bsd-cray.o bsd-cygwin_util.o bsd-getpeereid.o getrrsetbyname-ldns.o bsd-misc.o bsd-nextstep.o bsd-openpty.o bsd-poll.o bsd-setres_id.o bsd-snprintf.o bsd-statvfs.o bsd-waitpid.o fake-rfc2553.o openssl-compat.o xmmap.o xcrypt.o 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   763
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   764
 PORTS=port-aix.o port-irix.o port-linux.o port-solaris.o port-tun.o port-uw.o
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   765
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   766
@@ -32,7 +32,7 @@ $(OPENBSD): ../config.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   767
 $(PORTS): ../config.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   768
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   769
 libopenbsd-compat.a:  $(COMPAT) $(OPENBSD) $(PORTS)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   770
-	$(AR) rv $@ $(COMPAT) $(OPENBSD) $(PORTS)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   771
+	$(AR) rv $@ $(COMPAT) $(OPENBSD) $(PORTS) ../hash.o ../blocks.o
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   772
 	$(RANLIB) $@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   773
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   774
 clean:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   775
diff -pur old/pathnames.h new/pathnames.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   776
--- old/pathnames.h	2013-12-06 16:24:02.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   777
+++ new/pathnames.h	2015-04-01 02:13:45.651827507 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   778
@@ -39,7 +39,9 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   779
 #define _PATH_HOST_KEY_FILE		SSHDIR "/ssh_host_key"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   780
 #define _PATH_HOST_DSA_KEY_FILE		SSHDIR "/ssh_host_dsa_key"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   781
 #define _PATH_HOST_ECDSA_KEY_FILE	SSHDIR "/ssh_host_ecdsa_key"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   782
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   783
 #define _PATH_HOST_ED25519_KEY_FILE	SSHDIR "/ssh_host_ed25519_key"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   784
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   785
 #define _PATH_HOST_RSA_KEY_FILE		SSHDIR "/ssh_host_rsa_key"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   786
 #define _PATH_DH_MODULI			SSHDIR "/moduli"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   787
 /* Backwards compatibility */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   788
@@ -78,7 +80,9 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   789
 #define _PATH_SSH_CLIENT_ID_DSA		_PATH_SSH_USER_DIR "/id_dsa"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   790
 #define _PATH_SSH_CLIENT_ID_ECDSA	_PATH_SSH_USER_DIR "/id_ecdsa"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   791
 #define _PATH_SSH_CLIENT_ID_RSA		_PATH_SSH_USER_DIR "/id_rsa"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   792
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   793
 #define _PATH_SSH_CLIENT_ID_ED25519	_PATH_SSH_USER_DIR "/id_ed25519"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   794
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   795
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   796
 /*
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   797
  * Configuration file in user's home directory.  This file need not be
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   798
diff -pur old/readconf.c new/readconf.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   799
--- old/readconf.c	2015-03-31 21:14:02.435957183 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   800
+++ new/readconf.c	2015-04-01 02:14:22.222135058 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   801
@@ -1715,8 +1715,10 @@ fill_default_options(Options * options)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   802
 			add_identity_file(options, "~/",
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   803
 			    _PATH_SSH_CLIENT_ID_ECDSA, 0);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   804
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   805
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   806
 			add_identity_file(options, "~/",
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   807
 			    _PATH_SSH_CLIENT_ID_ED25519, 0);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   808
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   809
 		}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   810
 	}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   811
 	if (options->escape_char == -1)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   812
diff -pur old/sc25519.c new/sc25519.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   813
--- old/sc25519.c	2014-01-16 17:43:44.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   814
+++ new/sc25519.c	2015-04-01 03:46:19.162528358 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   815
@@ -6,6 +6,8 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   816
  * Copied from supercop-20130419/crypto_sign/ed25519/ref/sc25519.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   817
  */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   818
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   819
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   820
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   821
 #include "includes.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   822
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   823
 #include "sc25519.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   824
@@ -306,3 +308,5 @@ void sc25519_2interleave2(unsigned char
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   825
   r[125] = ((s1->v[31] >> 2) & 3) ^ (((s2->v[31] >> 2) & 3) << 2);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   826
   r[126] = ((s1->v[31] >> 4) & 3) ^ (((s2->v[31] >> 4) & 3) << 2);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   827
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   828
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   829
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   830
diff -pur old/sc25519.h new/sc25519.h
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   831
--- old/sc25519.h	2013-12-17 22:48:11.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   832
+++ new/sc25519.h	2015-04-01 03:45:37.633735864 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   833
@@ -8,6 +8,7 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   834
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   835
 #ifndef SC25519_H
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   836
 #define SC25519_H
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   837
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   838
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   839
 #include "crypto_api.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   840
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   841
@@ -77,4 +78,5 @@ void sc25519_window5(signed char r[51],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   842
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   843
 void sc25519_2interleave2(unsigned char r[127], const sc25519 *s1, const sc25519 *s2);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   844
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   845
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   846
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   847
diff -pur old/servconf.c new/servconf.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   848
--- old/servconf.c	2015-03-31 21:14:02.437668507 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   849
+++ new/servconf.c	2015-04-01 02:15:09.724697791 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   850
@@ -190,8 +190,10 @@ fill_default_server_options(ServerOption
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   851
 			options->host_key_files[options->num_host_key_files++] =
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   852
 			    _PATH_HOST_ECDSA_KEY_FILE;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   853
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   854
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   855
 			options->host_key_files[options->num_host_key_files++] =
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   856
 			    _PATH_HOST_ED25519_KEY_FILE;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   857
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   858
 		}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   859
 	}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   860
 	/* No certificates by default */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   861
diff -pur old/smult_curve25519_ref.c new/smult_curve25519_ref.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   862
--- old/smult_curve25519_ref.c	2013-11-03 13:26:53.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   863
+++ new/smult_curve25519_ref.c	2015-04-01 04:55:30.360761627 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   864
@@ -6,6 +6,8 @@ Public domain.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   865
 Derived from public domain code by D. J. Bernstein.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   866
 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   867
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   868
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   869
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   870
 int crypto_scalarmult_curve25519(unsigned char *, const unsigned char *, const unsigned char *);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   871
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   872
 static void add(unsigned int out[32],const unsigned int a[32],const unsigned int b[32])
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   873
@@ -263,3 +265,5 @@ int crypto_scalarmult_curve25519(unsigne
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   874
   for (i = 0;i < 32;++i) q[i] = work[64 + i];
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   875
   return 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   876
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   877
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   878
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   879
diff -pur old/ssh-add.0 new/ssh-add.0
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   880
--- old/ssh-add.0	2014-01-29 17:52:47.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   881
+++ new/ssh-add.0	2015-04-02 08:18:24.840811117 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   882
@@ -11,7 +11,7 @@ SYNOPSIS
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   883
 DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   884
      ssh-add adds private key identities to the authentication agent,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   885
      ssh-agent(1).  When run without arguments, it adds the files
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   886
-     ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   887
+     ~/.ssh/id_rsa, ~/.ssh/id_dsa and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   888
      ~/.ssh/identity.  After loading a private key, ssh-add will try to load
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   889
      corresponding certificate information from the filename obtained by
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   890
      appending -cert.pub to the name of the private key file.  Alternative
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   891
@@ -91,14 +91,6 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   892
              Contains the protocol version 2 DSA authentication identity of
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   893
              the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   894
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   895
-     ~/.ssh/id_ecdsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   896
-             Contains the protocol version 2 ECDSA authentication identity of
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   897
-             the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   898
-
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   899
-     ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   900
-             Contains the protocol version 2 ED25519 authentication identity
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   901
-             of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   902
-
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   903
      ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   904
              Contains the protocol version 2 RSA authentication identity of
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   905
              the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   906
diff -pur old/ssh-add.1 new/ssh-add.1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   907
--- old/ssh-add.1	2013-12-17 22:46:28.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   908
+++ new/ssh-add.1	2015-04-02 08:11:00.150982710 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   909
@@ -57,8 +57,6 @@ adds private key identities to the authe
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   910
 When run without arguments, it adds the files
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   911
 .Pa ~/.ssh/id_rsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   912
 .Pa ~/.ssh/id_dsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   913
-.Pa ~/.ssh/id_ecdsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   914
-.Pa ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   915
 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   916
 .Pa ~/.ssh/identity .
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   917
 After loading a private key,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   918
@@ -168,10 +166,6 @@ socket used to communicate with the agen
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   919
 Contains the protocol version 1 RSA authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   920
 .It Pa ~/.ssh/id_dsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   921
 Contains the protocol version 2 DSA authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   922
-.It Pa ~/.ssh/id_ecdsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   923
-Contains the protocol version 2 ECDSA authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   924
-.It Pa ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   925
-Contains the protocol version 2 ED25519 authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   926
 .It Pa ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   927
 Contains the protocol version 2 RSA authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   928
 .El
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   929
diff -pur old/ssh-add.c new/ssh-add.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   930
--- old/ssh-add.c	2013-12-28 22:44:07.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   931
+++ new/ssh-add.c	2015-04-01 04:55:52.619415360 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   932
@@ -73,7 +73,9 @@ static char *default_files[] = {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   933
 #ifdef OPENSSL_HAS_ECC
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   934
 	_PATH_SSH_CLIENT_ID_ECDSA,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   935
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   936
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   937
 	_PATH_SSH_CLIENT_ID_ED25519,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   938
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   939
 	_PATH_SSH_CLIENT_IDENTITY,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   940
 	NULL
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   941
 };
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   942
diff -pur old/ssh-agent.0 new/ssh-agent.0
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   943
--- old/ssh-agent.0	2014-01-29 17:52:47.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   944
+++ new/ssh-agent.0	2015-04-02 08:18:54.504859476 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   945
@@ -9,7 +9,7 @@ SYNOPSIS
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   946
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   947
 DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   948
      ssh-agent is a program to hold private keys used for public key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   949
-     authentication (RSA, DSA, ECDSA, ED25519).  The idea is that ssh-agent is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   950
+     authentication (RSA, DSA).  The idea is that ssh-agent is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   951
      started in the beginning of an X-session or a login session, and all
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   952
      other windows or programs are started as clients to the ssh-agent
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   953
      program.  Through use of environment variables the agent can be located
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   954
@@ -46,8 +46,8 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   955
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   956
      The agent initially does not have any private keys.  Keys are added using
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   957
      ssh-add(1).  When executed without arguments, ssh-add(1) adds the files
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   958
-     ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   959
-     ~/.ssh/identity.  If the identity has a passphrase, ssh-add(1) asks for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   960
+     ~/.ssh/id_rsa, ~/.ssh/id_dsa ~/.ssh/identity.  
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   961
+     If the identity has a passphrase, ssh-add(1) asks for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   962
      the passphrase on the terminal if it has one or from a small X11 program
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   963
      if running under X11.  If neither of these is the case then the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   964
      authentication will fail.  It then sends the identity to the agent.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   965
@@ -97,14 +97,6 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   966
              Contains the protocol version 2 DSA authentication identity of
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   967
              the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   968
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   969
-     ~/.ssh/id_ecdsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   970
-             Contains the protocol version 2 ECDSA authentication identity of
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   971
-             the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   972
-
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   973
-     ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   974
-             Contains the protocol version 2 ED25519 authentication identity
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   975
-             of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   976
-
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   977
      ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   978
              Contains the protocol version 2 RSA authentication identity of
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   979
              the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   980
diff -pur old/ssh-agent.1 new/ssh-agent.1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   981
--- old/ssh-agent.1	2013-12-17 22:46:28.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   982
+++ new/ssh-agent.1	2015-04-02 08:11:35.139725778 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   983
@@ -53,7 +53,7 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   984
 .Sh DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   985
 .Nm
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   986
 is a program to hold private keys used for public key authentication
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   987
-(RSA, DSA, ECDSA, ED25519).
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   988
+(RSA, DSA).
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   989
 The idea is that
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   990
 .Nm
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   991
 is started in the beginning of an X-session or a login session, and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   992
@@ -114,9 +114,7 @@ When executed without arguments,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   993
 .Xr ssh-add 1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   994
 adds the files
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   995
 .Pa ~/.ssh/id_rsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   996
-.Pa ~/.ssh/id_dsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   997
-.Pa ~/.ssh/id_ecdsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   998
-.Pa ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   999
+.Pa ~/.ssh/id_dsa 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1000
 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1001
 .Pa ~/.ssh/identity .
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1002
 If the identity has a passphrase,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1003
@@ -189,10 +187,6 @@ line terminates.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1004
 Contains the protocol version 1 RSA authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1005
 .It Pa ~/.ssh/id_dsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1006
 Contains the protocol version 2 DSA authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1007
-.It Pa ~/.ssh/id_ecdsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1008
-Contains the protocol version 2 ECDSA authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1009
-.It Pa ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1010
-Contains the protocol version 2 ED25519 authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1011
 .It Pa ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1012
 Contains the protocol version 2 RSA authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1013
 .It Pa $TMPDIR/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1014
diff -pur old/ssh-ed25519.c new/ssh-ed25519.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1015
--- old/ssh-ed25519.c	2013-12-06 17:37:54.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1016
+++ new/ssh-ed25519.c	2015-04-01 03:45:52.747724716 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1017
@@ -15,6 +15,8 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1018
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1019
  */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1020
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1021
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1022
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1023
 #include "includes.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1024
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1025
 #include <sys/types.h>
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1026
@@ -141,3 +143,5 @@ ssh_ed25519_verify(const Key *key, const
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1027
 	/* translate return code carefully */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1028
 	return (ret == 0) ? 1 : -1;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1029
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1030
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1031
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1032
diff -pur old/ssh-keygen.0 new/ssh-keygen.0
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1033
--- old/ssh-keygen.0	2014-01-29 17:52:47.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1034
+++ new/ssh-keygen.0	2015-04-02 08:01:54.866988427 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1035
@@ -32,7 +32,7 @@ SYNOPSIS
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1036
 DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1037
      ssh-keygen generates, manages and converts authentication keys for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1038
      ssh(1).  ssh-keygen can create RSA keys for use by SSH protocol version 1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1039
-     and DSA, ECDSA, ED25519 or RSA keys for use by SSH protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1040
+     and DSA or RSA keys for use by SSH protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1041
      The type of key to be generated is specified with the -t option.  If
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1042
      invoked without any arguments, ssh-keygen will generate an RSA key for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1043
      use in SSH protocol 2 connections.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1044
@@ -46,7 +46,7 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1045
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1046
      Normally each user wishing to use SSH with public key authentication runs
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1047
      this once to create the authentication key in ~/.ssh/identity,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1048
-     ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 or ~/.ssh/id_rsa.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1049
+     ~/.ssh/id_dsa or ~/.ssh/id_rsa.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1050
      Additionally, the system administrator may use this to generate host
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1051
      keys, as seen in /etc/rc.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1052
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1053
@@ -79,14 +79,14 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1054
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1055
      The options are as follows:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1056
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1057
-     -A      For each of the key types (rsa1, rsa, dsa, ecdsa and ed25519) for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1058
+     -A      For each of the key types (rsa1, rsa, and dsa) for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1059
              which host keys do not exist, generate the host keys with the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1060
              default key file path, an empty passphrase, default bits for the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1061
              key type, and default comment.  This is used by /etc/rc to
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1062
              generate new host keys.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1063
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1064
      -a rounds
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1065
-             When saving a new-format private key (i.e. an ed25519 key or any
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1066
+             When saving a new-format private key (i.e. any
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1067
              SSH protocol 2 key when the -o flag is set), this option
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1068
              specifies the number of KDF (key derivation function) rounds
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1069
              used.  Higher numbers result in slower passphrase verification
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1070
@@ -103,12 +103,7 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1071
              Specifies the number of bits in the key to create.  For RSA keys,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1072
              the minimum size is 768 bits and the default is 2048 bits.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1073
              Generally, 2048 bits is considered sufficient.  DSA keys must be
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1074
-             exactly 1024 bits as specified by FIPS 186-2.  For ECDSA keys,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1075
-             the -b flag determines the key length by selecting from one of
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1076
-             three elliptic curve sizes: 256, 384 or 521 bits.  Attempting to
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1077
-             use bit lengths other than these three values for ECDSA keys will
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1078
-             fail.  ED25519 keys have a fixed length and the -b flag will be
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1079
-             ignored.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1080
+             exactly 1024 bits as specified by FIPS 186-2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1081
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1082
      -C comment
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1083
              Provides a new comment.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1084
@@ -274,7 +269,7 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1085
              new OpenSSH format rather than the more compatible PEM format.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1086
              The new format has increased resistance to brute-force password
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1087
              cracking but is not supported by versions of OpenSSH prior to
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1088
-             6.5.  Ed25519 keys always use the new private key format.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1089
+             6.5.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1090
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1091
      -P passphrase
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1092
              Provides the (old) passphrase.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1093
@@ -315,8 +310,8 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1094
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1095
      -t type
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1096
              Specifies the type of key to create.  The possible values are
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1097
-             ``rsa1'' for protocol version 1 and ``dsa'', ``ecdsa'',
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1098
-             ``ed25519'', or ``rsa'' for protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1099
+             ``rsa1'' for protocol version 1 and ``dsa'' or ``rsa'' for 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1100
+             protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1101
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1102
      -u      Update a KRL.  When specified with -k, keys listed via the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1103
              command line are added to the existing KRL rather than a new KRL
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1104
@@ -521,10 +516,8 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1105
              contents of this file secret.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1106
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1107
      ~/.ssh/id_dsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1108
-     ~/.ssh/id_ecdsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1109
-     ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1110
      ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1111
-             Contains the protocol version 2 DSA, ECDSA, ED25519 or RSA
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1112
+             Contains the protocol version 2 DSA or RSA
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1113
              authentication identity of the user.  This file should not be
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1114
              readable by anyone but the user.  It is possible to specify a
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1115
              passphrase when generating the key; that passphrase will be used
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1116
@@ -534,10 +527,8 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1117
              read this file when a login attempt is made.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1118
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1119
      ~/.ssh/id_dsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1120
-     ~/.ssh/id_ecdsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1121
-     ~/.ssh/id_ed25519.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1122
      ~/.ssh/id_rsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1123
-             Contains the protocol version 2 DSA, ECDSA, ED25519 or RSA public
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1124
+             Contains the protocol version 2 DSA or RSA public
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1125
              key for authentication.  The contents of this file should be
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1126
              added to ~/.ssh/authorized_keys on all machines where the user
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1127
              wishes to log in using public key authentication.  There is no
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1128
diff -pur old/ssh-keygen.1 new/ssh-keygen.1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1129
--- old/ssh-keygen.1	2013-12-28 22:47:14.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1130
+++ new/ssh-keygen.1	2015-04-02 08:13:41.714356008 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1131
@@ -140,7 +140,7 @@ generates, manages and converts authenti
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1132
 .Xr ssh 1 .
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1133
 .Nm
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1134
 can create RSA keys for use by SSH protocol version 1 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1135
-DSA, ECDSA, ED25519 or RSA keys for use by SSH protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1136
+DSA or RSA keys for use by SSH protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1137
 The type of key to be generated is specified with the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1138
 .Fl t
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1139
 option.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1140
@@ -168,8 +168,6 @@ with public key authentication runs this
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1141
 key in
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1142
 .Pa ~/.ssh/identity ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1143
 .Pa ~/.ssh/id_dsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1144
-.Pa ~/.ssh/id_ecdsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1145
-.Pa ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1146
 or
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1147
 .Pa ~/.ssh/id_rsa .
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1148
 Additionally, the system administrator may use this to generate host keys,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1149
@@ -217,7 +215,7 @@ should be placed to be activated.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1150
 The options are as follows:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1151
 .Bl -tag -width Ds
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1152
 .It Fl A
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1153
-For each of the key types (rsa1, rsa, dsa, ecdsa and ed25519)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1154
+For each of the key types (rsa1, rsa, dsa)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1155
 for which host keys
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1156
 do not exist, generate the host keys with the default key file path,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1157
 an empty passphrase, default bits for the key type, and default comment.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1158
@@ -225,8 +223,7 @@ This is used by
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1159
 .Pa /etc/rc
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1160
 to generate new host keys.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1161
 .It Fl a Ar rounds
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1162
-When saving a new-format private key (i.e. an ed25519 key or any SSH protocol
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1163
-2 key when the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1164
+When saving a new-format private key (i.e. any SSH protocol 2 key when the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1165
 .Fl o
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1166
 flag is set), this option specifies the number of KDF (key derivation function)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1167
 rounds used.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1168
@@ -245,15 +242,6 @@ Specifies the number of bits in the key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1169
 For RSA keys, the minimum size is 768 bits and the default is 2048 bits.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1170
 Generally, 2048 bits is considered sufficient.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1171
 DSA keys must be exactly 1024 bits as specified by FIPS 186-2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1172
-For ECDSA keys, the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1173
-.Fl b
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1174
-flag determines the key length by selecting from one of three elliptic
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1175
-curve sizes: 256, 384 or 521 bits.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1176
-Attempting to use bit lengths other than these three values for ECDSA keys
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1177
-will fail.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1178
-ED25519 keys have a fixed length and the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1179
-.Fl b
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1180
-flag will be ignored.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1181
 .It Fl C Ar comment
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1182
 Provides a new comment.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1183
 .It Fl c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1184
@@ -468,7 +456,6 @@ to save SSH protocol 2 private keys usin
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1185
 the more compatible PEM format.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1186
 The new format has increased resistance to brute-force password cracking
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1187
 but is not supported by versions of OpenSSH prior to 6.5.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1188
-Ed25519 keys always use the new private key format.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1189
 .It Fl P Ar passphrase
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1190
 Provides the (old) passphrase.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1191
 .It Fl p
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1192
@@ -520,8 +507,6 @@ The possible values are
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1193
 .Dq rsa1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1194
 for protocol version 1 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1195
 .Dq dsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1196
-.Dq ecdsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1197
-.Dq ed25519 ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1198
 or
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1199
 .Dq rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1200
 for protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1201
@@ -800,10 +785,8 @@ where the user wishes to log in using RS
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1202
 There is no need to keep the contents of this file secret.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1203
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1204
 .It Pa ~/.ssh/id_dsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1205
-.It Pa ~/.ssh/id_ecdsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1206
-.It Pa ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1207
 .It Pa ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1208
-Contains the protocol version 2 DSA, ECDSA, ED25519 or RSA
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1209
+Contains the protocol version 2 DSA or RSA
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1210
 authentication identity of the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1211
 This file should not be readable by anyone but the user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1212
 It is possible to
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1213
@@ -816,10 +799,8 @@ but it is offered as the default file fo
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1214
 will read this file when a login attempt is made.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1215
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1216
 .It Pa ~/.ssh/id_dsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1217
-.It Pa ~/.ssh/id_ecdsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1218
-.It Pa ~/.ssh/id_ed25519.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1219
 .It Pa ~/.ssh/id_rsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1220
-Contains the protocol version 2 DSA, ECDSA, ED25519 or RSA
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1221
+Contains the protocol version 2 DSA or RSA
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1222
 public key for authentication.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1223
 The contents of this file should be added to
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1224
 .Pa ~/.ssh/authorized_keys
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1225
diff -pur old/ssh-keygen.c new/ssh-keygen.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1226
--- old/ssh-keygen.c	2013-12-06 16:24:02.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1227
+++ new/ssh-keygen.c	2015-04-01 02:26:11.265143754 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1228
@@ -197,7 +197,11 @@ type_bits_valid(int type, u_int32_t *bit
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1229
 	}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1230
 	if (type == KEY_DSA && *bitsp != 1024)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1231
 		fatal("DSA keys must be 1024 bits");
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1232
+#ifdef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1233
+	else if (type != KEY_ECDSA && *bitsp < 768)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1234
+#else /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1235
 	else if (type != KEY_ECDSA && type != KEY_ED25519 && *bitsp < 768)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1236
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1237
 		fatal("Key must at least be 768 bits");
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1238
 	else if (type == KEY_ECDSA && key_ecdsa_bits_to_nid(*bitsp) == -1)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1239
 		fatal("Invalid ECDSA key length - valid lengths are "
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1240
@@ -233,10 +237,12 @@ ask_filename(struct passwd *pw, const ch
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1241
 		case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1242
 			name = _PATH_SSH_CLIENT_ID_RSA;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1243
 			break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1244
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1245
 		case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1246
 		case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1247
 			name = _PATH_SSH_CLIENT_ID_ED25519;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1248
 			break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1249
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1250
 		default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1251
 			fprintf(stderr, "bad key type\n");
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1252
 			exit(1);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1253
@@ -900,7 +906,9 @@ do_gen_all_hostkeys(struct passwd *pw)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1254
 #ifdef OPENSSL_HAS_ECC
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1255
 		{ "ecdsa", "ECDSA",_PATH_HOST_ECDSA_KEY_FILE },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1256
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1257
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1258
 		{ "ed25519", "ED25519",_PATH_HOST_ED25519_KEY_FILE },
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1259
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1260
 		{ NULL, NULL, NULL }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1261
 	};
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1262
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1263
@@ -1616,7 +1624,10 @@ do_ca_sign(struct passwd *pw, int argc,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1264
 		if ((public = key_load_public(tmp, &comment)) == NULL)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1265
 			fatal("%s: unable to open \"%s\"", __func__, tmp);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1266
 		if (public->type != KEY_RSA && public->type != KEY_DSA &&
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1267
-		    public->type != KEY_ECDSA && public->type != KEY_ED25519)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1268
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1269
+		    public->type != KEY_ED25519 &&
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1270
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1271
+		    public->type != KEY_ECDSA)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1272
 			fatal("%s: key \"%s\" type %s cannot be certified",
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1273
 			    __func__, tmp, key_type(public));
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1274
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1275
diff -pur old/ssh-keyscan.0 new/ssh-keyscan.0
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1276
--- old/ssh-keyscan.0	2014-01-29 17:52:47.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1277
+++ new/ssh-keyscan.0	2015-04-02 08:03:08.223476077 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1278
@@ -48,9 +48,9 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1279
      -t type
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1280
              Specifies the type of the key to fetch from the scanned hosts.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1281
              The possible values are ``rsa1'' for protocol version 1 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1282
-             ``dsa'', ``ecdsa'', ``ed25519'', or ``rsa'' for protocol version
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1283
+             ``dsa'' or ``rsa'' for protocol version
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1284
              2.  Multiple values may be specified by separating them with
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1285
-             commas.  The default is to fetch ``rsa'' and ``ecdsa'' keys.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1286
+             commas.  The default is to fetch ``rsa'' keys.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1287
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1288
      -v      Verbose mode.  Causes ssh-keyscan to print debugging messages
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1289
              about its progress.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1290
@@ -72,12 +72,11 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1291
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1292
      host-or-namelist bits exponent modulus
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1293
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1294
-     Output format for rsa, dsa and ecdsa keys:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1295
+     Output format for rsa and dsa keys:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1296
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1297
      host-or-namelist keytype base64-encoded-key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1298
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1299
-     Where keytype is either ``ecdsa-sha2-nistp256'', ``ecdsa-sha2-nistp384'',
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1300
-     ``ecdsa-sha2-nistp521'', ``ssh-ed25519'', ``ssh-dss'' or ``ssh-rsa''.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1301
+     Where keytype is either ``ssh-dss'' or ``ssh-rsa''.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1302
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1303
      /etc/ssh/ssh_known_hosts
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1304
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1305
@@ -89,7 +88,7 @@ EXAMPLES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1306
      Find all hosts from the file ssh_hosts which have new or different keys
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1307
      from those in the sorted file ssh_known_hosts:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1308
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1309
-     $ ssh-keyscan -t rsa,dsa,ecdsa -f ssh_hosts | \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1310
+     $ ssh-keyscan -t rsa,dsa -f ssh_hosts | \
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1311
              sort -u - ssh_known_hosts | diff ssh_known_hosts -
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1312
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1313
 SEE ALSO
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1314
diff -pur old/ssh-keyscan.1 new/ssh-keyscan.1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1315
--- old/ssh-keyscan.1	2013-12-17 22:46:28.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1316
+++ new/ssh-keyscan.1	2015-04-02 08:14:50.877137257 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1317
@@ -89,16 +89,12 @@ The possible values are
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1318
 .Dq rsa1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1319
 for protocol version 1 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1320
 .Dq dsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1321
-.Dq ecdsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1322
-.Dq ed25519 ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1323
 or
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1324
 .Dq rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1325
 for protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1326
 Multiple values may be specified by separating them with commas.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1327
 The default is to fetch
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1328
 .Dq rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1329
-and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1330
-.Dq ecdsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1331
 keys.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1332
 .It Fl v
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1333
 Verbose mode.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1334
@@ -127,7 +123,7 @@ attacks which have begun after the ssh_k
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1335
 host-or-namelist bits exponent modulus
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1336
 .Ed
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1337
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1338
-.Pa Output format for rsa, dsa and ecdsa keys:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1339
+.Pa Output format for rsa and dsa keys:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1340
 .Bd -literal
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1341
 host-or-namelist keytype base64-encoded-key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1342
 .Ed
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1343
@@ -135,10 +131,6 @@ host-or-namelist keytype base64-encoded-
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1344
 Where
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1345
 .Pa keytype
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1346
 is either
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1347
-.Dq ecdsa-sha2-nistp256 ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1348
-.Dq ecdsa-sha2-nistp384 ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1349
-.Dq ecdsa-sha2-nistp521 ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1350
-.Dq ssh-ed25519 ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1351
 .Dq ssh-dss
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1352
 or
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1353
 .Dq ssh-rsa .
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1354
@@ -158,7 +150,7 @@ Find all hosts from the file
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1355
 which have new or different keys from those in the sorted file
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1356
 .Pa ssh_known_hosts :
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1357
 .Bd -literal
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1358
-$ ssh-keyscan -t rsa,dsa,ecdsa -f ssh_hosts | \e
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1359
+$ ssh-keyscan -t rsa,dsa -f ssh_hosts | \e
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1360
 	sort -u - ssh_known_hosts | diff ssh_known_hosts -
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1361
 .Ed
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1362
 .Sh SEE ALSO
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1363
diff -pur old/ssh-keyscan.c new/ssh-keyscan.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1364
--- old/ssh-keyscan.c	2013-12-06 16:24:02.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1365
+++ new/ssh-keyscan.c	2015-04-01 02:51:28.981556385 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1366
@@ -56,7 +56,9 @@ int ssh_port = SSH_DEFAULT_PORT;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1367
 #define KT_DSA		2
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1368
 #define KT_RSA		4
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1369
 #define KT_ECDSA	8
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1370
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1371
 #define KT_ED25519	16
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1372
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1373
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1374
 int get_keytypes = KT_RSA|KT_ECDSA;/* Get RSA and ECDSA keys by default */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1375
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1376
@@ -247,9 +249,11 @@ keygrab_ssh2(con *c)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1377
 	packet_set_connection(c->c_fd, c->c_fd);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1378
 	enable_compat20();
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1379
 	myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] =
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1380
-	    c->c_keytype == KT_DSA ?  "ssh-dss" :
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1381
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1382
+	    c->c_keytype == KT_ED25519 ?  "ssh-ed25519" :
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1383
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1384
 	    (c->c_keytype == KT_RSA ? "ssh-rsa" :
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1385
-	    (c->c_keytype == KT_ED25519 ? "ssh-ed25519" :
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1386
+	    (c->c_keytype == KT_DSA ? "ssh-dss" :
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1387
 	    "ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521"));
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1388
 	c->c_kex = kex_setup(myproposal);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1389
 	c->c_kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1390
@@ -257,7 +261,9 @@ keygrab_ssh2(con *c)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1391
 	c->c_kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1392
 	c->c_kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1393
 	c->c_kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1394
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1395
 	c->c_kex->kex[KEX_C25519_SHA256] = kexc25519_client;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1396
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1397
 	c->c_kex->verify_host_key = hostjump;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1398
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1399
 	if (!(j = setjmp(kexjmp))) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1400
@@ -575,10 +581,15 @@ do_host(char *host)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1401
 {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1402
 	char *name = strnnsep(&host, " \t\n");
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1403
 	int j;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1404
+#ifdef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1405
+	int max_kt = KT_ECDSA;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1406
+#else
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1407
+	int max_kt = KT_ED25519;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1408
+#endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1409
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1410
 	if (name == NULL)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1411
 		return;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1412
-	for (j = KT_RSA1; j <= KT_ED25519; j *= 2) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1413
+	for (j = KT_RSA1; j <= max_kt; j *= 2) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1414
 		if (get_keytypes & j) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1415
 			while (ncon >= MAXCON)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1416
 				conloop();
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1417
@@ -685,9 +696,11 @@ main(int argc, char **argv)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1418
 				case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1419
 					get_keytypes |= KT_RSA;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1420
 					break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1421
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1422
 				case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1423
 					get_keytypes |= KT_ED25519;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1424
 					break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1425
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1426
 				case KEY_UNSPEC:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1427
 					fatal("unknown key type %s", tname);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1428
 				}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1429
diff -pur old/ssh-keysign.0 new/ssh-keysign.0
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1430
--- old/ssh-keysign.0	2014-01-29 17:52:48.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1431
+++ new/ssh-keysign.0	2015-04-02 08:03:28.313581826 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1432
@@ -24,8 +24,6 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1433
              Controls whether ssh-keysign is enabled.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1434
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1435
      /etc/ssh/ssh_host_dsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1436
-     /etc/ssh/ssh_host_ecdsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1437
-     /etc/ssh/ssh_host_ed25519_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1438
      /etc/ssh/ssh_host_rsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1439
              These files contain the private parts of the host keys used to
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1440
              generate the digital signature.  They should be owned by root,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1441
@@ -34,8 +32,6 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1442
              host-based authentication is used.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1443
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1444
      /etc/ssh/ssh_host_dsa_key-cert.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1445
-     /etc/ssh/ssh_host_ecdsa_key-cert.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1446
-     /etc/ssh/ssh_host_ed25519_key-cert.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1447
      /etc/ssh/ssh_host_rsa_key-cert.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1448
              If these files exist they are assumed to contain public
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1449
              certificate information corresponding with the private keys
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1450
diff -pur old/ssh-keysign.8 new/ssh-keysign.8
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1451
--- old/ssh-keysign.8	2015-03-31 21:14:02.337922491 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1452
+++ new/ssh-keysign.8	2015-04-02 08:16:42.230595366 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1453
@@ -62,8 +62,6 @@ Controls whether
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1454
 is enabled.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1455
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1456
 .It Pa /etc/ssh/ssh_host_dsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1457
-.It Pa /etc/ssh/ssh_host_ecdsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1458
-.It Pa /etc/ssh/ssh_host_ed25519_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1459
 .It Pa /etc/ssh/ssh_host_rsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1460
 These files contain the private parts of the host keys used to
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1461
 generate the digital signature.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1462
@@ -74,8 +72,6 @@ Since they are readable only by root,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1463
 must be set-uid root if host-based authentication is used.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1464
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1465
 .It Pa /etc/ssh/ssh_host_dsa_key-cert.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1466
-.It Pa /etc/ssh/ssh_host_ecdsa_key-cert.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1467
-.It Pa /etc/ssh/ssh_host_ed25519_key-cert.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1468
 .It Pa /etc/ssh/ssh_host_rsa_key-cert.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1469
 If these files exist they are assumed to contain public certificate
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1470
 information corresponding with the private keys above.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1471
diff -pur old/ssh-keysign.c new/ssh-keysign.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1472
--- old/ssh-keysign.c	2013-12-06 16:24:02.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1473
+++ new/ssh-keysign.c	2015-04-01 02:53:53.600004403 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1474
@@ -150,7 +150,11 @@ main(int argc, char **argv)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1475
 {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1476
 	Buffer b;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1477
 	Options options;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1478
+#ifdef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1479
+#define NUM_KEYTYPES 3
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1480
+#else
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1481
 #define NUM_KEYTYPES 4
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1482
+#endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1483
 	Key *keys[NUM_KEYTYPES], *key = NULL;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1484
 	struct passwd *pw;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1485
 	int key_fd[NUM_KEYTYPES], i, found, version = 2, fd;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1486
@@ -169,7 +173,9 @@ main(int argc, char **argv)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1487
 	i = 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1488
 	key_fd[i++] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1489
 	key_fd[i++] = open(_PATH_HOST_ECDSA_KEY_FILE, O_RDONLY);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1490
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1491
 	key_fd[i++] = open(_PATH_HOST_ED25519_KEY_FILE, O_RDONLY);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1492
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1493
 	key_fd[i++] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1494
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1495
 	original_real_uid = getuid();	/* XXX readconf.c needs this */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1496
diff -pur old/ssh.0 new/ssh.0
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1497
--- old/ssh.0	2014-01-29 17:52:47.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1498
+++ new/ssh.0	2015-04-02 08:05:51.667197938 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1499
@@ -142,8 +142,8 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1500
      -i identity_file
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1501
              Selects a file from which the identity (private key) for public
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1502
              key authentication is read.  The default is ~/.ssh/identity for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1503
-             protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1504
-             ~/.ssh/id_ed25519 and ~/.ssh/id_rsa for protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1505
+             protocol version 1, and ~/.ssh/id_dsa, and ~/.ssh/id_rsa for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1506
+             protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1507
              Identity files may also be specified on a per-host basis in the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1508
              configuration file.  It is possible to have multiple -i options
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1509
              (and multiple identities specified in configuration files).  ssh
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1510
@@ -446,7 +446,7 @@ AUTHENTICATION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1511
      creates a public/private key pair for authentication purposes.  The
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1512
      server knows the public key, and only the user knows the private key.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1513
      ssh implements public key authentication protocol automatically, using
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1514
-     one of the DSA, ECDSA, ED25519 or RSA algorithms.  Protocol 1 is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1515
+     one of the DSA or RSA algorithms.  Protocol 1 is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1516
      restricted to using only RSA keys, but protocol 2 may use any.  The
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1517
      HISTORY section of ssl(8) contains a brief discussion of the DSA and RSA
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1518
      algorithms.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1519
@@ -459,11 +459,9 @@ AUTHENTICATION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1520
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1521
      The user creates his/her key pair by running ssh-keygen(1).  This stores
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1522
      the private key in ~/.ssh/identity (protocol 1), ~/.ssh/id_dsa (protocol
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1523
-     2 DSA), ~/.ssh/id_ecdsa (protocol 2 ECDSA), ~/.ssh/id_ed25519 (protocol 2
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1524
-     ED25519), or ~/.ssh/id_rsa (protocol 2 RSA) and stores the public key in
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1525
-     ~/.ssh/identity.pub (protocol 1), ~/.ssh/id_dsa.pub (protocol 2 DSA),
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1526
-     ~/.ssh/id_ecdsa.pub (protocol 2 ECDSA), ~/.ssh/id_ed25519.pub (protocol 2
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1527
-     ED25519), or ~/.ssh/id_rsa.pub (protocol 2 RSA) in the user's home
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1528
+     2 DSA) or ~/.ssh/id_rsa (protocol 2 RSA) and stores the public key in
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1529
+     ~/.ssh/identity.pub (protocol 1), ~/.ssh/id_dsa.pub (protocol 2 DSA)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1530
+     or ~/.ssh/id_rsa.pub (protocol 2 RSA) in the user's home
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1531
      directory.  The user should then copy the public key to
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1532
      ~/.ssh/authorized_keys in his/her home directory on the remote machine.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1533
      The authorized_keys file corresponds to the conventional ~/.rhosts file,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1534
@@ -799,7 +797,7 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1535
              for the user, and not accessible by others.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1536
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1537
      ~/.ssh/authorized_keys
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1538
-             Lists the public keys (DSA, ECDSA, ED25519, RSA) that can be used
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1539
+             Lists the public keys (DSA, RSA) that can be used
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1540
              for logging in as this user.  The format of this file is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1541
              described in the sshd(8) manual page.  This file is not highly
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1542
              sensitive, but the recommended permissions are read/write for the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1543
@@ -817,8 +815,6 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1544
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1545
      ~/.ssh/identity
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1546
      ~/.ssh/id_dsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1547
-     ~/.ssh/id_ecdsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1548
-     ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1549
      ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1550
              Contains the private key for authentication.  These files contain
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1551
              sensitive data and should be readable by the user but not
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1552
@@ -830,8 +826,6 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1553
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1554
      ~/.ssh/identity.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1555
      ~/.ssh/id_dsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1556
-     ~/.ssh/id_ecdsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1557
-     ~/.ssh/id_ed25519.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1558
      ~/.ssh/id_rsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1559
              Contains the public key for authentication.  These files are not
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1560
              sensitive and can (but need not) be readable by anyone.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1561
@@ -862,8 +856,6 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1562
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1563
      /etc/ssh/ssh_host_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1564
      /etc/ssh/ssh_host_dsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1565
-     /etc/ssh/ssh_host_ecdsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1566
-     /etc/ssh/ssh_host_ed25519_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1567
      /etc/ssh/ssh_host_rsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1568
              These files contain the private parts of the host keys and are
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1569
              used for host-based authentication.  If protocol version 1 is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1570
diff -pur old/ssh.1 new/ssh.1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1571
--- old/ssh.1	2013-12-17 22:46:28.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1572
+++ new/ssh.1	2015-04-02 08:15:39.041359535 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1573
@@ -279,8 +279,6 @@ The default is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1574
 .Pa ~/.ssh/identity
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1575
 for protocol version 1, and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1576
 .Pa ~/.ssh/id_dsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1577
-.Pa ~/.ssh/id_ecdsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1578
-.Pa ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1579
 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1580
 .Pa ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1581
 for protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1582
@@ -758,7 +756,7 @@ key pair for authentication purposes.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1583
 The server knows the public key, and only the user knows the private key.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1584
 .Nm
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1585
 implements public key authentication protocol automatically,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1586
-using one of the DSA, ECDSA, ED25519 or RSA algorithms.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1587
+using one of the DSA or RSA algorithms.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1588
 Protocol 1 is restricted to using only RSA keys,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1589
 but protocol 2 may use any.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1590
 The HISTORY section of
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1591
@@ -783,10 +781,6 @@ This stores the private key in
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1592
 (protocol 1),
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1593
 .Pa ~/.ssh/id_dsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1594
 (protocol 2 DSA),
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1595
-.Pa ~/.ssh/id_ecdsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1596
-(protocol 2 ECDSA),
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1597
-.Pa ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1598
-(protocol 2 ED25519),
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1599
 or
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1600
 .Pa ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1601
 (protocol 2 RSA)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1602
@@ -795,10 +789,6 @@ and stores the public key in
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1603
 (protocol 1),
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1604
 .Pa ~/.ssh/id_dsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1605
 (protocol 2 DSA),
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1606
-.Pa ~/.ssh/id_ecdsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1607
-(protocol 2 ECDSA),
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1608
-.Pa ~/.ssh/id_ed25519.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1609
-(protocol 2 ED25519),
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1610
 or
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1611
 .Pa ~/.ssh/id_rsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1612
 (protocol 2 RSA)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1613
@@ -1338,7 +1328,7 @@ secret, but the recommended permissions
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1614
 and not accessible by others.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1615
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1616
 .It Pa ~/.ssh/authorized_keys
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1617
-Lists the public keys (DSA, ECDSA, ED25519, RSA)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1618
+Lists the public keys (DSA, RSA)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1619
 that can be used for logging in as this user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1620
 The format of this file is described in the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1621
 .Xr sshd 8
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1622
@@ -1360,8 +1350,6 @@ above.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1623
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1624
 .It Pa ~/.ssh/identity
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1625
 .It Pa ~/.ssh/id_dsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1626
-.It Pa ~/.ssh/id_ecdsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1627
-.It Pa ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1628
 .It Pa ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1629
 Contains the private key for authentication.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1630
 These files
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1631
@@ -1375,8 +1363,6 @@ sensitive part of this file using 3DES.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1632
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1633
 .It Pa ~/.ssh/identity.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1634
 .It Pa ~/.ssh/id_dsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1635
-.It Pa ~/.ssh/id_ecdsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1636
-.It Pa ~/.ssh/id_ed25519.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1637
 .It Pa ~/.ssh/id_rsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1638
 Contains the public key for authentication.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1639
 These files are not
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1640
@@ -1415,8 +1401,6 @@ The file format and configuration option
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1641
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1642
 .It Pa /etc/ssh/ssh_host_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1643
 .It Pa /etc/ssh/ssh_host_dsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1644
-.It Pa /etc/ssh/ssh_host_ecdsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1645
-.It Pa /etc/ssh/ssh_host_ed25519_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1646
 .It Pa /etc/ssh/ssh_host_rsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1647
 These files contain the private parts of the host keys
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1648
 and are used for host-based authentication.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1649
diff -pur old/ssh.c new/ssh.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1650
--- old/ssh.c	2013-12-28 22:53:40.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1651
+++ new/ssh.c	2015-04-01 03:33:55.003074053 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1652
@@ -1010,8 +1010,10 @@ main(int ac, char **av)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1653
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1654
 		sensitive_data.keys[3] = key_load_private_cert(KEY_RSA,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1655
 		    _PATH_HOST_RSA_KEY_FILE, "", NULL);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1656
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1657
 		sensitive_data.keys[4] = key_load_private_cert(KEY_ED25519,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1658
 		    _PATH_HOST_ED25519_KEY_FILE, "", NULL);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1659
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1660
 		sensitive_data.keys[5] = key_load_private_type(KEY_DSA,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1661
 		    _PATH_HOST_DSA_KEY_FILE, "", NULL, NULL);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1662
 #ifdef OPENSSL_HAS_ECC
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1663
@@ -1020,8 +1022,10 @@ main(int ac, char **av)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1664
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1665
 		sensitive_data.keys[7] = key_load_private_type(KEY_RSA,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1666
 		    _PATH_HOST_RSA_KEY_FILE, "", NULL, NULL);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1667
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1668
 		sensitive_data.keys[8] = key_load_private_type(KEY_ED25519,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1669
 		    _PATH_HOST_ED25519_KEY_FILE, "", NULL, NULL);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1670
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1671
 		PRIV_END;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1672
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1673
 		if (options.hostbased_authentication == 1 &&
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1674
@@ -1038,8 +1042,10 @@ main(int ac, char **av)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1675
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1676
 			sensitive_data.keys[3] = key_load_cert(
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1677
 			    _PATH_HOST_RSA_KEY_FILE);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1678
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1679
 			sensitive_data.keys[4] = key_load_cert(
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1680
 			    _PATH_HOST_ED25519_KEY_FILE);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1681
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1682
 			sensitive_data.keys[5] = key_load_public(
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1683
 			    _PATH_HOST_DSA_KEY_FILE, NULL);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1684
 #ifdef OPENSSL_HAS_ECC
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1685
@@ -1048,8 +1054,10 @@ main(int ac, char **av)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1686
 #endif
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1687
 			sensitive_data.keys[7] = key_load_public(
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1688
 			    _PATH_HOST_RSA_KEY_FILE, NULL);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1689
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1690
 			sensitive_data.keys[8] = key_load_public(
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1691
 			    _PATH_HOST_ED25519_KEY_FILE, NULL);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1692
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1693
 			sensitive_data.external_keysign = 1;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1694
 		}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1695
 	}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1696
diff -pur old/ssh_config.0 new/ssh_config.0
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1697
--- old/ssh_config.0	2014-01-29 17:52:48.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1698
+++ new/ssh_config.0	2015-04-02 08:07:55.171885768 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1699
@@ -409,14 +409,9 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1700
              client wants to use in order of preference.  The default for this
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1701
              option is:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1702
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1703
-                [email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1704
-                [email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1705
-                [email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1706
-                [email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1707
                 [email protected],[email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1708
                 [email protected],[email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1709
-                ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1710
-                ssh-ed25519,ssh-rsa,ssh-dss
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1711
+                ssh-rsa,ssh-dss
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1712
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1713
              If hostkeys are known for the destination host then this default
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1714
              is modified to prefer their algorithms.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1715
@@ -446,10 +441,10 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1716
              default is ``no''.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1717
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1718
      IdentityFile
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1719
-             Specifies a file from which the user's DSA, ECDSA, ED25519 or RSA
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1720
+             Specifies a file from which the user's DSA or RSA
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1721
              authentication identity is read.  The default is ~/.ssh/identity
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1722
-             for protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1723
-             ~/.ssh/id_ed25519 and ~/.ssh/id_rsa for protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1724
+             for protocol version 1, and ~/.ssh/id_dsa and ~/.ssh/id_rsa for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1725
+             protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1726
              Additionally, any identities represented by the authentication
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1727
              agent will be used for authentication unless IdentitiesOnly is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1728
              set.  ssh(1) will try to load certificate information from the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1729
@@ -509,8 +504,6 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1730
              Specifies the available KEX (Key Exchange) algorithms.  Multiple
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1731
              algorithms must be comma-separated.  The default is:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1732
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1733
-                   [email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1734
-                   ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1735
                    diffie-hellman-group-exchange-sha256,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1736
                    diffie-hellman-group-exchange-sha1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1737
                    diffie-hellman-group14-sha1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1738
diff -pur old/ssh_config.5 new/ssh_config.5
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1739
--- old/ssh_config.5	2015-03-31 21:14:02.439364932 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1740
+++ new/ssh_config.5	2015-04-02 08:16:12.714886637 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1741
@@ -729,14 +729,9 @@ Specifies the protocol version 2 host ke
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1742
 that the client wants to use in order of preference.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1743
 The default for this option is:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1744
 .Bd -literal -offset 3n
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1745
[email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1746
[email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1747
[email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1748
[email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1749
 [email protected],[email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1750
 [email protected],[email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1751
-ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1752
-ssh-ed25519,ssh-rsa,ssh-dss
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1753
+ssh-rsa,ssh-dss
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1754
 .Ed
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1755
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1756
 If hostkeys are known for the destination host then this default is modified
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1757
@@ -778,14 +773,12 @@ offers many different identities.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1758
 The default is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1759
 .Dq no .
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1760
 .It Cm IdentityFile
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1761
-Specifies a file from which the user's DSA, ECDSA, ED25519 or RSA authentication
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1762
+Specifies a file from which the user's DSA or RSA authentication
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1763
 identity is read.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1764
 The default is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1765
 .Pa ~/.ssh/identity
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1766
 for protocol version 1, and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1767
 .Pa ~/.ssh/id_dsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1768
-.Pa ~/.ssh/id_ecdsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1769
-.Pa ~/.ssh/id_ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1770
 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1771
 .Pa ~/.ssh/id_rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1772
 for protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1773
@@ -898,8 +891,6 @@ Specifies the available KEX (Key Exchang
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1774
 Multiple algorithms must be comma-separated.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1775
 The default is:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1776
 .Bd -literal -offset indent
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1777
[email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1778
-ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1779
 diffie-hellman-group-exchange-sha256,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1780
 diffie-hellman-group-exchange-sha1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1781
 diffie-hellman-group14-sha1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1782
diff -pur old/sshconnect.c new/sshconnect.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1783
--- old/sshconnect.c	2015-03-31 21:14:02.413909705 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1784
+++ new/sshconnect.c	2015-04-01 04:56:41.997313652 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1785
@@ -1325,7 +1325,9 @@ show_other_keys(struct hostkeys *hostkey
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1786
 		KEY_RSA,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1787
 		KEY_DSA,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1788
 		KEY_ECDSA,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1789
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1790
 		KEY_ED25519,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1791
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1792
 		-1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1793
 	};
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1794
 	int i, ret = 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1795
diff -pur old/sshconnect2.c new/sshconnect2.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1796
--- old/sshconnect2.c	2015-03-31 21:14:02.440456459 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1797
+++ new/sshconnect2.c	2015-04-01 04:56:58.805755301 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1798
@@ -246,7 +246,9 @@ ssh_kex2(char *host, struct sockaddr *ho
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1799
 	kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1800
 	kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1801
 	kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1802
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1803
 	kex->kex[KEX_C25519_SHA256] = kexc25519_client;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1804
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1805
 #ifdef GSSAPI
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1806
 	if (options.gss_keyex) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1807
 		kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_client;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1808
diff -pur old/sshd.0 new/sshd.0
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1809
--- old/sshd.0	2014-01-29 17:52:47.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1810
+++ new/sshd.0	2015-04-02 08:09:18.391442884 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1811
@@ -82,8 +82,7 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1812
              be given if sshd is not run as root (as the normal host key files
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1813
              are normally not readable by anyone but root).  The default is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1814
              /etc/ssh/ssh_host_key for protocol version 1, and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1815
-             /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1816
-             /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1817
+             /etc/ssh/ssh_host_dsa_key and /etc/ssh/ssh_host_rsa_key for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1818
              protocol version 2.  It is possible to have multiple host key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1819
              files for the different protocol versions and host key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1820
              algorithms.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1821
@@ -148,7 +147,7 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1822
 AUTHENTICATION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1823
      The OpenSSH SSH daemon supports SSH protocols 1 and 2.  The default is to
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1824
      use protocol 2 only, though this can be changed via the Protocol option
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1825
-     in sshd_config(5).  Protocol 2 supports DSA, ECDSA, ED25519 and RSA keys;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1826
+     in sshd_config(5).  Protocol 2 supports DSA and RSA keys;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1827
      protocol 1 only supports RSA keys.  For both protocols, each host has a
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1828
      host-specific key, normally 2048 bits, used to identify the host.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1829
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1830
@@ -278,15 +277,13 @@ AUTHORIZED_KEYS FILE FORMAT
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1831
      starts with a number).  The bits, exponent, modulus, and comment fields
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1832
      give the RSA key for protocol version 1; the comment field is not used
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1833
      for anything (but may be convenient for the user to identify the key).
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1834
-     For protocol version 2 the keytype is ``ecdsa-sha2-nistp256'',
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1835
-     ``ecdsa-sha2-nistp384'', ``ecdsa-sha2-nistp521'', ``ssh-ed25519'',
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1836
-     ``ssh-dss'' or ``ssh-rsa''.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1837
+     For protocol version 2 the keytype is ``ssh-dss'' or ``ssh-rsa''.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1838
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1839
      Note that lines in this file are usually several hundred bytes long
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1840
      (because of the size of the public key encoding) up to a limit of 8
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1841
      kilobytes, which permits DSA keys up to 8 kilobits and RSA keys up to 16
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1842
      kilobits.  You don't want to type them in; instead, copy the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1843
-     identity.pub, id_dsa.pub, id_ecdsa.pub, id_ed25519.pub, or the id_rsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1844
+     identity.pub, id_dsa.pub or the id_rsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1845
      file and edit it.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1846
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1847
      sshd enforces a minimum RSA key modulus size for protocol 1 and protocol
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1848
@@ -513,7 +510,7 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1849
              for the user, and not accessible by others.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1850
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1851
      ~/.ssh/authorized_keys
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1852
-             Lists the public keys (DSA, ECDSA, ED25519, RSA) that can be used
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1853
+             Lists the public keys (DSA, RSA) that can be used
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1854
              for logging in as this user.  The format of this file is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1855
              described above.  The content of the file is not highly
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1856
              sensitive, but the recommended permissions are read/write for the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1857
@@ -574,8 +571,6 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1858
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1859
      /etc/ssh/ssh_host_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1860
      /etc/ssh/ssh_host_dsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1861
-     /etc/ssh/ssh_host_ecdsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1862
-     /etc/ssh/ssh_host_ed25519_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1863
      /etc/ssh/ssh_host_rsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1864
              These files contain the private parts of the host keys.  These
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1865
              files should only be owned by root, readable only by root, and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1866
@@ -584,8 +579,6 @@ FILES
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1867
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1868
      /etc/ssh/ssh_host_key.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1869
      /etc/ssh/ssh_host_dsa_key.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1870
-     /etc/ssh/ssh_host_ecdsa_key.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1871
-     /etc/ssh/ssh_host_ed25519_key.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1872
      /etc/ssh/ssh_host_rsa_key.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1873
              These files contain the public parts of the host keys.  These
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1874
              files should be world-readable but writable only by root.  Their
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1875
diff -pur old/sshd.8 new/sshd.8
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1876
--- old/sshd.8	2015-03-31 21:14:02.389944452 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1877
+++ new/sshd.8	2015-04-02 08:17:21.818430805 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1878
@@ -175,8 +175,6 @@ The default is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1879
 .Pa /etc/ssh/ssh_host_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1880
 for protocol version 1, and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1881
 .Pa /etc/ssh/ssh_host_dsa_key ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1882
-.Pa /etc/ssh/ssh_host_ecdsa_key .
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1883
-.Pa /etc/ssh/ssh_host_ed25519_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1884
 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1885
 .Pa /etc/ssh/ssh_host_rsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1886
 for protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1887
@@ -281,7 +279,7 @@ though this can be changed via the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1888
 .Cm Protocol
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1889
 option in
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1890
 .Xr sshd_config 4 .
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1891
-Protocol 2 supports DSA, ECDSA, ED25519 and RSA keys;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1892
+Protocol 2 supports DSA and RSA keys;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1893
 protocol 1 only supports RSA keys.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1894
 For both protocols,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1895
 each host has a host-specific key,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1896
@@ -492,10 +490,6 @@ protocol version 1; the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1897
 comment field is not used for anything (but may be convenient for the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1898
 user to identify the key).
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1899
 For protocol version 2 the keytype is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1900
-.Dq ecdsa-sha2-nistp256 ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1901
-.Dq ecdsa-sha2-nistp384 ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1902
-.Dq ecdsa-sha2-nistp521 ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1903
-.Dq ssh-ed25519 ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1904
 .Dq ssh-dss
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1905
 or
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1906
 .Dq ssh-rsa .
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1907
@@ -507,8 +501,6 @@ keys up to 16 kilobits.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1908
 You don't want to type them in; instead, copy the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1909
 .Pa identity.pub ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1910
 .Pa id_dsa.pub ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1911
-.Pa id_ecdsa.pub ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1912
-.Pa id_ed25519.pub ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1913
 or the
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1914
 .Pa id_rsa.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1915
 file and edit it.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1916
@@ -808,7 +800,7 @@ secret, but the recommended permissions
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1917
 and not accessible by others.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1918
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1919
 .It Pa ~/.ssh/authorized_keys
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1920
-Lists the public keys (DSA, ECDSA, ED25519, RSA)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1921
+Lists the public keys (DSA, RSA)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1922
 that can be used for logging in as this user.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1923
 The format of this file is described above.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1924
 The content of the file is not highly sensitive, but the recommended
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1925
@@ -888,8 +880,6 @@ rlogin/rsh.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1926
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1927
 .It Pa /etc/ssh/ssh_host_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1928
 .It Pa /etc/ssh/ssh_host_dsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1929
-.It Pa /etc/ssh/ssh_host_ecdsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1930
-.It Pa /etc/ssh/ssh_host_ed25519_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1931
 .It Pa /etc/ssh/ssh_host_rsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1932
 These files contain the private parts of the host keys.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1933
 These files should only be owned by root, readable only by root, and not
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1934
@@ -900,8 +890,6 @@ does not start if these files are group/
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1935
 .Pp
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1936
 .It Pa /etc/ssh/ssh_host_key.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1937
 .It Pa /etc/ssh/ssh_host_dsa_key.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1938
-.It Pa /etc/ssh/ssh_host_ecdsa_key.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1939
-.It Pa /etc/ssh/ssh_host_ed25519_key.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1940
 .It Pa /etc/ssh/ssh_host_rsa_key.pub
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1941
 These files contain the public parts of the host keys.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1942
 These files should be world-readable but writable only by
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1943
diff -pur old/sshd.c new/sshd.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1944
--- old/sshd.c	2015-03-31 21:14:02.441576765 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1945
+++ new/sshd.c	2015-04-01 03:42:59.569147555 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1946
@@ -797,7 +797,9 @@ list_hostkey_types(void)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1947
 		case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1948
 		case KEY_DSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1949
 		case KEY_ECDSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1950
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1951
 		case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1952
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1953
 			if (buffer_len(&b) > 0)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1954
 				buffer_append(&b, ",", 1);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1955
 			p = key_ssh_name(key);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1956
@@ -814,7 +816,9 @@ list_hostkey_types(void)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1957
 		case KEY_RSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1958
 		case KEY_DSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1959
 		case KEY_ECDSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1960
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1961
 		case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1962
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1963
 			if (buffer_len(&b) > 0)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1964
 				buffer_append(&b, ",", 1);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1965
 			p = key_ssh_name(key);
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1966
@@ -842,7 +846,9 @@ get_hostkey_by_type(int type, int need_p
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1967
 		case KEY_RSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1968
 		case KEY_DSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1969
 		case KEY_ECDSA_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1970
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1971
 		case KEY_ED25519_CERT:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1972
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1973
 			key = sensitive_data.host_certificates[i];
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1974
 			break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1975
 		default:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1976
@@ -1719,7 +1725,9 @@ main(int ac, char **av)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1977
 		case KEY_RSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1978
 		case KEY_DSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1979
 		case KEY_ECDSA:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1980
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1981
 		case KEY_ED25519:
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1982
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1983
 			sensitive_data.have_ssh2_key = 1;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1984
 			break;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1985
 		}
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1986
@@ -2546,7 +2554,9 @@ do_ssh2_kex(void)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1987
 	kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1988
 	kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1989
 	kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1990
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1991
 	kex->kex[KEX_C25519_SHA256] = kexc25519_server;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1992
+#endif /* WITHOUT_ED25519 */
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1993
 #ifdef GSSAPI
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1994
 	if (options.gss_keyex) {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1995
 		kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1996
diff -pur old/sshd_config.0 new/sshd_config.0
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1997
--- old/sshd_config.0	2014-01-29 17:52:48.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1998
+++ new/sshd_config.0	2015-04-02 08:09:53.957389224 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  1999
@@ -332,12 +332,11 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2000
      HostKey
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2001
              Specifies a file containing a private host key used by SSH.  The
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2002
              default is /etc/ssh/ssh_host_key for protocol version 1, and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2003
-             /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2004
-             /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2005
+             /etc/ssh/ssh_host_dsa_key and /etc/ssh/ssh_host_rsa_key for
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2006
              protocol version 2.  Note that sshd(8) will refuse to use a file
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2007
              if it is group/world-accessible.  It is possible to have multiple
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2008
              host key files.  ``rsa1'' keys are used for version 1 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2009
-             ``dsa'', ``ecdsa'', ``ed25519'' or ``rsa'' are used for version 2
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2010
+             ``dsa'' or ``rsa'' are used for version 2
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2011
              of the SSH protocol.  It is also possible to specify public host
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2012
              key files instead.  In this case operations on the private key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2013
              will be delegated to an ssh-agent(1).
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2014
@@ -399,8 +398,6 @@ DESCRIPTION
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2015
              Specifies the available KEX (Key Exchange) algorithms.  Multiple
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2016
              algorithms must be comma-separated.  The default is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2017
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2018
-                   [email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2019
-                   ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2020
                    diffie-hellman-group-exchange-sha256,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2021
                    diffie-hellman-group-exchange-sha1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2022
                    diffie-hellman-group14-sha1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2023
diff -pur old/sshd_config.5 new/sshd_config.5
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2024
--- old/sshd_config.5	2015-03-31 21:14:02.442624133 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2025
+++ new/sshd_config.5	2015-04-02 08:16:29.655757790 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2026
@@ -546,8 +546,6 @@ The default is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2027
 .Pa /etc/ssh/ssh_host_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2028
 for protocol version 1, and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2029
 .Pa /etc/ssh/ssh_host_dsa_key ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2030
-.Pa /etc/ssh/ssh_host_ecdsa_key ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2031
-.Pa /etc/ssh/ssh_host_ed25519_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2032
 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2033
 .Pa /etc/ssh/ssh_host_rsa_key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2034
 for protocol version 2.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2035
@@ -558,8 +556,6 @@ It is possible to have multiple host key
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2036
 .Dq rsa1
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2037
 keys are used for version 1 and
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2038
 .Dq dsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2039
-.Dq ecdsa ,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2040
-.Dq ed25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2041
 or
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2042
 .Dq rsa
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2043
 are used for version 2 of the SSH protocol.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2044
@@ -669,8 +665,6 @@ Specifies the available KEX (Key Exchang
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2045
 Multiple algorithms must be comma-separated.
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2046
 The default is
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2047
 .Bd -literal -offset indent
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2048
[email protected],
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2049
-ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2050
 diffie-hellman-group-exchange-sha256,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2051
 diffie-hellman-group-exchange-sha1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2052
 diffie-hellman-group14-sha1,
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2053
diff -pur old/verify.c new/verify.c
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2054
--- old/verify.c	2014-01-16 17:43:44.000000000 -0800
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2055
+++ new/verify.c	2015-04-01 03:43:49.962792178 -0700
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2056
@@ -9,6 +9,8 @@
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2057
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2058
 #include "crypto_api.h"
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2059
 
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2060
+#ifndef WITHOUT_ED25519
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2061
+
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2062
 int crypto_verify_32(const unsigned char *x,const unsigned char *y)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2063
 {
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2064
   unsigned int differentbits = 0;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2065
@@ -47,3 +49,4 @@ int crypto_verify_32(const unsigned char
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2066
   F(31)
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2067
   return (1 & ((differentbits - 1) >> 8)) - 1;
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2068
 }
7cfcde36f97f 20820589 Disable Curve25519 in OpenSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
  2069
+#endif /* WITHOUT_ED25519 */