Re: [Cfrg] [jose] GCM nonce reuse question

"Manger, James H" <James.H.Manger@team.telstra.com> Mon, 15 April 2013 01:55 UTC

Return-Path: <James.H.Manger@team.telstra.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5893121F92C1 for <cfrg@ietfa.amsl.com>; Sun, 14 Apr 2013 18:55:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.901
X-Spam-Level:
X-Spam-Status: No, score=-0.901 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, RELAY_IS_203=0.994]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hl1n4wINLLvS for <cfrg@ietfa.amsl.com>; Sun, 14 Apr 2013 18:55:38 -0700 (PDT)
Received: from ipxcvo.tcif.telstra.com.au (ipxcvo.tcif.telstra.com.au [203.35.135.208]) by ietfa.amsl.com (Postfix) with ESMTP id 4EE6921F92B2 for <cfrg@irtf.org>; Sun, 14 Apr 2013 18:55:37 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.87,472,1363093200"; d="scan'208";a="129790092"
Received: from unknown (HELO ipcbvi.tcif.telstra.com.au) ([10.97.217.204]) by ipocvi.tcif.telstra.com.au with ESMTP; 15 Apr 2013 11:55:36 +1000
X-IronPort-AV: E=McAfee;i="5400,1158,7045"; a="125367304"
Received: from wsmsg3706.srv.dir.telstra.com ([172.49.40.80]) by ipcbvi.tcif.telstra.com.au with ESMTP; 15 Apr 2013 11:55:36 +1000
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by wsmsg3706.srv.dir.telstra.com ([172.49.40.80]) with mapi; Mon, 15 Apr 2013 11:55:36 +1000
From: "Manger, James H" <James.H.Manger@team.telstra.com>
To: "cfrg@irtf.org" <cfrg@irtf.org>, "jose@ietf.org" <jose@ietf.org>
Date: Mon, 15 Apr 2013 11:55:34 +1000
Thread-Topic: [jose] [Cfrg] GCM nonce reuse question
Thread-Index: Ac4vy0pZp5NcBv21Sdau+wVKi4QJGQJp0EiA
Message-ID: <255B9BB34FB7D647A506DC292726F6E1150C74DDCF@WSMSG3153V.srv.dir.telstra.com>
References: <006a01ce2b3c$8f0d03b0$ad270b10$@augustcellars.com> <747787E65E3FBD4E93F0EB2F14DB556B183EF2E3@xmb-rcd-x04.cisco.com> <4E1F6AAD24975D4BA5B1680429673943675A0978@TK5EX14MBXC283.redmond.corp.microsoft.com> <004e01ce2fb9$74979730$5dc6c590$@augustcellars.com> <4EC6AC2C-8EE6-4433-8302-E884DD0B3C06@ve7jtb.com> <734D4714-BEF1-4E0C-8DB4-6753083F0F11@bbn.com>
In-Reply-To: <734D4714-BEF1-4E0C-8DB4-6753083F0F11@bbn.com>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-AU
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Subject: Re: [Cfrg] [jose] GCM nonce reuse question
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <http://www.irtf.org/mail-archive/web/cfrg>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <http://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Apr 2013 01:55:39 -0000

I think there are more options for handling multiple recipients of AEAD-secured content:


Option 3: Put all per-recipient info into one header; keep this header under the AEAD integrity check; have one nonce.
  COST: All recipients need to be known (and their key exchange info created) before the AEAD algorithm is applied.
  COST: The JWE JSON header structure needs to be adjusted (eg to have an array of recipient info) so it is not backward compatible with current drafts.
  COST: Doesn't help use cases where one recipient forwards an AEAD-secured message on to a new recipient (eg an XMPP system receives a message secured for a user and re-secures it for a specific device of that user). Changing recipients requires reapplying the AEAD operations.
  COST: Each recipient needs to see key exchange info of all recipients (privacy impact?).
  POSSIBLE-BENEFIT: Recipients, key exchanges, parameters, and content is secured as a complete unit.
 

Option 2b: Remove per-recipient info from AEAD integrity check; but add AEAD details to each key exchange. For instance, info about an AEAD operation (alg id, key id etc) potentially even including the whole ciphertext is used as the "label" for the RSAES-OAEP-ENCRYPT operation that encrypts the AEAD secret key for a recipient.
  BENEFIT: The key exchange is tied to a specific AEAD operation.
  COST: Crypto is not typically done like this; uncertain as to what exact security properties you are getting. Perhaps there are some similarities to NIST Concat KDF that adds "context" to key derivation: this adds "context" about an AEAD operation to the key exchange.


I agree with Richard Barnes that the per-recipient key exchange details should be outside the AEAD operation (not covered by the AEAD integrity check). Go with option 2 or 2b.
Then, separately, we can decide which details of the AEAD operation should be bound to each key exchange: none? AEAD key length? AEAD alg id? whole AEAD header? AEAD ciphertext? other context?


--
James Manger

> ----------
> From: jose-bounces@ietf.org [mailto:jose-bounces@ietf.org] On Behalf Of
> Richard Barnes
> Sent: Wednesday, 3 April 2013 4:55 AM
> … 
> The problem here is JWE, specifically the fact that the header (with
> per-recipient data) is covered by the integrity check.  If you remove
> the per-recipient data from the integrity check, then this problem goes
> away.  In that case, there is only one invocation of GCM (not one per
> recipient), so there's no problem.
> 
> So the choice that JOSE faces is from the following options:
> 
> Option 0. Outlaw GCM for multiple recipients.
>   COST: GCM
> 
> Option 1. Keep per-recipient info under integrity check, and require a
> fresh nonce for each recipient
>   COST: Removes all savings in the multiple recipient case
>   BENEFIT: Doesn't break backward compatibility with current, single-
> recipient JWE
> 
> Option 2. Remove per-recipient info from integrity check
>   COST: Breaks backward compatibility with current, single-recipient
> JWE
>   BENEFIT: Increases savings in multiple-recipient case (since no per-
> recipient integrity check value)
> 
> Option 0 is clearly not acceptable.  So basically, this is a choice
> about how much we want to let deployed code keep us from sensible
> architecture.
> 
> To me, the choice is clear.  Changing code is minor, short-term pain.
> Getting architecture wrong is major, long-term pain.  Let's do option
> (2).