Subject: [jose] #20: Shorter names for JSON serialization

From: "jose issue tracker" <[email-masked]>
Date: Mon, 06 May 2013 12:29:27 -0000

#20: Shorter names for JSON serialization

 I noticed as I was doing some programming with the JSON syntax for JWE/JWS
 that the current field names in the JSON format are unnecessarily
 cumbersome.  Nobody in the real world names a variable
 "initialization_vector", it's "iv".   Proposed changes:

 || OLD                     || NEW  ||
 || signatures              || sigs ||
 || signature               || sig  ||
 || payload                 || data ||
 || recipients              || keys ||
 || ciphertext              || data ||
 || initialization_vector   || iv   ||
 || authentication_tag      || mac  ||

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

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

---

From: "Jim Schaad" <[email-masked]>
Date: Mon, 6 May 2013 20:38:02 +0200

I would be againist calling the authentication_tag mac.  I don't object to
something like AuthTag.  It is not necessarily a MAC in all cases so calling
it one make thing problematical - much like calling a mac a sig.

Jim

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf Of
> jose issue tracker
> Sent: Monday, May 06, 2013 2:29 PM
> To: [email-masked]; [email-masked]
> Cc: [email-masked]
> Subject: [jose] #20: Shorter names for JSON serialization
> 
> -------------------------+----------------------------------------------
> -------------------------+---
> -------------------------+----------------------------------------------
> -------------------------+---
> 
> _______________________________________________
> jose mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/jose

---

From: Richard Barnes <[email-masked]>
Date: Mon, 6 May 2013 22:50:58 +0100

Even that's the name for the corresponding field in CMS AuthEnvelopedData
and AuthenticatedData?

On Monday, May 6, 2013, Jim Schaad wrote:

> > From: [email-masked] <javascript:;> [mailto:[email-masked]<javascript:;>]
> On Behalf Of
> > jose issue tracker
> > To: [email-masked] <javascript:;>;
> [email-masked]
> > Cc: [email-masked] <javascript:;>
> >      Type:  defect       |  [email-masked] <javascript:;>
> > [email-masked] <javascript:;>

---

From: Mike Jones <[email-masked]>
Date: Tue, 7 May 2013 21:40:33 +0000

What about "iv" and "tag"?  For the other names, I'd actually prefer staying with those that are full words rather than those that are abbreviations of words, since they're more descriptive.  But I agree that "initialization_vector" and "authentication_tag" were overkill.

                                                            -- Mike

From: Richard Barnes [mailto:[email-masked]]
Sent: Monday, May 06, 2013 2:51 PM
To: Jim Schaad
Cc: jose issue tracker; [email-masked]; [email-masked]
Subject: Re: [jose] #20: Shorter names for JSON serialization

Even that's the name for the corresponding field in CMS AuthEnvelopedData and AuthenticatedData?

Jim

> From: [email-masked]<javascript:;> [mailto:[email-masked]<javascript:;>] On Behalf Of
> jose issue tracker
> To: [email-masked]<javascript:;>; [email-masked]<mailto:[email-masked]>
> Cc: [email-masked]<javascript:;>
>  Reporter:  [email-masked]<mailto:[email-masked]>   |      Owner:  draft-ietf-jose-json-web-
>      Type:  defect       |  [email-masked]<javascript:;>
> [email-masked]<javascript:;>

---

From: "Manger, James H" <[email-masked]>
Date: Wed, 8 May 2013 10:34:09 +1000

How about “nonce”, instead of “iv”?

“nonce” is used for the equivalent field in other RFCs about AEAD algorithms: RFC 5116 AEAD, RFC 5297 SIV, RFC 3610 CCM. Some of these use the name “IV” for different things than the AEAD nonce.
NIST 800-38D GCM does uses “IV”, though it is defined as “A nonce that is associated with an invocation of authenticated encryption on a particular plaintext and AAD”. RFC 5084 “CCM & GCM in CMS” even says:
  “To have a common set of terms for AES-CCM and AES-GCM, the AES-GCM IV is referred to as a nonce in the remainder of this document.”

--
James Manger

