aboutsummaryrefslogtreecommitdiff
path: root/ssh/cipher.go
diff options
context:
space:
mode:
authorYan Zou <yzou@google.com>2014-04-14 10:43:20 -0700
committerAdam Langley <agl@golang.org>2014-04-14 10:43:20 -0700
commite1b0d6c49fae5632d0a563812fce85b5b542fbcf (patch)
tree629e28f89d1710158bdf454fedbd9823e163129a /ssh/cipher.go
parent058f0eec529666ecacd81b63aba586dad0b34a6b (diff)
downloadgo-x-crypto-e1b0d6c49fae5632d0a563812fce85b5b542fbcf.tar.xz
go.crypto/ssh: Add support for the pre-2006 RC4 cipher mode.
LGTM=hanwen R=agl, hanwen CC=golang-codereviews https://golang.org/cl/86600044
Diffstat (limited to 'ssh/cipher.go')
-rw-r--r--ssh/cipher.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/ssh/cipher.go b/ssh/cipher.go
index a58f10b..642696b 100644
--- a/ssh/cipher.go
+++ b/ssh/cipher.go
@@ -103,6 +103,12 @@ var cipherModes = map[string]*streamCipherMode{
"arcfour128": {16, 0, 1536, newRC4},
"arcfour256": {32, 0, 1536, newRC4},
+ // Cipher defined in RFC 4253, which describes SSH Transport Layer Protocol.
+ // Note that this cipher is not safe, as stated in RFC 4253: "Arcfour (and
+ // RC4) has problems with weak keys, and should be used with caution."
+ // RFC4345 introduces improved versions of Arcfour.
+ "arcfour": {16, 0, 0, newRC4},
+
// AES-GCM is not a stream cipher, so it is constructed with a
// special case. If we add any more non-stream ciphers, we
// should invest a cleaner way to do this.