xref: /titanic_50/usr/src/cmd/ssh/include/myproposal.h (revision e63a6e294d707d97ff9384b78a34d4f0189e4574)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * Redistribution and use in source and binary forms, with or without
57c478bd9Sstevel@tonic-gate  * modification, are permitted provided that the following conditions
67c478bd9Sstevel@tonic-gate  * are met:
77c478bd9Sstevel@tonic-gate  * 1. Redistributions of source code must retain the above copyright
87c478bd9Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer.
97c478bd9Sstevel@tonic-gate  * 2. Redistributions in binary form must reproduce the above copyright
107c478bd9Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer in the
117c478bd9Sstevel@tonic-gate  *    documentation and/or other materials provided with the distribution.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
147c478bd9Sstevel@tonic-gate  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
157c478bd9Sstevel@tonic-gate  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
167c478bd9Sstevel@tonic-gate  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
177c478bd9Sstevel@tonic-gate  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
187c478bd9Sstevel@tonic-gate  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
197c478bd9Sstevel@tonic-gate  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
207c478bd9Sstevel@tonic-gate  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
217c478bd9Sstevel@tonic-gate  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
227c478bd9Sstevel@tonic-gate  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
237c478bd9Sstevel@tonic-gate  */
24ee5b3c37Sjp161948 
25ee5b3c37Sjp161948 /*
26*e63a6e29SJan Pechanec  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27ee5b3c37Sjp161948  * Use is subject to license terms.
28ee5b3c37Sjp161948  */
29ee5b3c37Sjp161948 
30ee5b3c37Sjp161948 /*	$OpenBSD: myproposal.h,v 1.14 2002/04/03 09:26:11 markus Exp $	*/
31ee5b3c37Sjp161948 
32ee5b3c37Sjp161948 #ifndef	_MYPROPOSAL_H
33ee5b3c37Sjp161948 #define	_MYPROPOSAL_H
34ee5b3c37Sjp161948 
35ee5b3c37Sjp161948 #ifdef __cplusplus
36ee5b3c37Sjp161948 extern "C" {
37ee5b3c37Sjp161948 #endif
38ee5b3c37Sjp161948 
39ee5b3c37Sjp161948 
40ee5b3c37Sjp161948 #define	KEX_DEFAULT_KEX			"diffie-hellman-group-exchange-sha1," \
41ee5b3c37Sjp161948 					"diffie-hellman-group1-sha1"
42ee5b3c37Sjp161948 
437c478bd9Sstevel@tonic-gate #define	KEX_DEFAULT_PK_ALG		"ssh-rsa,ssh-dss"
44ee5b3c37Sjp161948 
45*e63a6e29SJan Pechanec /*
46*e63a6e29SJan Pechanec  * Keep CBC modes in the back of the client default cipher list for backward
47*e63a6e29SJan Pechanec  * compatibility but remove them from the server side because there are some
48*e63a6e29SJan Pechanec  * potential security issues with those modes regarding SSH protocol version 2.
49*e63a6e29SJan Pechanec  * Since the client is the one who picks the cipher from the list offered by the
50*e63a6e29SJan Pechanec  * server the only way to force the client not to use CBC modes is not to
51*e63a6e29SJan Pechanec  * advertise those at all. Note that we still support all such CBC modes in the
52*e63a6e29SJan Pechanec  * server code, this is about the default server cipher list only. The list can
53*e63a6e29SJan Pechanec  * be changed in the Ciphers option in the sshd_config(4) file.
54*e63a6e29SJan Pechanec  *
55*e63a6e29SJan Pechanec  * Note that the ordering of ciphers on the server side is not relevant but we
56*e63a6e29SJan Pechanec  * must do it properly even here so that we can use the macro for the client
57*e63a6e29SJan Pechanec  * list as well.
58*e63a6e29SJan Pechanec  */
59*e63a6e29SJan Pechanec #define	KEX_DEFAULT_SERVER_ENCRYPT	"aes128-ctr,aes192-ctr,aes256-ctr," \
60*e63a6e29SJan Pechanec 					"arcfour"
61ee5b3c37Sjp161948 
62*e63a6e29SJan Pechanec #define	KEX_DEFAULT_CLIENT_ENCRYPT	KEX_DEFAULT_SERVER_ENCRYPT \
63*e63a6e29SJan Pechanec 					",aes128-cbc,aes192-cbc,aes256-cbc," \
64*e63a6e29SJan Pechanec 					"blowfish-cbc,3des-cbc"
65*e63a6e29SJan Pechanec 
66*e63a6e29SJan Pechanec #define	KEX_DEFAULT_MAC			"hmac-md5,hmac-sha1,hmac-sha1-96," \
67*e63a6e29SJan Pechanec 					"hmac-md5-96"
68ee5b3c37Sjp161948 
697c478bd9Sstevel@tonic-gate #define	KEX_DEFAULT_COMP		"none,zlib"
707c478bd9Sstevel@tonic-gate #define	KEX_DEFAULT_LANG		""
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate 
73*e63a6e29SJan Pechanec static char *my_srv_proposal[PROPOSAL_MAX] = {
747c478bd9Sstevel@tonic-gate 	KEX_DEFAULT_KEX,
757c478bd9Sstevel@tonic-gate 	KEX_DEFAULT_PK_ALG,
76*e63a6e29SJan Pechanec 	KEX_DEFAULT_SERVER_ENCRYPT,
77*e63a6e29SJan Pechanec 	KEX_DEFAULT_SERVER_ENCRYPT,
78*e63a6e29SJan Pechanec 	KEX_DEFAULT_MAC,
79*e63a6e29SJan Pechanec 	KEX_DEFAULT_MAC,
80*e63a6e29SJan Pechanec 	KEX_DEFAULT_COMP,
81*e63a6e29SJan Pechanec 	KEX_DEFAULT_COMP,
82*e63a6e29SJan Pechanec 	KEX_DEFAULT_LANG,
83*e63a6e29SJan Pechanec 	KEX_DEFAULT_LANG
84*e63a6e29SJan Pechanec };
85*e63a6e29SJan Pechanec 
86*e63a6e29SJan Pechanec static char *my_clnt_proposal[PROPOSAL_MAX] = {
87*e63a6e29SJan Pechanec 	KEX_DEFAULT_KEX,
88*e63a6e29SJan Pechanec 	KEX_DEFAULT_PK_ALG,
89*e63a6e29SJan Pechanec 	KEX_DEFAULT_CLIENT_ENCRYPT,
90*e63a6e29SJan Pechanec 	KEX_DEFAULT_CLIENT_ENCRYPT,
917c478bd9Sstevel@tonic-gate 	KEX_DEFAULT_MAC,
927c478bd9Sstevel@tonic-gate 	KEX_DEFAULT_MAC,
937c478bd9Sstevel@tonic-gate 	KEX_DEFAULT_COMP,
947c478bd9Sstevel@tonic-gate 	KEX_DEFAULT_COMP,
957c478bd9Sstevel@tonic-gate 	KEX_DEFAULT_LANG,
967c478bd9Sstevel@tonic-gate 	KEX_DEFAULT_LANG
977c478bd9Sstevel@tonic-gate };
987c478bd9Sstevel@tonic-gate 
997c478bd9Sstevel@tonic-gate #ifdef __cplusplus
1007c478bd9Sstevel@tonic-gate }
1017c478bd9Sstevel@tonic-gate #endif
1027c478bd9Sstevel@tonic-gate 
1037c478bd9Sstevel@tonic-gate #endif /* _MYPROPOSAL_H */
104