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

Hannes Tschofenig <hannes.tschofenig@gmx.net> Thu, 07 February 2013 06:35 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 419FD21F8684 for <jose@ietfa.amsl.com>; Wed, 6 Feb 2013 22:35:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.404
X-Spam-Level:
X-Spam-Status: No, score=-102.404 tagged_above=-999 required=5 tests=[AWL=0.195, BAYES_00=-2.599, 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 KPa+f+EE13iF for <jose@ietfa.amsl.com>; Wed, 6 Feb 2013 22:35:13 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by ietfa.amsl.com (Postfix) with ESMTP id 0335321F8682 for <jose@ietf.org>; Wed, 6 Feb 2013 22:35:12 -0800 (PST)
Received: from mailout-de.gmx.net ([10.1.76.27]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MZRMh-1UNtA22lyP-00LDWW for <jose@ietf.org>; Thu, 07 Feb 2013 07:35:11 +0100
Received: (qmail invoked by alias); 07 Feb 2013 06:35:11 -0000
Received: from a88-115-219-140.elisa-laajakaista.fi (EHLO [192.168.100.200]) [88.115.219.140] by mail.gmx.net (mp027) with SMTP; 07 Feb 2013 07:35:11 +0100
X-Authenticated: #29516787
X-Provags-ID: V01U2FsdGVkX1/2Uk5xygj2Uv+VmcpWK/+ozwkMoTkwcVXN80UA0N Dsp02E9A37HbeQ
Message-ID: <51134B1B.6010109@gmx.net>
Date: Thu, 07 Feb 2013 08:35:07 +0200
From: Hannes Tschofenig <hannes.tschofenig@gmx.net>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version: 1.0
To: Richard Barnes <rlb@ipv.sx>
References: <CAL02cgSt7w5CrP+DXo7bz_+YsxKsVMoRbZLNWa6EHjnAyScWMg@mail.gmail.com>
In-Reply-To: <CAL02cgSt7w5CrP+DXo7bz_+YsxKsVMoRbZLNWa6EHjnAyScWMg@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: hannes.tschofenig@gmx.net, "jose@ietf.org" <jose@ietf.org>
Subject: [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: Thu, 07 Feb 2013 06:35:14 -0000

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
>