Subject: [jose] #29: Add an explicit "aad" field to JWE

From: "jose issue tracker" <[email-masked]>
Date: Thu, 27 Jun 2013 23:05:03 -0000

#29: Add an explicit "aad" field to JWE

 Let's start from the design principle that the crypto operations in JWE
 should not be JWE-specific if they don't have to be.  Right now, the only
 way for an application to provide AAD to a JWE algorithm is in the
 protected header.  So it's impossible to use JOSE to implement any
 protocol that uses AAD to protect non-JSON data.  (Or if not impossible,
 it's costly, since it will end up getting double-base64 encoded.)

 Instead, JWE should have an explicit "aad" field that contains a
 base64-encoded octet string that is input as Additional Authenticated Data
 to the AEAD algorithm.  If there is a protected header present then the
 overall AAD is the concatenation of the header and the "aad" field.

 In the compact format, this field is always empty.

 OLD:
 """
 Let the Additional Authenticated Data encryption parameter be the octets
 of the ASCII representation of the Encoded JWE Header value.
 """
 NEW:
 """
 Let the Additional Authenticated Data encryption parameter be the octets
 of the ASCII representation of the Encoded JWE Header value.  If an "aad"
 parameter is present, set the Additional Authenticated Data to the
 concatenation of the Encoded JWE Header, a period ('.') character, and the
 ASCII representation of the "aad" field value.
 """

-- 
-------------------------+-------------------------------------------------
 Reporter:  [email-masked]   |      Owner:  draft-ietf-jose-json-web-
     Type:  defect       |  [email-masked]
 Priority:  major        |     Status:  new
Component:  json-web-    |  Milestone:
  encryption             |    Version:
 Severity:  -            |   Keywords:
-------------------------+-------------------------------------------------

Ticket URL: <http://tools.ietf.org/wg/jose/trac/ticket/29>
jose <http://tools.ietf.org/jose/>

---

From: Mike Jones <[email-masked]>
Date: Sat, 29 Jun 2013 10:20:39 +0000

I can see merit in this proposal.

On the negative side, it's one more feature for implementations of the JWE JSON Serialization to support and one more way that the JSON Serialization is a superset of what's possible in the Compact Serialization.

On the positive side, it would let the JWS JSON Serialization be directly used for use cases where having Additional Authenticated Data (AAD) is useful.

I'm curious what others think.

				-- Mike

-----Original Message-----
From: jose issue tracker [mailto:[email-masked]] 
Sent: Thursday, June 27, 2013 4:05 PM
To: [email-masked]; [email-masked]
Cc: [email-masked]
Subject: [jose] #29: Add an explicit "aad" field to JWE

 Let's start from the design principle that the crypto operations in JWE  should not be JWE-specific if they don't have to be.  Right now, the only  way for an application to provide AAD to a JWE algorithm is in the  protected header.  So it's impossible to use JOSE to implement any  protocol that uses AAD to protect non-JSON data.  (Or if not impossible,  it's costly, since it will end up getting double-base64 encoded.)

 Instead, JWE should have an explicit "aad" field that contains a  base64-encoded octet string that is input as Additional Authenticated Data  to the AEAD algorithm.  If there is a protected header present then the  overall AAD is the concatenation of the header and the "aad" field.

 OLD:
 """
 Let the Additional Authenticated Data encryption parameter be the octets  of the ASCII representation of the Encoded JWE Header value.
 """
 NEW:
 """
 Let the Additional Authenticated Data encryption parameter be the octets  of the ASCII representation of the Encoded JWE Header value.  If an "aad"
 parameter is present, set the Additional Authenticated Data to the  concatenation of the Encoded JWE Header, a period ('.') character, and the  ASCII representation of the "aad" field value.
 """

-- 
-------------------------+----------------------------------------------
-------------------------+---
 Reporter:  [email-masked]   |      Owner:  draft-ietf-jose-json-web-
     Type:  defect       |  [email-masked]
 Priority:  major        |     Status:  new
Component:  json-web-    |  Milestone:
  encryption             |    Version:
 Severity:  -            |   Keywords:
-------------------------+----------------------------------------------
-------------------------+---