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

Michael D'Errico <mike-list@pobox.com> Sun, 10 November 2013 20:29 UTC

Return-Path: <mike-list@pobox.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id 1F33721E8142 for <tls@ietfa.amsl.com>; Sun, 10 Nov 2013 12:29:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599]
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id zJRTK9iUsCwZ for <tls@ietfa.amsl.com>; Sun, 10 Nov 2013 12:28:57 -0800 (PST)
Received: from sasl.smtp.pobox.com (a-pb-sasl-quonix.pobox.com []) by ietfa.amsl.com (Postfix) with ESMTP id 0956021E808A for <tls@ietf.org>; Sun, 10 Nov 2013 12:28:55 -0800 (PST)
Received: from sasl.smtp.pobox.com (unknown []) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 0F3FFCDA1; Sun, 10 Nov 2013 15:28:55 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=Ij8agNQtRqRb f2p9t4KWgPApCOs=; b=qmLH80l71xq+iK7OJl6VctEH8LUmJ3Efl0NIKtM0UFfB lOMuht6vBKSnDu3hpL80Zn9CKs52t0MoNkPE1rewTPvGrw1I6fKZOX6LTerWa7np ZttAuz+1nSoMN1tNqGx04USJKaao1c+dHnBbhkRvkRG6EMP30TB+BKT/+uQ3yb4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=message-id:date :from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=CImq1k DED9jPlEg/BEYmVxWRW1j/NXqbswLj6K8xXKtzhtZYD+C9Se2v7XcdBkUTphom4f 0E3/At7q+LK8R7n6olM1S2fj5wIEOzX9Z8wS3sh6pDAhk+wblTdiSNjRZj6My19s MCsJ1yBuQQ6s7N1FhxhxcvM9d+alZwJTLtWQA=
Received: from a-pb-sasl-quonix.pobox.com (unknown []) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 058F0CDA0; Sun, 10 Nov 2013 15:28:55 -0500 (EST)
Received: from iMac.local (unknown []) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 9597ACD9F; Sun, 10 Nov 2013 15:28:53 -0500 (EST)
Message-ID: <527FEC83.9020107@pobox.com>
Date: Sun, 10 Nov 2013 12:28:51 -0800
From: Michael D'Errico <mike-list@pobox.com>
User-Agent: Thunderbird (Macintosh/20100228)
MIME-Version: 1.0
To: Nikos Mavrogiannopoulos <nmav@gnutls.org>
References: <AAE0766F5AF36B46BAB7E0EFB927320630E4A54175@GBTWK10E001.Technology.local> <522BE808.4090405@stpeter.im> <522C88D8.5030702@gnutls.org>
In-Reply-To: <522C88D8.5030702@gnutls.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Pobox-Relay-ID: B7B2CC9E-4A46-11E3-8E23-F66B0E5B5709-38729857!a-pb-sasl-quonix.pobox.com
Cc: "'tls@ietf.org'" <tls@ietf.org>
Subject: [TLS] Encrypt-then-MAC again (was Re: padding bug)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.12
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: Sun, 10 Nov 2013 20:29:08 -0000

In trying to figure out what's stalling the encrypt-then-mac draft
I came across this old message (below).  The complaint against the
draft appears to be that since the MAC is no longer encrypted, there
may be a way to recover the secret HMAC key.  HMAC-MD5 is mentioned
as the problem, so I checked to see which cipher suites use it.

The 13 cipher suites using MD5 are:

   A     0001    TLS_RSA_WITH_NULL_MD5
   B     0003    TLS_RSA_EXPORT_WITH_RC4_40_MD5
   C     0004    TLS_RSA_WITH_RC4_128_MD5
   D     0006    TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5
   E     0017    TLS_DH_anon_EXPORT_WITH_RC4_40_MD5
   F     0018    TLS_DH_anon_WITH_RC4_128_MD5
   G     0022    TLS_KRB5_WITH_DES_CBC_MD5
   H     0023    TLS_KRB5_WITH_3DES_EDE_CBC_MD5
   I     0024    TLS_KRB5_WITH_RC4_128_MD5
   J     0025    TLS_KRB5_WITH_IDEA_CBC_MD5
   K     0029    TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
   L     002A    TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5
   M     002B    TLS_KRB5_EXPORT_WITH_RC4_40_MD5

Eight of these (A, B, D, E, G, K, L, and M) are considered trivially
breakable; F allows for a MitM; J uses the deprecated IDEA cipher;
and C and I use RC4 which we now know is completely broken.

That leaves only one cipher suite to possibly be concerned about:

   H     0023    TLS_KRB5_WITH_3DES_EDE_CBC_MD5

Do we really want to hold up the encrypt-then-mac draft any longer
because of this one Kerberos/triple-DES/MD5 cipher suite?


Nikos Mavrogiannopoulos wrote:
> On 09/08/2013 04:59 AM, Peter Saint-Andre wrote:
>>> As I recall there were three proposals for resolving the padding
>>> bug in TLS
>>> 1.       An extension for Pad First (i.e. padding before an
>>> otherwise standard TLS mode of operation)
>>> 2.       An extension for Encrypt-then-MAC (i.e. this draft)
>>> 3.       The replacement of each existing cipher suite with an 
>>> equivalent AEAD one
>>> Was any consensus achieved as to the best approach?
>> I never saw further discussion on this topic. Are there I-Ds for each
>> approach? #3 seems onerous to me (and doubling the number of cipher
>> suites doesn't seem like a desirable outcome), and as far as I can
>> tell there's no specification for #1. Although I am not a TLS expert,
>> the Encrypt-then-MAC I-D referenced above seems reasonable, it neatly
>> solves a real-world problem, and we have running code; thus IMHO
>> formalization of this approach deserves to be considered in the WG.
> It is important when trying to solve an issue not to introduce new
> issues. The current proposal for #2 unfortunately does not take into
> account known counter-measures for key recovery attacks in MACs (see [0]).
> regards,
> Nikos
> [0]. http://www.ietf.org/mail-archive/web/tls/current/msg09520.html