Subject: [jose] JWE: encrypted key as component vs header element

From: "Manger, James H" <[email-masked]>
Date: Wed, 30 May 2012 11:04:27 +1000

Encrypted data (JWE) uses the syntax: <header>.<encrypted_key>.<ciphertext>.<mac>

Is there a reason that the encrypted key isn't included as a header element?

I thought it could be because the encrypted key is specific to one recipient (eg it is encrypted with the recipient's public key) and it might be useful to separate per-recipient details for cases where a message is encrypted for multiple recipients (using another serialization, such as JWE-JS).

However that doesn't work. JWE-JS repeats the header for each recipient, and it has to since the header needs to include an id for the recipient's key.

It could be slightly helpful (eg for performance) to separate details that definitely vary per message from details that will probably remain the same for all messages between two parties. For this benefit, though, the IV would need to be moved out of the header (and conveyed as a prefix on the ciphertext).

--
James Manger

---

From: Nat Sakimura <[email-masked]>
Date: Wed, 30 May 2012 10:12:29 +0900

I pushed the same couple of months ago for the sake if uniformity and
the composability across JWS and JWE but did not get a support.

The reason given and had support if I remember correctly was a desire
to avoid double base64 encoding.

=nat via iPhone

On 2012/05/30, at 10:04, "Manger, James H"
<[email-masked]> wrote:

> _______________________________________________
> jose mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/jose

---

From: Mike Jones <[email-masked]>
Date: Wed, 30 May 2012 01:13:11 +0000

This question was considered during the open issues discussion by the working group members present in Paris and there was a clear consensus to have the encrypted key remain in its own field to avoid double base64url encoding a potentially large value.

				-- Mike

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Manger, James H
Sent: Tuesday, May 29, 2012 6:04 PM
To: [email-masked]
Subject: [jose] JWE: encrypted key as component vs header element

--
James Manger

---

From: "Manger, James H" <[email-masked]>
Date: Wed, 30 May 2012 11:17:11 +1000

Nat answered:
> I pushed the same couple of months ago for the sake if uniformity and the composability across JWS and JWE but did not get a support.
>
>The reason given and had support if I remember correctly was a desire to avoid double base64 encoding.

> This question was considered during the open issues discussion by the working group members present in Paris and there was a clear consensus to have the encrypted key remain in its own field to avo…

Thanks. Makes sense.

--
James Manger