Re: [TLS] AAED ciphers: AES-GCM vs AES-EAX/AES-CCM: a meta-analysis

"Paterson, Kenny" <Kenny.Paterson@rhul.ac.uk> Tue, 13 January 2015 17:53 UTC

Return-Path: <Kenny.Paterson@rhul.ac.uk>
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 C64C81A8BB2 for <tls@ietfa.amsl.com>; Tue, 13 Jan 2015 09:53:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.602
X-Spam-Level:
X-Spam-Status: No, score=-1.602 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, MIME_8BIT_HEADER=0.3, SPF_HELO_PASS=-0.001, 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 CCBBnGJyIQkC for <tls@ietfa.amsl.com>; Tue, 13 Jan 2015 09:53:06 -0800 (PST)
Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0612.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe00::612]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA29D1A9029 for <tls@ietf.org>; Tue, 13 Jan 2015 09:53:05 -0800 (PST)
Received: from DBXPR03MB383.eurprd03.prod.outlook.com (10.141.10.15) by DBXPR03MB381.eurprd03.prod.outlook.com (10.141.10.11) with Microsoft SMTP Server (TLS) id 15.1.53.17; Tue, 13 Jan 2015 17:52:41 +0000
Received: from DBXPR03MB383.eurprd03.prod.outlook.com ([10.141.10.15]) by DBXPR03MB383.eurprd03.prod.outlook.com ([10.141.10.15]) with mapi id 15.01.0053.000; Tue, 13 Jan 2015 17:52:41 +0000
From: "Paterson, Kenny" <Kenny.Paterson@rhul.ac.uk>
To: Manuel Pégourié-Gonnard <mpg@polarssl.org>, Peter Gutmann <pgut001@cs.auckland.ac.nz>, "<tls@ietf.org>" <tls@ietf.org>
Thread-Topic: [TLS] AAED ciphers: AES-GCM vs AES-EAX/AES-CCM: a meta-analysis
Thread-Index: AdApm1DpFjNg+4muRmKsYOSI8dViWQAASE0AAWzH8IAAAojMgA==
Date: Tue, 13 Jan 2015 17:52:41 +0000
Message-ID: <D0DB0820.3C588%kenny.paterson@rhul.ac.uk>
References: <9A043F3CF02CD34C8E74AC1594475C73AAF525B9@uxcn10-tdc05.UoA.auckland.ac.nz> <D0D16976.3BD1D%kenny.paterson@rhul.ac.uk> <54B54A5F.7020401@polarssl.org>
In-Reply-To: <54B54A5F.7020401@polarssl.org>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.4.7.141117
x-originating-ip: [134.219.227.30]
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Kenny.Paterson@rhul.ac.uk;
x-dmarcaction-test: None
x-microsoft-antispam: BCL:0;PCL:0;RULEID:(3005003);SRVR:DBXPR03MB381;
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:;SRVR:DBXPR03MB381;
x-forefront-prvs: 045584D28C
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(189002)(479174004)(51704005)(243025005)(199003)(24454002)(83506001)(77156002)(54356999)(66066001)(105586002)(106356001)(40100003)(62966003)(19580395003)(19580405001)(50986999)(107886001)(76176999)(2900100001)(2656002)(102836002)(122556002)(15975445007)(68736005)(2950100001)(97736003)(87936001)(74482002)(36756003)(64706001)(46102003)(101416001)(77096005)(86362001)(92566002)(491001); DIR:OUT; SFP:1101; SCL:1; SRVR:DBXPR03MB381; H:DBXPR03MB383.eurprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: rhul.ac.uk does not designate permitted sender hosts)
Content-Type: text/plain; charset="iso-8859-1"
Content-ID: <44B2868B3A312C4EA6A1AABA25C08CD5@eurprd03.prod.outlook.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: rhul.ac.uk
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2015 17:52:41.6443 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 2efd699a-1922-4e69-b601-108008d28a2e
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR03MB381
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/td7LAZYBZiGiTiWSQIjRIBYPFyE>
Subject: Re: [TLS] AAED ciphers: AES-GCM vs AES-EAX/AES-CCM: a meta-analysis
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: Tue, 13 Jan 2015 17:53:09 -0000

Hi

On 13/01/2015 16:39, "Manuel Pégourié-Gonnard" <mpg@polarssl.org> wrote:
>On 06/01/2015 11:35, Paterson, Kenny wrote:
>> It's good that nothing supports the truncated-MAC extension, because, in
>> combination with TLS's support for variable length padding, it
>>introduces
>> a security vulnerability. See:
>> 
>> http://www.isg.rhul.ac.uk/~kp/mee-comp.pdf
>> 
>> 
>> which shows that if the tag size (MAC length) is shorter than the
>>CBC-mode
>> block size, then there's a distinguishing attack that can tell the
>> difference between the encryption of a short message and a longer
>>message
>> (even though both are padded to the same size before encryption).
>> 
>But if one does not expect any length hiding, is there still a problem
>with
>truncated MACs?

I think one would expect length hiding at least up to the granularity of
the block size in TLS with CBC mode. (The RFC even suggests that more
should be possible: "Lengths longer than necessary might be desirable to
frustrate attacks on a protocol that are based on analysis of the lengths
of exchanged messages." [1])

As a special case of the general attack, consider a notional application
using TLS that sends either the message "YES" or the message "NO". Suppose
we negotiate truncated MACs, and the TLS Record Protocol implementation
selects the amount of padding to add at random (from the set of possible
padding lengths allowed under the TLS padding scheme).

By truncating the ciphertext, doing some bit flipping, and reinjecting the
modified ciphertext, an adversary can tell whether "YES" or "NO" was
originally encrypted. (This assumes that the minimum amount of padding is
NOT selected; this happens with probability roughly 15/16 under the above
assumptions.) 

I'd consider that to be an attack in your "don't expect any length hiding"
setting - after all, the difference in plaintext lengths is just 1 byte,
which is well below the CBC-mode block size. Does that seem reasonable, or
is it still outside your attack model?

Cheers

Kenny

[1] RFC 5246, Section 6.2.3.2