From: [email-masked] [mailto:[email-masked]] On Behalf Of Mike Jones
Sent: Wednesday, 8 May 2013 7:41 AM
To: Richard Barnes; Jim Schaad
Cc: [email-masked]; jose issue tracker; [email-masked]
Subject: Re: [jose] #20: Shorter names for JSON serialization

What about “iv” and “tag”?  For the other names, I’d actually prefer staying with those that are full words rather than those that are abbreviations of words, since they’re more descriptive.  But I agree that “initialization_vector” and “authentication_tag” were overkill.

                                                            -- Mike

---

From: Mike Jones <[email-masked]>
Date: Wed, 8 May 2013 00:36:55 +0000

http://tools.ietf.org/html/rfc4106 calls it “Initialization Vector (IV)” so I think the reasonable choices are either “initialization_vector” (the current name) or “iv” (the possible shortened name).  “Nonce” means very different things in other protocols, so I think we really should steer completely clear of it, to prevent confusion.

                                                            -- Mike

From: Manger, James H [mailto:[email-masked]]
Sent: Tuesday, May 07, 2013 5:34 PM
To: Mike Jones; Richard Barnes; Jim Schaad
Cc: [email-masked]; jose issue tracker; [email-masked]
Subject: RE: [jose] #20: Shorter names for JSON serialization

--
James Manger

From: [email-masked]<mailto:[email-masked]> [mailto:[email-masked]] On Behalf Of Mike Jones
Sent: Wednesday, 8 May 2013 7:41 AM
To: Richard Barnes; Jim Schaad
Cc: [email-masked]<mailto:[email-masked]>; jose issue tracker; [email-masked]<mailto:[email-masked]>
Subject: Re: [jose] #20: Shorter names for JSON serialization

                                                            -- Mike

---

From: "Manger, James H" <[email-masked]>
Date: Wed, 8 May 2013 10:49:57 +1000

RFC 4106 “GCM in IPsec ESP” uses the terms “IV” and “nonce”. It uses “nonce” for the 12-byte quantity used in the GCM algorithm, and “IV” for an 8-byte subset of that. That is, it uses “nonce” for the value JWE currently labels “iv”.

RFC 4106 section 2 “AES-GCM” says:
   For clarity, we refer to the AES-GCM IV as a
   nonce in the context of AES-GCM-ESP.  The same nonce and key
   combination MUST NOT be used more than once.
In section 4:

   The nonce passed to the GCM-AES encryption algorithm has the

   following layout:

There is some unavoidable historical confusion with the terms “iv” and “nonce” (even whether IV means initialization vector or initialization value). In my opionion, the RFCs that do the best job of avoiding confusion are the one using “nonce”.

--
James Manger

From: [email-masked] [mailto:[email-masked]] On Behalf Of Mike Jones
Sent: Wednesday, 8 May 2013 10:37 AM
To: Manger, James H; Richard Barnes; Jim Schaad
Cc: [email-masked]; jose issue tracker; [email-masked]
Subject: Re: [jose] #20: Shorter names for JSON serialization

                                                            -- Mike

--
James Manger

                                                            -- Mike

---

From: "Jim Schaad" <[email-masked]>
Date: Wed, 8 May 2013 08:08:07 +0200

Tag works well for me

From: Mike Jones [mailto:[email-masked]] 
Sent: Tuesday, May 07, 2013 11:41 PM
To: Richard Barnes; Jim Schaad
Cc: jose issue tracker; [email-masked];
[email-masked]
Subject: RE: [jose] #20: Shorter names for JSON serialization

What about "iv" and "tag"?  For the other names, I'd actually prefer staying
with those that are full words rather than those that are abbreviations of
words, since they're more descriptive.  But I agree that
"initialization_vector" and "authentication_tag" were overkill.

                                                            -- Mike

From: Richard Barnes [mailto:[email-masked]] 
Sent: Monday, May 06, 2013 2:51 PM
To: Jim Schaad
Cc: jose issue tracker; [email-masked];
[email-masked]
Subject: Re: [jose] #20: Shorter names for JSON serialization

Jim

> From: [email-masked] <javascript:;>  [mailto:[email-masked]
<javascript:;> ] On Behalf Of
> To: [email-masked] <javascript:;> ;
[email-masked]