Examples of Protecting Content using JavaScript Object Signing and Encryption (JOSE)
draft-ietf-jose-cookbook-02

The information below is for an old version of the document
Document Type Active Internet-Draft (jose WG)
Last updated 2014-04-21
Stream IETF
Intended RFC status (None)
Formats pdf htmlized bibtex
Reviews
Stream WG state WG Document
Document shepherd None
IESG IESG state I-D Exists
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
JOSE Working Group                                             M. Miller
Internet-Draft                                       Cisco Systems, Inc.
Intended status: Informational                            April 21, 2014
Expires: October 23, 2014

   Examples of Protecting Content using JavaScript Object Signing and
                           Encryption (JOSE)
                      draft-ietf-jose-cookbook-02

Abstract

   A set of examples of using JavaScript Object Signing and Encryption
   (JOSE) to protect data.  This document illustrates a representative
   sampling of various JSON Web Signature (JWS) and JSON Web Encryption
   (JWE) results given similar inputs.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on October 23, 2014.

Copyright Notice

   Copyright (c) 2014 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Miller                  Expires October 23, 2014                [Page 1]
Internet-Draft                JOSE Cookbook                   April 2014

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   4
     1.1.  Conventions Used in this Document . . . . . . . . . . . .   5
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   5
   3.  JSON Web Signature Examples . . . . . . . . . . . . . . . . .   5
     3.1.  RSA v1.5 Signature  . . . . . . . . . . . . . . . . . . .   6
       3.1.1.  Input Factors . . . . . . . . . . . . . . . . . . . .   6
       3.1.2.  Signing Operation . . . . . . . . . . . . . . . . . .   7
       3.1.3.  Output Results  . . . . . . . . . . . . . . . . . . .   8
     3.2.  RSA-PSS Signature . . . . . . . . . . . . . . . . . . . .   9
       3.2.1.  Input Factors . . . . . . . . . . . . . . . . . . . .  10
       3.2.2.  Signing Operation . . . . . . . . . . . . . . . . . .  10
       3.2.3.  Output Results  . . . . . . . . . . . . . . . . . . .  10
     3.3.  ECDSA Signature . . . . . . . . . . . . . . . . . . . . .  12
       3.3.1.  Input Factors . . . . . . . . . . . . . . . . . . . .  12
       3.3.2.  Signing Operation . . . . . . . . . . . . . . . . . .  12
       3.3.3.  Output Results  . . . . . . . . . . . . . . . . . . .  13
     3.4.  HMAC-SHA2 Integrity Protection  . . . . . . . . . . . . .  14
       3.4.1.  Input Factors . . . . . . . . . . . . . . . . . . . .  14
       3.4.2.  Signing Operation . . . . . . . . . . . . . . . . . .  15
       3.4.3.  Output Results  . . . . . . . . . . . . . . . . . . .  15
     3.5.  Detached Signature  . . . . . . . . . . . . . . . . . . .  16
       3.5.1.  Input Factors . . . . . . . . . . . . . . . . . . . .  16
       3.5.2.  Signing Operation . . . . . . . . . . . . . . . . . .  17
       3.5.3.  Output Results  . . . . . . . . . . . . . . . . . . .  17
     3.6.  Protecting Specific Header Fields . . . . . . . . . . . .  18
       3.6.1.  Input Factors . . . . . . . . . . . . . . . . . . . .  18
       3.6.2.  Signing Operation . . . . . . . . . . . . . . . . . .  18
       3.6.3.  Output Results  . . . . . . . . . . . . . . . . . . .  19
     3.7.  Protecting Content Only . . . . . . . . . . . . . . . . .  20
       3.7.1.  Input Factors . . . . . . . . . . . . . . . . . . . .  20
       3.7.2.  Signing Operation . . . . . . . . . . . . . . . . . .  20
       3.7.3.  Output Results  . . . . . . . . . . . . . . . . . . .  21
     3.8.  Multiple Signatures . . . . . . . . . . . . . . . . . . .  22
       3.8.1.  Input Factors . . . . . . . . . . . . . . . . . . . .  22
       3.8.2.  First Signing Operation . . . . . . . . . . . . . . .  22
       3.8.3.  Second Signing Operation  . . . . . . . . . . . . . .  23
       3.8.4.  Third Signing Operation . . . . . . . . . . . . . . .  24
       3.8.5.  Output Results  . . . . . . . . . . . . . . . . . . .  25
Show full document text