View | Details | Raw Unified | Return to bug 1022 | Differences between
and this patch

Collapse All | Expand All

(-)cipher.c (-17 / +32 lines)
Lines 54-79 struct Cipher { Link Here
54
	int	number;		/* for ssh1 only */
54
	int	number;		/* for ssh1 only */
55
	u_int	block_size;
55
	u_int	block_size;
56
	u_int	key_len;
56
	u_int	key_len;
57
	u_int	discard_len;
57
	const EVP_CIPHER	*(*evptype)(void);
58
	const EVP_CIPHER	*(*evptype)(void);
58
} ciphers[] = {
59
} ciphers[] = {
59
	{ "none",		SSH_CIPHER_NONE, 8, 0, EVP_enc_null },
60
	{ "none",		SSH_CIPHER_NONE, 8, 0, 0, EVP_enc_null },
60
	{ "des",		SSH_CIPHER_DES, 8, 8, EVP_des_cbc },
61
	{ "des",		SSH_CIPHER_DES, 8, 8, 0, EVP_des_cbc },
61
	{ "3des",		SSH_CIPHER_3DES, 8, 16, evp_ssh1_3des },
62
	{ "3des",		SSH_CIPHER_3DES, 8, 16, 0, evp_ssh1_3des },
62
	{ "blowfish",		SSH_CIPHER_BLOWFISH, 8, 32, evp_ssh1_bf },
63
	{ "blowfish",		SSH_CIPHER_BLOWFISH, 8, 32, 0, evp_ssh1_bf },
63
64
64
	{ "3des-cbc",		SSH_CIPHER_SSH2, 8, 24, EVP_des_ede3_cbc },
65
	{ "3des-cbc",		SSH_CIPHER_SSH2, 8, 24, 0, EVP_des_ede3_cbc },
65
	{ "blowfish-cbc",	SSH_CIPHER_SSH2, 8, 16, EVP_bf_cbc },
66
	{ "blowfish-cbc",	SSH_CIPHER_SSH2, 8, 16, 0, EVP_bf_cbc },
66
	{ "cast128-cbc",	SSH_CIPHER_SSH2, 8, 16, EVP_cast5_cbc },
67
	{ "cast128-cbc",	SSH_CIPHER_SSH2, 8, 16, 0, EVP_cast5_cbc },
67
	{ "arcfour",		SSH_CIPHER_SSH2, 8, 16, EVP_rc4 },
68
	{ "arcfour",		SSH_CIPHER_SSH2, 8, 16, 0, EVP_rc4 },
68
	{ "aes128-cbc",		SSH_CIPHER_SSH2, 16, 16, EVP_aes_128_cbc },
69
	{ "arcfour128",		SSH_CIPHER_SSH2, 8, 16, 1536, EVP_rc4 },
69
	{ "aes192-cbc",		SSH_CIPHER_SSH2, 16, 24, EVP_aes_192_cbc },
70
	{ "arcfour256",		SSH_CIPHER_SSH2, 8, 32, 1536, EVP_rc4 },
70
	{ "aes256-cbc",		SSH_CIPHER_SSH2, 16, 32, EVP_aes_256_cbc },
71
	{ "aes128-cbc",		SSH_CIPHER_SSH2, 16, 16, 0, EVP_aes_128_cbc },
72
	{ "aes192-cbc",		SSH_CIPHER_SSH2, 16, 24, 0, EVP_aes_192_cbc },
73
	{ "aes256-cbc",		SSH_CIPHER_SSH2, 16, 32, 0, EVP_aes_256_cbc },
71
	{ "rijndael-cbc@lysator.liu.se",
74
	{ "rijndael-cbc@lysator.liu.se",
72
				SSH_CIPHER_SSH2, 16, 32, EVP_aes_256_cbc },
75
				SSH_CIPHER_SSH2, 16, 32, 0, EVP_aes_256_cbc },
73
	{ "aes128-ctr",		SSH_CIPHER_SSH2, 16, 16, evp_aes_128_ctr },
76
	{ "aes128-ctr",		SSH_CIPHER_SSH2, 16, 16, 0, evp_aes_128_ctr },
74
	{ "aes192-ctr",		SSH_CIPHER_SSH2, 16, 24, evp_aes_128_ctr },
77
	{ "aes192-ctr",		SSH_CIPHER_SSH2, 16, 24, 0, evp_aes_128_ctr },
75
	{ "aes256-ctr",		SSH_CIPHER_SSH2, 16, 32, evp_aes_128_ctr },
78
	{ "aes256-ctr",		SSH_CIPHER_SSH2, 16, 32, 0, evp_aes_128_ctr },
76
	{ "acss@openssh.org",	SSH_CIPHER_SSH2, 16, 5, EVP_acss },
79
	{ "acss@openssh.org",	SSH_CIPHER_SSH2, 16, 5, 0, EVP_acss },
77
80
78
	{ NULL,			SSH_CIPHER_INVALID, 0, 0, NULL }
81
	{ NULL,			SSH_CIPHER_INVALID, 0, 0, NULL }
79
};
82
};
Lines 189-194 cipher_init(CipherContext *cc, Cipher *c Link Here
189
	static int dowarn = 1;
192
	static int dowarn = 1;
190
	const EVP_CIPHER *type;
193
	const EVP_CIPHER *type;
191
	int klen;
194
	int klen;
195
	u_char *junk, *discard;
192
196
193
	if (cipher->number == SSH_CIPHER_DES) {
197
	if (cipher->number == SSH_CIPHER_DES) {
194
		if (dowarn) {
198
		if (dowarn) {
Lines 226-231 cipher_init(CipherContext *cc, Cipher *c Link Here
226
	if (EVP_CipherInit(&cc->evp, NULL, (u_char *)key, NULL, -1) == 0)
230
	if (EVP_CipherInit(&cc->evp, NULL, (u_char *)key, NULL, -1) == 0)
227
		fatal("cipher_init: EVP_CipherInit: set key failed for %s",
231
		fatal("cipher_init: EVP_CipherInit: set key failed for %s",
228
		    cipher->name);
232
		    cipher->name);
233
234
	if (cipher->discard_len > 0) {		
235
		junk = xmalloc(cipher->discard_len);
236
		discard = xmalloc(cipher->discard_len);
237
		if (EVP_Cipher(&cc->evp, discard, junk,
238
		    cipher->discard_len) == 0)
239
			fatal("evp_crypt: EVP_Cipher failed during discard");
240
		memset(discard, 0, cipher->discard_len);
241
		xfree(junk);
242
		xfree(discard);
243
	}
229
}
244
}
230
245
231
void
246
void
(-)myproposal.h (-1 / +2 lines)
Lines 28-34 Link Here
28
	"diffie-hellman-group1-sha1"
28
	"diffie-hellman-group1-sha1"
29
#define	KEX_DEFAULT_PK_ALG	"ssh-rsa,ssh-dss"
29
#define	KEX_DEFAULT_PK_ALG	"ssh-rsa,ssh-dss"
30
#define	KEX_DEFAULT_ENCRYPT \
30
#define	KEX_DEFAULT_ENCRYPT \
31
	"aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour," \
31
	"aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \
32
	"arcfour128,arcfour256,arcfour," \
32
	"aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se," \
33
	"aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se," \
33
	"aes128-ctr,aes192-ctr,aes256-ctr"
34
	"aes128-ctr,aes192-ctr,aes256-ctr"
34
#define	KEX_DEFAULT_MAC \
35
#define	KEX_DEFAULT_MAC \
(-)ssh.1 (-2 / +5 lines)
Lines 479-492 The supported ciphers are Link Here
479
.Dq aes128-ctr ,
479
.Dq aes128-ctr ,
480
.Dq aes192-ctr ,
480
.Dq aes192-ctr ,
481
.Dq aes256-ctr ,
481
.Dq aes256-ctr ,
482
.Dq arcfour128 ,
483
.Dq arcfour256 ,
482
.Dq arcfour ,
484
.Dq arcfour ,
483
.Dq blowfish-cbc ,
485
.Dq blowfish-cbc ,
484
and
486
and
485
.Dq cast128-cbc .
487
.Dq cast128-cbc .
486
The default is
488
The default is
487
.Bd -literal
489
.Bd -literal
488
  ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
490
  ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
489
    aes192-cbc,aes256-cbc''
491
    arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
492
    aes192-ctr,aes256-ctr''
490
.Ed
493
.Ed
491
.It Fl D Ar port
494
.It Fl D Ar port
492
Specifies a local
495
Specifies a local
(-)ssh_config.5 (-2 / +5 lines)
Lines 193-206 The supported ciphers are Link Here
193
.Dq aes128-ctr ,
193
.Dq aes128-ctr ,
194
.Dq aes192-ctr ,
194
.Dq aes192-ctr ,
195
.Dq aes256-ctr ,
195
.Dq aes256-ctr ,
196
.Dq arcfour128 ,
197
.Dq arcfour256 ,
196
.Dq arcfour ,
198
.Dq arcfour ,
197
.Dq blowfish-cbc ,
199
.Dq blowfish-cbc ,
198
and
200
and
199
.Dq cast128-cbc .
201
.Dq cast128-cbc .
200
The default is
202
The default is
201
.Bd -literal
203
.Bd -literal
202
  ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
204
  ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
203
    aes192-cbc,aes256-cbc''
205
    arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
206
    aes192-ctr,aes256-ctr''
204
.Ed
207
.Ed
205
.It Cm ClearAllForwardings
208
.It Cm ClearAllForwardings
206
Specifies that all local, remote and dynamic port forwardings
209
Specifies that all local, remote and dynamic port forwardings
(-)sshd_config.5 (-2 / +5 lines)
Lines 168-181 The supported ciphers are Link Here
168
.Dq aes128-ctr ,
168
.Dq aes128-ctr ,
169
.Dq aes192-ctr ,
169
.Dq aes192-ctr ,
170
.Dq aes256-ctr ,
170
.Dq aes256-ctr ,
171
.Dq arcfour128 ,
172
.Dq arcfour256 ,
171
.Dq arcfour ,
173
.Dq arcfour ,
172
.Dq blowfish-cbc ,
174
.Dq blowfish-cbc ,
173
and
175
and
174
.Dq cast128-cbc .
176
.Dq cast128-cbc .
175
The default is
177
The default is
176
.Bd -literal
178
.Bd -literal
177
  ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
179
  ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
178
    aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr''
180
    arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
181
    aes192-ctr,aes256-ctr''
179
.Ed
182
.Ed
180
.It Cm ClientAliveInterval
183
.It Cm ClientAliveInterval
181
Sets a timeout interval in seconds after which if no data has been received
184
Sets a timeout interval in seconds after which if no data has been received

Return to bug 1022