Re: [jose] [Cfrg] Authenticated Encryption with AES-CBC and HMAC-SHA, version 01

"David McGrew (mcgrew)" <mcgrew@cisco.com> Mon, 12 November 2012 23:39 UTC

Return-Path: <mcgrew@cisco.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8440321F8786 for <jose@ietfa.amsl.com>; Mon, 12 Nov 2012 15:39:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -110.556
X-Spam-Level:
X-Spam-Status: No, score=-110.556 tagged_above=-999 required=5 tests=[AWL=0.043, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hnD-Y5pXAwGq for <jose@ietfa.amsl.com>; Mon, 12 Nov 2012 15:39:35 -0800 (PST)
Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by ietfa.amsl.com (Postfix) with ESMTP id 983F221F8674 for <jose@ietf.org>; Mon, 12 Nov 2012 15:39:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2468; q=dns/txt; s=iport; t=1352763575; x=1353973175; h=from:to:cc:subject:date:message-id:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=CfhQMd/wi5U9Z3cUDSDgdUCOlZv597bwG8WrdKDjZ5k=; b=RShkj5zpEIguV6Gn6a3VlEY4f/bSR7ey/HTqWfU6xcB2wi25fyK+yNX7 kxBE/Oxg095o51+vnFj3NuFR9AVTMUjsqFFN0/x3fAvV8rejdJmTWRg1d PE2kxLsBBGkTLIi9BBnKpVJPYfUkF1Pt+k3sLqQVZWaGEzkMyEXrbeTzU 8=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EAG+HoVCtJV2c/2dsb2JhbABEw2OBCIIeAQEBAwESAQVhEgEIDgMDAQILHTkUCQgCBA4FCBqHYgaaBKANjBWDboF7YQOIJZwvgWuCYg2CGQ
X-IronPort-AV: E=McAfee;i="5400,1158,6894"; a="141455826"
Received: from rcdn-core-5.cisco.com ([173.37.93.156]) by rcdn-iport-2.cisco.com with ESMTP; 12 Nov 2012 23:39:35 +0000
Received: from xhc-aln-x15.cisco.com (xhc-aln-x15.cisco.com [173.36.12.89]) by rcdn-core-5.cisco.com (8.14.5/8.14.5) with ESMTP id qACNdY8V000976 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 12 Nov 2012 23:39:35 GMT
Received: from xmb-rcd-x04.cisco.com ([169.254.8.200]) by xhc-aln-x15.cisco.com ([173.36.12.89]) with mapi id 14.02.0318.001; Mon, 12 Nov 2012 17:39:34 -0600
From: "David McGrew (mcgrew)" <mcgrew@cisco.com>
To: Dan Harkins <dharkins@lounge.org>
Thread-Topic: [Cfrg] Authenticated Encryption with AES-CBC and HMAC-SHA, version 01
Thread-Index: AQHNwRNEN8doFmnIpEGgEt2l6seQrpfm7JkA
Date: Mon, 12 Nov 2012 23:39:33 +0000
Message-ID: <747787E65E3FBD4E93F0EB2F14DB556B0F50AC3E@xmb-rcd-x04.cisco.com>
In-Reply-To: <3bfc8545d5829d56d26ceafba6d8d1f3.squirrel@www.trepanning.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.2.1.120420
x-originating-ip: [10.117.10.228]
x-tm-as-product-ver: SMEX-10.2.0.1135-7.000.1014-19356.005
x-tm-as-result: No--40.253500-8.000000-31
x-tm-as-user-approved-sender: No
x-tm-as-user-blocked-sender: No
Content-Type: text/plain; charset="iso-8859-1"
Content-ID: <AB07704F1715384C885312219ECD65DA@cisco.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailman-Approved-At: Mon, 12 Nov 2012 22:26:20 -0800
Cc: Mike Jones <michael.jones@microsoft.com>, "cfrg@irtf.org" <cfrg@irtf.org>, "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] [Cfrg] Authenticated Encryption with AES-CBC and HMAC-SHA, version 01
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/jose>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Nov 2012 23:39:36 -0000

On 11/12/12 3:21 PM, "Dan Harkins" <dharkins@lounge.org> wrote:

>
>  Hi Mike,
>
>> From: Mike Jones
>> <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>>
>> Date: Monday, November 12, 2012 1:55 PM
>> To: Cisco Employee <mcgrew@cisco.com<mailto:mcgrew@cisco.com>>,
>> "cfrg@irtf.org<mailto:cfrg@irtf.org>"
>> <cfrg@irtf.org<mailto:cfrg@irtf.org>>,
>> "jose@ietf.org<mailto:jose@ietf.org>"
>> <jose@ietf.org<mailto:jose@ietf.org>>
>> Subject: RE: [Cfrg] Authenticated Encryption with AES-CBC and HMAC-SHA,
>> version 01
>>
>> As background, if there was a version of this spec that did not assume
>> that the parameters would be concatenated together in a specific way,
>>but
>> left them as independent inputs and outputs, as AES GCM and AES CTR do,
>>it
>> would be a better match for JOSE¹s use case.
>
>  I encourage you to look into SIV mode, an AEAD scheme found in
>RFC 5297. SIV was defined by Rogaway and Shrimpton (in a paper
>found in the RFC) and is provably secure.
>
>  It takes a vector of input as additional authenticated data which will
>be authenticated, and a plaintext which will be authenticated and
>encrypted. It does not assume that the parameters are concatenated
>together, it's just a vector of separate inputs.
>
>  Additionally, SIV mode does not require a random IV/nonce. It works
>just fine if you have one, and it won't collapse if it is repeated (as GCM
>does) or is predictable (as CBC-HMAC does), and it works if you don't
>have, or want to have, one. In that fashion it is more robust than other
>AEAD schemes. The downside is that it's slower than GCM but is probably
>faster than CBC-HMAC with SHA2.

AES-SIV is in several ways technically superior to AES-CBC-HMAC-SHA.
However, the motivation to use the latter algorithm is its widespread
availability, as I understand it.   Mike and some other folks did a survey
of what crypto that is available.  (Perhaps someone can send a reference,
it is a good survey.)

Despite SIV's flexibility, it doesn't address Mike's complaint, because it
does not have an authentication tag that is separate from the ciphertext.
 Instead, it has the synthetic IV (which acts like an auth tag) combined
with the ciphertext.

As an aside, if SIV is used for JOSE, it can use the RFC 5116 interface
(see Sections 6.1-6.3 of the SIV RFC) and essentially would need to do so.
 

David

>
>  regards,
>
>  Dan.
>
>
>