Re: [jose] Issue #13 - use AES-GCM for Key Wrapping

Nat Sakimura <sakimura@gmail.com> Mon, 01 July 2013 17:01 UTC

Return-Path: <sakimura@gmail.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 5592D11E822A for <jose@ietfa.amsl.com>; Mon, 1 Jul 2013 10:01:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, NO_RELAYS=-0.001]
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 O0KWm6paZuWn for <jose@ietfa.amsl.com>; Mon, 1 Jul 2013 10:01:23 -0700 (PDT)
Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) by ietfa.amsl.com (Postfix) with ESMTP id 5E79521F9E39 for <jose@ietf.org>; Mon, 1 Jul 2013 10:01:23 -0700 (PDT)
Received: by mail-la0-f46.google.com with SMTP id eg20so4655771lab.19 for <jose@ietf.org>; Mon, 01 Jul 2013 10:01:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=tQi01u+XfOn3EWqP4aSSuEZ0RgTlwpUeN0EWo+7h19Q=; b=FEf/IJoJJfRNxwYfoef+96vik7kwNCzgBfurdRq1rF2Ao/yBwcTY83KbXdSexq2AU5 21lT/uPy2QSUsbcPwWinEuG1+Gt+CKA52aVKnfdWqQPPwVAt12Iq3+WbLgkdFNyfkdW5 VP8pAm8Zbd7jroI6V7/KGmGQoYNR/msC01FZxSsy3luVNuU4AEhcqBExEdL5KFre7pew SCOnKjcUKwn80RU6QPdfPdObSJWzxVV4mu4Mtxx1we/XIOvl5msDLJSpdKZwgpW7zt3p CaAGdaeASU2WKxnhRFtO4+nHZyq0LsWoaJB46ZMu9jvwTgxcAoLNkm2GiqAnqajHdAhM WNRA==
MIME-Version: 1.0
X-Received: by 10.112.53.10 with SMTP id x10mr12220907lbo.28.1372698079977; Mon, 01 Jul 2013 10:01:19 -0700 (PDT)
Received: by 10.112.199.33 with HTTP; Mon, 1 Jul 2013 10:01:19 -0700 (PDT)
In-Reply-To: <CAK+KdNWr-KBkO6_Z_iodcq-R_KBPFvFaU2i+ak5xLbLB=Vg9pw@mail.gmail.com>
References: <020f01ce71c4$80b8da90$822a8fb0$@augustcellars.com> <255B9BB34FB7D647A506DC292726F6E1151BE45229@WSMSG3153V.srv.dir.telstra.com> <049501ce7356$31644680$942cd380$@augustcellars.com> <CAK+KdNWr-KBkO6_Z_iodcq-R_KBPFvFaU2i+ak5xLbLB=Vg9pw@mail.gmail.com>
Date: Tue, 02 Jul 2013 02:01:19 +0900
Message-ID: <CABzCy2DFrsbDZEKbJ=uaVSEr5H+pFHt=SY0aPRHt1R78auBjqA@mail.gmail.com>
From: Nat Sakimura <sakimura@gmail.com>
To: Matias Woloski <matiasw@gmail.com>
Content-Type: multipart/alternative; boundary="001a11c3bb0c70e60b04e0762de0"
Cc: Jim Schaad <ietf@augustcellars.com>, "Manger, James H" <James.H.Manger@team.telstra.com>, "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] Issue #13 - use AES-GCM for Key Wrapping
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, 01 Jul 2013 17:01:25 -0000

+1


2013/6/28 Matias Woloski <matiasw@gmail.com>

