November 8, 2010
JSON Token Encryption Spec Results at IIW on Wednesday

We held a session on encryption for JSON Web Tokens at IIW on Wednesday, building upon the results from the JSON Tokens and No Base String sessions on Tuesday. Once again, substantial consensus emerged, which is described in the notes below.

These consensus decisions were in place by the start of the session:

  • Some use cases for JSON tokens require encryption
  • (plus all the decisions from the sessions on Tuesday)

It was agreed that these sets of high-level goals need to be achievable by application of signing and/or encryption:

  • Integrity
  • Confidentiality + Integrity
  • Non-Repudiation (which also implies Integrity)
  • Non-Repudiation + Confidentiality

Open issues identified at the start of the session were:

  • Should encryption and signing be accomplished via (1) separate but composable encryption and signing operations, (2) use of a small set of recommended composite operations that achieve the high-level goals, or (3) allowing for both possibilities?
  • Data format and how data formats affect streaming operations
  • Order of signing and encryption operations
  • Compress before encrypt?
  • What are we encrypting (payload or payload + signature)?

The primary consensus in the room was to invent as little as possible by reusing work that other experts have done in the space, while adapting their work to a JSON context. Participants provided the following references to work to borrow from:

Specific issues were resolved as follows:

  • Should encryption and signing be accomplished via (1) separate but composable encryption and signing operations, (2) use of a small set of recommended composite operations that achieve the high-level goals, or (3) allowing for both possibilities?

The consensus was for (3) – that we should specify a small set of composite operations that will meet the needs of common use cases, while also enabling applications to compose encryption and signing operations in a general fashion, should the composite operations prove insufficient for their use cases. A subset of the composite algorithm suites in WS-SecurityPolicy 1.2 was suggested as an appropriate starting point. Paul Tarjan of Facebook had also suggested during the OpenID Summit on Monday that descriptive composite algorithm values be used, such as “AES-256-CBC HMAC-SHA-256”.

  • Data format and how data formats affect streaming operations

For the same reasons as discussed during the signing session, the group reaffirmed that the order of the fields should be envelope.payload.signature, with the envelope containing sufficient information to determine the nature of the contents of the remaining fields. This order enables streaming operations, where content is created or analyzed in parallel with its transmission or reception, to the maximum extent possible, and also potentially minimizes buffering requirements imposed upon implementations.

  • Order of signing and encryption operations

It was recognized that no one-size-fits-all solution applies here and that different sets of operations are needed for different use cases. For instance, if non-repudiation is required, a signature of the plan text using public key cryptography must be present, which therefore must precede any other operations. Again, the group reaffirmed that we should reuse other work in this area to the extent possible.

  • Compress before encrypt?

Several participants pointed out existing practice in this area, including the use of the DEFLATE compression algorithm prior to encryption by TLS and CMS. It was agreed that we should similarly document how to optionally perform compression before encryption for those use cases where it makes sense.

  • What are we encrypting (payload or payload + signature)?

This was another area were the participants felt that we should reuse existing practice that has already been vetted by experts.

Special thanks go to Breno de Medeiros, whose crypto expertise was invaluable during this session, as well as Brad Hill, Diana Smetters and several other Googlers, John Bradley, Nat Sakimura, Joseph Holsten, Thomas Hardjono, Terry Hayes, Dick Hardt, Tony Nadalin, and others who contributed to this productive session.

4 Responses to “JSON Token Encryption Spec Results at IIW on Wednesday”

  1. Gerald Beuchelt on 09 Nov 2010 at 7:02 am #

    Mike –

    Thanks a lot for the report – this is really appreciated. Quick question:

    – Was S/MIME considered?
    – In the ordering/AE discussion, did you address indistinguishability and non-malleability?
    – Also for AE, are you requiring Strong MAC?

    Gerry

  2. Mike Jones: self-issued » JSON Token Naming Spec Results at IIW on Wednesday on 09 Nov 2010 at 11:53 am #

    […] Using Information Cards « JSON Token Encryption Spec Results at IIW on Wednesday November 9, 2010 JSON Token Naming Spec Results at IIW on […]

  3. JSON Signature and Encryption Spec. | =nat on 10 Nov 2010 at 12:40 am #

    […] JSON Token Spec Results at IIW on Tuesday: – JSON Token Encryption Spec Results at IIW on Wednesday: – JSON Token Naming Spec Results at IIW on Wednesday: – JSON Public Key Spec Results at IIW on […]

  4. Mike Jones: self-issued » JSON Web Token (JWT) Draft -01 on 31 Oct 2011 at 9:45 pm #

    […] JSON Token Encryption Spec Results at IIW […]

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.