Re: [jose] SPI - KID conflict -- Re: SPI proposal

Hannes Tschofenig <hannes.tschofenig@gmx.net> Fri, 08 February 2013 08:06 UTC

Return-Path: <hannes.tschofenig@gmx.net>
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 1BE2021F854F for <jose@ietfa.amsl.com>; Fri, 8 Feb 2013 00:06:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.868
X-Spam-Level:
X-Spam-Status: No, score=-101.868 tagged_above=-999 required=5 tests=[AWL=0.112, BAYES_00=-2.599, RCVD_IN_SORBS_WEB=0.619, 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 MULSrHxRFH2k for <jose@ietfa.amsl.com>; Fri, 8 Feb 2013 00:06:48 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by ietfa.amsl.com (Postfix) with ESMTP id E6B3A21F854E for <jose@ietf.org>; Fri, 8 Feb 2013 00:06:47 -0800 (PST)
Received: from mailout-de.gmx.net ([10.1.76.17]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MaoXk-1UO9HT2giA-00KNE6 for <jose@ietf.org>; Fri, 08 Feb 2013 09:06:45 +0100
Received: (qmail invoked by alias); 08 Feb 2013 08:06:45 -0000
Received: from unknown (EHLO [10.255.135.8]) [194.251.119.201] by mail.gmx.net (mp017) with SMTP; 08 Feb 2013 09:06:45 +0100
X-Authenticated: #29516787
X-Provags-ID: V01U2FsdGVkX1+uDQ9VuHyuoUr8UbxqsTDTJMNN0uRgvP7nLWaQ3X rbrZZ6F6CyhR4g
Mime-Version: 1.0 (Apple Message framework v1085)
Content-Type: text/plain; charset="us-ascii"
From: Hannes Tschofenig <hannes.tschofenig@gmx.net>
In-Reply-To: <CAL02cgTYBBCr95atASvQ+7gQK8gH3B2+ebyZO82Q=iSwQxt3AQ@mail.gmail.com>
Date: Fri, 08 Feb 2013 10:06:41 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <5E6B7E57-40C1-46B7-8B83-7E36F106C9D9@gmx.net>
References: <CAL02cgSt7w5CrP+DXo7bz_+YsxKsVMoRbZLNWa6EHjnAyScWMg@mail.gmail.com> <51134B1B.6010109@gmx.net> <CAL02cgTYBBCr95atASvQ+7gQK8gH3B2+ebyZO82Q=iSwQxt3AQ@mail.gmail.com>
To: Richard Barnes <rlb@ipv.sx>
X-Mailer: Apple Mail (2.1085)
X-Y-GMX-Trusted: 0
Cc: Hannes Tschofenig <hannes.tschofenig@gmx.net>, "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] SPI - KID conflict -- Re: SPI proposal
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: Fri, 08 Feb 2013 08:06:49 -0000

Yes, it needs to be clarified in the text that it also refers to the algorithms associated with that key. 

And: I noticed that the kid is now a header parameter (which is good). 

On Feb 7, 2013, at 4:40 PM, Richard Barnes wrote:

> As I understood it, 'kid' identifies a key, not the whole collection of security parameters.  But if that's not the case, sure, we can use 'kid'.
> 
> In either case, apparently the spec needs to be clarified.
> 
> 
> On Thu, Feb 7, 2013 at 1:35 AM, Hannes Tschofenig <hannes.tschofenig@gmx.net> wrote:
> Hi Richard,
> 
> when I tried to use the JW* specifications in OAuth my assumption was that the kid (key id) provides exactly the purpose you outline below (and call spi). (Btw, I prefer kid rather than SPI).
> 
> The only problem with the KID, as I raised on the list before, is that it should be in the header and not in the body (since otherwise it would not be visible when the data inside the body is encrypted.
> 
> Ciao
> Hannes
> 
> On 02/07/2013 12:11 AM, Richard Barnes wrote:
> To move us toward closing Issue #9 [9], here is some proposed text for
> an SPI [1] field.  To recall, SPI stands for "security parameters
> index", borrowing a term from IPsec.  The idea is that in cases where
> the same crypto parameters are being used repeatedly, this would save
> the parties from having to re-send the same parameters.
> 
> The below text is designed for the JWE spec, but could be adapted for
> JWS (just keep header, ignore part about key/iv).  Similar text is
> probably needed for the encryption/decryption/signing/verification sections.
> 
> Feedback welcome,
> --Richard
> 
> -----BEGIN-----
> Section 4.1.X. "spi" Header Parameter
> 
> The "spi" (Security Parameters Index) header parameter contains an
> opaque byte string that labels a set of security parameters.  This index
> is designed to enable the use of smaller headers in cases where entities
> will be re-using the same security parameters for several messages.
> 
> Entities supporting the use of the "spi" parameter MUST maintain a table
> of cached security parameters.  When an entity receives an object whose
> header contains both "spi" and "alg" values, then it MUST cache the
> following values from the JWE, indexed by the "spi" value:
> -- Contents of the JWE header
> -- Encrypted Key
> -- Initialization Vector
> 
> If an object containing an "spi" parameter but no "alg" parameter, then
> it MUST NOT contain an Encrypted Key or Initialization Vector.  That is,
> it will have the form "header.ciphertext.integrity_value".  When a
> recipient receives such an object, it uses the "spi" value to retrieve
> cached header, key, and initialization vector and reconstructs a full
> JWE.  This full JWE can then be further processed according to the
> normal JWE processing rules.  If the recipient has no cached parameters
> for the "spi" value, the process MUST fail.
> -----END-----
> 
> 
> [9] http://tools.ietf.org/wg/jose/trac/ticket/9
> 
> 
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
> 
> 
>