draft-ietf-jose-json-web-signature-10.txt   draft-ietf-jose-json-web-signature-11.txt 
JOSE Working Group M. Jones JOSE Working Group M. Jones
Internet-Draft Microsoft Internet-Draft Microsoft
Intended status: Standards Track J. Bradley Intended status: Standards Track J. Bradley
Expires: October 27, 2013 Ping Identity Expires: November 29, 2013 Ping Identity
N. Sakimura N. Sakimura
NRI NRI
April 25, 2013 May 28, 2013
JSON Web Signature (JWS) JSON Web Signature (JWS)
draft-ietf-jose-json-web-signature-10 draft-ietf-jose-json-web-signature-11
Abstract Abstract
JSON Web Signature (JWS) is a means of representing content secured JSON Web Signature (JWS) is a means of representing content secured
with digital signatures or Message Authentication Codes (MACs) using with digital signatures or Message Authentication Codes (MACs) using
JavaScript Object Notation (JSON) data structures. Cryptographic JavaScript Object Notation (JSON) based data structures.
algorithms and identifiers for use with this specification are Cryptographic algorithms and identifiers for use with this
described in the separate JSON Web Algorithms (JWA) specification. specification are described in the separate JSON Web Algorithms (JWA)
Related encryption capabilities are described in the separate JSON specification. Related encryption capabilities are described in the
Web Encryption (JWE) specification. separate JSON Web Encryption (JWE) specification.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 27, 2013. This Internet-Draft will expire on November 29, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 20 skipping to change at page 2, line 20
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Notational Conventions . . . . . . . . . . . . . . . . . . 4 1.1. Notational Conventions . . . . . . . . . . . . . . . . . . 4
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. JSON Web Signature (JWS) Overview . . . . . . . . . . . . . . 6 3. JSON Web Signature (JWS) Overview . . . . . . . . . . . . . . 6
3.1. Example JWS . . . . . . . . . . . . . . . . . . . . . . . 6 3.1. Example JWS . . . . . . . . . . . . . . . . . . . . . . . 6
4. JWS Header . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4. JWS Header . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.1. Reserved Header Parameter Names . . . . . . . . . . . . . 8 4.1. Reserved Header Parameter Names . . . . . . . . . . . . . 8
4.1.1. "alg" (Algorithm) Header Parameter . . . . . . . . . . 8 4.1.1. "alg" (Algorithm) Header Parameter . . . . . . . . . . 8
4.1.2. "jku" (JWK Set URL) Header Parameter . . . . . . . . . 8 4.1.2. "jku" (JWK Set URL) Header Parameter . . . . . . . . . 9
4.1.3. "jwk" (JSON Web Key) Header Parameter . . . . . . . . 9 4.1.3. "jwk" (JSON Web Key) Header Parameter . . . . . . . . 9
4.1.4. "x5u" (X.509 URL) Header Parameter . . . . . . . . . . 9 4.1.4. "x5u" (X.509 URL) Header Parameter . . . . . . . . . . 9
4.1.5. "x5t" (X.509 Certificate Thumbprint) Header 4.1.5. "x5t" (X.509 Certificate Thumbprint) Header
Parameter . . . . . . . . . . . . . . . . . . . . . . 9 Parameter . . . . . . . . . . . . . . . . . . . . . . 9
4.1.6. "x5c" (X.509 Certificate Chain) Header Parameter . . . 9 4.1.6. "x5c" (X.509 Certificate Chain) Header Parameter . . . 10
4.1.7. "kid" (Key ID) Header Parameter . . . . . . . . . . . 10 4.1.7. "kid" (Key ID) Header Parameter . . . . . . . . . . . 10
4.1.8. "typ" (Type) Header Parameter . . . . . . . . . . . . 10 4.1.8. "typ" (Type) Header Parameter . . . . . . . . . . . . 10
4.1.9. "cty" (Content Type) Header Parameter . . . . . . . . 10 4.1.9. "cty" (Content Type) Header Parameter . . . . . . . . 11
4.1.10. "crit" (Critical) Header Parameter . . . . . . . . . . 11 4.1.10. "crit" (Critical) Header Parameter . . . . . . . . . . 11
4.2. Public Header Parameter Names . . . . . . . . . . . . . . 11 4.2. Public Header Parameter Names . . . . . . . . . . . . . . 11
4.3. Private Header Parameter Names . . . . . . . . . . . . . . 11 4.3. Private Header Parameter Names . . . . . . . . . . . . . . 12
5. Producing and Consuming JWSs . . . . . . . . . . . . . . . . . 11 5. Producing and Consuming JWSs . . . . . . . . . . . . . . . . . 12
5.1. Message Signing or MACing . . . . . . . . . . . . . . . . 12 5.1. Message Signing or MACing . . . . . . . . . . . . . . . . 12
5.2. Message Signature or MAC Validation . . . . . . . . . . . 13 5.2. Message Signature or MAC Validation . . . . . . . . . . . 13
5.3. String Comparison Rules . . . . . . . . . . . . . . . . . 14 5.3. String Comparison Rules . . . . . . . . . . . . . . . . . 14
6. Securing JWSs with Cryptographic Algorithms . . . . . . . . . 14 6. Cryptographic Algorithms . . . . . . . . . . . . . . . . . . . 15
7. JSON Serialization . . . . . . . . . . . . . . . . . . . . . . 15 7. Key Identification . . . . . . . . . . . . . . . . . . . . . . 15
7.1. Example JWS-JS . . . . . . . . . . . . . . . . . . . . . . 15 8. JWS JSON Serialization . . . . . . . . . . . . . . . . . . . . 15
8. Implementation Considerations . . . . . . . . . . . . . . . . 17 9. Implementation Considerations . . . . . . . . . . . . . . . . 18
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18
9.1. JSON Web Signature and Encryption Header Parameters 10.1. JSON Web Signature and Encryption Header Parameters
Registry . . . . . . . . . . . . . . . . . . . . . . . . . 17 Registry . . . . . . . . . . . . . . . . . . . . . . . . . 18
9.1.1. Registration Template . . . . . . . . . . . . . . . . 18 10.1.1. Registration Template . . . . . . . . . . . . . . . . 19
9.1.2. Initial Registry Contents . . . . . . . . . . . . . . 18 10.1.2. Initial Registry Contents . . . . . . . . . . . . . . 19
9.2. JSON Web Signature and Encryption Type Values Registry . . 19 10.2. JSON Web Signature and Encryption Type Values Registry . . 20
9.2.1. Registration Template . . . . . . . . . . . . . . . . 19 10.2.1. Registration Template . . . . . . . . . . . . . . . . 20
9.2.2. Initial Registry Contents . . . . . . . . . . . . . . 20 10.2.2. Initial Registry Contents . . . . . . . . . . . . . . 21
9.3. Media Type Registration . . . . . . . . . . . . . . . . . 20 10.3. Media Type Registration . . . . . . . . . . . . . . . . . 21
9.3.1. Registry Contents . . . . . . . . . . . . . . . . . . 20 10.3.1. Registry Contents . . . . . . . . . . . . . . . . . . 21
10. Security Considerations . . . . . . . . . . . . . . . . . . . 21 11. Security Considerations . . . . . . . . . . . . . . . . . . . 22
10.1. Cryptographic Security Considerations . . . . . . . . . . 21 11.1. Cryptographic Security Considerations . . . . . . . . . . 23
10.2. JSON Security Considerations . . . . . . . . . . . . . . . 23 11.2. JSON Security Considerations . . . . . . . . . . . . . . . 24
10.3. Unicode Comparison Security Considerations . . . . . . . . 23 11.3. Unicode Comparison Security Considerations . . . . . . . . 24
11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 23 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 25
11.1. Normative References . . . . . . . . . . . . . . . . . . . 23 12.1. Normative References . . . . . . . . . . . . . . . . . . . 25
11.2. Informative References . . . . . . . . . . . . . . . . . . 25 12.2. Informative References . . . . . . . . . . . . . . . . . . 26
Appendix A. JWS Examples . . . . . . . . . . . . . . . . . . . . 26 Appendix A. JWS Examples . . . . . . . . . . . . . . . . . . . . 27
A.1. Example JWS using HMAC SHA-256 . . . . . . . . . . . . . . 26 A.1. Example JWS using HMAC SHA-256 . . . . . . . . . . . . . . 27
A.1.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 26 A.1.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 27
A.1.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 28 A.1.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 29
A.1.3. Validating . . . . . . . . . . . . . . . . . . . . . . 28 A.1.3. Validating . . . . . . . . . . . . . . . . . . . . . . 29
A.2. Example JWS using RSA SHA-256 . . . . . . . . . . . . . . 28 A.2. Example JWS using RSASSA-PKCS-v1_5 SHA-256 . . . . . . . . 29
A.2.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 28 A.2.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 29
A.2.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 32 A.2.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 33
A.2.3. Validating . . . . . . . . . . . . . . . . . . . . . . 32 A.2.3. Validating . . . . . . . . . . . . . . . . . . . . . . 33
A.3. Example JWS using ECDSA P-256 SHA-256 . . . . . . . . . . 33 A.3. Example JWS using ECDSA P-256 SHA-256 . . . . . . . . . . 34
A.3.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 33 A.3.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 34
A.3.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 35 A.3.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 36
A.3.3. Validating . . . . . . . . . . . . . . . . . . . . . . 35 A.3.3. Validating . . . . . . . . . . . . . . . . . . . . . . 36
A.4. Example JWS using ECDSA P-521 SHA-512 . . . . . . . . . . 36 A.4. Example JWS using ECDSA P-521 SHA-512 . . . . . . . . . . 37
A.4.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 36 A.4.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 37
A.4.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 38 A.4.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 39
A.4.3. Validating . . . . . . . . . . . . . . . . . . . . . . 38 A.4.3. Validating . . . . . . . . . . . . . . . . . . . . . . 39
A.5. Example Plaintext JWS . . . . . . . . . . . . . . . . . . 39 A.5. Example Plaintext JWS . . . . . . . . . . . . . . . . . . 40
Appendix B. "x5c" (X.509 Certificate Chain) Example . . . . . . . 40 A.6. Example JWS Using JWS JSON Serialization . . . . . . . . . 41
A.6.1. JWS Protected Header . . . . . . . . . . . . . . . . . 41
A.6.2. JWS Per-Signature Unprotected Headers . . . . . . . . 41
A.6.3. Complete JWS Header Values . . . . . . . . . . . . . . 41
A.6.4. Complete JWS JSON Serialization Representation . . . . 42
A.6.5. RSA Key Used for Second Signature . . . . . . . . . . 42
Appendix B. "x5c" (X.509 Certificate Chain) Example . . . . . . . 44
Appendix C. Notes on implementing base64url encoding without Appendix C. Notes on implementing base64url encoding without
padding . . . . . . . . . . . . . . . . . . . . . . . 41 padding . . . . . . . . . . . . . . . . . . . . . . . 46
Appendix D. Possible Compact Serialization for Multiple Appendix D. Negative Test Case for "crit" Header Parameter . . . 47
Signatures . . . . . . . . . . . . . . . . . . . . . 42 Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 47
Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 43 Appendix F. Document History . . . . . . . . . . . . . . . . . . 48
Appendix F. Document History . . . . . . . . . . . . . . . . . . 44 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 53
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 48
1. Introduction 1. Introduction
JSON Web Signature (JWS) is a compact format for representing content JSON Web Signature (JWS) is a means of representing content secured
secured with digital signatures or Message Authentication Codes with digital signatures or Message Authentication Codes (MACs) using
(MACs) intended for space constrained environments such as HTTP JavaScript Object Notation (JSON) [RFC4627] based data structures.
Authorization headers and URI query parameters. It represents this The JWS cryptographic mechanisms provide integrity protection for
content using JavaScript Object Notation (JSON) [RFC4627] based data arbitrary sequences of octets.
structures. The JWS cryptographic mechanisms provide integrity
protection for arbitrary sequences of octets. Two closely related representations for JWS objects are defined. The
JWS Compact Serialization is a compact, URL-safe representation
intended for space constrained environments such as HTTP
Authorization headers and URI query parameters. The JWS JSON
Serialization represents JWS objects as JSON objects and enables
multiple signatures and/or MACs to be applied to the same content.
Both share the same cryptographic underpinnings.
Cryptographic algorithms and identifiers for use with this Cryptographic algorithms and identifiers for use with this
specification are described in the separate JSON Web Algorithms (JWA) specification are described in the separate JSON Web Algorithms (JWA)
[JWA] specification. Related encryption capabilities are described [JWA] specification. Related encryption capabilities are described
in the separate JSON Web Encryption (JWE) [JWE] specification. in the separate JSON Web Encryption (JWE) [JWE] specification.
1.1. Notational Conventions 1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
skipping to change at page 4, line 37 skipping to change at page 4, line 43
2. Terminology 2. Terminology
JSON Web Signature (JWS) A data structure representing a digitally JSON Web Signature (JWS) A data structure representing a digitally
signed or MACed message. The structure represents three values: signed or MACed message. The structure represents three values:
the JWS Header, the JWS Payload, and the JWS Signature. the JWS Header, the JWS Payload, and the JWS Signature.
JSON Text Object A UTF-8 [RFC3629] encoded text string representing JSON Text Object A UTF-8 [RFC3629] encoded text string representing
a JSON object; the syntax of JSON objects is defined in Section a JSON object; the syntax of JSON objects is defined in Section
2.2 of [RFC4627]. 2.2 of [RFC4627].
JWS Header A JSON Text Object that describes the digital signature JWS Header A JSON Text Object (or JSON Text Objects, when using the
or MAC operation applied to create the JWS Signature value. JWS JSON Serialization) that describes the digital signature or
MAC operation applied to create the JWS Signature value. The
members of the JWS Header object(s) are Header Parameters.
JWS Payload The sequence of octets to be secured -- a.k.a., the JWS Payload The sequence of octets to be secured -- a.k.a., the
message. The payload can contain an arbitrary sequence of octets. message. The payload can contain an arbitrary sequence of octets.
JWS Signature A sequence of octets containing the cryptographic JWS Signature A sequence of octets containing the cryptographic
material that ensures the integrity of the JWS Header and the JWS material that ensures the integrity of the JWS Protected Header
Payload. The JWS Signature value is a digital signature or MAC and the JWS Payload. The JWS Signature value is a digital
value calculated over the JWS Signing Input using the parameters signature or MAC value calculated over the JWS Signing Input using
specified in the JWS Header. the parameters specified in the JWS Header.
JWS Protected Header A JSON Text Object that contains the portion of
the JWS Header that is integrity protected. For the JWS Compact
Serialization, this comprises the entire JWS Header. For the JWS
JSON Serialization, this is one component of the JWS Header.
Header Parameter A name/value pair that is member of the JWS Header.
Header Parameter Name The name of a member of the JWS Header.
Header Parameter Value The value of a member of the JWS Header.
Base64url Encoding The URL- and filename-safe Base64 encoding Base64url Encoding The URL- and filename-safe Base64 encoding
described in RFC 4648 [RFC4648], Section 5, with the (non URL- described in RFC 4648 [RFC4648], Section 5, with the (non URL-
safe) '=' padding characters omitted, as permitted by Section 3.2. safe) '=' padding characters omitted, as permitted by Section 3.2.
(See Appendix C for notes on implementing base64url encoding (See Appendix C for notes on implementing base64url encoding
without padding.) without padding.)
Encoded JWS Header Base64url encoding of the JWS Header. Encoded JWS Header Base64url encoding of the JWS Protected Header.
Encoded JWS Payload Base64url encoding of the JWS Payload. Encoded JWS Payload Base64url encoding of the JWS Payload.
Encoded JWS Signature Base64url encoding of the JWS Signature. Encoded JWS Signature Base64url encoding of the JWS Signature.
JWS Signing Input The concatenation of the Encoded JWS Header, a JWS Signing Input The concatenation of the Encoded JWS Header, a
period ('.') character, and the Encoded JWS Payload. period ('.') character, and the Encoded JWS Payload.
Header Parameter Name The name of a member of the JWS Header.
Header Parameter Value The value of a member of the JWS Header.
JWS Compact Serialization A representation of the JWS as the JWS Compact Serialization A representation of the JWS as the
concatenation of the Encoded JWS Header, the Encoded JWS Payload, concatenation of the Encoded JWS Header, the Encoded JWS Payload,
and the Encoded JWS Signature in that order, with the three and the Encoded JWS Signature in that order, with the three
strings being separated by two period ('.') characters. This strings being separated by two period ('.') characters. This
results in a compact, URL-safe representation. representation is compact and URL-safe.
JWS JSON Serialization A representation of the JWS as a JSON JWS JSON Serialization A representation of the JWS as a JSON
structure containing Encoded JWS Header, Encoded JWS Payload, and structure containing JWS Header, Encoded JWS Payload, and Encoded
Encoded JWS Signature values. Unlike the JWS Compact JWS Signature values. Unlike the JWS Compact Serialization, the
Serialization, the JWS JSON Serialization enables multiple digital JWS JSON Serialization enables multiple digital signatures and/or
signatures and/or MACs to be applied to the same content. This MACs to be applied to the same content. This representation is
representation is neither compact nor URL-safe. neither compact nor URL-safe.
Collision Resistant Namespace A namespace that allows names to be Collision Resistant Namespace A namespace that allows names to be
allocated in a manner such that they are highly unlikely to allocated in a manner such that they are highly unlikely to
collide with other names. For instance, collision resistance can collide with other names. For instance, collision resistance can
be achieved through administrative delegation of portions of the be achieved through administrative delegation of portions of the
namespace or through use of collision-resistant name allocation namespace or through use of collision-resistant name allocation
functions. Examples of Collision Resistant Namespaces include: functions. Examples of Collision Resistant Namespaces include:
Domain Names, Object Identifiers (OIDs) as defined in the ITU-T Domain Names, Object Identifiers (OIDs) as defined in the ITU-T
X.660 and X.670 Recommendation series, and Universally Unique X.660 and X.670 Recommendation series, and Universally Unique
IDentifiers (UUIDs) [RFC4122]. When using an administratively IDentifiers (UUIDs) [RFC4122]. When using an administratively
skipping to change at page 6, line 20 skipping to change at page 6, line 33
3. JSON Web Signature (JWS) Overview 3. JSON Web Signature (JWS) Overview
JWS represents digitally signed or MACed content using JSON data JWS represents digitally signed or MACed content using JSON data
structures and base64url encoding. Three values are represented in a structures and base64url encoding. Three values are represented in a
JWS: the JWS Header, the JWS Payload, and the JWS Signature. In the JWS: the JWS Header, the JWS Payload, and the JWS Signature. In the
Compact Serialization, the three values are base64url-encoded for Compact Serialization, the three values are base64url-encoded for
transmission, and represented as the concatenation of the encoded transmission, and represented as the concatenation of the encoded
strings in that order, with the three strings being separated by two strings in that order, with the three strings being separated by two
period ('.') characters. A JSON Serialization for this information period ('.') characters. A JSON Serialization for this information
is also defined in Section 7. is also defined in Section 8.
The JWS Header describes the signature or MAC method and parameters The JWS Header describes the signature or MAC method and parameters
employed. The JWS Payload is the message content to be secured. The employed. The JWS Payload is the message content to be secured. The
JWS Signature ensures the integrity of both the JWS Header and the JWS Signature ensures the integrity of both the JWS Protected Header
JWS Payload. and the JWS Payload.
3.1. Example JWS 3.1. Example JWS
The following example JWS Header declares that the encoded object is The following example JWS Header declares that the encoded object is
a JSON Web Token (JWT) [JWT] and the JWS Header and the JWS Payload a JSON Web Token (JWT) [JWT] and the JWS Header and the JWS Payload
are secured using the HMAC SHA-256 algorithm: are secured using the HMAC SHA-256 algorithm:
{"typ":"JWT", {"typ":"JWT",
"alg":"HS256"} "alg":"HS256"}
skipping to change at page 7, line 29 skipping to change at page 7, line 43
representation using the JWS Compact Serialization (with line breaks representation using the JWS Compact Serialization (with line breaks
for display purposes only): for display purposes only):
eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9 eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9
. .
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt
cGxlLmNvbS9pc19yb290Ijp0cnVlfQ cGxlLmNvbS9pc19yb290Ijp0cnVlfQ
. .
dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
This computation is illustrated in more detail in Appendix A.1. This computation is illustrated in more detail in Appendix A.1. See
Appendix A for additional examples.
4. JWS Header 4. JWS Header
The members of the JSON object represented by the JWS Header describe The members of the JSON object(s) represented by the JWS Header
the digital signature or MAC applied to the Encoded JWS Header and describe the digital signature or MAC applied to the Encoded JWS
the Encoded JWS Payload and optionally additional properties of the Header and the Encoded JWS Payload and optionally additional
JWS. The Header Parameter Names within this object MUST be unique; properties of the JWS. The Header Parameter Names within the JWS
JWSs with duplicate Header Parameter Names MUST be rejected. Header MUST be unique; JWSs with duplicate Header Parameter Names
MUST be rejected.
Implementations are required to understand the specific header Implementations are required to understand the specific header
parameters defined by this specification that are designated as "MUST parameters defined by this specification that are designated as "MUST
be understood" and process them in the manner defined in this be understood" and process them in the manner defined in this
specification. All other header parameters defined by this specification. All other header parameters defined by this
specification that are not so designated MUST be ignored when not specification that are not so designated MUST be ignored when not
understood. Unless listed as a critical header parameter, per understood. Unless listed as a critical header parameter, per
Section 4.1.10, all other header parameters MUST be ignored when not Section 4.1.10, all other header parameters MUST be ignored when not
understood. understood.
skipping to change at page 8, line 12 skipping to change at page 8, line 27
Parameter Names, Public Header Parameter Names, and Private Header Parameter Names, Public Header Parameter Names, and Private Header
Parameter Names. Parameter Names.
4.1. Reserved Header Parameter Names 4.1. Reserved Header Parameter Names
The following Header Parameter Names are reserved with meanings as The following Header Parameter Names are reserved with meanings as
defined below. All the names are short because a core goal of this defined below. All the names are short because a core goal of this
specification is for the resulting representations using the JWS specification is for the resulting representations using the JWS
Compact Serialization to be compact. Compact Serialization to be compact.
Additional reserved Header Parameter Names MAY be defined via the Additional reserved Header Parameter Names can be defined via the
IANA JSON Web Signature and Encryption Header Parameters registry IANA JSON Web Signature and Encryption Header Parameters registry
Section 9.1. As indicated by the common registry, JWSs and JWEs Section 10.1. As indicated by the common registry, JWSs and JWEs
share a common header parameter space; when a parameter is used by share a common header parameter space; when a parameter is used by
both specifications, its usage must be compatible between the both specifications, its usage must be compatible between the
specifications. specifications.
4.1.1. "alg" (Algorithm) Header Parameter 4.1.1. "alg" (Algorithm) Header Parameter
The "alg" (algorithm) header parameter identifies the cryptographic The "alg" (algorithm) header parameter identifies the cryptographic
algorithm used to secure the JWS. The algorithm specified by the algorithm used to secure the JWS. The algorithm specified by the
"alg" value MUST be supported by the implementation and there MUST be "alg" value MUST be supported by the implementation and there MUST be
a key for use with that algorithm associated with the party that a key for use with that algorithm associated with the party that
skipping to change at page 9, line 31 skipping to change at page 9, line 43
the first certificate. This MAY be followed by additional the first certificate. This MAY be followed by additional
certificates, with each subsequent certificate being the one used to certificates, with each subsequent certificate being the one used to
certify the previous one. The protocol used to acquire the resource certify the previous one. The protocol used to acquire the resource
MUST provide integrity protection; an HTTP GET request to retrieve MUST provide integrity protection; an HTTP GET request to retrieve
the certificate MUST use TLS [RFC2818] [RFC5246]; the identity of the the certificate MUST use TLS [RFC2818] [RFC5246]; the identity of the
server MUST be validated, as per Section 3.1 of HTTP Over TLS server MUST be validated, as per Section 3.1 of HTTP Over TLS
[RFC2818]. Use of this header parameter is OPTIONAL. [RFC2818]. Use of this header parameter is OPTIONAL.
4.1.5. "x5t" (X.509 Certificate Thumbprint) Header Parameter 4.1.5. "x5t" (X.509 Certificate Thumbprint) Header Parameter
The "x5t" (X.509 Certificate Thumbprint) header parameter provides a The "x5t" (X.509 Certificate Thumbprint) header parameter is a
base64url encoded SHA-1 thumbprint (a.k.a. digest) of the DER base64url encoded SHA-1 thumbprint (a.k.a. digest) of the DER
encoding of the X.509 certificate [RFC5280] corresponding to the key encoding of the X.509 certificate [RFC5280] corresponding to the key
used to digitally sign the JWS. Use of this header parameter is used to digitally sign the JWS. Use of this header parameter is
OPTIONAL. OPTIONAL.
If, in the future, certificate thumbprints need to be computed using If, in the future, certificate thumbprints need to be computed using
hash functions other than SHA-1, it is suggested that additional hash functions other than SHA-1, it is suggested that additional
related header parameters be defined for that purpose. For example, related header parameters be defined for that purpose. For example,
it is suggested that a new "x5t#S256" (X.509 Certificate Thumbprint it is suggested that a new "x5t#S256" (X.509 Certificate Thumbprint
using SHA-256) header parameter could be defined by registering it in using SHA-256) header parameter could be defined by registering it in
the IANA JSON Web Signature and Encryption Header Parameters registry the IANA JSON Web Signature and Encryption Header Parameters registry
Section 9.1. Section 10.1.
4.1.6. "x5c" (X.509 Certificate Chain) Header Parameter 4.1.6. "x5c" (X.509 Certificate Chain) Header Parameter
The "x5c" (X.509 Certificate Chain) header parameter contains the The "x5c" (X.509 Certificate Chain) header parameter contains the
X.509 public key certificate or certificate chain [RFC5280] X.509 public key certificate or certificate chain [RFC5280]
corresponding to the key used to digitally sign the JWS. The corresponding to the key used to digitally sign the JWS. The
certificate or certificate chain is represented as an array of certificate or certificate chain is represented as a JSON array of
certificate value strings. Each string is a base64 encoded certificate value strings. Each string in the array is a base64
([RFC4648] Section 4 -- not base64url encoded) DER [ITU.X690.1994] encoded ([RFC4648] Section 4 -- not base64url encoded) DER
PKIX certificate value. The certificate containing the public key [ITU.X690.1994] PKIX certificate value. The certificate containing
corresponding to the key used to digitally sign the JWS MUST be the the public key corresponding to the key used to digitally sign the
first certificate. This MAY be followed by additional certificates, JWS MUST be the first certificate. This MAY be followed by
with each subsequent certificate being the one used to certify the additional certificates, with each subsequent certificate being the
previous one. The recipient MUST verify the certificate chain one used to certify the previous one. The recipient MUST verify the
according to [RFC5280] and reject the JWS if any validation failure certificate chain according to [RFC5280] and reject the JWS if any
occurs. Use of this header parameter is OPTIONAL. validation failure occurs. Use of this header parameter is OPTIONAL.
See Appendix B for an example "x5c" value. See Appendix B for an example "x5c" value.
4.1.7. "kid" (Key ID) Header Parameter 4.1.7. "kid" (Key ID) Header Parameter
The "kid" (key ID) header parameter is a hint indicating which key The "kid" (key ID) header parameter is a hint indicating which key
was used to secure the JWS. This parameter allows originators to was used to secure the JWS. This parameter allows originators to
explicitly signal a change of key to recipients. Should the explicitly signal a change of key to recipients. Should the
recipient be unable to locate a key corresponding to the "kid" value, recipient be unable to locate a key corresponding to the "kid" value,
they SHOULD treat that condition as an error. The interpretation of they SHOULD treat that condition as an error. The interpretation of
the "kid" value is unspecified. Its value MUST be a string. Use of the "kid" value is unspecified. Its value MUST be a string. Use of
this header parameter is OPTIONAL. this header parameter is OPTIONAL.
When used with a JWK, the "kid" value can be used to match a JWK When used with a JWK, the "kid" value can be used to match a JWK
"kid" parameter value. "kid" parameter value.
4.1.8. "typ" (Type) Header Parameter 4.1.8. "typ" (Type) Header Parameter
The "typ" (type) header parameter is used to declare the type of this The "typ" (type) header parameter is used to declare the type of this
object. The type value "JWS" is used to indicate that this object is object. The type value "JWS" is used to indicate that this object is
a JWS using the JWS Compact Serialization. The type value "JWS-JS" a JWS using the JWS Compact Serialization. The type value "JWS+JSON"
is used to indicate that this object is a JWS using the JWS JSON is used to indicate that this object is a JWS using the JWS JSON
Serialization. The "typ" value is a case sensitive string. Use of Serialization. Other type values MAY be used, and if not understood,
this header parameter is OPTIONAL. SHOULD be ignored. The "typ" value is a case sensitive string. Use
of this header parameter is OPTIONAL.
MIME Media Type [RFC2046] values MAY be used as "typ" values. MIME Media Type [RFC2046] values MAY be used as "typ" values.
"typ" values SHOULD either be registered in the IANA JSON Web "typ" values SHOULD either be registered in the IANA JSON Web
Signature and Encryption Type Values registry Section 9.2 or be a Signature and Encryption Type Values registry Section 10.2 or be a
value that contains a Collision Resistant Namespace. value that contains a Collision Resistant Namespace.
4.1.9. "cty" (Content Type) Header Parameter 4.1.9. "cty" (Content Type) Header Parameter
The "cty" (content type) header parameter is used to declare the type The "cty" (content type) header parameter is used to declare the type
of the secured content (the Payload). For example, the JSON Web of the secured content (the Payload). For example, the JSON Web
Token (JWT) [JWT] specification uses the "cty" value "JWT" to Token (JWT) [JWT] specification uses the "cty" value "JWT" to
indicate that the Payload is a JSON Web Token (JWT). The "cty" value indicate that the Payload is a JSON Web Token (JWT). Content type
is a case sensitive string. Use of this header parameter is values that are not understood SHOULD be ignored. The "cty" value is
OPTIONAL. a case sensitive string. Use of this header parameter is OPTIONAL.
The values used for the "cty" header parameter come from the same The values used for the "cty" header parameter come from the same
value space as the "typ" header parameter, with the same rules value space as the "typ" header parameter, with the same rules
applying. applying.
4.1.10. "crit" (Critical) Header Parameter 4.1.10. "crit" (Critical) Header Parameter
The "crit" (critical) header parameter is array listing the names of The "crit" (critical) header parameter indicates that extensions to
header parameters that are present in the JWS Header that MUST be [[ this specification ]] are being used that MUST be understood and
understood and processed by the implementation or if not understood, processed. Its value is an array listing the header parameter names
MUST cause the JWS to be rejected. This list MUST NOT include header defined by those extensions that are used in the JWS Header. If any
parameters defined by this specification, duplicate names, or names of the listed extension header parameters are not understood and
that do not occur as header parameters within the JWS. Use of this supported by the receiver, it MUST reject the JWS. Senders MUST NOT
header parameter is OPTIONAL. This header parameter MUST be include header parameter names defined by [[ this specification ]],
understood by implementations. duplicate names, or names that do not occur as header parameter names
within the JWS Header in the "crit" list. Senders MUST not use the
empty list "[]" as the "crit" value. Recipients MAY reject the JWS
if the critical list contains any header parameter names defined by
[[ this specification ]] or any other constraints on its use are
violated. This header parameter MUST be integrity protected, and
therefore MUST occur only with the JWS Protected Header, when used.
Use of this header parameter is OPTIONAL. This header parameter MUST
be understood by implementations.
An example use, along with a hypothetical "exp" (expiration-time) An example use, along with a hypothetical "exp" (expiration-time)
field is: field is:
{"alg":"ES256", {"alg":"ES256",
"crit":["exp"], "crit":["exp"],
"exp":1363284000 "exp":1363284000
} }
4.2. Public Header Parameter Names 4.2. Public Header Parameter Names
Additional Header Parameter Names can be defined by those using JWSs. Additional Header Parameter Names can be defined by those using JWSs.
However, in order to prevent collisions, any new Header Parameter However, in order to prevent collisions, any new Header Parameter
Name SHOULD either be registered in the IANA JSON Web Signature and Name SHOULD either be registered in the IANA JSON Web Signature and
Encryption Header Parameters registry Section 9.1 or be a Public Encryption Header Parameters registry Section 10.1 or be a Public
Name: a value that contains a Collision Resistant Namespace. In each Name: a value that contains a Collision Resistant Namespace. In each
case, the definer of the name or value needs to take reasonable case, the definer of the name or value needs to take reasonable
precautions to make sure they are in control of the part of the precautions to make sure they are in control of the part of the
namespace they use to define the Header Parameter Name. namespace they use to define the Header Parameter Name.
New header parameters should be introduced sparingly, as they can New header parameters should be introduced sparingly, as they can
result in non-interoperable JWSs. result in non-interoperable JWSs.
4.3. Private Header Parameter Names 4.3. Private Header Parameter Names
skipping to change at page 12, line 21 skipping to change at page 12, line 40
2. Base64url encode the octets of the JWS Payload. This encoding 2. Base64url encode the octets of the JWS Payload. This encoding
becomes the Encoded JWS Payload. becomes the Encoded JWS Payload.
3. Create a JWS Header containing the desired set of header 3. Create a JWS Header containing the desired set of header
parameters. Note that white space is explicitly allowed in the parameters. Note that white space is explicitly allowed in the
representation and no canonicalization need be performed before representation and no canonicalization need be performed before
encoding. encoding.
4. Base64url encode the octets of the UTF-8 representation of the 4. Base64url encode the octets of the UTF-8 representation of the
JWS Header to create the Encoded JWS Header. JWS Protected Header to create the Encoded JWS Header. If the
JWS Protected Header is not present (which can only happen when
using the JWS JSON Serialization), let the Encoded JWS Header be
the empty string.
5. Compute the JWS Signature in the manner defined for the 5. Compute the JWS Signature in the manner defined for the
particular algorithm being used over the JWS Signing Input (the particular algorithm being used over the JWS Signing Input (the
concatenation of the Encoded JWS Header, a period ('.') concatenation of the Encoded JWS Header, a period ('.')
character, and the Encoded JWS Payload). The "alg" (algorithm) character, and the Encoded JWS Payload). The "alg" (algorithm)
header parameter MUST be present in the JWS Header, with the header parameter MUST be present in the JWS Header, with the
algorithm value accurately representing the algorithm used to algorithm value accurately representing the algorithm used to
construct the JWS Signature. construct the JWS Signature.
6. Base64url encode the representation of the JWS Signature to 6. Base64url encode the representation of the JWS Signature to
create the Encoded JWS Signature. create the Encoded JWS Signature.
7. The three encoded parts are the result values used in both the 7. The three encoded parts are result values used in both the JWS
JWS Compact Serialization and the JWS JSON Serialization Compact Serialization and the JWS JSON Serialization
representations. representations.
8. If the JWS JSON Serialization is being used, repeat this process 8. If the JWS JSON Serialization is being used, repeat this process
for each digital signature or MAC value being applied. for each digital signature or MAC value being applied.
9. Create the desired serialized output. The JWS Compact 9. Create the desired serialized output. The JWS Compact
Serialization of this result is the concatenation of the Encoded Serialization of this result is the concatenation of the Encoded
JWS Header, the Encoded JWS Payload, and the Encoded JWS JWS Header, the Encoded JWS Payload, and the Encoded JWS
Signature in that order, with the three strings being separated Signature in that order, with the three strings being separated
by two period ('.') characters. The JWS JSON Serialization is by two period ('.') characters. The JWS JSON Serialization is
described in Section 7. described in Section 8.
5.2. Message Signature or MAC Validation 5.2. Message Signature or MAC Validation
When validating a JWS, the following steps MUST be taken. The order When validating a JWS, the following steps MUST be taken. The order
of the steps is not significant in cases where there are no of the steps is not significant in cases where there are no
dependencies between the inputs and outputs of the steps. If any of dependencies between the inputs and outputs of the steps. If any of
the listed steps fails, then the JWS MUST be rejected. the listed steps fails, then the JWS MUST be rejected.
1. Parse the serialized input to determine the values of the Encoded 1. Parse the serialized input to determine the values of the JWS
JWS Header, the Encoded JWS Payload, and the Encoded JWS Header, the Encoded JWS Payload, and the Encoded JWS Signature.
Signature. When using the JWS Compact Serialization, these three When using the JWS Compact Serialization, the Encoded JWS
values are represented as text strings in that order, separated Header, the Encoded JWS Payload, and the Encoded JWS Signature
by two period ('.') characters. The JWS JSON Serialization is are represented as text strings in that order, separated by two
described in Section 7. period ('.') characters. The JWS JSON Serialization is
described in Section 8.
2. The Encoded JWS Header MUST be successfully base64url decoded 2. The Encoded JWS Header MUST be successfully base64url decoded
following the restriction given in this specification that no following the restriction given in this specification that no
padding characters have been used. padding characters have been used.
3. The resulting JWS Header MUST be completely valid JSON syntax 3. Let the JWS Protected Header value be the result of base64url
conforming to RFC 4627 [RFC4627]. decoding the Encoded JWS Header.
4. The resulting JWS Header MUST be validated to only include 4. The resulting JWS Protected Header MUST be a completely valid
parameters and values whose syntax and semantics are both JSON object conforming to RFC 4627 [RFC4627].
understood and supported or that are specified as being ignored
when not understood.
5. The Encoded JWS Payload MUST be successfully base64url decoded 5. If using the JWS Compact Serialization, let the JWS Header be
following the restriction given in this specification that no the JWS Protected Header; otherwise, when using the JWS JSON
padding characters have been used. Serialization, let the JWS Header be the union of the members of
the JWS Protected Header, the members of the "unprotected"
value, and the members of the corresponding "header" value, all
of which must be completely valid JSON objects.
6. The Encoded JWS Signature MUST be successfully base64url decoded 6. The resulting JWS Header MUST NOT contain duplicate Header
following the restriction given in this specification that no Parameter Names. When using the JWS JSON Serialization, this
padding characters have been used. restriction includes that the same Header Parameter Name also
MUST NOT occur in distinct JSON Text Object values that together
comprise the JWS Header.
7. The JWS Signature MUST be successfully validated against the JWS 7. The resulting JWS Header MUST be validated to only include
Signing Input (the concatenation of the Encoded JWS Header, a parameters and values whose syntax and semantics are both
period ('.') character, and the Encoded JWS Payload) in the understood and supported or that are specified as being ignored
manner defined for the algorithm being used, which MUST be when not understood.
accurately represented by the value of the "alg" (algorithm)
header parameter, which MUST be present.
8. If the JWS JSON Serialization is being used, repeat this process 8. The Encoded JWS Payload MUST be successfully base64url decoded
for each digital signature or MAC value contained in the following the restriction given in this specification that no
representation. padding characters have been used.
9. The Encoded JWS Signature MUST be successfully base64url decoded
following the restriction given in this specification that no
padding characters have been used.
10. The JWS Signature MUST be successfully validated against the JWS
Signing Input (the concatenation of the Encoded JWS Header, a
period ('.') character, and the Encoded JWS Payload) in the
manner defined for the algorithm being used, which MUST be
accurately represented by the value of the "alg" (algorithm)
header parameter, which MUST be present.
11. If the JWS JSON Serialization is being used, repeat this process
for each digital signature or MAC value contained in the
representation.
5.3. String Comparison Rules 5.3. String Comparison Rules
Processing a JWS inevitably requires comparing known strings to Processing a JWS inevitably requires comparing known strings to
values in JSON objects. For example, in checking what the algorithm values in JSON objects. For example, in checking what the algorithm
is, the Unicode string encoding "alg" will be checked against the is, the Unicode string encoding "alg" will be checked against the
member names in the JWS Header to see if there is a matching Header member names in the JWS Header to see if there is a matching Header
Parameter Name. A similar process occurs when determining if the Parameter Name. A similar process occurs when determining if the
value of the "alg" header parameter represents a supported algorithm. value of the "alg" header parameter represents a supported algorithm.
skipping to change at page 14, line 32 skipping to change at page 15, line 17
3. Unicode Normalization [USA15] MUST NOT be applied at any point to 3. Unicode Normalization [USA15] MUST NOT be applied at any point to
either the JSON string or to the string it is to be compared either the JSON string or to the string it is to be compared
against. against.
4. Comparisons between the two strings MUST be performed as a 4. Comparisons between the two strings MUST be performed as a
Unicode code point to code point equality comparison. (Note that Unicode code point to code point equality comparison. (Note that
values that originally used different Unicode encodings (UTF-8, values that originally used different Unicode encodings (UTF-8,
UTF-16, etc.) may result in the same code point values.) UTF-16, etc.) may result in the same code point values.)
Also, see the JSON security considerations in Section 10.2 and the Also, see the JSON security considerations in Section 11.2 and the
Unicode security considerations in Section 10.3. Unicode security considerations in Section 11.3.
6. Securing JWSs with Cryptographic Algorithms 6. Cryptographic Algorithms
JWS uses cryptographic algorithms to digitally sign or MAC the JWS JWS uses cryptographic algorithms to digitally sign or MAC the JWS
Header and the JWS Payload. The JSON Web Algorithms (JWA) [JWA] Protected Header and the JWS Payload. The JSON Web Algorithms (JWA)
specification describes a set of cryptographic algorithms and [JWA] specification describes a set of cryptographic algorithms and
identifiers to be used with this specification. Specifically, identifiers to be used with this specification. Specifically,
Section 3.1 specifies a set of "alg" (algorithm) header parameter Section 3.1 specifies a set of "alg" (algorithm) header parameter
values intended for use this specification. It also describes the values intended for use this specification. It also describes the
semantics and operations that are specific to these algorithms. semantics and operations that are specific to these algorithms.
Public keys employed for digital signing can be identified using the 7. Key Identification
Header Parameter methods described in Section 4.1 or can be
distributed using methods that are outside the scope of this
specification.
7. JSON Serialization It is necessary for the recipient of a JWS to be able to determine
the key that was employed for the digital signature or MAC operation.
The key employed can be identified using the Header Parameter methods
described in Section 4.1 or can be identified using methods that are
outside the scope of this specification. Specifically, the Header
Parameters "jku", "jwk", "x5u", "x5t", "x5c", and "kid" can be used
to identify the key used. The sender SHOULD include sufficient
information in the Header Parameters to identify the key used, unless
the application uses another means or convention to determine the key
used. Recipients MUST reject the input when the algorithm used
requires a key (which is true of all algorithms except for "none")
and the key used cannot be determined.
8. JWS JSON Serialization
The JWS JSON Serialization represents digitally signed or MACed The JWS JSON Serialization represents digitally signed or MACed
content as a JSON object with a "signatures" member containing an content as a JSON object. Unlike the JWS Compact Serialization,
array of per-signature information and a "payload" member containing content using the JWS JSON Serialization can be secured with more
a shared Encoded JWS Payload value. Each member of the "signatures" than one digital signature and/or MAC value.
array is a JSON object with a "header" member containing an Encoded
JWS Header value and a "signature" member containing an Encoded JWS
Signature value.
Unlike the JWS Compact Serialization, content using the JWS JSON The representation is closely related to that used in the JWS Compact
Serialization MAY be secured with more than one digital signature Serialization, with the following differences for the JWS JSON
and/or MAC value. Each is represented as an Encoded JWS Signature Serialization:
value in the "signature" member of an object in the "signatures"
array. For each signature, there is an Encoded JWS Encoded Header
value in the "header" member of the same object in the "signatures"
array. This specifies the digital signature or MAC applied to the
Encoded JWS Header value and the shared Encoded JWS Payload value to
create the JWS Signature value. Therefore, the syntax is:
{"signatures":[ o Values in the JWS JSON Serialization are represented as members of
{"header":"<header 1 contents>", a JSON object, rather than as base64url encoded strings separated
"signature":"<signature 1 contents>"}, by period ('.') characters. (However binary values and values
... that are integrity protected are still base64url encoded.)
{"header":"<header N contents>",
"signature":"<signature N contents>"}],
"payload":"<payload contents>"
}
The contents of the Encoded JWS Header, Encoded JWS Payload, and o The Encoded JWS Header value, if non-empty, is stored in the
Encoded JWS Signature values are exactly as specified in the rest of "protected" member.
this specification. They are interpreted and validated in the same
manner, with each corresponding "header" and "signature" value being
created and validated together.
Each JWS Signature value is computed on the JWS Signing Input o The Encoded JWS Payload value is stored in the "payload" member.
corresponding to the concatenation of the Encoded JWS Header, a
period ('.') character, and the Encoded JWS Payload in the same
manner as for the JWS Compact Serialization. This has the desirable
result that each Encoded JWS Signature value in the "signatures"
array is identical to the value that would be used for the same
parameter in the JWS Compact Serialization, as is the shared JWS
Payload value.
7.1. Example JWS-JS o There can be multiple signature and/or MAC values, rather than
just one. A JSON array in the "signatures" member is used to hold
values that are specific to a particular signature or MAC
computation, with one array element per signature/MAC represented.
These array elements are JSON objects.
This section contains an example using the JWS JSON Serialization. o Each Encoded JWS Signature value is stored in the "signature"
This example demonstrates the capability for conveying multiple member of a JSON object that is an element of the "signatures"
digital signatures and/or MACs for the same payload. array.
The Encoded JWS Payload used in this example is the same as used in o Some header parameter values, such as the "alg" value and
the examples in Appendix A (with line breaks for display purposes parameters used for selecting keys, can also differ for different
only): signature/MAC computations. Per-signature/MAC header parameter
values are stored in the "header" members of the same JSON objects
that are elements of the "signatures" array.
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt o Some header parameters, including the "alg" parameter, can be
cGxlLmNvbS9pc19yb290Ijp0cnVlfQ shared among all signature/MAC computations. These header
parameters are stored in either of two top-level member(s) of the
JSON object: the "protected" member and the "unprotected" member.
The values of these members are JSON Text Objects containing
Header Parameters.
Two digital signatures are used in this example: an RSA SHA-256 o Not all header parameters are integrity protected. The shared
signature, for which the header and signature values are the same as header parameters in the "protected" member are integrity
in Appendix A.2, and an ECDSA P-256 SHA-256 signature, for which the protected, and are base64url encoded. The per-signature/MAC
header and signature values are the same as in Appendix A.3. The two header parameters in the "header" array element members and the
Decoded JWS Header Segments used are: shared header parameters in the "unprotected" member are not
integrity protected. These JSON Text Objects containing header
parameters that are not integrity protected are not base64url
encoded.
{"alg":"RS256"} o The header parameter values used when creating or validating
individual signature or MAC values are the union of the three sets
of header parameter values that may be present: (1) the per-
signature/MAC values in the "header" member of the signature/MAC's
array element, (2) the shared integrity-protected values in the
"protected" member, and (3) the shared non-integrity-protected
values in the "unprotected" member. The union of these sets of
header parameters comprises the JWS Header. The header parameter
names in the three locations MUST be disjoint.
and: The syntax of a JWS using the JWS JSON Serialization is as follows:
{"alg":"ES256"} {"protected":<integrity-protected shared header contents>",
"unprotected":<non-integrity-protected shared header contents>",
"payload":"<payload contents>"
"signatures":[
{"header":"<per-signature unprotected header 1 contents>",
"signature":"<signature 1 contents>"},
...
{"header":"<per-signature unprotected header N contents>",
"signature":"<signature N contents>"}],
}
Since the computations of the JWS Header and JWS Signature values are Of these members, only the "payload", "signatures", and "signature"
the same as in Appendix A.2 and Appendix A.3, they are not repeated members MUST be present. At least one of the "header", "protected",
here. and "unprotected" members MUST be present so that an "alg" header
parameter value is conveyed for each signature/MAC computation.
The complete JSON Web Signature JSON Serialization (JWS-JS) for these The contents of the Encoded JWS Payload and Encoded JWS Signature
values is as follows (with line breaks for display purposes only): values are exactly as defined in the rest of this specification.
They are interpreted and validated in the same manner, with each
corresponding Encoded JWS Signature and set of header parameter
values being created and validated together. The JWS Header values
used are the union of the header parameters in the "protected",
"unprotected", and corresponding "header" members, as described
earlier.
{"signatures":[ Each JWS Signature value is computed on the JWS Signing Input using
{"header":"eyJhbGciOiJSUzI1NiJ9", the parameters of the corresponding JWS Header value in the same
"signature": manner as for the JWS Compact Serialization. This has the desirable
"cC4hiUPoj9Eetdgtv3hF80EGrhuB__dzERat0XF9g2VtQgr9PJbu3XOiZj5RZ property that each Encoded JWS Signature value in the "signatures"
mh7AAuHIm4Bh-0Qc_lF5YKt_O8W2Fp5jujGbds9uJdbF9CUAr7t1dnZcAcQjb array is identical to the value that would have been computed for the
KBYNX4BAynRFdiuB--f_nZLgrnbyTyWzO75vRK5h6xBArLIARNPvkSjtQBMHl same parameter in the JWS Compact Serialization, provided that the
b1L07Qe7K0GarZRmB_eSN9383LcOLn6_dO--xi12jzDwusC-eOkHWEsqtFZES Encoded JWS Header value (which represents the integrity-protected
c6BfI7noOPqvhJ1phCnvWh6IeYI2w9QOYEUipUTI8np6LbgGY9Fs98rqVt5AX header parameter values) matches that used in the JWS Compact
LIhWkWywlVmtVrBp0igcN_IoypGlUPQGe77Rw"}, Serialization.
{"header":"eyJhbGciOiJFUzI1NiJ9",
"signature":
"DtEhU3ljbEg8L38VWAfUAqOyKAM6-Xx-F4GawxaepmXFCgfTjDxw5djxLa8IS
lSApmWQxfKTUJqPP3-Kg6NU1Q"}],
"payload":
"eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGF
tcGxlLmNvbS9pc19yb290Ijp0cnVlfQ"
}
8. Implementation Considerations See Appendix A.6 for an example of computing a JWS using the JWS JSON
Serialization.
9. Implementation Considerations
The JWS Compact Serialization is mandatory to implement. The JWS Compact Serialization is mandatory to implement.
Implementation of the JWS JSON Serialization is OPTIONAL. Implementation of the JWS JSON Serialization is OPTIONAL.
9. IANA Considerations 10. IANA Considerations
The following registration procedure is used for all the registries The following registration procedure is used for all the registries
established by this specification. established by this specification.
Values are registered with a Specification Required [RFC5226] after a Values are registered with a Specification Required [RFC5226] after a
two-week review period on the [TBD]@ietf.org mailing list, on the two-week review period on the [TBD]@ietf.org mailing list, on the
advice of one or more Designated Experts. However, to allow for the advice of one or more Designated Experts. However, to allow for the
allocation of values prior to publication, the Designated Expert(s) allocation of values prior to publication, the Designated Expert(s)
may approve registration once they are satisfied that such a may approve registration once they are satisfied that such a
specification will be published. specification will be published.
skipping to change at page 17, line 38 skipping to change at page 18, line 39
Within the review period, the Designated Expert(s) will either Within the review period, the Designated Expert(s) will either
approve or deny the registration request, communicating this decision approve or deny the registration request, communicating this decision
to the review list and IANA. Denials should include an explanation to the review list and IANA. Denials should include an explanation
and, if applicable, suggestions as to how to make the request and, if applicable, suggestions as to how to make the request
successful. successful.
IANA must only accept registry updates from the Designated Expert(s) IANA must only accept registry updates from the Designated Expert(s)
and should direct all requests for registration to the review mailing and should direct all requests for registration to the review mailing
list. list.
9.1. JSON Web Signature and Encryption Header Parameters Registry 10.1. JSON Web Signature and Encryption Header Parameters Registry
This specification establishes the IANA JSON Web Signature and This specification establishes the IANA JSON Web Signature and
Encryption Header Parameters registry for reserved JWS and JWE Header Encryption Header Parameters registry for reserved JWS and JWE Header
Parameter Names. The registry records the reserved Header Parameter Parameter Names. The registry records the reserved Header Parameter
Name and a reference to the specification that defines it. The same Name and a reference to the specification that defines it. The same
Header Parameter Name MAY be registered multiple times, provided that Header Parameter Name MAY be registered multiple times, provided that
the parameter usage is compatible between the specifications. the parameter usage is compatible between the specifications.
Different registrations of the same Header Parameter Name will Different registrations of the same Header Parameter Name will
typically use different Header Parameter Usage Location(s) values. typically use different Header Parameter Usage Location(s) values.
9.1.1. Registration Template 10.1.1. Registration Template
Header Parameter Name: Header Parameter Name:
The name requested (e.g., "example"). This name is case The name requested (e.g., "example"). This name is case
sensitive. Names that match other registered names in a case sensitive. Names that match other registered names in a case
insensitive manner SHOULD NOT be accepted. insensitive manner SHOULD NOT be accepted.
Header Parameter Usage Location(s): Header Parameter Usage Location(s):
The header parameter usage locations, which should be one or more The header parameter usage locations, which should be one or more
of the values "JWS" or "JWE". of the values "JWS" or "JWE".
skipping to change at page 18, line 27 skipping to change at page 19, line 27
For Standards Track RFCs, state "IETF". For others, give the name For Standards Track RFCs, state "IETF". For others, give the name
of the responsible party. Other details (e.g., postal address, of the responsible party. Other details (e.g., postal address,
email address, home page URI) may also be included. email address, home page URI) may also be included.
Specification Document(s): Specification Document(s):
Reference to the document(s) that specify the parameter, Reference to the document(s) that specify the parameter,
preferably including URI(s) that can be used to retrieve copies of preferably including URI(s) that can be used to retrieve copies of
the document(s). An indication of the relevant sections may also the document(s). An indication of the relevant sections may also
be included but is not required. be included but is not required.
9.1.2. Initial Registry Contents 10.1.2. Initial Registry Contents
This specification registers the Header Parameter Names defined in This specification registers the Header Parameter Names defined in
Section 4.1 in this registry. Section 4.1 in this registry.
o Header Parameter Name: "alg" o Header Parameter Name: "alg"
o Header Parameter Usage Location(s): JWS o Header Parameter Usage Location(s): JWS
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.1 of [[ this document ]] o Specification Document(s): Section 4.1.1 of [[ this document ]]
o Header Parameter Name: "jku" o Header Parameter Name: "jku"
skipping to change at page 19, line 34 skipping to change at page 20, line 34
o Header Parameter Name: "cty" o Header Parameter Name: "cty"
o Header Parameter Usage Location(s): JWS o Header Parameter Usage Location(s): JWS
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.9 of [[ this document ]] o Specification Document(s): Section 4.1.9 of [[ this document ]]
o Header Parameter Name: "crit" o Header Parameter Name: "crit"
o Header Parameter Usage Location(s): JWS o Header Parameter Usage Location(s): JWS
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.10 of [[ this document ]] o Specification Document(s): Section 4.1.10 of [[ this document ]]
9.2. JSON Web Signature and Encryption Type Values Registry 10.2. JSON Web Signature and Encryption Type Values Registry
This specification establishes the IANA JSON Web Signature and This specification establishes the IANA JSON Web Signature and
Encryption Type Values registry for values of the JWS and JWE "typ" Encryption Type Values registry for values of the JWS and JWE "typ"
(type) header parameter. It is RECOMMENDED that all registered "typ" (type) header parameter. It is RECOMMENDED that all registered "typ"
values also include a MIME Media Type [RFC2046] value that the values also include a MIME Media Type [RFC2046] value that the
registered value is a short name for. The registry records the "typ" registered value is a short name for. The registry records the "typ"
value, the MIME type value that it is an abbreviation for (if any), value, the MIME type value that it is an abbreviation for (if any),
and a reference to the specification that defines it. and a reference to the specification that defines it.
MIME Media Type [RFC2046] values MUST NOT be directly registered as MIME Media Type [RFC2046] values MUST NOT be directly registered as
new "typ" values; rather, new "typ" values MAY be registered as short new "typ" values; rather, new "typ" values MAY be registered as short
names for MIME types. names for MIME types.
9.2.1. Registration Template 10.2.1. Registration Template
"typ" Header Parameter Value: "typ" Header Parameter Value:
The name requested (e.g., "example"). This name is case The name requested (e.g., "example"). This name is case
sensitive. Names that match other registered names in a case sensitive. Names that match other registered names in a case
insensitive manner SHOULD NOT be accepted. insensitive manner SHOULD NOT be accepted.
Abbreviation for MIME Type: Abbreviation for MIME Type:
The MIME type that this name is an abbreviation for (e.g., The MIME type that this name is an abbreviation for (e.g.,
"application/example"). "application/example").
Change Controller: Change Controller:
For Standards Track RFCs, state "IETF". For others, give the name For Standards Track RFCs, state "IETF". For others, give the name
of the responsible party. Other details (e.g., postal address, of the responsible party. Other details (e.g., postal address,
email address, home page URI) may also be included. email address, home page URI) may also be included.
Specification Document(s): Specification Document(s):
Reference to the document(s) that specify the parameter, Reference to the document(s) that specify the parameter,
preferably including URI(s) that can be used to retrieve copies of preferably including URI(s) that can be used to retrieve copies of
the document(s). An indication of the relevant sections may also the document(s). An indication of the relevant sections may also
be included but is not required. be included but is not required.
9.2.2. Initial Registry Contents 10.2.2. Initial Registry Contents
This specification registers the "JWS" and "JWS-JS" type values in This specification registers the "JWS" and "JWS+JSON" type values in
this registry: this registry:
o "typ" Header Parameter Value: "JWS" o "typ" Header Parameter Value: "JWS"
o Abbreviation for MIME type: application/jws o Abbreviation for MIME type: application/jws
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.8 of [[ this document ]] o Specification Document(s): Section 4.1.8 of [[ this document ]]
o "typ" Header Parameter Value: "JWS-JS" o "typ" Header Parameter Value: "JWS+JSON"
o Abbreviation for MIME type: application/jws-js o Abbreviation for MIME type: application/jws+json
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.8 of [[ this document ]] o Specification Document(s): Section 4.1.8 of [[ this document ]]
9.3. Media Type Registration 10.3. Media Type Registration
9.3.1. Registry Contents 10.3.1. Registry Contents
This specification registers the "application/jws" and This specification registers the "application/jws" and
"application/jws-js" Media Types [RFC2046] in the MIME Media Type "application/jws+json" Media Types [RFC2046] in the MIME Media Type
registry [RFC4288] to indicate, respectively, that the content is a registry [RFC4288] to indicate, respectively, that the content is a
JWS using the JWS Compact Serialization or a JWS using the JWS JSON JWS using the JWS Compact Serialization or a JWS using the JWS JSON
Serialization. Serialization.
o Type name: application o Type name: application
o Subtype name: jws o Subtype name: jws
o Required parameters: n/a o Required parameters: n/a
o Optional parameters: n/a o Optional parameters: n/a
o Encoding considerations: JWS values are encoded as a series of o Encoding considerations: JWS values are encoded as a series of
base64url encoded values (some of which may be the empty string) base64url encoded values (some of which may be the empty string)
skipping to change at page 21, line 26 skipping to change at page 22, line 26
o Additional information: Magic number(s): n/a, File extension(s): o Additional information: Magic number(s): n/a, File extension(s):
n/a, Macintosh file type code(s): n/a n/a, Macintosh file type code(s): n/a
o Person & email address to contact for further information: Michael o Person & email address to contact for further information: Michael
B. Jones, mbj@microsoft.com B. Jones, mbj@microsoft.com
o Intended usage: COMMON o Intended usage: COMMON
o Restrictions on usage: none o Restrictions on usage: none
o Author: Michael B. Jones, mbj@microsoft.com o Author: Michael B. Jones, mbj@microsoft.com
o Change Controller: IETF o Change Controller: IETF
o Type name: application o Type name: application
o Subtype name: jws-js o Subtype name: jws+json
o Required parameters: n/a o Required parameters: n/a
o Optional parameters: n/a o Optional parameters: n/a
o Encoding considerations: JWS-JS values are represented as a JSON o Encoding considerations: application/jws+json values are
Object; UTF-8 encoding SHOULD be employed for the JSON object. represented as a JSON Object; UTF-8 encoding SHOULD be employed
for the JSON object.
o Security considerations: See the Security Considerations section o Security considerations: See the Security Considerations section
of [[ this document ]] of [[ this document ]]
o Interoperability considerations: n/a o Interoperability considerations: n/a
o Published specification: [[ this document ]] o Published specification: [[ this document ]]
o Applications that use this media type: TBD o Applications that use this media type: TBD
o Additional information: Magic number(s): n/a, File extension(s): o Additional information: Magic number(s): n/a, File extension(s):
n/a, Macintosh file type code(s): n/a n/a, Macintosh file type code(s): n/a
o Person & email address to contact for further information: Michael o Person & email address to contact for further information: Michael
B. Jones, mbj@microsoft.com B. Jones, mbj@microsoft.com
o Intended usage: COMMON o Intended usage: COMMON
o Restrictions on usage: none o Restrictions on usage: none
o Author: Michael B. Jones, mbj@microsoft.com o Author: Michael B. Jones, mbj@microsoft.com
o Change Controller: IETF o Change Controller: IETF
10. Security Considerations 11. Security Considerations
11.1. Cryptographic Security Considerations
10.1. Cryptographic Security Considerations
All of the security issues faced by any cryptographic application All of the security issues faced by any cryptographic application
must be faced by a JWS/JWE/JWK agent. Among these issues are must be faced by a JWS/JWE/JWK agent. Among these issues are
protecting the user's private and symmetric keys, preventing various protecting the user's private and symmetric keys, preventing various
attacks, and helping the user avoid mistakes such as inadvertently attacks, and helping the user avoid mistakes such as inadvertently
encrypting a message for the wrong recipient. The entire list of encrypting a message for the wrong recipient. The entire list of
security considerations is beyond the scope of this document, but security considerations is beyond the scope of this document, but
some significant concerns are listed here. some significant concerns are listed here.
All the security considerations in XML DSIG 2.0 All the security considerations in XML DSIG 2.0
skipping to change at page 23, line 5 skipping to change at page 24, line 9
certificate store used by the intended victim. A prerequisite to certificate store used by the intended victim. A prerequisite to
this attack succeeding is the attacker having write access to the this attack succeeding is the attacker having write access to the
intended victim's certificate store. intended victim's certificate store.
If, in the future, certificate thumbprints need to be computed using If, in the future, certificate thumbprints need to be computed using
hash functions other than SHA-1, it is suggested that additional hash functions other than SHA-1, it is suggested that additional
related header parameters be defined for that purpose. For example, related header parameters be defined for that purpose. For example,
it is suggested that a new "x5t#S256" (X.509 Certificate Thumbprint it is suggested that a new "x5t#S256" (X.509 Certificate Thumbprint
using SHA-256) header parameter could be defined and used. using SHA-256) header parameter could be defined and used.
10.2. JSON Security Considerations 11.2. JSON Security Considerations
Strict JSON validation is a security requirement. If malformed JSON Strict JSON validation is a security requirement. If malformed JSON
is received, then the intent of the sender is impossible to reliably is received, then the intent of the sender is impossible to reliably
discern. Ambiguous and potentially exploitable situations could discern. Ambiguous and potentially exploitable situations could
arise if the JSON parser used does not reject malformed JSON syntax. arise if the JSON parser used does not reject malformed JSON syntax.
Section 2.2 of the JavaScript Object Notation (JSON) specification Section 2.2 of the JavaScript Object Notation (JSON) specification
[RFC4627] states "The names within an object SHOULD be unique", [RFC4627] states "The names within an object SHOULD be unique",
whereas this specification states that "Header Parameter Names within whereas this specification states that "Header Parameter Names within
this object MUST be unique; JWSs with duplicate Header Parameter this object MUST be unique; JWSs with duplicate Header Parameter
skipping to change at page 23, line 27 skipping to change at page 24, line 31
Section 2.2 "SHOULD" be treated as a "MUST". Ambiguous and Section 2.2 "SHOULD" be treated as a "MUST". Ambiguous and
potentially exploitable situations could arise if the JSON parser potentially exploitable situations could arise if the JSON parser
used does not enforce the uniqueness of member names. used does not enforce the uniqueness of member names.
Some JSON parsers might not reject input that contains extra Some JSON parsers might not reject input that contains extra
significant characters after a valid input. For instance, the input significant characters after a valid input. For instance, the input
"{"tag":"value"}ABCD" contains a valid JSON object followed by the "{"tag":"value"}ABCD" contains a valid JSON object followed by the
extra characters "ABCD". Such input MUST be rejected in its extra characters "ABCD". Such input MUST be rejected in its
entirety. entirety.
10.3. Unicode Comparison Security Considerations 11.3. Unicode Comparison Security Considerations
Header Parameter Names and algorithm names are Unicode strings. For Header Parameter Names and algorithm names are Unicode strings. For
security reasons, the representations of these names must be compared security reasons, the representations of these names must be compared
verbatim after performing any escape processing (as per RFC 4627 verbatim after performing any escape processing (as per RFC 4627
[RFC4627], Section 2.5). This means, for instance, that these JSON [RFC4627], Section 2.5). This means, for instance, that these JSON
strings must compare as being equal ("sig", "\u0073ig"), whereas strings must compare as being equal ("sig", "\u0073ig"), whereas
these must all compare as being not equal to the first set or to each these must all compare as being not equal to the first set or to each
other ("SIG", "Sig", "si\u0047"). other ("SIG", "Sig", "si\u0047").
JSON strings can contain characters outside the Unicode Basic JSON strings can contain characters outside the Unicode Basic
Multilingual Plane. For instance, the G clef character (U+1D11E) may Multilingual Plane. For instance, the G clef character (U+1D11E) may
be represented in a JSON string as "\uD834\uDD1E". Ideally, JWS be represented in a JSON string as "\uD834\uDD1E". Ideally, JWS
implementations SHOULD ensure that characters outside the Basic implementations SHOULD ensure that characters outside the Basic
Multilingual Plane are preserved and compared correctly; Multilingual Plane are preserved and compared correctly;
alternatively, if this is not possible due to these characters alternatively, if this is not possible due to these characters
exercising limitations present in the underlying JSON implementation, exercising limitations present in the underlying JSON implementation,
then input containing them MUST be rejected. then input containing them MUST be rejected.
11. References 12. References
12.1. Normative References
11.1. Normative References
[ITU.X690.1994] [ITU.X690.1994]
International Telecommunications Union, "Information International Telecommunications Union, "Information
Technology - ASN.1 encoding rules: Specification of Basic Technology - ASN.1 encoding rules: Specification of Basic
Encoding Rules (BER), Canonical Encoding Rules (CER) and Encoding Rules (BER), Canonical Encoding Rules (CER) and
Distinguished Encoding Rules (DER)", ITU-T Recommendation Distinguished Encoding Rules (DER)", ITU-T Recommendation
X.690, 1994. X.690, 1994.
[JWA] Jones, M., "JSON Web Algorithms (JWA)", [JWA] Jones, M., "JSON Web Algorithms (JWA)",
draft-ietf-jose-json-web-algorithms (work in progress), draft-ietf-jose-json-web-algorithms (work in progress),
April 2013. May 2013.
[JWK] Jones, M., "JSON Web Key (JWK)", [JWK] Jones, M., "JSON Web Key (JWK)",
draft-ietf-jose-json-web-key (work in progress), draft-ietf-jose-json-web-key (work in progress), May 2013.
April 2013.
[RFC1421] Linn, J., "Privacy Enhancement for Internet Electronic [RFC1421] Linn, J., "Privacy Enhancement for Internet Electronic
Mail: Part I: Message Encryption and Authentication Mail: Part I: Message Encryption and Authentication
Procedures", RFC 1421, February 1993. Procedures", RFC 1421, February 1993.
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046, Extensions (MIME) Part Two: Media Types", RFC 2046,
November 1996. November 1996.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
skipping to change at page 25, line 10 skipping to change at page 26, line 13
May 2008. May 2008.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 2008. (TLS) Protocol Version 1.2", RFC 5246, August 2008.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, May 2008. (CRL) Profile", RFC 5280, May 2008.
[USA15] Davis, M., Whistler, K., and M. Duerst, "Unicode [USA15] Davis, M., Whistler, K., and M. Deurst, "Unicode
Normalization Forms", Unicode Standard Annex 15, 09 2009. Normalization Forms", Unicode Standard Annex 15, 09 2009.
[USASCII] American National Standards Institute, "Coded Character [USASCII] American National Standards Institute, "Coded Character
Set -- 7-bit American Standard Code for Information Set -- 7-bit American Standard Code for Information
Interchange", ANSI X3.4, 1986. Interchange", ANSI X3.4, 1986.
[W3C.WD-xmldsig-bestpractices-20110809] [W3C.WD-xmldsig-bestpractices-20110809]
Datta, P. and F. Hirsch, "XML Signature Best Practices", Datta, P. and F. Hirsch, "XML Signature Best Practices",
World Wide Web Consortium WD WD-xmldsig-bestpractices- World Wide Web Consortium WD WD-xmldsig-bestpractices-
20110809, August 2011, <http://www.w3.org/TR/2011/ 20110809, August 2011, <http://www.w3.org/TR/2011/
WD-xmldsig-bestpractices-20110809>. WD-xmldsig-bestpractices-20110809>.
11.2. Informative References 12.2. Informative References
[CanvasApp] [CanvasApp]
Facebook, "Canvas Applications", 2010. Facebook, "Canvas Applications", 2010.
[JSS] Bradley, J. and N. Sakimura (editor), "JSON Simple Sign", [JSS] Bradley, J. and N. Sakimura (editor), "JSON Simple Sign",
September 2010. September 2010.
[JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web
Encryption (JWE)", draft-ietf-jose-json-web-encryption Encryption (JWE)", draft-ietf-jose-json-web-encryption
(work in progress), April 2013. (work in progress), May 2013.
[JWT] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token [JWT] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
(JWT)", draft-ietf-oauth-json-web-token (work in (JWT)", draft-ietf-oauth-json-web-token (work in
progress), April 2013. progress), May 2013.
[MagicSignatures] [MagicSignatures]
Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic
Signatures", January 2011. Signatures", January 2011.
[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally
Unique IDentifier (UUID) URN Namespace", RFC 4122, Unique IDentifier (UUID) URN Namespace", RFC 4122,
July 2005. July 2005.
[W3C.CR-xmldsig-core2-20120124] [W3C.CR-xmldsig-core2-20120124]
skipping to change at page 28, line 38 skipping to change at page 29, line 43
MUST be rejected. MUST be rejected.
First, we validate that the JWS Header string is legal JSON. First, we validate that the JWS Header string is legal JSON.
To validate the HMAC value, we repeat the previous process of using To validate the HMAC value, we repeat the previous process of using
the correct key and the ASCII representation of the JWS Signing Input the correct key and the ASCII representation of the JWS Signing Input
as input to the HMAC SHA-256 function and then taking the output and as input to the HMAC SHA-256 function and then taking the output and
determining if it matches the JWS Signature. If it matches exactly, determining if it matches the JWS Signature. If it matches exactly,
the HMAC has been validated. the HMAC has been validated.
A.2. Example JWS using RSA SHA-256 A.2. Example JWS using RSASSA-PKCS-v1_5 SHA-256
A.2.1. Encoding A.2.1. Encoding
The JWS Header in this example is different from the previous example The JWS Header in this example is different from the previous example
in two ways: First, because a different algorithm is being used, the in two ways: First, because a different algorithm is being used, the
"alg" value is different. Second, for illustration purposes only, "alg" value is different. Second, for illustration purposes only,
the optional "typ" parameter is not used. (This difference is not the optional "typ" parameter is not used. (This difference is not
related to the algorithm employed.) The JWS Header used is: related to the algorithm employed.) The JWS Header used is:
{"alg":"RS256"} {"alg":"RS256"}
skipping to change at page 32, line 44 skipping to change at page 33, line 44
Decoding the JWS requires base64url decoding the Encoded JWS Header, Decoding the JWS requires base64url decoding the Encoded JWS Header,
Encoded JWS Payload, and Encoded JWS Signature to produce the JWS Encoded JWS Payload, and Encoded JWS Signature to produce the JWS
Header, JWS Payload, and JWS Signature octet sequences. The octet Header, JWS Payload, and JWS Signature octet sequences. The octet
sequence containing the UTF-8 representation of the JWS Header is sequence containing the UTF-8 representation of the JWS Header is
decoded into the JWS Header string. decoded into the JWS Header string.
A.2.3. Validating A.2.3. Validating
Since the "alg" parameter in the header is "RS256", we validate the Since the "alg" parameter in the header is "RS256", we validate the
RSA SHA-256 digital signature contained in the JWS Signature. If any RSASSA-PKCS-v1_5 SHA-256 digital signature contained in the JWS
of the validation steps fail, the JWS MUST be rejected. Signature. If any of the validation steps fail, the JWS MUST be
rejected.
First, we validate that the JWS Header string is legal JSON. First, we validate that the JWS Header string is legal JSON.
Validating the JWS Signature is a little different from the previous Validating the JWS Signature is a little different from the previous
example. First, we base64url decode the Encoded JWS Signature to example. First, we base64url decode the Encoded JWS Signature to
produce a digital signature S to check. We then pass (n, e), S and produce a digital signature S to check. We then pass (n, e), S and
the octets of the ASCII representation of the JWS Signing Input to an the octets of the ASCII representation of the JWS Signing Input to an
RSA signature verifier that has been configured to use the SHA-256 RSASSA-PKCS-v1_5 signature verifier that has been configured to use
hash function. the SHA-256 hash function.
A.3. Example JWS using ECDSA P-256 SHA-256 A.3. Example JWS using ECDSA P-256 SHA-256
A.3.1. Encoding A.3.1. Encoding
The JWS Header for this example differs from the previous example The JWS Header for this example differs from the previous example
because a different algorithm is being used. The JWS Header used is: because a different algorithm is being used. The JWS Header used is:
{"alg":"ES256"} {"alg":"ES256"}
skipping to change at page 40, line 5 skipping to change at page 41, line 5
Concatenating these parts in the order Header.Payload.Signature with Concatenating these parts in the order Header.Payload.Signature with
period ('.') characters between the parts yields this complete JWS period ('.') characters between the parts yields this complete JWS
(with line breaks for display purposes only): (with line breaks for display purposes only):
eyJhbGciOiJub25lIn0 eyJhbGciOiJub25lIn0
. .
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt
cGxlLmNvbS9pc19yb290Ijp0cnVlfQ cGxlLmNvbS9pc19yb290Ijp0cnVlfQ
. .
A.6. Example JWS Using JWS JSON Serialization
This section contains an example using the JWS JSON Serialization.
This example demonstrates the capability for conveying multiple
digital signatures and/or MACs for the same payload.
The Encoded JWS Payload used in this example is the same as that used
in the examples in Appendix A.2 (with line breaks for display
purposes only):
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt
cGxlLmNvbS9pc19yb290Ijp0cnVlfQ
Two digital signatures are used in this example: both using RSASSA-
PKCS-v1_5 SHA-256. For the first, the JWS Protected Header and key
are the same as in Appendix A.2, resulting in the same JWS Signature
value; therefore, its computation is not repeated here. For the
second a different key is used, which is provided in Appendix A.6.5;
its computation follows the same procedure as the first, so it is not
detailed here either, other than including the resulting Encoded JWS
Signature value.
A.6.1. JWS Protected Header
The JWS Protected Header value used for both computations is:
{"alg":"RS256"}
Base64url encoding these octets yields this Encoded JWS Header value:
eyJhbGciOiJSUzI1NiJ9
A.6.2. JWS Per-Signature Unprotected Headers
Key ID values are supplied for both keys using per-signature header
parameters. The two values used to represent these Key IDs are:
{"kid":"2010-12-29"}
and:
{"kid":"e9bc097a-ce51-4036-9562-d2ade882db0d"}
A.6.3. Complete JWS Header Values
Combining the protected and per-signature header values supplied, the
JWS Header values used for the first and second signatures
respectively are:
{"alg":"RS256",
"kid":"2010-12-29"}
and:
{"alg":"RS256",
"kid":"e9bc097a-ce51-4036-9562-d2ade882db0d"}
A.6.4. Complete JWS JSON Serialization Representation
The complete JSON Web Signature JSON Serialization for these values
is as follows (with line breaks for display purposes only):
{"protected":"eyJhbGciOiJSUzI1NiJ9",
"payload":
"eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGF
tcGxlLmNvbS9pc19yb290Ijp0cnVlfQ",
"signatures":[
{"header":
{"kid":"2010-12-29"},
"signature":
"cC4hiUPoj9Eetdgtv3hF80EGrhuB__dzERat0XF9g2VtQgr9PJbu3XOiZj5RZ
mh7AAuHIm4Bh-0Qc_lF5YKt_O8W2Fp5jujGbds9uJdbF9CUAr7t1dnZcAcQjb
KBYNX4BAynRFdiuB--f_nZLgrnbyTyWzO75vRK5h6xBArLIARNPvkSjtQBMHl
b1L07Qe7K0GarZRmB_eSN9383LcOLn6_dO--xi12jzDwusC-eOkHWEsqtFZES
c6BfI7noOPqvhJ1phCnvWh6IeYI2w9QOYEUipUTI8np6LbgGY9Fs98rqVt5AX
LIhWkWywlVmtVrBp0igcN_IoypGlUPQGe77Rw"},
{"header":
{"kid":"e9bc097a-ce51-4036-9562-d2ade882db0d"},
"signature":
"m2nhGPQGjPEDIotJnzcnlhUZnXeg0xzLVbh6NZzthY8yU3klJYaENE1aLAUtL
cq-TmEeYIr30ruGH2kNFqW4-oc7LcTQu9-7ItRhfi0kKeN1zNAAUemfNYXaXA
1JayiiCl7m9ylhLKIsvdXhFvV7XDSbUMnVoO9Yu5_ROKOJMkeU6ywR8DDcHmu
B2KcLMfpHn1FqnUnojxwfOg1Eqyb_ppeDTm9t_h8FoQgHqRpNgsTTvxI9vSPE
ZrWTkSf_D4ci6p06DM_nE6FbptYF3ENHF8NpGgncv_D_h9AIrZU5-6ee2HB24
jtN9qOHw2pkVrvhtxdsSJdeG6uJqiFs0ArwQQ"}]
}
A.6.5. RSA Key Used for Second Signature
The values of the RSA key used for the second signature in this this
example, presented as the octet sequences representing big endian
integers are:
+-----------+-------------------------------------------------------+
| Parameter | Value |
| Name | |
+-----------+-------------------------------------------------------+
| Modulus | [160, 120, 137, 109, 191, 13, 24, 29, 15, 217, 68, |
| | 35, 164, 152, 33, 179, 62, 22, 51, 134, 60, 228, 112, |
| | 172, 11, 62, 57, 16, 26, 162, 213, 250, 199, 183, 56, |
| | 103, 101, 172, 20, 178, 226, 124, 116, 135, 195, 195, |
| | 124, 91, 174, 65, 218, 196, 113, 82, 132, 161, 145, |
| | 71, 8, 117, 240, 109, 116, 40, 196, 26, 174, 135, 43, |
| | 175, 40, 166, 223, 157, 5, 188, 92, 7, 52, 219, 11, |
| | 157, 96, 99, 25, 65, 151, 108, 25, 104, 206, 147, 63, |
| | 1, 157, 154, 58, 111, 200, 251, 54, 202, 96, 220, 42, |
| | 196, 21, 252, 193, 58, 205, 44, 89, 217, 58, 164, 99, |
| | 3, 76, 195, 180, 76, 19, 103, 110, 26, 2, 122, 173, |
| | 211, 45, 218, 134, 212, 26, 198, 156, 110, 213, 139, |
| | 31, 135, 227, 43, 0, 45, 192, 39, 206, 176, 194, 154, |
| | 217, 10, 185, 227, 143, 142, 179, 117, 171, 238, 187, |
| | 88, 12, 185, 36, 110, 100, 76, 34, 39, 20, 145, 184, |
| | 44, 14, 100, 21, 77, 15, 82, 150, 53, 156, 46, 196, |
| | 231, 156, 152, 152, 85, 145, 184, 195, 213, 134, 107, |
| | 75, 10, 117, 233, 76, 215, 62, 205, 95, 170, 6, 234, |
| | 221, 139, 4, 241, 239, 203, 28, 32, 95, 192, 24, 164, |
| | 172, 132, 10, 193, 239, 45, 140, 153, 198, 140, 117, |
| | 17, 223, 12, 26, 5, 47, 223, 211, 151, 120, 15, 230, |
| | 60, 42, 51, 104, 119, 46, 41, 242, 177, 76, 33] |
| Exponent | [1, 0, 1] |
| Private | [118, 50, 242, 255, 124, 119, 87, 168, 168, 112, 223, |
| Exponent | 168, 229, 103, 13, 131, 170, 154, 205, 206, 245, 241, |
| | 74, 48, 223, 131, 48, 162, 245, 11, 182, 83, 167, 98, |
| | 4, 208, 220, 106, 25, 64, 254, 100, 175, 173, 4, 252, |
| | 108, 16, 87, 213, 184, 31, 116, 93, 84, 198, 113, |
| | 109, 2, 5, 101, 88, 41, 244, 145, 38, 26, 34, 4, 130, |
| | 91, 142, 55, 45, 192, 248, 210, 76, 152, 153, 51, |
| | 255, 242, 236, 107, 193, 13, 153, 25, 74, 66, 198, |
| | 224, 228, 254, 194, 136, 130, 168, 102, 170, 31, 253, |
| | 162, 142, 121, 170, 188, 103, 84, 57, 166, 142, 115, |
| | 220, 167, 19, 43, 110, 18, 197, 46, 56, 40, 186, 71, |
| | 188, 68, 152, 43, 159, 81, 123, 128, 103, 167, 243, |
| | 139, 188, 90, 36, 142, 151, 217, 213, 244, 149, 183, |
| | 9, 16, 149, 119, 233, 161, 201, 107, 151, 185, 157, |
| | 124, 238, 147, 50, 51, 170, 188, 190, 154, 92, 239, |
| | 46, 37, 178, 49, 74, 209, 220, 56, 19, 186, 34, 52, |
| | 152, 130, 86, 56, 237, 1, 186, 225, 244, 29, 248, 57, |
| | 21, 1, 10, 55, 176, 110, 145, 149, 4, 137, 13, 121, |
| | 236, 87, 186, 48, 218, 3, 78, 218, 2, 244, 95, 168, |
| | 218, 217, 247, 252, 81, 13, 22, 210, 219, 26, 149, |
| | 32, 217, 211, 144, 231, 104, 240, 69, 73, 237, 1, 14, |
| | 28, 161, 202, 222, 209, 156, 108, 27, 207, 126, 40, |
| | 77, 102, 93, 1] |
+-----------+-------------------------------------------------------+
Appendix B. "x5c" (X.509 Certificate Chain) Example Appendix B. "x5c" (X.509 Certificate Chain) Example
The JSON array below is an example of a certificate chain that could The JSON array below is an example of a certificate chain that could
be used as the value of an "x5c" (X.509 Certificate Chain) header be used as the value of an "x5c" (X.509 Certificate Chain) header
parameter, per Section 4.1.6. Note that since these strings contain parameter, per Section 4.1.6. Note that since these strings contain
base64 encoded (not base64url encoded) values, they are allowed to base64 encoded (not base64url encoded) values, they are allowed to
contain white space and line breaks. contain white space and line breaks.
["MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVM ["MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVM
xITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR2 xITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR2
skipping to change at page 42, line 45 skipping to change at page 47, line 16
'=' padding characters are added; if the length mod 4 is 3, one '=' '=' padding characters are added; if the length mod 4 is 3, one '='
padding character is added; if the length mod 4 is 1, the input is padding character is added; if the length mod 4 is 1, the input is
malformed. malformed.
An example correspondence between unencoded and encoded values An example correspondence between unencoded and encoded values
follows. The octet sequence below encodes into the string below, follows. The octet sequence below encodes into the string below,
which when decoded, reproduces the octet sequence. which when decoded, reproduces the octet sequence.
3 236 255 224 193 3 236 255 224 193
A-z_4ME A-z_4ME
Appendix D. Possible Compact Serialization for Multiple Signatures Appendix D. Negative Test Case for "crit" Header Parameter
Appendix C of [JWE] suggests a possible compact serialization for Conforming implementations must reject input containing critical
JWEs with multiple recipients. This suggests a corresponding compact extensions that are not understood or cannot be processed. The
serialization for JWSs with multiple digital signatures and/or MACs. following JWS must be rejected by all implementations, because it
This possible compact serialization concatenates instances of the uses an extension header parameter name
per-signature/MAC fields, separating them with tilde ('~') "http://example.com/UNDEFINED" that they do not understand. Any
characters, which are URL-safe. other similar input, in which the use of the value
"http://example.com/UNDEFINED" is substituted for any other header
parameter name not understood by the implementation, must also be
rejected.
The concatenation of the Encoded JWS Header values goes before the The JWS Header value for this JWS is:
first period ('.') character in the compact serialization. The
concatenation of the corresponding Encoded JWS Signature values goes
after the second period ('.') character in the compact serialization.
A complete compact serialization of the multi-signature/MAC JWS in {"alg":"none",
Section 7.1 (with line breaks for display purposes only) would be: "crit":["http://example.com/UNDEFINED"],
"http://example.com/UNDEFINED":true
}
eyJhbGciOiJSUzI1NiJ9 The complete JWS that must be rejected is as follows (with line
~ breaks for display purposes only):
eyJhbGciOiJFUzI1NiJ9
.
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGF
tcGxlLmNvbS9pc19yb290Ijp0cnVlfQ
.
cC4hiUPoj9Eetdgtv3hF80EGrhuB__dzERat0XF9g2VtQgr9PJbu3XOiZj5RZ
mh7AAuHIm4Bh-0Qc_lF5YKt_O8W2Fp5jujGbds9uJdbF9CUAr7t1dnZcAcQjb
KBYNX4BAynRFdiuB--f_nZLgrnbyTyWzO75vRK5h6xBArLIARNPvkSjtQBMHl
b1L07Qe7K0GarZRmB_eSN9383LcOLn6_dO--xi12jzDwusC-eOkHWEsqtFZES
c6BfI7noOPqvhJ1phCnvWh6IeYI2w9QOYEUipUTI8np6LbgGY9Fs98rqVt5AX
LIhWkWywlVmtVrBp0igcN_IoypGlUPQGe77Rw
~
DtEhU3ljbEg8L38VWAfUAqOyKAM6-Xx-F4GawxaepmXFCgfTjDxw5djxLa8IS
lSApmWQxfKTUJqPP3-Kg6NU1Q
This representation is suggested for those who may desire or require eyJhbGciOiJub25lIiwNCiAiY3JpdCI6WyJodHRwOi8vZXhhbXBsZS5jb20vVU5ERU
a compact, URL-safe serialization of JWSs with multiple digital ZJTkVEIl0sDQogImh0dHA6Ly9leGFtcGxlLmNvbS9VTkRFRklORUQiOnRydWUNCn0.
signatures and/or MACs. It is a suggestion to implementers for whom RkFJTA.
this functionality would be valuable, and not a normative part of
this specification.
Appendix E. Acknowledgements Appendix E. Acknowledgements
Solutions for signing JSON content were previously explored by Magic Solutions for signing JSON content were previously explored by Magic
Signatures [MagicSignatures], JSON Simple Sign [JSS], and Canvas Signatures [MagicSignatures], JSON Simple Sign [JSS], and Canvas
Applications [CanvasApp], all of which influenced this draft. Applications [CanvasApp], all of which influenced this draft.
Thanks to Axel Nennker for his early implementation and feedback on Thanks to Axel Nennker for his early implementation and feedback on
the JWS and JWE specifications. the JWS and JWE specifications.
This specification is the work of the JOSE Working Group, which This specification is the work of the JOSE Working Group, which
includes dozens of active and dedicated participants. In particular, includes dozens of active and dedicated participants. In particular,
the following individuals contributed ideas, feedback, and wording the following individuals contributed ideas, feedback, and wording
that influenced this specification: that influenced this specification:
Dirk Balfanz, Richard Barnes, Brian Campbell, Breno de Medeiros, Dick Dirk Balfanz, Richard Barnes, Brian Campbell, Breno de Medeiros, Dick
Hardt, Joe Hildebrand, Jeff Hodges, Edmund Jay, Yaron Y. Goland, Ben Hardt, Joe Hildebrand, Jeff Hodges, Edmund Jay, Yaron Y. Goland, Ben
Laurie, James Manger, Tony Nadalin, Axel Nennker, John Panzer, Laurie, James Manger, Matt Miller, Tony Nadalin, Axel Nennker, John
Emmanuel Raviart, Eric Rescorla, Jim Schaad, Paul Tarjan, Hannes Panzer, Emmanuel Raviart, Eric Rescorla, Jim Schaad, Paul Tarjan,
Tschofenig, and Sean Turner. Hannes Tschofenig, and Sean Turner.
Jim Schaad and Karen O'Donoghue chaired the JOSE working group and Jim Schaad and Karen O'Donoghue chaired the JOSE working group and
Sean Turner and Stephen Farrell served as Security area directors Sean Turner and Stephen Farrell served as Security area directors
during the creation of this specification. during the creation of this specification.
Appendix F. Document History Appendix F. Document History
[[ to be removed by the RFC editor before publication as an RFC ]] [[ to be removed by the RFC editor before publication as an RFC ]]
-10 -11
o Added Key Identification section.
o For the JWS JSON Serialization, enable header parameter values to
be specified in any of three parameters: the "protected" member
that is integrity protected and shared among all recipients, the
"unprotected" member that is not integrity protected and shared
among all recipients, and the "header" member that is not
integrity protected and specific to a particular recipient. (This
does not affect the JWS Compact Serialization, in which all header
parameter values are in a single integrity protected JWE Header
value.)
o Removed suggested compact serialization for multiple digital
signatures and/or MACs.
o Changed the MIME type name "application/jws-js" to
"application/jws+json", addressing issue #22.
o Tightened the description of the "crit" (critical) header
parameter.
o Added a negative test case for the "crit" header parameter
-10
o Added an appendix suggesting a possible compact serialization for o Added an appendix suggesting a possible compact serialization for
JWSs with multiple digital signatures and/or MACs. JWSs with multiple digital signatures and/or MACs.
-09 -09
o Added JWS JSON Serialization, as specified by o Added JWS JSON Serialization, as specified by
draft-jones-jose-jws-json-serialization-04. draft-jones-jose-jws-json-serialization-04.
o Registered "application/jws-js" MIME type and "JWS-JS" typ header o Registered "application/jws-js" MIME type and "JWS-JS" typ header
parameter value. parameter value.
 End of changes. 103 change blocks. 
317 lines changed or deleted 541 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/