Re: [jose] issue #25 TEXT

Richard Barnes <rlb@ipv.sx> Tue, 05 November 2013 00:03 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 4311021E8335 for <jose@ietfa.amsl.com>; Mon, 4 Nov 2013 16:03:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.899
X-Spam-Level:
X-Spam-Status: No, score=-2.899 tagged_above=-999 required=5 tests=[AWL=0.077, 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 kv1rXrdaI9nj for <jose@ietfa.amsl.com>; Mon, 4 Nov 2013 16:03:10 -0800 (PST)
Received: from mail-ob0-f179.google.com (mail-ob0-f179.google.com [209.85.214.179]) by ietfa.amsl.com (Postfix) with ESMTP id 25C5B21E831B for <jose@ietf.org>; Mon, 4 Nov 2013 16:03:09 -0800 (PST)
Received: by mail-ob0-f179.google.com with SMTP id uy5so7750297obc.24 for <jose@ietf.org>; Mon, 04 Nov 2013 16:03:08 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=eXP3Uat22SQJtU2JJXi7xrKrv/9CRbl9jXjqYt6Gaes=; b=j0hxBtgO5FWN0uDocaEHLVIxn/PJjPxwuW0GcpSp2KSAT8VTAEEZPSPSuIJCTTPMD/ wMlAhaEFiXKz1dgMijBZER244f6EEtyNZe2BQMWisy1rHghacovrGIYSwg2kz3lEgqkX iJW3m+0lAw0iwRALJEgLX6oxfxx9gq/Fi6GFYaPKF/cJDVMBzu367LeR+mJ5OEjtfxQD uVQHCuM2CTV9pNl+/XW9OckuVKSwyAxXl8nzgkV7DDQyJybMJFBjJ4nwh8/sRnHOWgzy owS3r59MVKYTWqQNAFCYgj9mMw2yf4eaQC4McEtkzwbSMJgB90Hpxx7JR/1EywfxtFuj rrDg==
X-Gm-Message-State: ALoCoQmRii0xxd1jr8DVzej76fobo2H3Acy1qgCrBNq/0b9ZQezVbmszizjkOn9E3pLmQldKaM/0
MIME-Version: 1.0
X-Received: by 10.60.230.197 with SMTP id ta5mr16579720oec.16.1383609788599; Mon, 04 Nov 2013 16:03:08 -0800 (PST)
Received: by 10.60.31.74 with HTTP; Mon, 4 Nov 2013 16:03:08 -0800 (PST)
In-Reply-To: <4E1F6AAD24975D4BA5B168042967394377E3AA77@TK5EX14MBXC288.redmond.corp.microsoft.com>
References: <013501cebd4f$98fd82a0$caf887e0$@augutscellars.com> <4E1F6AAD24975D4BA5B168042967394377E3A6D4@TK5EX14MBXC288.redmond.corp.microsoft.com> <002c01ced995$07989e00$16c9da00$@augustcellars.com> <4E1F6AAD24975D4BA5B168042967394377E3AA77@TK5EX14MBXC288.redmond.corp.microsoft.com>
Date: Mon, 04 Nov 2013 16:03:08 -0800
Message-ID: <CAL02cgTF20npn7XXe+UmqpHPtcfa5P1dJM+q0KhZicSLEQi_-w@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
To: Mike Jones <Michael.Jones@microsoft.com>
Content-Type: multipart/alternative; boundary="001a11363f9ef5126504ea62c151"
Cc: Jim Schaad <ietf@augustcellars.com>, Jim Schaad <ietf@augutscellars.com>, "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] issue #25 TEXT
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, 05 Nov 2013 00:03:16 -0000

Here's an objection.   :)

There is absolutely no reason to have two options for this.  We should just
have the "delete the payload" option, so that there's a single, consistent
technique for implementers.

In fact, the "sign a digest" option is not actually a detached signature --
it's an "attached" signature over the digest.



On Mon, Nov 4, 2013 at 11:54 AM, Mike Jones <Michael.Jones@microsoft.com>wrote:

>  While defining the hash function names may not be strictly in scope for
> us, I’d have no problem having us register JWA names for the common hash
> functions (e.g., “S256”) so people could use them in this context.  Unless
> I hear objections, I’ll proceed on this basis.
>
>
>
>                                                             -- Mike
>
>
>
> *From:* Jim Schaad [mailto:ietf@augustcellars.com]
> *Sent:* Monday, November 04, 2013 11:36 AM
> *To:* Mike Jones; 'Jim Schaad'
> *Cc:* jose@ietf.org
> *Subject:* RE: [jose] issue #25 TEXT
>
>
>
> The only problem that I have with the text in the last paragraph is that
> it does not discuss where and how the hash algorithm is registered so that
> each application does not create its own registry of hash algorithms but
> uses a common one.  This could be done by having a new document that
> defines a body type for this and point, but that is a new document that
> would need to be written and discussed.
>
>
>
> I also don’t care for the second sentence.  The assumption is that the
> recipient can create the exact payload rather than has access to it.  For
> example adding the base64 wrapping is not an issue in terms of re-creating
> the content.
>
>
>
> Jim
>
>
>
>
>
> *From:* jose-bounces@ietf.org [mailto:jose-bounces@ietf.org<jose-bounces@ietf.org>]
> *On Behalf Of *Mike Jones
> *Sent:* Monday, November 04, 2013 10:34 AM
> *To:* Jim Schaad
> *Cc:* jose@ietf.org
> *Subject:* Re: [jose] issue #25 TEXT
>
>
>
> Per my action item from the last call, I propose the following text to
> address issue #25:
>
>
>
> 8.  Detached Content
>
>
>
> In some contexts, it is useful integrity protect content that is not
> itself contained in a JWS object.  There are two suggested ways of
> accomplishing this using JWS objects.
>
>
>
> One way is create a JWS object containing the payload in the normal
> fashion, but then delete the payload representation, and send this modified
> object to the recipient, rather than the JWS.  This method assumes that the
> recipient has access to the exact payload used in the JWS.  When using the
> JWS Compact Serialization, the deletion is accomplished by replacing the
> second field (which contains BASE64URL(JWS Payload)) value with the empty
> string; when using the JWS JSON Serialization, the deletion is accomplished
> by deleting the “payload” member.  To use the modified object, the
> recipient reconstructs the JWS by re-inserting the payload representation
> into the modified object, and uses the resulting JWS in the usual manner.
> Note that this method needs no support from JWS libraries, as applications
> can use this method by modifying the inputs and outputs of standard JWS
> libraries.
>
>
>
> Another way to accomplish this is to have the JWS Payload be or include a
> cryptographic hash of the detached content.  The application might also
> include an identifier for the hash algorithm used in the JWS payload.  To
> use this JWS, the recipient validates the JWS in the usual way and verifies
> that the hash value contained in the JWS payload matches a cryptographic
> hash of the detached content computed by the recipient.  This method also
> needs no support from JWS libraries.
>
>
>
>                                                             -- Mike
>
>
>
> *From:* Jim Schaad [mailto:ietf@augutscellars.com <ietf@augutscellars.com>]
>
> *Sent:* Sunday, September 29, 2013 1:08 PM
> *To:* Mike Jones
> *Cc:* jose@ietf.org
> *Subject:* issue #25 TEXT
>
>
>
> The following provides suggested text for addressing Issue #25
>
>
>
> Jim
>
>
>
>
>
> Text for the JWS document:
>
>
>
> Section 7.2.1  Detached Content
>
>
>
> Applications can do detached content with the JSON serialization.
>  Detached content has the benefit of allowing the content to be transmitted
> in a more natural format, and to avoid the expansion associated with
> applying the base64 transformation.  It has the downside that how the
> content is serialized into a text string is not preserved and therefore
> some type of canonicalization process may need to be applied by both the
> sender and the recipient.  In some circumstances this is not an issue
> (signing a binary file), while in other circumstances it can be problematic
> (end of line characters or ordering of JSON objects).  Applications cannot
> rely on this feature to be implemented by libraries but need to do it
> themselves.
>
>
>
> On serialization, the application removes the payload value from the JSON
> structure before writing it out.  The contents of the signed field are then
> transmitted separately from the JWS structure.  For instance, the JWS
> serialized JSON structure could be transmitted as an HTTP header field,
> while the content is transmitted as  the content of the HTTP body.
>
>
>
> On deserialization, the application obtains the to be signed value from
> where it is transferred, applies the necessary canonicalization and
> encoding to it before creating the “payload” member of the JSON structure
> and passing the resulting object to the library for processing.
>
>
>
>
>
> Text for the JWE document:
>
>
>
> Section 7.2.1 Detached Content
>
>
>
> Applications can do detached content with the JSON serialization.
> Detached content has the benefit of allowing the content to be transmitted
> in a more natural format, and to avoid the expansion associated with
> applying the base64 transformation.  Since the output of the encryption
> process is always an octet string, there are no canonicalization issues
> associated with transporting the encrypted string separately from the
> encryption header.
>
>
>
> On serialization, the application removes the “ciphertext” field from the
> JSON structure before writing it out.  The contents of the “ciphertext”
> field then have the base64 encoding removed and it is transmitted separated
> from the JWE structure.  For instance, the JWE serialized JSON structure
> could be transmitted as an HTTP header field, while the cipher  text could
> be transmitted using binary transfer encoding as the HTTP body.
>
>
>
> On deserialization, the application obtains the cipher text from where it
> was transferred, applies the base64 transfer encoding and places it in the
> “ciphertext” member of the JWE JSON structure.  The resulting object is
> then passed to the JOSE library for process.
>
>
>
>
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>
>