Re: [jose] Question on enc location

"Jim Schaad" <> Tue, 23 July 2013 20:49 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id CC04811E810C for <>; Tue, 23 Jul 2013 13:49:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.598
X-Spam-Status: No, score=-3.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id p5+InN+xSCGw for <>; Tue, 23 Jul 2013 13:49:13 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 6772F11E8100 for <>; Tue, 23 Jul 2013 13:49:09 -0700 (PDT)
Received: from Philemon ( []) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: by (Postfix) with ESMTPSA id 9AC622CA26; Tue, 23 Jul 2013 13:49:08 -0700 (PDT)
From: Jim Schaad <>
To: 'Mike Jones' <>, 'Richard Barnes' <>
References: <05a101ce8733$d96415e0$8c2c41a0$> <> <> <05fd01ce879f$581712a0$084537e0$> <>
In-Reply-To: <>
Date: Tue, 23 Jul 2013 13:48:00 -0700
Message-ID: <065a01ce87e5$ee9a1920$cbce4b60$>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_065B_01CE87AB.423C79A0"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQHQTpdhMabkoa5v2EltdYDF5I7dAAGP8XVaAsDOTjsA9gUfhAEhaTGymTvf/5A=
Content-Language: en-us
Subject: Re: [jose] Question on enc location
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Javascript Object Signing and Encryption <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 23 Jul 2013 20:49:20 -0000

But in this case I don't think that I need an encrypted key value because I
am using direct.


From: Mike Jones [] 
Sent: Tuesday, July 23, 2013 8:29 AM
To: Jim Schaad; 'Richard Barnes'
Subject: RE: [jose] Question on enc location


For the first, no - it's missing the required "recipients" element.


For the second, no - the "recipients" value is missing the required
"encrypted_key" value.


Answering Richard's comment - I expect that in most cases people will put
elements such as "enc" that are common between all recipients in either the
"protected" or "unprotected" top-level headers, but this isn't a
requirement.  In the worst case, should a sender use different "enc" values
for different recipients, the result will be that the JWE will fail to
decrypt for all the recipients in which the "enc" value is incorrect.


                                                            -- Mike


From: Jim Schaad [] 
Sent: Tuesday, July 23, 2013 5:23 AM
To: 'Richard Barnes'; Mike Jones
Subject: RE: [jose] Question on enc location


As a follow up.   Is this legal?



  Header: <alg:"direct", enc:"AES-GCM"},

  IV: ., tag:., payload:.



Or is the line






From: Richard Barnes [] 
Sent: Tuesday, July 23, 2013 5:04 AM
To: Mike Jones
Cc: Jim Schaad;
Subject: Re: [jose] Question on enc location


In which case, it seems like it should be in the top level header, to avoid
having it repeated every time. 


In general, it seems like there are "content" parameters (e.g., enc, zip,
cty) that should go at the top level, and "key" parameters that should be
per-recipient (e.g., alg, epk, salt).  It would be helpful to implementors
to be clear about what goes where. 


On Monday, July 22, 2013, Mike Jones wrote:

No - just that the "enc" field for all recipients be the same.


<javascript:_e(%7b%7d,%20'cvml',%20'');> ] On Behalf Of
Jim Schaad
Sent: Monday, July 22, 2013 4:33 PM
To: <javascript:_e(%7b%7d,%20'cvml',%20'');> 
Subject: [jose] Question on enc location


Is there supposed to be a requirement in the JWE specification that the enc
field be in the common protected (or unprotected) header and no in the
individual recipient header information?