> While I like the detailed examples of barnes draft. I have to agree, that
> the explosion of combinations is not good for implementers. It's
> overwhelming and doesn't foster interop on the open web. Look at XMLEnc and
> all the options you have, imho that's why standards don't end up being
> adopted wildly in every language (only some of those algos end up being
> implemented in each language creating an interop nightmare). Jones draft is
> simple enough (although it would be good to add some examples).
>
>
> On Thu, Jun 27, 2013 at 1:48 PM, Jim Schaad <ietf@augustcellars.com>wrote:
>
>> James,
>>
>> The small devices use case does present a reason for wanting to use
>> AES-GCM rather than AESKW for this case.  Specifically, there is no need to
>> have silicon devoted to doing AES decrypt.  All operations can be done just
>> with AES encrypt.
>>
>> jim
>>
>> > -----Original Message-----
>> > From: jose-bounces@ietf.org [mailto:jose-bounces@ietf.org] On Behalf Of
>> > Manger, James H
>> > Sent: Wednesday, June 26, 2013 7:40 PM
>> > To: jose@ietf.org
>> > Subject: Re: [jose] Issue #13 - use AES-GCM for Key Wrapping
>> >
>> > I don't think we should standardize
>> draft-jones-jose-aes-gcm-key-wrap-00. No
>> > rationale is apparent. We already have an AES-based key wrap algorithm
>> > (A128KW, A256KW), which has a 64-bit size overhead. The AES-GCM key
>> > wrap algorithm in this draft add almost no useful properties, but has a
>> 224-bit
>> > size overhead.
>> >
>> > I like the concatenation of the IV, ciphertext, and tag byte arrays.
>> But doing
>> > this here while content encryption serializes the same values as
>> dot-separated
>> > B64 blobs does smell of poor ad hoc design. It is nice to highlight how
>> a
>> > previous choice complicates extending JOSE to other algorithms, but
>> only if
>> > we then fix that previous choice.
>> >
>> > If the additional authenticated data (AAD) was used to bind the CEK
>> algorithm
>> > id (or other context info, as ConcatKDF does) to the wrapped key, then
>> there
>> > would at least be an extra security property that would make this key
>> wrap
>> > algorithm worth considering. For instance, instead of AAD being empty,
>> AAD
>> > could be the "key wrap: " + "enc" value.
>> >
>> > By reusing a CEK algorithm as a KEK algorithm, and supporting direct
>> > encryption, we substantially increase the risk that an attacker can
>> rearrange
>> > some encrypted content so a legitimate recipient treats it as an
>> encrypted key
>> > leading to security flaws.
>> >
>> > For example, Alice sends "Start of PIN = 8" confidentially to Bob:
>> >   {alg:dir,enc:A128GCM,kid:1}..iv.ciphertext.tag
>> > An attacker seeing this JOSE message learns nothing about the 1st digit
>> of the
>> > PIN.
>> > But if the attacker sends 10 messages to Bob for 10 guess of that digit:
>> >
>> > {alg:A128GCMKW,enc:A128GCM,kid:1}.iv|ciphertext|tag.ivN.ciphertextN.tag
>> > N
>> > where ivN.ciphertextN.tagN are calculated using an AES key of "Start of
>> PIN =
>> > <N>", then 9 messages will cause errors, while 1 message will be
>> accepted --
>> > revealing the supposedly confidential information in 10 guesses instead
>> of
>> > 2^128.
>> >
>> > Actually the above attack does not quite work for the compact encoding
>> as
>> > AAD is never empty for content encryption. I not certain for the JSON
>> > encoding. In any case, an explicit and unambiguous AAD value for key
>> > wrapping would be good.
>> >
>> > Finally, a key wrap algorithm like this should go to the IETF crypto
>> group
>> > (CRFG) instead of being invented in JOSE. We have already spent a year
>> > unpicking a JOSE-special AEAD algorithm.
>> >
>> > --
>> > James Manger
>> >
>> >
>> > > -----Original Message-----
>> > > From: jose-bounces@ietf.org [mailto:jose-bounces@ietf.org] On Behalf
>> > > Of Jim Schaad
>> > > Sent: Wednesday, 26 June 2013 2:53 AM
>> > > To: jose@ietf.org
>> > > Subject: [jose] Issue #13 - use AES-GCM for Key Wrapping
>> > >
>> > > We now have two documents   one from Richard and one from Mike   which
>> > > provide the two different ways that have been proposed for doing key
>> > > wrapping with an AEAD algorithm.
>> > >
>> > > Please review the two documents and provide comments to the list.
>> > >
>> > > Jim
>> >
>> > _______________________________________________
>> > jose mailing list
>> > jose@ietf.org
>> > https://www.ietf.org/mailman/listinfo/jose
>>
>> _______________________________________________
>> jose mailing list
>> jose@ietf.org
>> https://www.ietf.org/mailman/listinfo/jose
>>
>
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>
>


-- 
Nat Sakimura (=nat)
Chairman, OpenID Foundation
http://nat.sakimura.org/
@_nat_en