xref: /netbsd-src/crypto/external/bsd/openssh/dist/myproposal.h (revision 37afb7eb6895c833050f8bfb1d1bb2f99f332539)
1 /*	$NetBSD: myproposal.h,v 1.11 2015/07/03 01:00:00 christos Exp $	*/
2 /* $OpenBSD: myproposal.h,v 1.44 2015/05/27 23:51:10 dtucker Exp $ */
3 
4 /*
5  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifdef WITH_OPENSSL
29 
30 #define KEX_COMMON_KEX		\
31 	"curve25519-sha256@libssh.org," \
32 	"ecdh-sha2-nistp256," \
33 	"ecdh-sha2-nistp384," \
34 	"ecdh-sha2-nistp521," \
35 	"diffie-hellman-group-exchange-sha256"
36 
37 #define KEX_SERVER_KEX KEX_COMMON_KEX "," \
38 	"diffie-hellman-group14-sha1"
39 
40 #define KEX_CLIENT_KEX KEX_COMMON_KEX "," \
41 	"diffie-hellman-group-exchange-sha1," \
42 	"diffie-hellman-group14-sha1," \
43 	"diffie-hellman-group1-sha1"
44 
45 #define	KEX_DEFAULT_PK_ALG	\
46 	"ecdsa-sha2-nistp256-cert-v01@openssh.com," \
47 	"ecdsa-sha2-nistp384-cert-v01@openssh.com," \
48 	"ecdsa-sha2-nistp521-cert-v01@openssh.com," \
49 	"ssh-ed25519-cert-v01@openssh.com," \
50 	"ssh-rsa-cert-v01@openssh.com," \
51 	"ssh-dss-cert-v01@openssh.com," \
52 	"ssh-rsa-cert-v00@openssh.com," \
53 	"ssh-dss-cert-v00@openssh.com," \
54 	"ecdsa-sha2-nistp256," \
55 	"ecdsa-sha2-nistp384," \
56 	"ecdsa-sha2-nistp521," \
57 	"ssh-ed25519," \
58 	"ssh-rsa," \
59 	"ssh-dss"
60 
61 #define	KEX_SERVER_ENCRYPT \
62 	"chacha20-poly1305@openssh.com," \
63 	"aes128-ctr,aes192-ctr,aes256-ctr," \
64 	"aes128-gcm@openssh.com,aes256-gcm@openssh.com"
65 
66 #define KEX_CLIENT_ENCRYPT KEX_SERVER_ENCRYPT "," \
67 	"arcfour256,arcfour128," \
68 	"aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \
69 	"aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se"
70 
71 #define	KEX_SERVER_MAC \
72 	"umac-64-etm@openssh.com," \
73 	"umac-128-etm@openssh.com," \
74 	"hmac-sha2-256-etm@openssh.com," \
75 	"hmac-sha2-512-etm@openssh.com," \
76 	"hmac-sha1-etm@openssh.com," \
77 	"umac-64@openssh.com," \
78 	"umac-128@openssh.com," \
79 	"hmac-sha2-256," \
80 	"hmac-sha2-512," \
81 	"hmac-sha1"
82 
83 #define KEX_CLIENT_MAC KEX_SERVER_MAC "," \
84 	"hmac-md5-etm@openssh.com," \
85 	"hmac-ripemd160-etm@openssh.com," \
86 	"hmac-sha1-96-etm@openssh.com," \
87 	"hmac-md5-96-etm@openssh.com," \
88 	"hmac-md5," \
89 	"hmac-ripemd160," \
90 	"hmac-ripemd160@openssh.com," \
91 	"hmac-sha1-96," \
92 	"hmac-md5-96"
93 
94 #else
95 
96 #define KEX_SERVER_KEX		\
97 	"curve25519-sha256@libssh.org"
98 #define	KEX_DEFAULT_PK_ALG	\
99 	"ssh-ed25519-cert-v01@openssh.com," \
100 	"ssh-ed25519"
101 #define	KEX_SERVER_ENCRYPT \
102 	"chacha20-poly1305@openssh.com," \
103 	"aes128-ctr,aes192-ctr,aes256-ctr"
104 #define	KEX_SERVER_MAC \
105 	"umac-64-etm@openssh.com," \
106 	"umac-128-etm@openssh.com," \
107 	"hmac-sha2-256-etm@openssh.com," \
108 	"hmac-sha2-512-etm@openssh.com," \
109 	"hmac-sha1-etm@openssh.com," \
110 	"umac-64@openssh.com," \
111 	"umac-128@openssh.com," \
112 	"hmac-sha2-256," \
113 	"hmac-sha2-512," \
114 	"hmac-sha1"
115 
116 #define KEX_CLIENT_KEX KEX_SERVER_KEX
117 #define	KEX_CLIENT_ENCRYPT KEX_SERVER_ENCRYPT
118 #define KEX_CLIENT_MAC KEX_SERVER_MAC
119 
120 #endif /* WITH_OPENSSL */
121 
122 #define KEX_CLIENT_ENCRYPT_INCLUDE_NONE KEX_CLIENT_ENCRYPT \
123 	",none"
124 #define KEX_SERVER_ENCRYPT_INCLUDE_NONE KEX_SERVER_ENCRYPT \
125 	",none"
126 
127 #define	KEX_DEFAULT_COMP	"none,zlib@openssh.com,zlib"
128 #define	KEX_DEFAULT_LANG	""
129 
130 #define KEX_CLIENT \
131 	KEX_CLIENT_KEX, \
132 	KEX_DEFAULT_PK_ALG, \
133 	KEX_CLIENT_ENCRYPT_INCLUDE_NONE, \
134 	KEX_CLIENT_ENCRYPT_INCLUDE_NONE, \
135 	KEX_CLIENT_MAC, \
136 	KEX_CLIENT_MAC, \
137 	KEX_DEFAULT_COMP, \
138 	KEX_DEFAULT_COMP, \
139 	KEX_DEFAULT_LANG, \
140 	KEX_DEFAULT_LANG
141 
142 #define KEX_SERVER \
143 	KEX_SERVER_KEX, \
144 	KEX_DEFAULT_PK_ALG, \
145 	KEX_SERVER_ENCRYPT_INCLUDE_NONE, \
146 	KEX_SERVER_ENCRYPT_INCLUDE_NONE, \
147 	KEX_SERVER_MAC, \
148 	KEX_SERVER_MAC, \
149 	KEX_DEFAULT_COMP, \
150 	KEX_DEFAULT_COMP, \
151 	KEX_DEFAULT_LANG, \
152 	KEX_DEFAULT_LANG
153