idnits 2.17.1 draft-amringer-jose-chacha-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a Security Considerations section. ** The abstract seems to contain references ([RFC8439], [I-D.arciszewski-xchacha]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 7, 2018) is 1991 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'RFC-THIS' is mentioned on line 197, but not defined == Outdated reference: A later version (-03) exists of draft-arciszewski-xchacha-02 Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 (No Working Group) G. Amringer 3 Internet-Draft Independent 4 Intended status: Informational November 7, 2018 5 Expires: May 11, 2019 7 Chacha derived AEAD algorithms in JSON Object Signing and Encryption 8 (JOSE) 9 draft-amringer-jose-chacha-00 11 Abstract 13 This document defines how to use the AEAD algorithms 14 "AEAD_XCHACHA20_POLY1305" and "AEAD_CHACHA20_POLY1305" from [RFC8439] 15 and [I-D.arciszewski-xchacha] in JSON Object Signing and Encryption 16 (JOSE). 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at https://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on May 11, 2019. 35 Copyright Notice 37 Copyright (c) 2018 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (https://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 1.1. Notation and Conventions . . . . . . . . . . . . . . . . 2 54 2. Key Management . . . . . . . . . . . . . . . . . . . . . . . 2 55 2.1. Algorithms . . . . . . . . . . . . . . . . . . . . . . . 2 56 2.2. Header Parameters Used for Key Encryption . . . . . . . . 3 57 2.2.1. "iv" (Initialization Vector) Header Parameter . . . . 3 58 2.2.2. "tag" (Authentication Tag) Header Parameter . . . . . 3 59 3. Content Encryption . . . . . . . . . . . . . . . . . . . . . 4 60 3.1. Algorithms . . . . . . . . . . . . . . . . . . . . . . . 4 61 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 62 5. Normative References . . . . . . . . . . . . . . . . . . . . 5 63 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 5 65 1. Introduction 67 The Internet Research Task Force (IRTF) Crypto Forum Research Group 68 (CFRG) defined the ChaCha20 and Poly1305 algorithms to be used in 69 IETF protocols both independantly and as an AEAD construction 70 ([RFC8439]). It has also been presented with a definition of an 71 eXtended-nonce variant ([I-D.arciszewski-xchacha]) for use in 72 stateless contexts. This document defines how to use those 73 algorithms in JOSE in an interoperable manner. 75 This document defines the conventions to use in the context of 76 [RFC7516], and [RFC7517]. 78 1.1. Notation and Conventions 80 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 81 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 82 document are to be interpreted as described in [RFC2119]. 84 The JOSE key format ("JSON Web Key (JWK)") is defined by [RFC7517] 85 and thumbprints for it ("JSON Web Key (JWK) Thumbprint") in 86 [RFC7638]. 88 2. Key Management 90 2.1. Algorithms 92 This section defines the specifics of encrypting a JWE Content 93 Encryption Key (CEK) with AEAD_CHACHA20_POLY1305 ([RFC8439]) and 94 AEAD_XCHACHA20_POLY1305 ([I-D.arciszewski-xchacha]). 96 Use of an Initialization Vector (IV) is REQUIRED with this algorithm. 97 The IV is represented in base64url-encoded form as the "iv" 98 (initialization vector) Header Parameter value. 100 The Additional Authenticated Data value used is the empty octet 101 string. 103 The JWE Encrypted Key value is the ciphertext output. 105 The Authentication Tag output is represented in base64url-encoded 106 form as the "tag" (authentication tag) Header Parameter value. 108 The following "alg" (algorithm) Header Parameter values are used to 109 indicate that the JWE Encrypted Key is the result of encrypting the 110 CEK using the corresponding algorithm and IV size: 112 +-------------------------+----------+-------------+ 113 | Algorithm | IV size | "alg" value | 114 +-------------------------+----------+-------------+ 115 | AEAD_CHACHA20_POLY1305 | 96 bits | C20PKW | 116 | AEAD_XCHACHA20_POLY1305 | 192 bits | XC20PKW | 117 +-------------------------+----------+-------------+ 119 2.2. Header Parameters Used for Key Encryption 121 The following Header Parameters are used for both algorithms defined 122 for key encryption. 124 2.2.1. "iv" (Initialization Vector) Header Parameter 126 The "iv" (initialization vector) Header Parameter value is the 127 base64url-encoded representation of the 96-bit or 192-bit IV value 128 used for the key encryption operation. This Header Parameter MUST be 129 present and MUST be understood and processed by implementations when 130 these algorithms are used. 132 2.2.2. "tag" (Authentication Tag) Header Parameter 134 The "tag" (authentication tag) Header Parameter value is the 135 base64url-encoded representation of the 128-bit Authentication Tag 136 value resulting from the key encryption operation. This Header 137 Parameter MUST be present and MUST be understood and processed by 138 implementations when these algorithms are used. 140 3. Content Encryption 142 3.1. Algorithms 144 This section defines the specifics of performing authenticated 145 encryption with ChaCha20-Poly1305. 147 The CEK is used as the encryption key. 149 Use of an IV is REQUIRED with this algorithm. 151 The following "enc" (encryption algorithm) Header Parameter values 152 are used to indicate that the JWE Ciphertext and JWE Authentication 153 Tag values have been computed using the corresponding algorithm and 154 IV size: 156 +-------------------------+----------+-------------+ 157 | Algorithm | IV size | "alg" value | 158 +-------------------------+----------+-------------+ 159 | AEAD_CHACHA20_POLY1305 | 96 bits | C20P | 160 | AEAD_XCHACHA20_POLY1305 | 192 bits | XC20P | 161 +-------------------------+----------+-------------+ 163 4. IANA Considerations 165 The following is added to the "JSON Web Signature and Encryption 166 Algorithms" registry: 168 o Algorithm Name: "C20PKW" 169 o Algorithm Description: Key wrapping with ChaCha20-Poly1305 170 o Algorithm Usage Location(s): "alg" 171 o JOSE Implementation Requirements: Recommended 172 o Change Controller: IESG 173 o Specification Document(s): Section 2 of [RFC-THIS] 174 o Algorithm Analysis Documents(s): [RFC8439] 176 o Algorithm Name: "XC20PKW" 177 o Algorithm Description: Key wrapping with XChaCha20-Poly1305 178 o Algorithm Usage Location(s): "alg" 179 o JOSE Implementation Requirements: Recommended 180 o Change Controller: IESG 181 o Specification Document(s): Section 2 of [RFC-THIS] 182 o Algorithm Analysis Documents(s): [I-D.arciszewski-xchacha] 184 o Algorithm Name: "C20P" 185 o Algorithm Description: ChaCha20-Poly1305 186 o Algorithm Usage Location(s): "enc" 187 o JOSE Implementation Requirements: Recommended 188 o Change Controller: IESG 189 o Specification Document(s): Section 3 of [RFC-THIS] 190 o Algorithm Analysis Documents(s): [RFC8439] 192 o Algorithm Name: "XC20P" 193 o Algorithm Description: ChaCha20-Poly1305 194 o Algorithm Usage Location(s): "enc" 195 o JOSE Implementation Requirements: Recommended 196 o Change Controller: IESG 197 o Specification Document(s): Section 3 of [RFC-THIS] 198 o Algorithm Analysis Documents(s): [I-D.arciszewski-xchacha] 200 5. Normative References 202 [I-D.arciszewski-xchacha] 203 Arciszewski, S., "XChaCha: eXtended-nonce ChaCha and 204 AEAD_XChaCha20_Poly1305", draft-arciszewski-xchacha-02 205 (work in progress), October 2018. 207 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 208 Requirement Levels", BCP 14, RFC 2119, 209 DOI 10.17487/RFC2119, March 1997, 210 . 212 [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", 213 RFC 7516, DOI 10.17487/RFC7516, May 2015, 214 . 216 [RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517, 217 DOI 10.17487/RFC7517, May 2015, 218 . 220 [RFC7638] Jones, M. and N. Sakimura, "JSON Web Key (JWK) 221 Thumbprint", RFC 7638, DOI 10.17487/RFC7638, September 222 2015, . 224 [RFC8439] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF 225 Protocols", RFC 8439, DOI 10.17487/RFC8439, June 2018, 226 . 228 Author's Address 230 Guillaume Amringer 231 Independent 232 Canada 234 Email: g.amringer@gmail.com