Re: [Cfrg] Salsa20 stream cipher in TLS

Simon Josefsson <simon@josefsson.org> Mon, 18 March 2013 20:55 UTC

Return-Path: <simon@josefsson.org>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8398D21F916C; Mon, 18 Mar 2013 13:55:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -99.909
X-Spam-Level:
X-Spam-Status: No, score=-99.909 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FH_HOST_EQ_D_D_D_D=0.765, HELO_MISMATCH_COM=0.553, HOST_EQ_STATICB=1.372, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nMK4lbi3Z+4x; Mon, 18 Mar 2013 13:55:54 -0700 (PDT)
Received: from yxa-v.extundo.com (static-213-115-179-173.sme.bredbandsbolaget.se [213.115.179.173]) by ietfa.amsl.com (Postfix) with ESMTP id A29D121F914F; Mon, 18 Mar 2013 13:55:53 -0700 (PDT)
Received: from latte.josefsson.org (host-95-192-103-177.mobileonline.telia.com [95.192.103.177]) (authenticated bits=0) by yxa-v.extundo.com (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id r2IKthCd009249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 18 Mar 2013 21:55:45 +0100
From: Simon Josefsson <simon@josefsson.org>
To: Wan-Teh Chang <wtc@google.com>
References: <87ppyxhc6y.fsf@latte.josefsson.org> <747787E65E3FBD4E93F0EB2F14DB556B183EB8AD@xmb-rcd-x04.cisco.com> <CALTJjxG7H+TTLeDW279SK5fWi13c2HPpkFKt3gLhv7VD__p0Cg@mail.gmail.com>
OpenPGP: id=B565716F; url=http://josefsson.org/key.txt
X-Hashcash: 1:22:130318:tls@ietf.org::K8nk1fUrLw1piW/7:3bnc
X-Hashcash: 1:22:130318:cfrg@irtf.org::+Ps6paRixAR8yNrV:Bek3
X-Hashcash: 1:22:130318:wtc@google.com::gE+KLXI0W4qEv3OR:GDSS
X-Hashcash: 1:22:130318:joachim@secworks.se::f3lrVB5nPrZ37699:IqUe
X-Hashcash: 1:22:130318:mcgrew@cisco.com::Ua0cWHXJYLWnHsCl:UOB+
Date: Mon, 18 Mar 2013 21:55:38 +0100
In-Reply-To: <CALTJjxG7H+TTLeDW279SK5fWi13c2HPpkFKt3gLhv7VD__p0Cg@mail.gmail.com> (Wan-Teh Chang's message of "Mon, 18 Mar 2013 12:48:51 -0700")
Message-ID: <87620o77hx.fsf@latte.josefsson.org>
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Cc: "David McGrew (mcgrew)" <mcgrew@cisco.com>, "cfrg@irtf.org" <cfrg@irtf.org>, "joachim@secworks.se" <joachim@secworks.se>, "tls@ietf.org" <tls@ietf.org>
Subject: Re: [Cfrg] Salsa20 stream cipher in TLS
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <http://www.irtf.org/mail-archive/web/cfrg>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <http://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Mar 2013 20:55:54 -0000

Wan-Teh Chang <wtc@google.com> writes:

> On Sun, Mar 17, 2013 at 3:51 PM, Simon Josefsson <simon@josefsson.org> wrote:
>> All,
>>
>> FYI, we have published -00 of a draft that describes how the Salsa20
>> stream cipher can be added to TLS and DTLS, see:
>>
>> http://tools.ietf.org/html/draft-josefsson-salsa20-tls
>
> Hi Simon,
>
> I am interested in this work. I am especially interested in your plan
> to allow the salsa20 cipher suites to be used in TLS 1.0 and TLS
> 1.1, which you stated in the first paragraph of the Introduction
> section.
>
> Since all of the new cipher suite names end in _SHA256, I
> infer the MAC algorithm is hmac_sha256. (The fact is
> not explicitly stated in the -00 draft.)

Hi Wan-Teh and thank you for the review.  Good catch, I have added a
paragraph explaining what the MAC algorithm should be.

> It is important to clarify how hmac_sha256 can be used in TLS 1.0 and
> TLS 1.1, because a naive implementor would see the old definition of
> MACAlgorithm in TLS 1.0 and 1.1:
>
>     enum { null, md5, sha } MACAlgorithm;
>
> and conclude that hmac_sha256 can't be used in TLS
> 1.0 and 1.1.

Right.

Would adding a set of cipher suites that use HMAC-SHA1 resolve this?  We
have added them already in our working copy for performance reasons.  It
is not clear whether there is any point in also having HMAC-SHA256, it
destroys the performance properties.

> I'm also interested in figuring out if these cipher suites
> can be used in SSL 3.0. The only difficulty I see is
> extending the SSL 3.0 MAC algorithm to hash=sha256
> (see the definition of the SSL 3.0 MAC in Section 5.2.3.1
> of RFC 6101) -- it is not clear what should be the size of
> pad_1 and pad_2 for hash=sha256.

I'm hoping that using HMAC-SHA1 here would solve this too, right?

> The reason I'm interested in SSL 3.0 is that web browsers,
> when talking to Google servers, which implement TLS/SSL
> version negotiation correctly, are still downgraded to SSL 3.0
> by network errors injected by certain network devices.

Having compability with SSL 3.0 would be nice.  The next version will
mention SSL 3.0 compatibility too.

/Simon