Re: [jose] proposal: put encryption header parameters into a separate object

"Richard L. Barnes" <rbarnes@bbn.com> Fri, 09 November 2012 06:58 UTC

Return-Path: <rbarnes@bbn.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 AA57921F8536 for <jose@ietfa.amsl.com>; Thu, 8 Nov 2012 22:58:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.799
X-Spam-Level:
X-Spam-Status: No, score=-106.799 tagged_above=-999 required=5 tests=[AWL=-0.200, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, 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 UBX4lyICrASc for <jose@ietfa.amsl.com>; Thu, 8 Nov 2012 22:58:39 -0800 (PST)
Received: from smtp.bbn.com (smtp.bbn.com [128.33.1.81]) by ietfa.amsl.com (Postfix) with ESMTP id 02F4921F853F for <jose@ietf.org>; Thu, 8 Nov 2012 22:58:39 -0800 (PST)
Received: from [128.89.253.120] (port=57408) by smtp.bbn.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from <rbarnes@bbn.com>) id 1TWiY2-0001ux-FB; Fri, 09 Nov 2012 01:58:38 -0500
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
From: "Richard L. Barnes" <rbarnes@bbn.com>
In-Reply-To: <19F1B8FA-6655-4933-A58C-70B12BE025C3@gmail.com>
Date: Fri, 09 Nov 2012 01:58:37 -0500
Content-Transfer-Encoding: quoted-printable
Message-Id: <3F30DDAB-F245-459F-90B9-91DCFED11A3A@bbn.com>
References: <20121107093441.26081.45621.idtracker@ietfa.amsl.com> <19F1B8FA-6655-4933-A58C-70B12BE025C3@gmail.com>
To: Dick Hardt <dick.hardt@gmail.com>
X-Mailer: Apple Mail (2.1499)
Cc: "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] proposal: put encryption header parameters into a separate object
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, 09 Nov 2012 06:58:39 -0000

Hey Dick,

To make sure I understand your use case correctly: You want to convey an encrypted object, as well as a signature over the plaintext (without having to encrypt the signature value).  Does that sound accurate?

It seems like there are three types of information you want in the object: (1) cipher text, (2) encryption parameters, and (3) signature value/parameters.  So why not encapsulate it like that?  To propose a JSON syntax:

{
  "enc": { /* encryption parameters */ },
  "sig": { /* signature parameters + value */ },
  "val": "/* ciphertext */"
}

Obviously: 
-- JWE/JWS could be the special cases where only one of "enc" or "sig" is present
-- This cleanly supports multiple signatures via multiple "sig" values (e.g., in an array)
-- This cleanly supports multiple recipients via multiple "enc" values (e.g., in an array)
-- You could leave one of "enc" or "sig" parameters as flat lists (as in JWS/JWE), but it seems cleaner to have them parallel
-- For a compact serialization, you would want certain fields to be not double-base64'ed.  We can figure that out later :)

This seems like kind of an appealing line of reasoning to me.  I would be glad to do some work on figuring out the details.

--Richard




On Nov 7, 2012, at 3:23 PM, Dick Hardt <dick.hardt@gmail.com> wrote:

> To enable encrypting and then signing of the same token, we need to specify the encrypting and signing algorithms separately.
> 
> Since we are using JSON, how about if we create an encryption object to contain all the parameters defined in JWE so that there is no overlap in the JWS namespace.
> 
> "enc": 
> 	{  "alg"
> 	,  "enc"
> 	,  "zip"
> 	}
> 
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose