Re: [TLS] chacha to replace RC4 (was: Salsa vs. ChaCha)

Nikos Mavrogiannopoulos <> Fri, 06 December 2013 13:15 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id AD0F31ADFAF for <>; Fri, 6 Dec 2013 05:15:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -6.903
X-Spam-Status: No, score=-6.903 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 7iDwAybnnN3z for <>; Fri, 6 Dec 2013 05:15:05 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 00D391ADFAD for <>; Fri, 6 Dec 2013 05:15:04 -0800 (PST)
Received: from ( []) by (8.14.4/8.14.4) with ESMTP id rB6DExW6020413 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 6 Dec 2013 08:15:00 -0500
Received: from [] ( []) by (8.14.4/8.14.4) with ESMTP id rB6DEvmT020060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 Dec 2013 08:14:59 -0500
Message-ID: <>
From: Nikos Mavrogiannopoulos <>
To: Robert Ransom <>
Date: Fri, 06 Dec 2013 14:14:57 +0100
In-Reply-To: <>
References: <> <> <> <> <>
Content-Type: text/plain; charset="UTF-8"
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on
Subject: Re: [TLS] chacha to replace RC4 (was: Salsa vs. ChaCha)
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 06 Dec 2013 13:15:06 -0000

On Fri, 2013-12-06 at 04:54 -0800, Robert Ransom wrote:

> > We believe there are merits in selecting a winner of cryptographic
> > competition, but given your comments and that Chacha was the
> > recommendation of the CFRG there is no need to delay things if Chacha vs
> > Salsa20 is only issue to replace RC4.
> The other issue in replacing RC4 with Salsa20 or ChaCha is that the
> currently available efficient implementations of Salsa20 and ChaCha
> encrypt a whole message at once, rather than incrementally generating
> a stream as with RC4.  (And modifying them to do the latter would add
> considerable complexity -- if it must be done, I would generate 3 or 4
> blocks of output at a time and have some other piece of code XOR the
> keystream with the data.)

Which ones are you referring to? I have been using salsa20 with a sane
API that allows encrypting message by message (see nettle's
implementation of salsa20).

> Salsa20 and ChaCha are meant to be used as in Adam Langley's draft,
> not as replacements for RC4.

Are you suggesting that neither is good for TLS? I disagree, as if you
see my IETF88 presentation slides, Salsa20 performs much better than RC4
_in TLS_, making it suitable for a replacement.

Adam's draft proposes a novel scheme. While that this is a good scheme,
it can only be used in TLS 1.2 or later, and there will be competing
AEAD schemes coming from the CAESAR competition. We need a replacement
for RC4 now, that can (ideally) be patched in old implementations as