Re: [jose] Comments on draft-barnes-jose-spi-00

Richard Barnes <rlb@ipv.sx> Tue, 02 April 2013 18:15 UTC

Return-Path: <rlb@ipv.sx>
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 DC3AD21F8C10 for <jose@ietfa.amsl.com>; Tue, 2 Apr 2013 11:15:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.972
X-Spam-Level:
X-Spam-Status: No, score=-1.972 tagged_above=-999 required=5 tests=[AWL=1.004, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 sFRQ1mFjRbBE for <jose@ietfa.amsl.com>; Tue, 2 Apr 2013 11:15:50 -0700 (PDT)
Received: from mail-oa0-f43.google.com (mail-oa0-f43.google.com [209.85.219.43]) by ietfa.amsl.com (Postfix) with ESMTP id 097CD21F8A09 for <jose@ietf.org>; Tue, 2 Apr 2013 11:15:49 -0700 (PDT)
Received: by mail-oa0-f43.google.com with SMTP id l10so682394oag.16 for <jose@ietf.org>; Tue, 02 Apr 2013 11:15:49 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=XS9n5knoUeCSOztaGB/q6LRXZJfE4/cEjnzk4ZzHPZ0=; b=dQ6dkPxNgRcQ4L4Yysr2SVwEpsKV0gQvarb+iuaH2iXCqnSweoXdyDeSIZxm3OK53T Orlz1So9uDL5iMO62Mna1BYvLx48lHdx4k95fjEZOaeoJYoWcweSFfqhagmH9fMlDlRN iLIdO666vbnRVY7jVIc8CgwiPdjQ9pHGzhzB2wumjAwpmX0LU1Fmx6QfEJdyE2ThS8rr rZle9RBIReGMH5jeJKLtSqEACncY2QPM7yBo8WUUrzwZwNgHKYB1pAwHGZTKJKxURCvf g+h6vTZYS+zcBQ/Pk6s4P8bpL5rD1Bcogre8oilXw4GJr7BhwlQQ18EuJBRrOYVWfEDm CAeQ==
MIME-Version: 1.0
X-Received: by 10.60.24.197 with SMTP id w5mr5846982oef.6.1364926549563; Tue, 02 Apr 2013 11:15:49 -0700 (PDT)
Received: by 10.60.160.201 with HTTP; Tue, 2 Apr 2013 11:15:49 -0700 (PDT)
X-Originating-IP: [192.1.51.16]
In-Reply-To: <005301ce2fba$e4c68100$ae538300$@augustcellars.com>
References: <005301ce2fba$e4c68100$ae538300$@augustcellars.com>
Date: Tue, 02 Apr 2013 14:15:49 -0400
Message-ID: <CAL02cgTw4zACRH9okznsbxHGY+QTSqvwZJLP1v6r_5ir_3Gg6w@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
To: Jim Schaad <ietf@augustcellars.com>
Content-Type: multipart/alternative; boundary="e89a8ff1c30e21f86504d964ba0b"
X-Gm-Message-State: ALoCoQnkr8p2O5zX+U54M47+l4l7MBzEgDA0+4YasZJlf5OvTTUDbivWSrKyGFTVrD/XsYOc1t0h
Cc: jose@ietf.org, draft-barnes-jose-spi@tools.ietf.org
Subject: Re: [jose] Comments on draft-barnes-jose-spi-00
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: Tue, 02 Apr 2013 18:15:51 -0000

>
> 1.       ** What headers are required and which can  be implicit – for
> example can the algorithm fields be implicit in the SPI?
>

If "spi" is present, then everything else is optional.


> **
>
> **2.       **Are the integrity value computed across the fully populated
> header or the SPI header?
>
I would suggest using the SPI header, just because it's simpler, but it
doesn't really matter.  If you trust the out-of-band process, then the two
have equivalent security properties.  I don't really care, since we
shouldn't be computing integrity values over the header anyway (ISSUE-4).


> ****
>
> **3.       **Is there a way to forward a message from person A which
> knows the SPI values and person B which does not?
>
I assume by this you mean
1. C -> A -> B, where C and A share an SPI, and B does not.
2. A does not have to do any cryptographic computations

In this case, the answer is "No".  The answer would be "Yes" if there were
no header integrity check -- A could simply fill in the pre-negotiated
parameters.  But the fact that the header is integrity-protected means that
A cannot do this, so the "spi" remains in place.


****
>
> **4.       **What is the correct algorithm for determining the JWS vs JWE
> in the event that all of the algorithms are implicit****
>
> **
>
Unless you know the SPI, you cannot make that distinction.  But you can't
reliably distinguish JWS from JWE right now anyway.


> 5.       **What happens if you have implicit parameters and explicit
> parameters and they do not match?
>
We should specify this, but I don't have a strong feeling for which option
we should choose:
1. SPI wins; b/c more trusted
2. Explicit wins; use SPI as default; override when necessary
3. Throw an error; malformed object


> ****
>
> **6.       **Is there a recommended way to determine what the SPI
> parameters are going to be?  Does the application need to pre-parse the
> message to get the SPI value or is there a recommendation that some type of
> callback be included
>
I would expect an API of a JOSE library supporting SPI to provide an
interface where an app could specify bindings between an SPI and a set of
parameters.  That way, the pre-negotiation protocol could use that
interface to configure the JOSE library, and the JOSE-using application
could just use the normal JOSE interface to process objects.


> ****
>
> **7.       **Can you make things like the IV be implicit?  Thus agree on
> a starting value and an increment and compute the new IV for each new
> message
>
That would be up to the pre-negotiation mechanism.  In general, this
doesn't seem like a good idea; you could think of secure ways to do it, but
it might be fragile.


> ****
>
> **8.       **If you are requiring that the values be populated by the
> application – does this require that you have a canonical encoding of how
> those values are placed into the header for the purposes of the integrity
> check?
>
This sounds like a good reason to do the integrity check over the SPI
header.


--Richard




> ****
>
> ** **
>
> Jim****
>
> ** **
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>
>