xref: /onnv-gate/usr/src/cmd/ssh/include/myproposal.h (revision 8805:e32f9c722e63)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * Redistribution and use in source and binary forms, with or without
50Sstevel@tonic-gate  * modification, are permitted provided that the following conditions
60Sstevel@tonic-gate  * are met:
70Sstevel@tonic-gate  * 1. Redistributions of source code must retain the above copyright
80Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer.
90Sstevel@tonic-gate  * 2. Redistributions in binary form must reproduce the above copyright
100Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer in the
110Sstevel@tonic-gate  *    documentation and/or other materials provided with the distribution.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
140Sstevel@tonic-gate  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
150Sstevel@tonic-gate  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
160Sstevel@tonic-gate  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
170Sstevel@tonic-gate  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
180Sstevel@tonic-gate  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
190Sstevel@tonic-gate  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
200Sstevel@tonic-gate  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
210Sstevel@tonic-gate  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
220Sstevel@tonic-gate  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
230Sstevel@tonic-gate  */
246288Sjp161948 
256288Sjp161948 /*
268658SJan.Pechanec@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
276288Sjp161948  * Use is subject to license terms.
286288Sjp161948  */
296288Sjp161948 
306288Sjp161948 /*	$OpenBSD: myproposal.h,v 1.14 2002/04/03 09:26:11 markus Exp $	*/
316288Sjp161948 
326288Sjp161948 #ifndef	_MYPROPOSAL_H
336288Sjp161948 #define	_MYPROPOSAL_H
346288Sjp161948 
356288Sjp161948 #ifdef __cplusplus
366288Sjp161948 extern "C" {
376288Sjp161948 #endif
386288Sjp161948 
396288Sjp161948 
408658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_KEX			"diffie-hellman-group-exchange-sha1," \
418658SJan.Pechanec@Sun.COM 					"diffie-hellman-group1-sha1"
426288Sjp161948 
438658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_PK_ALG		"ssh-rsa,ssh-dss"
446288Sjp161948 
458658SJan.Pechanec@Sun.COM /*
468658SJan.Pechanec@Sun.COM  * Keep CBC modes in the back of the client default cipher list for backward
478658SJan.Pechanec@Sun.COM  * compatibility but remove them from the server side because there are some
488658SJan.Pechanec@Sun.COM  * potential security issues with those modes regarding SSH protocol version 2.
498658SJan.Pechanec@Sun.COM  * Since the client is the one who picks the cipher from the list offered by the
508658SJan.Pechanec@Sun.COM  * server the only way to force the client not to use CBC modes is not to
518658SJan.Pechanec@Sun.COM  * advertise those at all. Note that we still support all such CBC modes in the
528658SJan.Pechanec@Sun.COM  * server code, this is about the default server cipher list only. The list can
538658SJan.Pechanec@Sun.COM  * be changed in the Ciphers option in the sshd_config(4) file.
548658SJan.Pechanec@Sun.COM  *
558658SJan.Pechanec@Sun.COM  * Note that the ordering of ciphers on the server side is not relevant but we
568658SJan.Pechanec@Sun.COM  * must do it properly even here so that we can use the macro for the client
578658SJan.Pechanec@Sun.COM  * list as well.
588658SJan.Pechanec@Sun.COM  */
598658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_SERVER_ENCRYPT	"aes128-ctr,aes192-ctr,aes256-ctr," \
60*8805SJan.Pechanec@Sun.COM 					"arcfour128,arcfour256,arcfour"
616288Sjp161948 
628658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_CLIENT_ENCRYPT	KEX_DEFAULT_SERVER_ENCRYPT \
638658SJan.Pechanec@Sun.COM 					",aes128-cbc,aes192-cbc,aes256-cbc," \
648658SJan.Pechanec@Sun.COM 					"blowfish-cbc,3des-cbc"
656288Sjp161948 
668658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_MAC			"hmac-md5,hmac-sha1,hmac-sha1-96," \
678658SJan.Pechanec@Sun.COM 					"hmac-md5-96"
688658SJan.Pechanec@Sun.COM 
698658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_COMP		"none,zlib"
708658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_LANG		""
710Sstevel@tonic-gate 
720Sstevel@tonic-gate 
738658SJan.Pechanec@Sun.COM static char *my_srv_proposal[PROPOSAL_MAX] = {
740Sstevel@tonic-gate 	KEX_DEFAULT_KEX,
750Sstevel@tonic-gate 	KEX_DEFAULT_PK_ALG,
768658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_SERVER_ENCRYPT,
778658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_SERVER_ENCRYPT,
788658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_MAC,
798658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_MAC,
808658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_COMP,
818658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_COMP,
828658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_LANG,
838658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_LANG
848658SJan.Pechanec@Sun.COM };
858658SJan.Pechanec@Sun.COM 
868658SJan.Pechanec@Sun.COM static char *my_clnt_proposal[PROPOSAL_MAX] = {
878658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_KEX,
888658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_PK_ALG,
898658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_CLIENT_ENCRYPT,
908658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_CLIENT_ENCRYPT,
910Sstevel@tonic-gate 	KEX_DEFAULT_MAC,
920Sstevel@tonic-gate 	KEX_DEFAULT_MAC,
930Sstevel@tonic-gate 	KEX_DEFAULT_COMP,
940Sstevel@tonic-gate 	KEX_DEFAULT_COMP,
950Sstevel@tonic-gate 	KEX_DEFAULT_LANG,
960Sstevel@tonic-gate 	KEX_DEFAULT_LANG
970Sstevel@tonic-gate };
980Sstevel@tonic-gate 
990Sstevel@tonic-gate #ifdef __cplusplus
1000Sstevel@tonic-gate }
1010Sstevel@tonic-gate #endif
1020Sstevel@tonic-gate 
1030Sstevel@tonic-gate #endif /* _MYPROPOSAL_H */
104