Re: [TLS] Last Call: <draft-ietf-tls-encrypt-then-mac-02.txt> (Encrypt-then-MAC for TLS and DTLS) to Proposed Standard

mrex@sap.com (Martin Rex) Mon, 16 June 2014 15:35 UTC

Return-Path: <mrex@sap.com>
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 1D1A61A007C; Mon, 16 Jun 2014 08:35:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.552
X-Spam-Level:
X-Spam-Status: No, score=-6.552 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 juIHhwWizBd8; Mon, 16 Jun 2014 08:35:01 -0700 (PDT)
Received: from smtpde01.sap-ag.de (smtpde01.sap-ag.de [155.56.68.170]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3273F1A007B; Mon, 16 Jun 2014 08:35:01 -0700 (PDT)
Received: from mail05.wdf.sap.corp by smtpde01.sap-ag.de (26) with ESMTP id s5GFYtOX007500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 16 Jun 2014 17:34:55 +0200 (MEST)
In-Reply-To: <CADi0yUN+A7QGZLeSDDXMLhK6mr4O09rGr0ZJy6AafPVSQJX1tA@mail.gmail.com>
To: Hugo Krawczyk <hugo@ee.technion.ac.il>
Date: Mon, 16 Jun 2014 17:34:55 +0200
X-Mailer: ELM [version 2.4ME+ PL125 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <20140616153455.977B21AD52@ld9781.wdf.sap.corp>
From: mrex@sap.com
X-SAP: out
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/Ghy-Sy7qFZ7dPYBI720HmzxruPE
Cc: "ietf\\@ietf.org" <ietf@ietf.org>, TLS Mailing List <tls@ietf.org>
Subject: Re: [TLS] Last Call: <draft-ietf-tls-encrypt-then-mac-02.txt> (Encrypt-then-MAC for TLS and DTLS) to Proposed Standard
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: mrex@sap.com
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: Mon, 16 Jun 2014 15:35:03 -0000

Hugo Krawczyk wrote:
>
> The technical results in my 2001 paper are correct but the conclusion
> regarding SSL/TLS is wrong. I assumed that TLS was using fresh IVs and that
> the MAC was computed on the encoded plaintext, i.e. Encode-Mac-Encrypt
> while TLS is doing Mac-Encode-Encrypt which is exactly what my theoretical
> example shows is insecure. The later padding attacks showed that the
> theoretical example of insecurity had a very practical instantiation in
> TLS.  While the paper shows correctly that MAC-then-Encrypt can be secure
> with both CBC and stream ciphers, it also shows that it requires a LOT of
> care about encoding - it turned out that TLS/SSL was not doing that. So if
> you want to keep Mac-then-Encrypt then you must change the encoding as well
> as how you apply the MAC. Changing to Encrypt-then-MAC is a much safer
> solution.

I agree with you that your paper demonstrates problem with
mac-extend-encrypt schemes.  And that it fails to notice that
TLS applies CBC padding after computing the MAC and before encryption,
and is therefore an mac-extend-encrypt scheme that can be susceptible to
decryption oracles.

But I strongly disagree to the assertion that "Encrypt-then-MAC" would
be a much safer scheme than *TRUE* MAC-then-Encrypt _withou_ any
extension inserted before the encryption such as CBC-padding.

In fact, the pad-mac-encrypt scheme for TLS-CBC-ciphersuites, as suggested
by Serge Vaudenay, is provably safer than the currently favoured
encrypt-then-MAC scheme.


-Martin