Examples of Protecting Content Using JSON Object Signing and Encryption (JOSE)
RFC 7520
Document | Type | RFC - Informational (May 2015; Errata) | |
---|---|---|---|
Author | Matthew Miller | ||
Last updated | 2016-09-14 | ||
Stream | Internent Engineering Task Force (IETF) | ||
Formats | plain text html pdf htmlized (tools) htmlized bibtex | ||
Reviews | |||
Stream | WG state | Submitted to IESG for Publication | |
Document shepherd | Jim Schaad | ||
Shepherd write-up | Show (last changed 2014-11-14) | ||
IESG | IESG state | RFC 7520 (Informational) | |
Action Holders |
(None)
|
||
Consensus Boilerplate | Yes | ||
Telechat date | |||
Responsible AD | Kathleen Moriarty | ||
Send notices to | (None) | ||
IANA | IANA review state | Version Changed - Review Needed | |
IANA action state | No IANA Actions |
Internet Engineering Task Force (IETF) M. Miller Request for Comments: 7520 Cisco Systems, Inc. Category: Informational May 2015 ISSN: 2070-1721 Examples of Protecting Content Using JSON Object Signing and Encryption (JOSE) Abstract This document contains a set of examples using JSON Object Signing and Encryption (JOSE) technology to protect data. These examples present a representative sampling of JSON Web Key (JWK) objects as well as various JSON Web Signature (JWS) and JSON Web Encryption (JWE) results given similar inputs. Status of This Memo This document is not an Internet Standards Track specification; it is published for informational purposes. This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741. Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7520. Copyright Notice Copyright (c) 2015 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 Informational [Page 1] RFC 7520 JOSE Cookbook May 2015 Table of Contents 1. Introduction ....................................................5 1.1. Conventions Used in This Document ..........................5 2. Terminology .....................................................6 3. JSON Web Key Examples ...........................................6 3.1. EC Public Key ..............................................6 3.2. EC Private Key .............................................7 3.3. RSA Public Key .............................................8 3.4. RSA Private Key ............................................8 3.5. Symmetric Key (MAC Computation) ...........................10 3.6. Symmetric Key (Encryption) ................................11 4. JSON Web Signature Examples ....................................11 4.1. RSA v1.5 Signature ........................................12 4.1.1. Input Factors ......................................12 4.1.2. Signing Operation ..................................12 4.1.3. Output Results .....................................13 4.2. RSA-PSS Signature .........................................15 4.2.1. Input Factors ......................................15 4.2.2. Signing Operation ..................................16 4.2.3. Output Results .....................................17 4.3. ECDSA Signature ...........................................19 4.3.1. Input Factors ......................................19 4.3.2. Signing Operation ..................................19 4.3.3. Output Results .....................................20 4.4. HMAC-SHA2 Integrity Protection ............................21 4.4.1. Input Factors ......................................22 4.4.2. Signing Operation ..................................22 4.4.3. Output Results .....................................23 4.5. Signature with Detached Content ...........................24 4.5.1. Input Factors ......................................25 4.5.2. Signing Operation ..................................25 4.5.3. Output Results .....................................26 4.6. Protecting Specific Header Fields .........................27 4.6.1. Input Factors ......................................27 4.6.2. Signing Operation ..................................27 4.6.3. Output Results .....................................28 4.7. Protecting Content Only ...................................29 4.7.1. Input Factors ......................................30 4.7.2. Signing Operation ..................................30Show full document text