Re: [TLS] Encrypt-then-MAC again (was Re: padding bug)

Juho Vähä-Herttua <juhovh@iki.fi> Fri, 29 November 2013 17:05 UTC

Return-Path: <juhovh@iki.fi>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 914271AE1BF for <tls@ietfa.amsl.com>; Fri, 29 Nov 2013 09:05:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.701
X-Spam-Level:
X-Spam-Status: No, score=-1.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, J_CHICKENPOX_34=0.6, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XSXii0AvbLCO for <tls@ietfa.amsl.com>; Fri, 29 Nov 2013 09:05:00 -0800 (PST)
Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by ietfa.amsl.com (Postfix) with ESMTP id EEF121AE12E for <tls@ietf.org>; Fri, 29 Nov 2013 09:04:12 -0800 (PST)
Received: from [10.178.135.118] (85-76-79-52-nat.elisa-mobile.fi [85.76.79.52]) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id 719491397D3; Fri, 29 Nov 2013 19:04:02 +0200 (EET)
References: <20131129162025.83A731AB0E@ld9781.wdf.sap.corp>
Mime-Version: 1.0 (1.0)
In-Reply-To: <20131129162025.83A731AB0E@ld9781.wdf.sap.corp>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Message-Id: <37189D49-4190-4DCA-B6E8-C46226D9F51E@iki.fi>
X-Mailer: iPhone Mail (11B554a)
From: =?utf-8?Q?Juho_V=C3=A4h=C3=A4-Herttua?= <juhovh@iki.fi>
Date: Fri, 29 Nov 2013 19:00:29 +0200
To: "mrex@sap.com" <mrex@sap.com>
Cc: "<tls@ietf.org>" <tls@ietf.org>, Peter Gutmann <p.gutmann@auckland.ac.nz>
Subject: Re: [TLS] Encrypt-then-MAC again (was Re: padding bug)
X-BeenThere: tls@ietf.org
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." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Nov 2013 17:05:02 -0000

> On 29.11.2013, at 18.20, mrex@sap.com (Martin Rex) wrote:
> 
> I'm perfectly OK with a solution for fixing the mac-pad-encrypt goof
> in GenericBlockCipher PDU for all existing versions of TLS, but I'm
> strongly opposed to moving the HMAC into the clear, and into particular
> I am strongly opposed to put the HMAC into the clear for the
> GenericStreamCipher PDU.

You have been quite clear about that, and I've got the impression that you are the only but very vocal opponent of encrypt-then-mac on this list. Although in GenericStreamCipher it offers no benefit, I still haven't seen a convincing argument about why encrypt-then-mac should not be used.

I'm sure you have good reasons for this opposition, so could you please explain them in one or two sentences. This excluding the "encrypting the HMAC makes it safer" argument, which might be true but as I understand is not well proven.

> Signaling of this PDU change will be through a new SCSV in ClientHello,
> confirmation by the Server through a simple ServerHelloExtension, similar
> to how signaling is done for rfc5746 (TLS renegotiation_info extension).

This might be the only way to solve this problem, but I must point out that SCSVs seem to be a solution for everything now. Browsers allow a version downgrade attack? Let's add an SCSV. The CBC handling is broken? Let's add an SCSV. How many SCSV hacks can we add?

Adding AEAD support for TLS <1.2 is a good idea and wouldn't require hacks, but I'm worried it wouldn't be adopted fast enough. Especially since CBC+HMAC AEAD ciphers that would be easiest to patch are impossible in TLS because of the way AEAD is implemented.

So I prefer fixing CBC first (with encrypt-then-mac unless otherwise proven) and then allowing AEAD in all versions to let people prepare for GCM in whatever version they use instead of trying to force TLS 1.2 upgrade with GCM, it clearly isn't working.


Juho