idnits 2.17.1 draft-ietf-trans-rfc6962-bis-29.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 : ---------------------------------------------------------------------------- == There are 7 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. -- The draft header indicates that this document obsoletes RFC6962, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 22, 2018) is 2006 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '0' on line 459 -- Looks like a reference, but probably isn't: '1' on line 459 -- Looks like a reference, but probably isn't: '7' on line 608 ** Obsolete normative reference: RFC 6961 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 7159 (Obsoleted by RFC 8259) ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7807 (Obsoleted by RFC 9457) -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) -- Obsolete informational reference (is this intentional?): RFC 6962 (Obsoleted by RFC 9162) -- Obsolete informational reference (is this intentional?): RFC 7320 (Obsoleted by RFC 8820) Summary: 4 errors (**), 0 flaws (~~), 2 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TRANS (Public Notary Transparency) B. Laurie 3 Internet-Draft A. Langley 4 Obsoletes: 6962 (if approved) E. Kasper 5 Intended status: Experimental E. Messeri 6 Expires: April 25, 2019 Google 7 R. Stradling 8 Comodo CA 9 October 22, 2018 11 Certificate Transparency Version 2.0 12 draft-ietf-trans-rfc6962-bis-29 14 Abstract 16 This document describes version 2.0 of the Certificate Transparency 17 (CT) protocol for publicly logging the existence of Transport Layer 18 Security (TLS) server certificates as they are issued or observed, in 19 a manner that allows anyone to audit certification authority (CA) 20 activity and notice the issuance of suspect certificates as well as 21 to audit the certificate logs themselves. The intent is that 22 eventually clients would refuse to honor certificates that do not 23 appear in a log, effectively forcing CAs to add all issued 24 certificates to the logs. 26 Logs are network services that implement the protocol operations for 27 submissions and queries that are defined in this document. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at http://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on April 25, 2019. 46 Copyright Notice 48 Copyright (c) 2018 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 64 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5 65 1.2. Data Structures . . . . . . . . . . . . . . . . . . . . . 5 66 1.3. Major Differences from CT 1.0 . . . . . . . . . . . . . . 5 67 2. Cryptographic Components . . . . . . . . . . . . . . . . . . 7 68 2.1. Merkle Hash Trees . . . . . . . . . . . . . . . . . . . . 7 69 2.1.1. Definition of the Merkle Tree . . . . . . . . . . . . 7 70 2.1.2. Verifying a Tree Head Given Entries . . . . . . . . . 8 71 2.1.3. Merkle Inclusion Proofs . . . . . . . . . . . . . . . 8 72 2.1.4. Merkle Consistency Proofs . . . . . . . . . . . . . . 10 73 2.1.5. Example . . . . . . . . . . . . . . . . . . . . . . . 12 74 2.2. Signatures . . . . . . . . . . . . . . . . . . . . . . . 13 75 3. Submitters . . . . . . . . . . . . . . . . . . . . . . . . . 13 76 3.1. Certificates . . . . . . . . . . . . . . . . . . . . . . 14 77 3.2. Precertificates . . . . . . . . . . . . . . . . . . . . . 14 78 4. Log Format and Operation . . . . . . . . . . . . . . . . . . 15 79 4.1. Log Parameters . . . . . . . . . . . . . . . . . . . . . 16 80 4.2. Accepting Submissions . . . . . . . . . . . . . . . . . . 17 81 4.3. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 18 82 4.4. Log ID . . . . . . . . . . . . . . . . . . . . . . . . . 18 83 4.5. TransItem Structure . . . . . . . . . . . . . . . . . . . 19 84 4.6. Log Artifact Extensions . . . . . . . . . . . . . . . . . 20 85 4.7. Merkle Tree Leaves . . . . . . . . . . . . . . . . . . . 20 86 4.8. Signed Certificate Timestamp (SCT) . . . . . . . . . . . 21 87 4.9. Merkle Tree Head . . . . . . . . . . . . . . . . . . . . 22 88 4.10. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 22 89 4.11. Merkle Consistency Proofs . . . . . . . . . . . . . . . . 23 90 4.12. Merkle Inclusion Proofs . . . . . . . . . . . . . . . . . 24 91 4.13. Shutting down a log . . . . . . . . . . . . . . . . . . . 24 92 5. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 25 93 5.1. Submit Entry to Log . . . . . . . . . . . . . . . . . . . 27 94 5.2. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 29 95 5.3. Retrieve Merkle Consistency Proof between Two Signed Tree 96 Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 29 97 5.4. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 30 98 5.5. Retrieve Merkle Inclusion Proof, Signed Tree Head and 99 Consistency Proof by Leaf Hash . . . . . . . . . . . . . 31 100 5.6. Retrieve Entries and STH from Log . . . . . . . . . . . . 32 101 5.7. Retrieve Accepted Trust Anchors . . . . . . . . . . . . . 34 102 6. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 34 103 6.1. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . . 35 104 6.2. TransItemList Structure . . . . . . . . . . . . . . . . . 36 105 6.3. Presenting SCTs, inclusions proofs and STHs . . . . . . . 36 106 6.4. transparency_info TLS Extension . . . . . . . . . . . . . 36 107 6.5. cached_info TLS Extension . . . . . . . . . . . . . . . . 37 108 7. Certification Authorities . . . . . . . . . . . . . . . . . . 37 109 7.1. Transparency Information X.509v3 Extension . . . . . . . 37 110 7.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 38 111 7.1.2. Certificate Extension . . . . . . . . . . . . . . . . 38 112 7.2. TLS Feature X.509v3 Extension . . . . . . . . . . . . . . 38 113 8. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 114 8.1. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 38 115 8.1.1. Receiving SCTs and inclusion proofs . . . . . . . . . 38 116 8.1.2. Reconstructing the TBSCertificate . . . . . . . . . . 39 117 8.1.3. Validating SCTs . . . . . . . . . . . . . . . . . . . 39 118 8.1.4. Fetching inclusion proofs . . . . . . . . . . . . . . 40 119 8.1.5. Validating inclusion proofs . . . . . . . . . . . . . 40 120 8.1.6. Evaluating compliance . . . . . . . . . . . . . . . . 40 121 8.1.7. cached_info TLS Extension . . . . . . . . . . . . . . 40 122 8.2. Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 41 123 8.3. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 42 124 9. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 43 125 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 43 126 10.1. New Entry to the TLS ExtensionType Registry . . . . . . 43 127 10.2. New Entry to the TLS CachedInformationType registry . . 43 128 10.3. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 44 129 10.3.1. Expert Review guidelines . . . . . . . . . . . . . . 44 130 10.4. Signature Algorithms . . . . . . . . . . . . . . . . . . 44 131 10.4.1. Expert Review guidelines . . . . . . . . . . . . . . 45 132 10.5. VersionedTransTypes . . . . . . . . . . . . . . . . . . 45 133 10.5.1. Expert Review guidelines . . . . . . . . . . . . . . 46 134 10.6. Log Artifact Extension Registry . . . . . . . . . . . . 46 135 10.6.1. Expert Review guidelines . . . . . . . . . . . . . . 47 136 10.7. Object Identifiers . . . . . . . . . . . . . . . . . . . 47 137 10.7.1. Log ID Registry . . . . . . . . . . . . . . . . . . 47 138 11. Security Considerations . . . . . . . . . . . . . . . . . . . 48 139 11.1. Misissued Certificates . . . . . . . . . . . . . . . . . 49 140 11.2. Detection of Misissue . . . . . . . . . . . . . . . . . 49 141 11.3. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 49 142 11.4. Preventing Tracking Clients . . . . . . . . . . . . . . 50 143 11.5. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 50 144 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 50 145 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 50 146 13.1. Normative References . . . . . . . . . . . . . . . . . . 50 147 13.2. Informative References . . . . . . . . . . . . . . . . . 52 148 Appendix A. Supporting v1 and v2 simultaneously . . . . . . . . 53 149 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 54 151 1. Introduction 153 Certificate Transparency aims to mitigate the problem of misissued 154 certificates by providing append-only logs of issued certificates. 155 The logs do not themselves prevent misissuance, but they ensure that 156 interested parties (particularly those named in certificates) can 157 detect such misissuance. Note that this is a general mechanism that 158 could be used for transparently logging any form of binary data, 159 subject to some kind of inclusion criteria. In this document, we 160 only describe its use for public TLS server certificates (i.e., where 161 the inclusion criteria is a valid certificate issued by a public 162 certification authority (CA)). 164 Each log contains certificate chains, which can be submitted by 165 anyone. It is expected that public CAs will contribute all their 166 newly issued certificates to one or more logs; however certificate 167 holders can also contribute their own certificate chains, as can 168 third parties. In order to avoid logs being rendered useless by the 169 submission of large numbers of spurious certificates, it is required 170 that each chain ends with a trust anchor that is accepted by the log. 171 When a chain is accepted by a log, a signed timestamp is returned, 172 which can later be used to provide evidence to TLS clients that the 173 chain has been submitted. TLS clients can thus require that all 174 certificates they accept as valid are accompanied by signed 175 timestamps. 177 Those who are concerned about misissuance can monitor the logs, 178 asking them regularly for all new entries, and can thus check whether 179 domains for which they are responsible have had certificates issued 180 that they did not expect. What they do with this information, 181 particularly when they find that a misissuance has happened, is 182 beyond the scope of this document. However, broadly speaking, they 183 can invoke existing business mechanisms for dealing with misissued 184 certificates, such as working with the CA to get the certificate 185 revoked, or with maintainers of trust anchor lists to get the CA 186 removed. Of course, anyone who wants can monitor the logs and, if 187 they believe a certificate is incorrectly issued, take action as they 188 see fit. 190 Similarly, those who have seen signed timestamps from a particular 191 log can later demand a proof of inclusion from that log. If the log 192 is unable to provide this (or, indeed, if the corresponding 193 certificate is absent from monitors' copies of that log), that is 194 evidence of the incorrect operation of the log. The checking 195 operation is asynchronous to allow clients to proceed without delay, 196 despite possible issues such as network connectivity and the vagaries 197 of firewalls. 199 The append-only property of each log is achieved using Merkle Trees, 200 which can be used to efficiently prove that any particular instance 201 of the log is a superset of any particular previous instance and to 202 efficiently detect various misbehaviors of the log (e.g., issuing a 203 signed timestamp for a certificate that is not subsequently logged). 205 It is necessary to treat each log as a trusted third party, because 206 the log auditing mechanisms described in this document can be 207 circumvented by a misbehaving log that shows different, inconsistent 208 views of itself to different clients. Whilst it is anticipated that 209 additional mechanisms could be developed to address these 210 shortcomings and thereby avoid the need to blindly trust logs, such 211 mechanisms are outside the scope of this document. 213 1.1. Requirements Language 215 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 216 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 217 document are to be interpreted as described in [RFC2119]. 219 1.2. Data Structures 221 Data structures are defined and encoded according to the conventions 222 laid out in Section 3 of [RFC8446]. 224 1.3. Major Differences from CT 1.0 226 This document revises and obsoletes the experimental CT 1.0 [RFC6962] 227 protocol, drawing on insights gained from CT 1.0 deployments and on 228 feedback from the community. The major changes are: 230 o Hash and signature algorithm agility: permitted algorithms are now 231 specified in IANA registries. 233 o Precertificate format: precertificates are now CMS objects rather 234 than X.509 certificates, which avoids violating the certificate 235 serial number uniqueness requirement in Section 4.1.2.2 of 236 [RFC5280]. 238 o Removed precertificate signing certificates and the precertificate 239 poison extension: the change of precertificate format means that 240 these are no longer needed. 242 o Logs IDs: each log is now identified by an OID rather than by the 243 hash of its public key. OID allocations are managed by an IANA 244 registry. 246 o "TransItem" structure: this new data structure is used to 247 encapsulate most types of CT data. A "TransItemList", consisting 248 of one or more "TransItem" structures, can be used anywhere that 249 "SignedCertificateTimestampList" was used in [RFC6962]. 251 o Merkle tree leaves: the "MerkleTreeLeaf" structure has been 252 replaced by the "TransItem" structure, which eases extensibility 253 and simplifies the leaf structure by removing one layer of 254 abstraction. 256 o Unified leaf format: the structure for both certificate and 257 precertificate entries now includes only the TBSCertificate 258 (whereas certificate entries in [RFC6962] included the entire 259 certificate). 261 o Log Artifact Extensions: these are now typed and managed by an 262 IANA registry, and they can now appear not only in SCTs but also 263 in STHs. 265 o API outputs: complete "TransItem" structures are returned, rather 266 than the constituent parts of each structure. 268 o get-all-by-hash: new client API for obtaining an inclusion proof 269 and the corresponding consistency proof at the same time. 271 o submit-entry: new client API, replacing add-chain and add-pre- 272 chain. 274 o Presenting SCTs with proofs: TLS servers may present SCTs together 275 with the corresponding inclusion proofs using any of the 276 mechanisms that [RFC6962] defined for presenting SCTs only. 277 (Presenting SCTs only is still supported). 279 o CT TLS extension: the "signed_certificate_timestamp" TLS extension 280 has been replaced by the "transparency_info" TLS extension. 282 o Other TLS extensions: "status_request_v2" may be used (in the same 283 manner as "status_request"); "cached_info" may be used to avoid 284 sending the same complete SCTs and inclusion proofs to the same 285 TLS clients multiple times. 287 o Verification algorithms: added detailed algorithms for verifying 288 inclusion proofs, for verifying consistency between two STHs, and 289 for verifying a root hash given a complete list of the relevant 290 leaf input entries. 292 o Extensive clarifications and editorial work. 294 2. Cryptographic Components 296 2.1. Merkle Hash Trees 298 2.1.1. Definition of the Merkle Tree 300 The log uses a binary Merkle Hash Tree for efficient auditing. The 301 hash algorithm used is one of the log's parameters (see Section 4.1). 302 We have established a registry of acceptable hash algorithms (see 303 Section 10.3). Throughout this document, the hash algorithm in use 304 is referred to as HASH and the size of its output in bytes as 305 HASH_SIZE. The input to the Merkle Tree Hash is a list of data 306 entries; these entries will be hashed to form the leaves of the 307 Merkle Hash Tree. The output is a single HASH_SIZE Merkle Tree Hash. 308 Given an ordered list of n inputs, D_n = {d[0], d[1], ..., d[n-1]}, 309 the Merkle Tree Hash (MTH) is thus defined as follows: 311 The hash of an empty list is the hash of an empty string: 313 MTH({}) = HASH(). 315 The hash of a list with one entry (also known as a leaf hash) is: 317 MTH({d[0]}) = HASH(0x00 || d[0]). 319 For n > 1, let k be the largest power of two smaller than n (i.e., k 320 < n <= 2k). The Merkle Tree Hash of an n-element list D_n is then 321 defined recursively as 323 MTH(D_n) = HASH(0x01 || MTH(D[0:k]) || MTH(D[k:n])), 325 Where || is concatenation and D[k1:k2] = D'_(k2-k1) denotes the list 326 {d'[0] = d[k1], d'[1] = d[k1+1], ..., d'[k2-k1-1] = d[k2-1]} of 327 length (k2 - k1). (Note that the hash calculations for leaves and 328 nodes differ; this domain separation is required to give second 329 preimage resistance). 331 Note that we do not require the length of the input list to be a 332 power of two. The resulting Merkle Tree may thus not be balanced; 333 however, its shape is uniquely determined by the number of leaves. 334 (Note: This Merkle Tree is essentially the same as the history tree 336 [CrosbyWallach] proposal, except our definition handles non-full 337 trees differently). 339 2.1.2. Verifying a Tree Head Given Entries 341 When a client has a complete list of n input "entries" from "0" up to 342 "tree_size - 1" and wishes to verify this list against a tree head 343 "root_hash" returned by the log for the same "tree_size", the 344 following algorithm may be used: 346 1. Set "stack" to an empty stack. 348 2. For each "i" from "0" up to "tree_size - 1": 350 1. Push "HASH(0x00 || entries[i])" to "stack". 352 2. Set "merge_count" to the lowest value ("0" included) such 353 that "LSB(i >> merge_count)" is not set. In other words, set 354 "merge_count" to the number of consecutive "1"s found 355 starting at the least significant bit of "i". 357 3. Repeat "merge_count" times: 359 1. Pop "right" from "stack". 361 2. Pop "left" from "stack". 363 3. Push "HASH(0x01 || left || right)" to "stack". 365 3. If there is more than one element in the "stack", repeat the same 366 merge procedure (Step 2.3 above) until only a single element 367 remains. 369 4. The remaining element in "stack" is the Merkle Tree hash for the 370 given "tree_size" and should be compared by equality against the 371 supplied "root_hash". 373 2.1.3. Merkle Inclusion Proofs 375 A Merkle inclusion proof for a leaf in a Merkle Hash Tree is the 376 shortest list of additional nodes in the Merkle Tree required to 377 compute the Merkle Tree Hash for that tree. Each node in the tree is 378 either a leaf node or is computed from the two nodes immediately 379 below it (i.e., towards the leaves). At each step up the tree 380 (towards the root), a node from the inclusion proof is combined with 381 the node computed so far. In other words, the inclusion proof 382 consists of the list of missing nodes required to compute the nodes 383 leading from a leaf to the root of the tree. If the root computed 384 from the inclusion proof matches the true root, then the inclusion 385 proof proves that the leaf exists in the tree. 387 2.1.3.1. Generating an Inclusion Proof 389 Given an ordered list of n inputs to the tree, D_n = {d[0], d[1], 390 ..., d[n-1]}, the Merkle inclusion proof PATH(m, D_n) for the (m+1)th 391 input d[m], 0 <= m < n, is defined as follows: 393 The proof for the single leaf in a tree with a one-element input list 394 D[1] = {d[0]} is empty: 396 PATH(0, {d[0]}) = {} 398 For n > 1, let k be the largest power of two smaller than n. The 399 proof for the (m+1)th element d[m] in a list of n > m elements is 400 then defined recursively as 402 PATH(m, D_n) = PATH(m, D[0:k]) : MTH(D[k:n]) for m < k; and 404 PATH(m, D_n) = PATH(m - k, D[k:n]) : MTH(D[0:k]) for m >= k, 406 The : operator and D[k1:k2] are defined the same as in Section 2.1.1. 408 2.1.3.2. Verifying an Inclusion Proof 410 When a client has received an inclusion proof (e.g., in a "TransItem" 411 of type "inclusion_proof_v2") and wishes to verify inclusion of an 412 input "hash" for a given "tree_size" and "root_hash", the following 413 algorithm may be used to prove the "hash" was included in the 414 "root_hash": 416 1. Compare "leaf_index" against "tree_size". If "leaf_index" is 417 greater than or equal to "tree_size" then fail the proof 418 verification. 420 2. Set "fn" to "leaf_index" and "sn" to "tree_size - 1". 422 3. Set "r" to "hash". 424 4. For each value "p" in the "inclusion_path" array: 426 If "sn" is 0, stop the iteration and fail the proof verification. 428 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 430 1. Set "r" to "HASH(0x01 || p || r)" 431 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 432 equally until either "LSB(fn)" is set or "fn" is "0". 434 Otherwise: 436 1. Set "r" to "HASH(0x01 || r || p)" 438 Finally, right-shift both "fn" and "sn" one time. 440 5. Compare "sn" to 0. Compare "r" against the "root_hash". If "sn" 441 is equal to 0, and "r" and the "root_hash" are equal, then the 442 log has proven the inclusion of "hash". Otherwise, fail the 443 proof verification. 445 2.1.4. Merkle Consistency Proofs 447 Merkle consistency proofs prove the append-only property of the tree. 448 A Merkle consistency proof for a Merkle Tree Hash MTH(D_n) and a 449 previously advertised hash MTH(D[0:m]) of the first m leaves, m <= n, 450 is the list of nodes in the Merkle Tree required to verify that the 451 first m inputs D[0:m] are equal in both trees. Thus, a consistency 452 proof must contain a set of intermediate nodes (i.e., commitments to 453 inputs) sufficient to verify MTH(D_n), such that (a subset of) the 454 same nodes can be used to verify MTH(D[0:m]). We define an algorithm 455 that outputs the (unique) minimal consistency proof. 457 2.1.4.1. Generating a Consistency Proof 459 Given an ordered list of n inputs to the tree, D_n = {d[0], d[1], 460 ..., d[n-1]}, the Merkle consistency proof PROOF(m, D_n) for a 461 previous Merkle Tree Hash MTH(D[0:m]), 0 < m < n, is defined as: 463 PROOF(m, D_n) = SUBPROOF(m, D_n, true) 465 In SUBPROOF, the boolean value represents whether the subtree created 466 from D[0:m] is a complete subtree of the Merkle Tree created from 467 D_n, and, consequently, whether the subtree Merkle Tree Hash 468 MTH(D[0:m]) is known. The initial call to SUBPROOF sets this to be 469 true, and SUBPROOF is then defined as follows: 471 The subproof for m = n is empty if m is the value for which PROOF was 472 originally requested (meaning that the subtree created from D[0:m] is 473 a complete subtree of the Merkle Tree created from the original D_n 474 for which PROOF was requested, and the subtree Merkle Tree Hash 475 MTH(D[0:m]) is known): 477 SUBPROOF(m, D[m], true) = {} 478 Otherwise, the subproof for m = n is the Merkle Tree Hash committing 479 inputs D[0:m]: 481 SUBPROOF(m, D[m], false) = {MTH(D[m])} 483 For m < n, let k be the largest power of two smaller than n. The 484 subproof is then defined recursively. 486 If m <= k, the right subtree entries D[k:n] only exist in the current 487 tree. We prove that the left subtree entries D[0:k] are consistent 488 and add a commitment to D[k:n]: 490 SUBPROOF(m, D_n, b) = SUBPROOF(m, D[0:k], b) : MTH(D[k:n]) 492 If m > k, the left subtree entries D[0:k] are identical in both 493 trees. We prove that the right subtree entries D[k:n] are consistent 494 and add a commitment to D[0:k]. 496 SUBPROOF(m, D_n, b) = SUBPROOF(m - k, D[k:n], false) : MTH(D[0:k]) 498 The number of nodes in the resulting proof is bounded above by 499 ceil(log2(n)) + 1. 501 The : operator and D[k1:k2] are defined the same as in Section 2.1.1. 503 2.1.4.2. Verifying Consistency between Two Tree Heads 505 When a client has a tree head "first_hash" for tree size "first", a 506 tree head "second_hash" for tree size "second" where "0 < first < 507 second", and has received a consistency proof between the two (e.g., 508 in a "TransItem" of type "consistency_proof_v2"), the following 509 algorithm may be used to verify the consistency proof: 511 1. If "first" is an exact power of 2, then prepend "first_hash" to 512 the "consistency_path" array. 514 2. Set "fn" to "first - 1" and "sn" to "second - 1". 516 3. If "LSB(fn)" is set, then right-shift both "fn" and "sn" equally 517 until "LSB(fn)" is not set. 519 4. Set both "fr" and "sr" to the first value in the 520 "consistency_path" array. 522 5. For each subsequent value "c" in the "consistency_path" array: 524 If "sn" is 0, stop the iteration and fail the proof verification. 526 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 528 1. Set "fr" to "HASH(0x01 || c || fr)" 529 Set "sr" to "HASH(0x01 || c || sr)" 531 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 532 equally until either "LSB(fn)" is set or "fn" is "0". 534 Otherwise: 536 1. Set "sr" to "HASH(0x01 || sr || c)" 538 Finally, right-shift both "fn" and "sn" one time. 540 6. After completing iterating through the "consistency_path" array 541 as described above, verify that the "fr" calculated is equal to 542 the "first_hash" supplied, that the "sr" calculated is equal to 543 the "second_hash" supplied and that "sn" is 0. 545 2.1.5. Example 547 The binary Merkle Tree with 7 leaves: 549 hash 550 / \ 551 / \ 552 / \ 553 / \ 554 / \ 555 k l 556 / \ / \ 557 / \ / \ 558 / \ / \ 559 g h i j 560 / \ / \ / \ | 561 a b c d e f d6 562 | | | | | | 563 d0 d1 d2 d3 d4 d5 565 The inclusion proof for d0 is [b, h, l]. 567 The inclusion proof for d3 is [c, g, l]. 569 The inclusion proof for d4 is [f, j, k]. 571 The inclusion proof for d6 is [i, k]. 573 The same tree, built incrementally in four steps: 575 hash0 hash1=k 576 / \ / \ 577 / \ / \ 578 / \ / \ 579 g c g h 580 / \ | / \ / \ 581 a b d2 a b c d 582 | | | | | | 583 d0 d1 d0 d1 d2 d3 585 hash2 hash 586 / \ / \ 587 / \ / \ 588 / \ / \ 589 / \ / \ 590 / \ / \ 591 k i k l 592 / \ / \ / \ / \ 593 / \ e f / \ / \ 594 / \ | | / \ / \ 595 g h d4 d5 g h i j 596 / \ / \ / \ / \ / \ | 597 a b c d a b c d e f d6 598 | | | | | | | | | | 599 d0 d1 d2 d3 d0 d1 d2 d3 d4 d5 601 The consistency proof between hash0 and hash is PROOF(3, D[7]) = [c, 602 d, g, l]. c, g are used to verify hash0, and d, l are additionally 603 used to show hash is consistent with hash0. 605 The consistency proof between hash1 and hash is PROOF(4, D[7]) = [l]. 606 hash can be verified using hash1=k and l. 608 The consistency proof between hash2 and hash is PROOF(6, D[7]) = [i, 609 j, k]. k, i are used to verify hash2, and j is additionally used to 610 show hash is consistent with hash2. 612 2.2. Signatures 614 Various data structures Section 1.2 are signed. A log MUST use one 615 of the signature algorithms defined in Section 10.4. 617 3. Submitters 619 Submitters submit certificates or preannouncements of certificates 620 prior to issuance (precertificates) to logs for public auditing, as 621 described below. In order to enable attribution of each logged 622 certificate or precertificate to its issuer, each submission MUST be 623 accompanied by all additional certificates required to verify the 624 chain up to an accepted trust anchor (Section 5.7). The trust anchor 625 (a root or intermediate CA certificate) MAY be omitted from the 626 submission. 628 If a log accepts a submission, it will return a Signed Certificate 629 Timestamp (SCT) (see Section 4.8). The submitter SHOULD validate the 630 returned SCT as described in Section 8.1 if they understand its 631 format and they intend to use it directly in a TLS handshake or to 632 construct a certificate. If the submitter does not need the SCT (for 633 example, the certificate is being submitted simply to make it 634 available in the log), it MAY validate the SCT. 636 3.1. Certificates 638 Any entity can submit a certificate (Section 5.1) to a log. Since it 639 is anticipated that TLS clients will reject certificates that are not 640 logged, it is expected that certificate issuers and subjects will be 641 strongly motivated to submit them. 643 3.2. Precertificates 645 CAs may preannounce a certificate prior to issuance by submitting a 646 precertificate (Section 5.1) that the log can use to create an entry 647 that will be valid against the issued certificate. The CA MAY 648 incorporate the returned SCT in the issued certificate. One example 649 of where the returned SCT is not incorporated in the issued 650 certificate is when a CA sends the precertificate to multiple logs, 651 but only incorporates the SCTs that are returned first. 653 A precertificate is a CMS [RFC5652] "signed-data" object that 654 conforms to the following profile: 656 o It MUST be DER encoded. 658 o "SignedData.version" MUST be v3(3). 660 o "SignedData.digestAlgorithms" MUST only include the 661 "SignerInfo.digestAlgorithm" OID value (see below). 663 o "SignedData.encapContentInfo": 665 * "eContentType" MUST be the OID 1.3.101.78. 667 * "eContent" MUST contain a TBSCertificate [RFC5280] that will be 668 identical to the TBSCertificate in the issued certificate, 669 except that the Transparency Information (Section 7.1) 670 extension MUST be omitted. 672 o "SignedData.certificates" MUST be omitted. 674 o "SignedData.crls" MUST be omitted. 676 o "SignedData.signerInfos" MUST contain one "SignerInfo": 678 * "version" MUST be v3(3). 680 * "sid" MUST use the "subjectKeyIdentifier" option. 682 * "digestAlgorithm" MUST be one of the hash algorithm OIDs listed 683 in Section 10.3. 685 * "signedAttrs" MUST be present and MUST contain two attributes: 687 + A content-type attribute whose value is the same as 688 "SignedData.encapContentInfo.eContentType". 690 + A message-digest attribute whose value is the message digest 691 of "SignedData.encapContentInfo.eContent". 693 * "signatureAlgorithm" MUST be the same OID as 694 "TBSCertificate.signature". 696 * "signature" MUST be from the same (root or intermediate) CA 697 that will ultimately issue the certificate. This signature 698 indicates the CA's intent to issue the certificate. This 699 intent is considered binding (i.e., misissuance of the 700 precertificate is considered equivalent to misissuance of the 701 corresponding certificate). 703 * "unsignedAttrs" MUST be omitted. 705 "SignerInfo.signedAttrs" is included in the message digest 706 calculation process (see Section 5.4 of [RFC5652]), which ensures 707 that the "SignerInfo.signature" value will not be a valid X.509v3 708 signature that could be used in conjunction with the TBSCertificate 709 (from "SignedData.encapContentInfo.eContent") to construct a valid 710 certificate. 712 4. Log Format and Operation 714 A log is a single, append-only Merkle Tree of submitted certificate 715 and precertificate entries. 717 When it receives and accepts a valid submission, the log MUST return 718 an SCT that corresponds to the submitted certificate or 719 precertificate. If the log has previously seen this valid 720 submission, it SHOULD return the same SCT as it returned before (to 721 reduce the ability to track clients as described in Section 11.4). 722 If different SCTs are produced for the same submission, multiple log 723 entries will have to be created, one for each SCT (as the timestamp 724 is a part of the leaf structure). Note that if a certificate was 725 previously logged as a precertificate, then the precertificate's SCT 726 of type "precert_sct_v2" would not be appropriate; instead, a fresh 727 SCT of type "x509_sct_v2" should be generated. 729 An SCT is the log's promise to append to its Merkle Tree an entry for 730 the accepted submission. Upon producing an SCT, the log MUST fulfil 731 this promise by performing the following actions within a fixed 732 amount of time known as the Maximum Merge Delay (MMD), which is one 733 of the log's parameters (see Section 4.1): 735 o Allocate a tree index to the entry representing the accepted 736 submission. 738 o Calculate the root of the tree. 740 o Sign the root of the tree (see Section 4.10). 742 The log may append multiple entries before signing the root of the 743 tree. 745 Log operators SHOULD NOT impose any conditions on retrieving or 746 sharing data from the log. 748 4.1. Log Parameters 750 A log is defined by a collection of parameters, which are used by 751 clients to communicate with the log and to verify log artifacts. 753 Base URL: The URL to substitute for in Section 5. 755 Hash Algorithm: The hash algorithm used for the Merkle Tree (see 756 Section 10.3). 758 Signature Algorithm: The signature algorithm used (see Section 2.2). 760 Public Key: The public key used to verify signatures generated by 761 the log. A log MUST NOT use the same keypair as any other log. 763 Log ID: The OID that uniquely identifies the log. 765 Maximum Merge Delay: The MMD the log has committed to. 767 Version: The version of the protocol supported by the log (currently 768 1 or 2). 770 Maximum Chain Length: The longest chain submission the log is 771 willing to accept, if the log imposes any limit. 773 STH Frequency Count: The maximum number of STHs the log may produce 774 in any period equal to the "Maximum Merge Delay" (see 775 Section 4.10). 777 Final STH: If a log has been closed down (i.e., no longer accepts 778 new entries), existing entries may still be valid. In this case, 779 the client should know the final valid STH in the log to ensure no 780 new entries can be added without detection. The final STH should 781 be provided in the form of a TransItem of type 782 "signed_tree_head_v2". 784 [JSON.Metadata] is an example of a metadata format which includes the 785 above elements. 787 4.2. Accepting Submissions 789 To ensure that logged certificates and precertificates are 790 attributable to a known trust anchor, and to set clear expectations 791 for what monitors would find in a log, and to avoid being overloaded 792 by invalid submissions, the log MUST NOT accept any submission until 793 it has verified that the submitted certificate or precertificate 794 chains to an accepted trust anchor. 796 The log MUST NOT use other sources of intermediate CA certificates to 797 attempt certification path construction; instead, it MUST only use 798 the intermediate CA certificates provided in the submission, in the 799 order provided. 801 Logs SHOULD accept certificates and precertificates that are fully 802 valid according to RFC 5280 [RFC5280] verification rules and are 803 submitted with such a chain. (A log may decide, for example, to 804 temporarily reject valid submissions to protect itself against 805 denial-of-service attacks). 807 Logs MAY accept certificates and precertificates that have expired, 808 are not yet valid, have been revoked, or are otherwise not fully 809 valid according to RFC 5280 verification rules in order to 810 accommodate quirks of CA certificate-issuing software. However, logs 811 MUST reject submissions without a valid signature chain to an 812 accepted trust anchor. Logs MUST also reject precertificates that do 813 not conform to the requirements in Section 3.2. 815 Logs SHOULD limit the length of chain they will accept. The maximum 816 chain length is one of the log's parameters (see Section 4.1). 818 The log SHALL allow retrieval of its list of accepted trust anchors 819 (see Section 5.7), each of which is a root or intermediate CA 820 certificate. This list might usefully be the union of root 821 certificates trusted by major browser vendors. 823 4.3. Log Entries 825 If a submission is accepted and an SCT issued, the accepting log MUST 826 store the entire chain used for verification. This chain MUST 827 include the certificate or precertificate itself, the zero or more 828 intermediate CA certificates provided by the submitter, and the trust 829 anchor used to verify the chain (even if it was omitted from the 830 submission). The log MUST present this chain for auditing upon 831 request (see Section 5.6). This prevents the CA from avoiding blame 832 by logging a partial or empty chain. Each log entry is a "TransItem" 833 structure of type "x509_entry_v2" or "precert_entry_v2". However, a 834 log may store its entries in any format. If a log does not store 835 this "TransItem" in full, it must store the "timestamp" and 836 "sct_extensions" of the corresponding 837 "TimestampedCertificateEntryDataV2" structure. The "TransItem" can 838 be reconstructed from these fields and the entire chain that the log 839 used to verify the submission. 841 4.4. Log ID 843 Each log is identified by an OID, which is one of the log's 844 parameters (see Section 4.1) and which MUST NOT be used to identify 845 any other log. A log's operator MUST either allocate the OID 846 themselves or request an OID from the Log ID Registry (see 847 Section 10.7.1). Various data structures include the DER encoding of 848 this OID, excluding the ASN.1 tag and length bytes, in an opaque 849 vector: 851 opaque LogID<2..127>; 853 Note that the ASN.1 length and the opaque vector length are identical 854 in size (1 byte) and value, so the DER encoding of the OID can be 855 reproduced simply by prepending an OBJECT IDENTIFIER tag (0x06) to 856 the opaque vector length and contents. 858 OIDs used to identify logs are limited such that the DER encoding of 859 their value is less than or equal to 127 octets. 861 4.5. TransItem Structure 863 Various data structures are encapsulated in the "TransItem" structure 864 to ensure that the type and version of each one is identified in a 865 common fashion: 867 enum { 868 reserved(0), 869 x509_entry_v2(1), precert_entry_v2(2), 870 x509_sct_v2(3), precert_sct_v2(4), 871 signed_tree_head_v2(5), consistency_proof_v2(6), 872 inclusion_proof_v2(7), 873 (65535) 874 } VersionedTransType; 876 struct { 877 VersionedTransType versioned_type; 878 select (versioned_type) { 879 case x509_entry_v2: TimestampedCertificateEntryDataV2; 880 case precert_entry_v2: TimestampedCertificateEntryDataV2; 881 case x509_sct_v2: SignedCertificateTimestampDataV2; 882 case precert_sct_v2: SignedCertificateTimestampDataV2; 883 case signed_tree_head_v2: SignedTreeHeadDataV2; 884 case consistency_proof_v2: ConsistencyProofDataV2; 885 case inclusion_proof_v2: InclusionProofDataV2; 886 } data; 887 } TransItem; 889 "versioned_type" is a value from the IANA registry in Section 10.5 890 that identifies the type of the encapsulated data structure and the 891 earliest version of this protocol to which it conforms. This 892 document is v2. 894 "data" is the encapsulated data structure. The various structures 895 named with the "DataV2" suffix are defined in later sections of this 896 document. 898 Note that "VersionedTransType" combines the v1 [RFC6962] type 899 enumerations "Version", "LogEntryType", "SignatureType" and 900 "MerkleLeafType". Note also that v1 did not define "TransItem", but 901 this document provides guidelines (see Appendix A) on how v2 902 implementations can co-exist with v1 implementations. 904 Future versions of this protocol may reuse "VersionedTransType" 905 values defined in this document as long as the corresponding data 906 structures are not modified, and may add new "VersionedTransType" 907 values for new or modified data structures. 909 4.6. Log Artifact Extensions 911 enum { 912 reserved(65535) 913 } ExtensionType; 915 struct { 916 ExtensionType extension_type; 917 opaque extension_data<0..2^16-1>; 918 } Extension; 920 The "Extension" structure provides a generic extensibility for log 921 artifacts, including Signed Certificate Timestamps (Section 4.8) and 922 Signed Tree Heads (Section 4.10). The interpretation of the 923 "extension_data" field is determined solely by the value of the 924 "extension_type" field. 926 This document does not define any extensions, but it does establish a 927 registry for future "ExtensionType" values (see Section 10.6). Each 928 document that registers a new "ExtensionType" must specify the 929 context in which it may be used (e.g., SCT, STH, or both) and 930 describe how to interpret the corresponding "extension_data". 932 4.7. Merkle Tree Leaves 934 The leaves of a log's Merkle Tree correspond to the log's entries 935 (see Section 4.3). Each leaf is the leaf hash (Section 2.1) of a 936 "TransItem" structure of type "x509_entry_v2" or "precert_entry_v2", 937 which encapsulates a "TimestampedCertificateEntryDataV2" structure. 938 Note that leaf hashes are calculated as HASH(0x00 || TransItem), 939 where the hash algorithm is one of the log's parameters. 941 opaque TBSCertificate<1..2^24-1>; 943 struct { 944 uint64 timestamp; 945 opaque issuer_key_hash<32..2^8-1>; 946 TBSCertificate tbs_certificate; 947 Extension sct_extensions<0..2^16-1>; 948 } TimestampedCertificateEntryDataV2; 950 "timestamp" is the date and time at which the certificate or 951 precertificate was accepted by the log, in the form of a 64-bit 952 unsigned number of milliseconds elapsed since the Unix Epoch (1 953 January 1970 00:00:00 UTC - see [UNIXTIME]), ignoring leap seconds, 954 in network byte order. Note that the leaves of a log's Merkle Tree 955 are not required to be in strict chronological order. 957 "issuer_key_hash" is the HASH of the public key of the CA that issued 958 the certificate or precertificate, calculated over the DER encoding 959 of the key represented as SubjectPublicKeyInfo [RFC5280]. This is 960 needed to bind the CA to the certificate or precertificate, making it 961 impossible for the corresponding SCT to be valid for any other 962 certificate or precertificate whose TBSCertificate matches 963 "tbs_certificate". The length of the "issuer_key_hash" MUST match 964 HASH_SIZE. 966 "tbs_certificate" is the DER encoded TBSCertificate from the 967 submission. (Note that a precertificate's TBSCertificate can be 968 reconstructed from the corresponding certificate as described in 969 Section 8.1.2). 971 "sct_extensions" matches the SCT extensions of the corresponding SCT. 973 The type of the "TransItem" corresponds to the value of the "type" 974 parameter supplied in the Section 5.1 call. 976 4.8. Signed Certificate Timestamp (SCT) 978 An SCT is a "TransItem" structure of type "x509_sct_v2" or 979 "precert_sct_v2", which encapsulates a 980 "SignedCertificateTimestampDataV2" structure: 982 struct { 983 LogID log_id; 984 uint64 timestamp; 985 Extension sct_extensions<0..2^16-1>; 986 opaque signature<0..2^16-1>; 987 } SignedCertificateTimestampDataV2; 989 "log_id" is this log's unique ID, encoded in an opaque vector as 990 described in Section 4.4. 992 "timestamp" is equal to the timestamp from the corresponding 993 "TimestampedCertificateEntryDataV2" structure. 995 "sct_extensions" is a vector of 0 or more SCT extensions. This 996 vector MUST NOT include more than one extension with the same 997 "extension_type". The extensions in the vector MUST be ordered by 998 the value of the "extension_type" field, smallest value first. If an 999 implementation sees an extension that it does not understand, it 1000 SHOULD ignore that extension. Furthermore, an implementation MAY 1001 choose to ignore any extension(s) that it does understand. 1003 "signature" is computed over a "TransItem" structure of type 1004 "x509_entry_v2" or "precert_entry_v2" (see Section 4.7) using the 1005 signature algorithm declared in the log's parameters (see 1006 Section 4.1). 1008 4.9. Merkle Tree Head 1010 The log stores information about its Merkle Tree in a 1011 "TreeHeadDataV2": 1013 opaque NodeHash<32..2^8-1>; 1015 struct { 1016 uint64 timestamp; 1017 uint64 tree_size; 1018 NodeHash root_hash; 1019 Extension sth_extensions<0..2^16-1>; 1020 } TreeHeadDataV2; 1022 The length of NodeHash MUST match HASH_SIZE of the log. 1024 "timestamp" is the current date and time, in the form of a 64-bit 1025 unsigned number of milliseconds elapsed since the Unix Epoch (1 1026 January 1970 00:00:00 UTC - see [UNIXTIME]), ignoring leap seconds, 1027 in network byte order. 1029 "tree_size" is the number of entries currently in the log's Merkle 1030 Tree. 1032 "root_hash" is the root of the Merkle Hash Tree. 1034 "sth_extensions" is a vector of 0 or more STH extensions. This 1035 vector MUST NOT include more than one extension with the same 1036 "extension_type". The extensions in the vector MUST be ordered by 1037 the value of the "extension_type" field, smallest value first. If an 1038 implementation sees an extension that it does not understand, it 1039 SHOULD ignore that extension. Furthermore, an implementation MAY 1040 choose to ignore any extension(s) that it does understand. 1042 4.10. Signed Tree Head (STH) 1044 Periodically each log SHOULD sign its current tree head information 1045 (see Section 4.9) to produce an STH. When a client requests a log's 1046 latest STH (see Section 5.2), the log MUST return an STH that is no 1047 older than the log's MMD. However, since STHs could be used to mark 1048 individual clients (by producing a new STH for each query), a log 1049 MUST NOT produce STHs more frequently than its parameters declare 1050 (see Section 4.1). In general, there is no need to produce a new STH 1051 unless there are new entries in the log; however, in the event that a 1052 log does not accept any submissions during an MMD period, the log 1053 MUST sign the same Merkle Tree Hash with a fresh timestamp. 1055 An STH is a "TransItem" structure of type "signed_tree_head_v2", 1056 which encapsulates a "SignedTreeHeadDataV2" structure: 1058 struct { 1059 LogID log_id; 1060 TreeHeadDataV2 tree_head; 1061 opaque signature<0..2^16-1>; 1062 } SignedTreeHeadDataV2; 1064 "log_id" is this log's unique ID, encoded in an opaque vector as 1065 described in Section 4.4. 1067 The "timestamp" in "tree_head" MUST be at least as recent as the most 1068 recent SCT timestamp in the tree. Each subsequent timestamp MUST be 1069 more recent than the timestamp of the previous update. 1071 "tree_head" contains the latest tree head information (see 1072 Section 4.9). 1074 "signature" is computed over the "tree_head" field using the 1075 signature algorithm declared in the log's parameters (see 1076 Section 4.1). 1078 4.11. Merkle Consistency Proofs 1080 To prepare a Merkle Consistency Proof for distribution to clients, 1081 the log produces a "TransItem" structure of type 1082 "consistency_proof_v2", which encapsulates a "ConsistencyProofDataV2" 1083 structure: 1085 struct { 1086 LogID log_id; 1087 uint64 tree_size_1; 1088 uint64 tree_size_2; 1089 NodeHash consistency_path<1..2^16-1>; 1090 } ConsistencyProofDataV2; 1092 "log_id" is this log's unique ID, encoded in an opaque vector as 1093 described in Section 4.4. 1095 "tree_size_1" is the size of the older tree. 1097 "tree_size_2" is the size of the newer tree. 1099 "consistency_path" is a vector of Merkle Tree nodes proving the 1100 consistency of two STHs. 1102 4.12. Merkle Inclusion Proofs 1104 To prepare a Merkle Inclusion Proof for distribution to clients, the 1105 log produces a "TransItem" structure of type "inclusion_proof_v2", 1106 which encapsulates an "InclusionProofDataV2" structure: 1108 struct { 1109 LogID log_id; 1110 uint64 tree_size; 1111 uint64 leaf_index; 1112 NodeHash inclusion_path<1..2^16-1>; 1113 } InclusionProofDataV2; 1115 "log_id" is this log's unique ID, encoded in an opaque vector as 1116 described in Section 4.4. 1118 "tree_size" is the size of the tree on which this inclusion proof is 1119 based. 1121 "leaf_index" is the 0-based index of the log entry corresponding to 1122 this inclusion proof. 1124 "inclusion_path" is a vector of Merkle Tree nodes proving the 1125 inclusion of the chosen certificate or precertificate. 1127 4.13. Shutting down a log 1129 Log operators may decide to shut down a log for various reasons, such 1130 as deprecation of the signature algorithm. If there are entries in 1131 the log for certificates that have not yet expired, simply making TLS 1132 clients stop recognizing that log will have the effect of 1133 invalidating SCTs from that log. To avoid that, the following 1134 actions are suggested: 1136 o Make it known to clients and monitors that the log will be frozen. 1138 o Stop accepting new submissions (the error code "shutdown" should 1139 be returned for such requests). 1141 o Once MMD from the last accepted submission has passed and all 1142 pending submissions are incorporated, issue a final STH and 1143 publish it as one of the log's parameters. Having an STH with a 1144 timestamp that is after the MMD has passed from the last SCT 1145 issuance allows clients to audit this log regularly without 1146 special handling for the final STH. At this point the log's 1147 private key is no longer needed and can be destroyed. 1149 o Keep the log running until the certificates in all of its entries 1150 have expired or exist in other logs (this can be determined by 1151 scanning other logs or connecting to domains mentioned in the 1152 certificates and inspecting the SCTs served). 1154 5. Log Client Messages 1156 Messages are sent as HTTPS GET or POST requests. Parameters for 1157 POSTs and all responses are encoded as JavaScript Object Notation 1158 (JSON) objects [RFC7159]. Parameters for GETs are encoded as order- 1159 independent key/value URL parameters, using the "application/x-www- 1160 form-urlencoded" format described in the "HTML 4.01 Specification" 1161 [HTML401]. Binary data is base64 encoded [RFC4648] as specified in 1162 the individual messages. 1164 Clients are configured with a base URL for a log and construct URLs 1165 for requests by appending suffixes to this base URL. This structure 1166 places some degree of restriction on how log operators can deploy 1167 these services, as noted in [RFC7320]. However, operational 1168 experience with version 1 of this protocol has not indicated that 1169 these restrictions are a problem in practice. 1171 Note that JSON objects and URL parameters may contain fields not 1172 specified here. These extra fields SHOULD be ignored. 1174 The prefix, which is one of the log's parameters, MAY 1175 include a path as well as a server name and a port. 1177 In practice, log servers may include multiple front-end machines. 1178 Since it is impractical to keep these machines in perfect sync, 1179 errors may occur that are caused by skew between the machines. Where 1180 such errors are possible, the front-end will return additional 1181 information (as specified below) making it possible for clients to 1182 make progress, if progress is possible. Front-ends MUST only serve 1183 data that is free of gaps (that is, for example, no front-end will 1184 respond with an STH unless it is also able to prove consistency from 1185 all log entries logged within that STH). 1187 For example, when a consistency proof between two STHs is requested, 1188 the front-end reached may not yet be aware of one or both STHs. In 1189 the case where it is unaware of both, it will return the latest STH 1190 it is aware of. Where it is aware of the first but not the second, 1191 it will return the latest STH it is aware of and a consistency proof 1192 from the first STH to the returned STH. The case where it knows the 1193 second but not the first should not arise (see the "no gaps" 1194 requirement above). 1196 If the log is unable to process a client's request, it MUST return an 1197 HTTP response code of 4xx/5xx (see [RFC7231]), and, in place of the 1198 responses outlined in the subsections below, the body SHOULD be a 1199 JSON Problem Details Object (see [RFC7807] Section 3), containing: 1201 type: A URN reference identifying the problem. To facilitate 1202 automated response to errors, this document defines a set of 1203 standard tokens for use in the "type" field, within the URN 1204 namespace of: "urn:ietf:params:trans:error:". 1206 detail: A human-readable string describing the error that prevented 1207 the log from processing the request, ideally with sufficient 1208 detail to enable the error to be rectified. 1210 e.g., In response to a request of "/ct/v2/get- 1211 entries?start=100&end=99", the log would return a "400 Bad Request" 1212 response code with a body similar to the following: 1214 { 1215 "type": "urn:ietf:params:trans:error:endBeforeStart", 1216 "detail": "'start' cannot be greater than 'end'" 1217 } 1219 Most error types are specific to the type of request and are defined 1220 in the respective subsections below. The one exception is the 1221 "malformed" error type, which indicates that the log server could not 1222 parse the client's request because it did not comply with this 1223 document: 1225 +-----------+----------------------------------+ 1226 | type | detail | 1227 +-----------+----------------------------------+ 1228 | malformed | The request could not be parsed. | 1229 +-----------+----------------------------------+ 1231 Clients SHOULD treat "500 Internal Server Error" and "503 Service 1232 Unavailable" responses as transient failures and MAY retry the same 1233 request without modification at a later date. Note that as per 1234 [RFC7231], in the case of a 503 response the log MAY include a 1235 "Retry-After:" header in order to request a minimum time for the 1236 client to wait before retrying the request. 1238 5.1. Submit Entry to Log 1240 POST https:///ct/v2/submit-entry 1242 Inputs: 1244 submission: The base64 encoded certificate or precertificate. 1246 type: The "VersionedTransType" integer value that indicates the 1247 type of the "submission": 1 for "x509_entry_v2", or 2 for 1248 "precert_entry_v2". 1250 chain: An array of zero or more base64 encoded CA certificates. 1251 The first element is the certifier of the "submission"; the 1252 second certifies the first; etc. The last element of "chain" 1253 (or, if "chain" is an empty array, the "submission") is 1254 certified by an accepted trust anchor. 1256 Outputs: 1258 sct: A base64 encoded "TransItem" of type "x509_sct_v2" or 1259 "precert_sct_v2", signed by this log, that corresponds to the 1260 "submission". 1262 If the submitted entry is immediately appended to (or already 1263 exists in) this log's tree, then the log SHOULD also output: 1265 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1266 signed by this log. 1268 inclusion: A base64 encoded "TransItem" of type 1269 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1270 Tree nodes proves the inclusion of the "submission" in the 1271 returned "sth". 1273 Error codes: 1275 +----------------+--------------------------------------------------+ 1276 | type | detail | 1277 +----------------+--------------------------------------------------+ 1278 | badSubmission | "submission" is neither a valid certificate nor | 1279 | | a valid precertificate. | 1280 | | | 1281 | badType | "type" is neither 1 nor 2. | 1282 | | | 1283 | badChain | The first element of "chain" is not the | 1284 | | certifier of the "submission", or the second | 1285 | | element does not certify the first, etc. | 1286 | | | 1287 | badCertificate | One or more certificates in the "chain" are not | 1288 | | valid (e.g., not properly encoded). | 1289 | | | 1290 | unknownAnchor | The last element of "chain" (or, if "chain" is | 1291 | | an empty array, the "submission") both is not, | 1292 | | and is not certified by, an accepted trust | 1293 | | anchor. | 1294 | | | 1295 | shutdown | The log is no longer accepting submissions. | 1296 +----------------+--------------------------------------------------+ 1298 If the version of "sct" is not v2, then a v2 client may be unable to 1299 verify the signature. It MUST NOT construe this as an error. This 1300 is to avoid forcing an upgrade of compliant v2 clients that do not 1301 use the returned SCTs. 1303 If a log detects bad encoding in a chain that otherwise verifies 1304 correctly then the log MUST either log the certificate or return the 1305 "bad certificate" error. If the certificate is logged, an SCT MUST 1306 be issued. Logging the certificate is useful, because monitors 1307 (Section 8.2) can then detect these encoding errors, which may be 1308 accepted by some TLS clients. 1310 If "submission" is an accepted trust anchor whose certifier is 1311 neither an accepted trust anchor nor the first element of "chain", 1312 then the log MUST return the "unknown anchor" error. A log cannot 1313 generate an SCT for a submission if it does not have access to the 1314 issuer's public key. 1316 If the returned "sct" is intended to be provided to TLS clients, then 1317 "sth" and "inclusion" (if returned) SHOULD also be provided to TLS 1318 clients (e.g., if "type" was 2 (for "precert_sct_v2") then all three 1319 "TransItem"s could be embedded in the certificate). 1321 5.2. Retrieve Latest Signed Tree Head 1323 GET https:///ct/v2/get-sth 1325 No inputs. 1327 Outputs: 1329 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1330 signed by this log, that is no older than the log's MMD. 1332 5.3. Retrieve Merkle Consistency Proof between Two Signed Tree Heads 1334 GET https:///ct/v2/get-sth-consistency 1336 Inputs: 1338 first: The tree_size of the older tree, in decimal. 1340 second: The tree_size of the newer tree, in decimal (optional). 1342 Both tree sizes must be from existing v2 STHs. However, because 1343 of skew, the receiving front-end may not know one or both of the 1344 existing STHs. If both are known, then only the "consistency" 1345 output is returned. If the first is known but the second is not 1346 (or has been omitted), then the latest known STH is returned, 1347 along with a consistency proof between the first STH and the 1348 latest. If neither are known, then the latest known STH is 1349 returned without a consistency proof. 1351 Outputs: 1353 consistency: A base64 encoded "TransItem" of type 1354 "consistency_proof_v2", whose "tree_size_1" MUST match the 1355 "first" input. If the "sth" output is omitted, then 1356 "tree_size_2" MUST match the "second" input. If "first" and 1357 "second" are equal and correspond to a known STH, the returned 1358 consistency proof MUST be empty (a "consistency_path" array 1359 with zero elements). 1361 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1362 signed by this log. 1364 Note that no signature is required for the "consistency" output as 1365 it is used to verify the consistency between two STHs, which are 1366 signed. 1368 Error codes: 1370 +-------------------+-----------------------------------------------+ 1371 | type | detail | 1372 +-------------------+-----------------------------------------------+ 1373 | firstUnknown | "first" is before the latest known STH but is | 1374 | | not from an existing STH. | 1375 | | | 1376 | secondUnknown | "second" is before the latest known STH but | 1377 | | is not from an existing STH. | 1378 | | | 1379 | secondBeforeFirst | "second" is smaller than "first". | 1380 +-------------------+-----------------------------------------------+ 1382 See Section 2.1.4.2 for an outline of how to use the "consistency" 1383 output. 1385 5.4. Retrieve Merkle Inclusion Proof from Log by Leaf Hash 1387 GET https:///ct/v2/get-proof-by-hash 1389 Inputs: 1391 hash: A base64 encoded v2 leaf hash. 1393 tree_size: The tree_size of the tree on which to base the proof, 1394 in decimal. 1396 The "hash" must be calculated as defined in Section 4.7. The 1397 "tree_size" must designate an existing v2 STH. Because of skew, 1398 the front-end may not know the requested STH. In that case, it 1399 will return the latest STH it knows, along with an inclusion proof 1400 to that STH. If the front-end knows the requested STH then only 1401 "inclusion" is returned. 1403 Outputs: 1405 inclusion: A base64 encoded "TransItem" of type 1406 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1407 Tree nodes proves the inclusion of the chosen certificate in 1408 the selected STH. 1410 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1411 signed by this log. 1413 Note that no signature is required for the "inclusion" output as 1414 it is used to verify inclusion in the selected STH, which is 1415 signed. 1417 Error codes: 1419 +-----------------+-------------------------------------------------+ 1420 | type | detail | 1421 +-----------------+-------------------------------------------------+ 1422 | hashUnknown | "hash" is not the hash of a known leaf (may be | 1423 | | caused by skew or by a known certificate not | 1424 | | yet merged). | 1425 | | | 1426 | treeSizeUnknown | "hash" is before the latest known STH but is | 1427 | | not from an existing STH. | 1428 +-----------------+-------------------------------------------------+ 1430 See Section 2.1.3.2 for an outline of how to use the "inclusion" 1431 output. 1433 5.5. Retrieve Merkle Inclusion Proof, Signed Tree Head and Consistency 1434 Proof by Leaf Hash 1436 GET https:///ct/v2/get-all-by-hash 1438 Inputs: 1440 hash: A base64 encoded v2 leaf hash. 1442 tree_size: The tree_size of the tree on which to base the proofs, 1443 in decimal. 1445 The "hash" must be calculated as defined in Section 4.7. The 1446 "tree_size" must designate an existing v2 STH. 1448 Because of skew, the front-end may not know the requested STH or the 1449 requested hash, which leads to a number of cases: 1451 +--------------------+----------------------------------------------+ 1452 | Case | Response | 1453 +--------------------+----------------------------------------------+ 1454 | latest STH < | Return latest STH | 1455 | requested STH | | 1456 | | | 1457 | latest STH > | Return latest STH and a consistency proof | 1458 | requested STH | between it and the requested STH (see | 1459 | | Section 5.3) | 1460 | | | 1461 | index of requested | Return "inclusion" | 1462 | hash < latest STH | | 1463 +--------------------+----------------------------------------------+ 1464 Note that more than one case can be true, in which case the returned 1465 data is their union. It is also possible for none to be true, in 1466 which case the front-end MUST return an empty response. 1468 Outputs: 1470 inclusion: A base64 encoded "TransItem" of type 1471 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1472 Tree nodes proves the inclusion of the chosen certificate in 1473 the returned STH. 1475 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1476 signed by this log. 1478 consistency: A base64 encoded "TransItem" of type 1479 "consistency_proof_v2" that proves the consistency of the 1480 requested STH and the returned STH. 1482 Note that no signature is required for the "inclusion" or 1483 "consistency" outputs as they are used to verify inclusion in and 1484 consistency of STHs, which are signed. 1486 Errors are the same as in Section 5.4. 1488 See Section 2.1.3.2 for an outline of how to use the "inclusion" 1489 output, and see Section 2.1.4.2 for an outline of how to use the 1490 "consistency" output. 1492 5.6. Retrieve Entries and STH from Log 1494 GET https:///ct/v2/get-entries 1496 Inputs: 1498 start: 0-based index of first entry to retrieve, in decimal. 1500 end: 0-based index of last entry to retrieve, in decimal. 1502 Outputs: 1504 entries: An array of objects, each consisting of 1506 log_entry: The base64 encoded "TransItem" structure of type 1507 "x509_entry_v2" or "precert_entry_v2" (see Section 4.3). 1509 submitted_entry: JSON object representing the inputs that were 1510 submitted to "submit-entry", with the addition of the trust 1511 anchor to the "chain" field if the submission did not 1512 include it. 1514 sct: The base64 encoded "TransItem" of type "x509_sct_v2" or 1515 "precert_sct_v2" corresponding to this log entry. 1517 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1518 signed by this log. 1520 Note that this message is not signed -- the "entries" data can be 1521 verified by constructing the Merkle Tree Hash corresponding to a 1522 retrieved STH. All leaves MUST be v2. However, a compliant v2 1523 client MUST NOT construe an unrecognized TransItem type as an error. 1524 This means it may be unable to parse some entries, but note that each 1525 client can inspect the entries it does recognize as well as verify 1526 the integrity of the data by treating unrecognized leaves as opaque 1527 input to the tree. 1529 The "start" and "end" parameters SHOULD be within the range 0 <= x < 1530 "tree_size" as returned by "get-sth" in Section 5.2. 1532 The "start" parameter MUST be less than or equal to the "end" 1533 parameter. 1535 Each "submitted_entry" output parameter MUST include the trust anchor 1536 that the log used to verify the "submission", even if that trust 1537 anchor was not provided to "submit-entry" (see Section 5.1). If the 1538 "submission" does not certify itself, then the first element of 1539 "chain" MUST be present and MUST certify the "submission". 1541 Log servers MUST honor requests where 0 <= "start" < "tree_size" and 1542 "end" >= "tree_size" by returning a partial response covering only 1543 the valid entries in the specified range. "end" >= "tree_size" could 1544 be caused by skew. Note that the following restriction may also 1545 apply: 1547 Logs MAY restrict the number of entries that can be retrieved per 1548 "get-entries" request. If a client requests more than the permitted 1549 number of entries, the log SHALL return the maximum number of entries 1550 permissible. These entries SHALL be sequential beginning with the 1551 entry specified by "start". 1553 Because of skew, it is possible the log server will not have any 1554 entries between "start" and "end". In this case it MUST return an 1555 empty "entries" array. 1557 In any case, the log server MUST return the latest STH it knows 1558 about. 1560 See Section 2.1.2 for an outline of how to use a complete list of 1561 "log_entry" entries to verify the "root_hash". 1563 Error codes: 1565 +----------------+--------------------------------------------------+ 1566 | type | detail | 1567 +----------------+--------------------------------------------------+ 1568 | startUnknown | "start" is greater than the number of entries in | 1569 | | the Merkle tree. | 1570 | | | 1571 | endBeforeStart | "start" cannot be greater than "end". | 1572 +----------------+--------------------------------------------------+ 1574 5.7. Retrieve Accepted Trust Anchors 1576 GET https:///ct/v2/get-anchors 1578 No inputs. 1580 Outputs: 1582 certificates: An array of base64 encoded trust anchors that are 1583 acceptable to the log. 1585 max_chain_length: If the server has chosen to limit the length of 1586 chains it accepts, this is the maximum number of certificates 1587 in the chain, in decimal. If there is no limit, this is 1588 omitted. 1590 6. TLS Servers 1592 CT-using TLS servers MUST use at least one of the three mechanisms 1593 listed below to present one or more SCTs from one or more logs to 1594 each TLS client during full TLS handshakes, where each SCT 1595 corresponds to the server certificate. They SHOULD also present 1596 corresponding inclusion proofs and STHs. 1598 Three mechanisms are provided because they have different tradeoffs. 1600 o A TLS extension (Section 4.2 of [RFC8446]) with type 1601 "transparency_info" (see Section 6.4). This mechanism allows TLS 1602 servers to participate in CT without the cooperation of CAs, 1603 unlike the other two mechanisms. It also allows SCTs and 1604 inclusion proofs to be updated on the fly. 1606 o An Online Certificate Status Protocol (OCSP) [RFC6960] response 1607 extension (see Section 7.1.1), where the OCSP response is provided 1608 in the "CertificateStatus" message, provided that the TLS client 1609 included the "status_request" extension in the (extended) 1610 "ClientHello" (Section 8 of [RFC6066]). This mechanism, popularly 1611 known as OCSP stapling, is already widely (but not universally) 1612 implemented. It also allows SCTs and inclusion proofs to be 1613 updated on the fly. 1615 o An X509v3 certificate extension (see Section 7.1.2). This 1616 mechanism allows the use of unmodified TLS servers, but the SCTs 1617 and inclusion proofs cannot be updated on the fly. Since the logs 1618 from which the SCTs and inclusion proofs originated won't 1619 necessarily be accepted by TLS clients for the full lifetime of 1620 the certificate, there is a risk that TLS clients will 1621 subsequently consider the certificate to be non-compliant and in 1622 need of re-issuance. 1624 Additionally, a TLS server which supports presenting SCTs using an 1625 OCSP response MAY provide it when the TLS client included the 1626 "status_request_v2" extension ([RFC6961]) in the (extended) 1627 "ClientHello", but only in addition to at least one of the three 1628 mechanisms listed above. 1630 6.1. Multiple SCTs 1632 CT-using TLS servers SHOULD send SCTs from multiple logs, because: 1634 o One or more logs may not have become acceptable to all CT-using 1635 TLS clients. 1637 o If a CA and a log collude, it is possible to temporarily hide 1638 misissuance from clients. When a TLS client requires SCTs from 1639 multiple logs to be provided, it is more difficult to mount this 1640 attack. 1642 o If a log misbehaves or suffers a key compromise, a consequence may 1643 be that clients cease to trust it. Since the time an SCT may be 1644 in use can be considerable (several years is common in current 1645 practice when embedded in a certificate), including SCTs from 1646 multiple logs reduces the probability of the certificate being 1647 rejected by TLS clients. 1649 o TLS clients may have policies related to the above risks requiring 1650 TLS servers to present multiple SCTs. For example, at the time of 1651 writing, Chromium [Chromium.Log.Policy] requires multiple SCTs to 1652 be presented with EV certificates in order for the EV indicator to 1653 be shown. 1655 To select the logs from which to obtain SCTs, a TLS server can, for 1656 example, examine the set of logs popular TLS clients accept and 1657 recognize. 1659 6.2. TransItemList Structure 1661 Multiple SCTs, inclusion proofs, and indeed "TransItem" structures of 1662 any type, are combined into a list as follows: 1664 opaque SerializedTransItem<1..2^16-1>; 1666 struct { 1667 SerializedTransItem trans_item_list<1..2^16-1>; 1668 } TransItemList; 1670 Here, "SerializedTransItem" is an opaque byte string that contains 1671 the serialized "TransItem" structure. This encoding ensures that TLS 1672 clients can decode each "TransItem" individually (so, for example, if 1673 there is a version upgrade, out-of-date clients can still parse old 1674 "TransItem" structures while skipping over new "TransItem" structures 1675 whose versions they don't understand). 1677 6.3. Presenting SCTs, inclusions proofs and STHs 1679 In each "TransItemList" that is sent to a client during a TLS 1680 handshake, the TLS server MUST include a "TransItem" structure of 1681 type "x509_sct_v2" or "precert_sct_v2" (except as described in 1682 Section 6.5). 1684 Presenting inclusion proofs and STHs in the TLS handshake helps to 1685 protect the client's privacy (see Section 8.1.4) and reduces load on 1686 log servers. Therefore, if the TLS server can obtain them, it SHOULD 1687 also include "TransItem"s of type "inclusion_proof_v2" and 1688 "signed_tree_head_v2" in the "TransItemList". 1690 6.4. transparency_info TLS Extension 1692 Provided that a TLS client includes the "transparency_info" extension 1693 type in the ClientHello and the TLS server supports the 1694 "transparency_info" extension: 1696 o The TLS server MUST verify that the received "extension_data" is 1697 empty. 1699 o The TLS server MUST construct a "TransItemList" of relevant 1700 "TransItem"s (see Section 6.3), which SHOULD omit any "TransItem"s 1701 that are already embedded in the server certificate or the stapled 1702 OCSP response (see Section 7.1). If the constructed 1703 "TransItemList" is not empty, then the TLS server MUST include the 1704 "transparency_info" extension with the "extension_data" set to 1705 this "TransItemList". 1707 TLS servers MUST only include this extension in the following 1708 messages: 1710 o the ServerHello message (for TLS 1.2 or earlier). 1712 o the Certificate or CertificateRequest message (for TLS 1.3). 1714 TLS servers MUST NOT process or include this extension when a TLS 1715 session is resumed, since session resumption uses the original 1716 session information. 1718 6.5. cached_info TLS Extension 1720 When a TLS server includes the "transparency_info" extension, it 1721 SHOULD NOT include any "TransItem" structures of type "x509_sct_v2" 1722 or "precert_sct_v2" in the "TransItemList" if all of the following 1723 conditions are met: 1725 o The TLS client includes the "cached_info" ([RFC7924]) extension 1726 type in the ClientHello, with a "CachedObject" of type 1727 "ct_compliant" (see Section 8.1.7) and at least one "CachedObject" 1728 of type "cert". 1730 o The TLS server sends a modified Certificate message (as described 1731 in section 4.1 of [RFC7924]). 1733 If the "hash_value" of any "CachedObject" of type "ct_compliant" sent 1734 by a TLS client is not 1 byte long with the value 0, the CT-using TLS 1735 server MUST abort the handshake. 1737 7. Certification Authorities 1739 7.1. Transparency Information X.509v3 Extension 1741 The Transparency Information X.509v3 extension, which has OID 1742 1.3.101.75 and SHOULD be non-critical, contains one or more 1743 "TransItem" structures in a "TransItemList". This extension MAY be 1744 included in OCSP responses (see Section 7.1.1) and certificates (see 1745 Section 7.1.2). Since RFC5280 requires the "extnValue" field (an 1746 OCTET STRING) of each X.509v3 extension to include the DER encoding 1747 of an ASN.1 value, a "TransItemList" MUST NOT be included directly. 1748 Instead, it MUST be wrapped inside an additional OCTET STRING, which 1749 is then put into the "extnValue" field: 1751 TransparencyInformationSyntax ::= OCTET STRING 1753 "TransparencyInformationSyntax" contains a "TransItemList". 1755 7.1.1. OCSP Response Extension 1757 A certification authority MAY include a Transparency Information 1758 X.509v3 extension in the "singleExtensions" of a "SingleResponse" in 1759 an OCSP response. All included SCTs and inclusion proofs MUST be for 1760 the certificate identified by the "certID" of that "SingleResponse", 1761 or for a precertificate that corresponds to that certificate. 1763 7.1.2. Certificate Extension 1765 A certification authority MAY include a Transparency Information 1766 X.509v3 extension in a certificate. All included SCTs and inclusion 1767 proofs MUST be for a precertificate that corresponds to this 1768 certificate. 1770 7.2. TLS Feature X.509v3 Extension 1772 A certification authority SHOULD NOT issue any certificate that 1773 identifies the "transparency_info" TLS extension in a TLS feature 1774 extension [RFC7633], because TLS servers are not required to support 1775 the "transparency_info" TLS extension in order to participate in CT 1776 (see Section 6). 1778 8. Clients 1780 There are various different functions clients of logs might perform. 1781 We describe here some typical clients and how they should function. 1782 Any inconsistency may be used as evidence that a log has not behaved 1783 correctly, and the signatures on the data structures prevent the log 1784 from denying that misbehavior. 1786 All clients need various parameters in order to communicate with logs 1787 and verify their responses. These parameters are described in 1788 Section 4.1, but note that this document does not describe how the 1789 parameters are obtained, which is implementation-dependent (see, for 1790 example, [Chromium.Policy]). 1792 8.1. TLS Client 1794 8.1.1. Receiving SCTs and inclusion proofs 1796 TLS clients receive SCTs and inclusion proofs alongside or in 1797 certificates. CT-using TLS clients MUST implement all of the three 1798 mechanisms by which TLS servers may present SCTs (see Section 6) and 1799 MAY also accept SCTs via the "status_request_v2" extension 1800 ([RFC6961]). 1802 TLS clients that support the "transparency_info" TLS extension (see 1803 Section 6.4) SHOULD include it in ClientHello messages, with empty 1804 "extension_data". If a TLS server includes the "transparency_info" 1805 TLS extension when resuming a TLS session, the TLS client MUST abort 1806 the handshake. 1808 8.1.2. Reconstructing the TBSCertificate 1810 Validation of an SCT for a certificate (where the "type" of the 1811 "TransItem" is "x509_sct_v2") uses the unmodified TBSCertificate 1812 component of the certificate. 1814 Before an SCT for a precertificate (where the "type" of the 1815 "TransItem" is "precert_sct_v2") can be validated, the TBSCertificate 1816 component of the precertificate needs to be reconstructed from the 1817 TBSCertificate component of the certificate as follows: 1819 o Remove the Transparency Information extension (see Section 7.1). 1821 o Remove embedded v1 SCTs, identified by OID 1.3.6.1.4.1.11129.2.4.2 1822 (see section 3.3 of [RFC6962]). This allows embedded v1 and v2 1823 SCTs to co-exist in a certificate (see Appendix A). 1825 8.1.3. Validating SCTs 1827 In addition to normal validation of the server certificate and its 1828 chain, CT-using TLS clients MUST validate each received SCT for which 1829 they have the corresponding log's parameters. To validate an SCT, a 1830 TLS client computes the signature input by constructing a "TransItem" 1831 of type "x509_entry_v2" or "precert_entry_v2", depending on the SCT's 1832 "TransItem" type. The "TimestampedCertificateEntryDataV2" structure 1833 is constructed in the following manner: 1835 o "timestamp" is copied from the SCT. 1837 o "tbs_certificate" is the reconstructed TBSCertificate portion of 1838 the server certificate, as described in Section 8.1.2. 1840 o "issuer_key_hash" is computed as described in Section 4.7. 1842 o "sct_extensions" is copied from the SCT. 1844 The SCT's "signature" is then verified using the public key of the 1845 corresponding log, which is identified by the "log_id". The required 1846 signature algorithm is one of the log's parameters. 1848 8.1.4. Fetching inclusion proofs 1850 When a TLS client has validated a received SCT but does not yet 1851 possess a corresponding inclusion proof, the TLS client MAY request 1852 the inclusion proof directly from a log using "get-proof-by-hash" 1853 (Section 5.4) or "get-all-by-hash" (Section 5.5). 1855 Note that fetching inclusion proofs directly from a log will disclose 1856 to the log which TLS server the client has been communicating with. 1857 This may be regarded as a significant privacy concern, and so it is 1858 preferable for the TLS server to send the inclusion proofs (see 1859 Section 6.3). 1861 8.1.5. Validating inclusion proofs 1863 When a TLS client has received, or fetched, an inclusion proof (and 1864 an STH), it SHOULD proceed to verifying the inclusion proof to the 1865 provided STH. The TLS client SHOULD also verify consistency between 1866 the provided STH and an STH it knows about. 1868 If the TLS client holds an STH that predates the SCT, it MAY, in the 1869 process of auditing, request a new STH from the log (Section 5.2), 1870 then verify it by requesting a consistency proof (Section 5.3). Note 1871 that if the TLS client uses "get-all-by-hash", then it will already 1872 have the new STH. 1874 8.1.6. Evaluating compliance 1876 It is up to a client's local policy to specify the quantity and form 1877 of evidence (SCTs, inclusion proofs or a combination) needed to 1878 achieve compliance and how to handle non-compliance. 1880 A TLS client can only evaluate compliance if it has given the TLS 1881 server the opportunity to send SCTs and inclusion proofs by any of 1882 the three mechanisms that are mandatory to implement for CT-using TLS 1883 clients (see Section 8.1.1). Therefore, a TLS client MUST NOT 1884 evaluate compliance if it did not include both the 1885 "transparency_info" and "status_request" TLS extensions in the 1886 ClientHello. 1888 8.1.7. cached_info TLS Extension 1890 If a TLS client uses the "cached_info" TLS extension ([RFC7924]) to 1891 indicate 1 or more cached certificates, all of which it already 1892 considers to be CT compliant, the TLS client MAY also include a 1893 "CachedObject" of type "ct_compliant" in the "cached_info" extension. 1894 Its "hash_value" field MUST have the value 0 and be 1 byte long (the 1895 minimum length permitted by [RFC7924]). 1897 8.2. Monitor 1899 Monitors watch logs to check that they behave correctly, for 1900 certificates of interest, or both. For example, a monitor may be 1901 configured to report on all certificates that apply to a specific 1902 domain name when fetching new entries for consistency validation. 1904 A monitor MUST at least inspect every new entry in every log it 1905 watches, and it MAY also choose to keep copies of entire logs. 1907 To inspect all of the existing entries, the monitor SHOULD follow 1908 these steps once for each log: 1910 1. Fetch the current STH (Section 5.2). 1912 2. Verify the STH signature. 1914 3. Fetch all the entries in the tree corresponding to the STH 1915 (Section 5.6). 1917 4. If applicable, check each entry to see if it's a certificate of 1918 interest. 1920 5. Confirm that the tree made from the fetched entries produces the 1921 same hash as that in the STH. 1923 To inspect new entries, the monitor SHOULD follow these steps 1924 repeatedly for each log: 1926 1. Fetch the current STH (Section 5.2). Repeat until the STH 1927 changes. 1929 2. Verify the STH signature. 1931 3. Fetch all the new entries in the tree corresponding to the STH 1932 (Section 5.6). If they remain unavailable for an extended 1933 period, then this should be viewed as misbehavior on the part of 1934 the log. 1936 4. If applicable, check each entry to see if it's a certificate of 1937 interest. 1939 5. Either: 1941 1. Verify that the updated list of all entries generates a tree 1942 with the same hash as the new STH. 1944 Or, if it is not keeping all log entries: 1946 1. Fetch a consistency proof for the new STH with the previous 1947 STH (Section 5.3). 1949 2. Verify the consistency proof. 1951 3. Verify that the new entries generate the corresponding 1952 elements in the consistency proof. 1954 6. Repeat from step 1. 1956 8.3. Auditing 1958 Auditing ensures that the current published state of a log is 1959 reachable from previously published states that are known to be good, 1960 and that the promises made by the log in the form of SCTs have been 1961 kept. Audits are performed by monitors or TLS clients. 1963 In particular, there are four log behavior properties that should be 1964 checked: 1966 o The Maximum Merge Delay (MMD). 1968 o The STH Frequency Count. 1970 o The append-only property. 1972 o The consistency of the log view presented to all query sources. 1974 A benign, conformant log publishes a series of STHs over time, each 1975 derived from the previous STH and the submitted entries incorporated 1976 into the log since publication of the previous STH. This can be 1977 proven through auditing of STHs. SCTs returned to TLS clients can be 1978 audited by verifying against the accompanying certificate, and using 1979 Merkle Inclusion Proofs, against the log's Merkle tree. 1981 The action taken by the auditor if an audit fails is not specified, 1982 but note that in general if audit fails, the auditor is in possession 1983 of signed proof of the log's misbehavior. 1985 A monitor (Section 8.2) can audit by verifying the consistency of 1986 STHs it receives, ensure that each entry can be fetched and that the 1987 STH is indeed the result of making a tree from all fetched entries. 1989 A TLS client (Section 8.1) can audit by verifying an SCT against any 1990 STH dated after the SCT timestamp + the Maximum Merge Delay by 1991 requesting a Merkle inclusion proof (Section 5.4). It can also 1992 verify that the SCT corresponds to the server certificate it arrived 1993 with (i.e., the log entry is that certificate, or is a precertificate 1994 corresponding to that certificate). 1996 Checking of the consistency of the log view presented to all entities 1997 is more difficult to perform because it requires a way to share log 1998 responses among a set of CT-using entities, and is discussed in 1999 Section 11.3. 2001 9. Algorithm Agility 2003 It is not possible for a log to change any of its algorithms part way 2004 through its lifetime: 2006 Signature algorithm: SCT signatures must remain valid so signature 2007 algorithms can only be added, not removed. 2009 Hash algorithm: A log would have to support the old and new hash 2010 algorithms to allow backwards-compatibility with clients that are 2011 not aware of a hash algorithm change. 2013 Allowing multiple signature or hash algorithms for a log would 2014 require that all data structures support it and would significantly 2015 complicate client implementation, which is why it is not supported by 2016 this document. 2018 If it should become necessary to deprecate an algorithm used by a 2019 live log, then the log MUST be frozen as specified in Section 4.13 2020 and a new log SHOULD be started. Certificates in the frozen log that 2021 have not yet expired and require new SCTs SHOULD be submitted to the 2022 new log and the SCTs from that log used instead. 2024 10. IANA Considerations 2026 The assignment policy criteria mentioned in this section refer to the 2027 policies outlined in [RFC5226]. 2029 10.1. New Entry to the TLS ExtensionType Registry 2031 IANA is asked to add an entry for "transparency_info(TBD)" to the 2032 "TLS ExtensionType Values" registry defined in [RFC8446], setting the 2033 "Recommended" value to "Y", setting the "TLS 1.3" value to "CH, CR, 2034 CT", and citing this document as the "Reference". 2036 10.2. New Entry to the TLS CachedInformationType registry 2038 IANA is asked to add an entry for "ct_compliant(TBD)" to the "TLS 2039 CachedInformationType Values" registry defined in [RFC7924], citing 2040 this document as the "Reference". 2042 10.3. Hash Algorithms 2044 IANA is asked to establish a registry of hash algorithm values, named 2045 "CT Hash Algorithms", that initially consists of: 2047 +--------+------------+------------------------+--------------------+ 2048 | Value | Hash | OID | Reference / | 2049 | | Algorithm | | Assignment Policy | 2050 +--------+------------+------------------------+--------------------+ 2051 | 0x00 | SHA-256 | 2.16.840.1.101.3.4.2.1 | [RFC6234] | 2052 | | | | | 2053 | 0x01 - | Unassigned | | Specification | 2054 | 0xDF | | | Required and | 2055 | | | | Expert Review | 2056 | | | | | 2057 | 0xE0 - | Reserved | | Experimental Use | 2058 | 0xEF | | | | 2059 | | | | | 2060 | 0xF0 - | Reserved | | Private Use | 2061 | 0xFF | | | | 2062 +--------+------------+------------------------+--------------------+ 2064 10.3.1. Expert Review guidelines 2066 The appointed Expert should ensure that the proposed algorithm has a 2067 public specification and is suitable for use as a cryptographic hash 2068 algorithm with no known preimage or collision attacks. These attacks 2069 can damage the integrity of the log. 2071 10.4. Signature Algorithms 2073 IANA is asked to establish a registry of signature algorithm values, 2074 named "CT Signature Algorithms", that initially consists of: 2076 +--------------------------------+--------------------+-------------+ 2077 | SignatureScheme Value | Signature | Reference / | 2078 | | Algorithm | Assignment | 2079 | | | Policy | 2080 +--------------------------------+--------------------+-------------+ 2081 | ecdsa_secp256r1_sha256(0x0403) | ECDSA (NIST P-256) | [FIPS186-4] | 2082 | | with SHA-256 | | 2083 | | | | 2084 | ecdsa_secp256r1_sha256(0x0403) | Deterministic | [RFC6979] | 2085 | | ECDSA (NIST P-256) | | 2086 | | with HMAC-SHA256 | | 2087 | | | | 2088 | ed25519(0x0807) | Ed25519 (PureEdDSA | [RFC8032] | 2089 | | with the | | 2090 | | edwards25519 | | 2091 | | curve) | | 2092 | | | | 2093 | private_use(0xFE00..0xFFFF) | Reserved | Private Use | 2094 +--------------------------------+--------------------+-------------+ 2096 10.4.1. Expert Review guidelines 2098 The appointed Expert should ensure that the proposed algorithm has a 2099 public specification, has a value assigned to it in the TLS 2100 SignatureScheme Registry (that IANA is asked to establish in 2101 [RFC8446]) and is suitable for use as a cryptographic signature 2102 algorithm. 2104 10.5. VersionedTransTypes 2106 IANA is asked to establish a registry of "VersionedTransType" values, 2107 named "CT VersionedTransTypes", that initially consists of: 2109 +-------------+----------------------+------------------------------+ 2110 | Value | Type and Version | Reference / Assignment | 2111 | | | Policy | 2112 +-------------+----------------------+------------------------------+ 2113 | 0x0000 | Reserved | [RFC6962] (*) | 2114 | | | | 2115 | 0x0001 | x509_entry_v2 | RFCXXXX | 2116 | | | | 2117 | 0x0002 | precert_entry_v2 | RFCXXXX | 2118 | | | | 2119 | 0x0003 | x509_sct_v2 | RFCXXXX | 2120 | | | | 2121 | 0x0004 | precert_sct_v2 | RFCXXXX | 2122 | | | | 2123 | 0x0005 | signed_tree_head_v2 | RFCXXXX | 2124 | | | | 2125 | 0x0006 | consistency_proof_v2 | RFCXXXX | 2126 | | | | 2127 | 0x0007 | inclusion_proof_v2 | RFCXXXX | 2128 | | | | 2129 | 0x0008 - | Unassigned | Specification Required and | 2130 | 0xDFFF | | Expert Review | 2131 | | | | 2132 | 0xE000 - | Reserved | Experimental Use | 2133 | 0xEFFF | | | 2134 | | | | 2135 | 0xF000 - | Reserved | Private Use | 2136 | 0xFFFF | | | 2137 +-------------+----------------------+------------------------------+ 2139 (*) The 0x0000 value is reserved so that v1 SCTs are distinguishable 2140 from v2 SCTs and other "TransItem" structures. 2142 [RFC Editor: please update 'RFCXXXX' to refer to this document, once 2143 its RFC number is known.] 2145 10.5.1. Expert Review guidelines 2147 The appointed Expert should review the public specification to ensure 2148 that it is detailed enough to ensure implementation interoperability. 2150 10.6. Log Artifact Extension Registry 2152 IANA is asked to establish a registry of "ExtensionType" values, 2153 named "CT Log Artifact Extensions", that initially consists of: 2155 +---------------+------------+-----+--------------------------------+ 2156 | ExtensionType | Status | Use | Reference / Assignment Policy | 2157 +---------------+------------+-----+--------------------------------+ 2158 | 0x0000 - | Unassigned | n/a | Specification Required and | 2159 | 0xDFFF | | | Expert Review | 2160 | | | | | 2161 | 0xE000 - | Reserved | n/a | Experimental Use | 2162 | 0xEFFF | | | | 2163 | | | | | 2164 | 0xF000 - | Reserved | n/a | Private Use | 2165 | 0xFFFF | | | | 2166 +---------------+------------+-----+--------------------------------+ 2168 The "Use" column should contain one or both of the following values: 2170 o "SCT", for extensions specified for use in Signed Certificate 2171 Timestamps. 2173 o "STH", for extensions specified for use in Signed Tree Heads. 2175 10.6.1. Expert Review guidelines 2177 The appointed Expert should review the public specification to ensure 2178 that it is detailed enough to ensure implementation interoperability. 2179 The Expert should also verify that the extension is appropriate to 2180 the contexts in which it is specified to be used (SCT, STH, or both). 2182 10.7. Object Identifiers 2184 This document uses object identifiers (OIDs) to identify Log IDs (see 2185 Section 4.4), the precertificate CMS "eContentType" (see 2186 Section 3.2), and X.509v3 extensions in certificates (see 2187 Section 7.1.2) and OCSP responses (see Section 7.1.1). The OIDs are 2188 defined in an arc that was selected due to its short encoding. 2190 10.7.1. Log ID Registry 2192 IANA is asked to establish a registry of Log IDs, named "CT Log ID 2193 Registry", that initially consists of: 2195 +---------------------+------------+--------------------------------+ 2196 | Value | Log | Reference / Assignment Policy | 2197 +---------------------+------------+--------------------------------+ 2198 | 1.3.101.8192 - | Unassigned | Parameters Required and First | 2199 | 1.3.101.16383 | | Come First Served | 2200 | | | | 2201 | 1.3.101.80.0 - | Unassigned | Parameters Required and First | 2202 | 1.3.101.80.* | | Come First Served | 2203 +---------------------+------------+--------------------------------+ 2205 All OIDs in the range from 1.3.101.8192 to 1.3.101.16383 have been 2206 reserved. This is a limited resource of 8,192 OIDs, each of which 2207 has an encoded length of 4 octets. 2209 The 1.3.101.80 arc has been delegated. This is an unlimited 2210 resource, but only the 128 OIDs from 1.3.101.80.0 to 1.3.101.80.127 2211 have an encoded length of only 4 octets. 2213 Each application for the allocation of a Log ID should be accompanied 2214 by all of the required parameters (except for the Log ID) listed in 2215 Section 4.1. 2217 11. Security Considerations 2219 With CAs, logs, and servers performing the actions described here, 2220 TLS clients can use logs and signed timestamps to reduce the 2221 likelihood that they will accept misissued certificates. If a server 2222 presents a valid signed timestamp for a certificate, then the client 2223 knows that a log has committed to publishing the certificate. From 2224 this, the client knows that monitors acting for the subject of the 2225 certificate have had some time to notice the misissuance and take 2226 some action, such as asking a CA to revoke a misissued certificate. 2227 A signed timestamp does not guarantee this though, since appropriate 2228 monitors might not have checked the logs or the CA might have refused 2229 to revoke the certificate. 2231 In addition, if TLS clients will not accept unlogged certificates, 2232 then site owners will have a greater incentive to submit certificates 2233 to logs, possibly with the assistance of their CA, increasing the 2234 overall transparency of the system. 2236 [I-D.ietf-trans-threat-analysis] provides a more detailed threat 2237 analysis of the Certificate Transparency architecture. 2239 11.1. Misissued Certificates 2241 Misissued certificates that have not been publicly logged, and thus 2242 do not have a valid SCT, are not considered compliant. Misissued 2243 certificates that do have an SCT from a log will appear in that 2244 public log within the Maximum Merge Delay, assuming the log is 2245 operating correctly. Since a log is allowed to serve an STH of any 2246 age up to the MMD, the maximum period of time during which a 2247 misissued certificate can be used without being available for audit 2248 is twice the MMD. 2250 11.2. Detection of Misissue 2252 The logs do not themselves detect misissued certificates; they rely 2253 instead on interested parties, such as domain owners, to monitor them 2254 and take corrective action when a misissue is detected. 2256 11.3. Misbehaving Logs 2258 A log can misbehave in several ways. Examples include: failing to 2259 incorporate a certificate with an SCT in the Merkle Tree within the 2260 MMD; presenting different, conflicting views of the Merkle Tree at 2261 different times and/or to different parties; issuing STHs too 2262 frequently; mutating the signature of a logged certificate; and 2263 failing to present a chain containing the certifier of a logged 2264 certificate. Such misbehavior is detectable and 2265 [I-D.ietf-trans-threat-analysis] provides more details on how this 2266 can be done. 2268 Violation of the MMD contract is detected by log clients requesting a 2269 Merkle inclusion proof (Section 5.4) for each observed SCT. These 2270 checks can be asynchronous and need only be done once per 2271 certificate. However, note that there may be privacy concerns (see 2272 Section 8.1.4). 2274 Violation of the append-only property or the STH issuance rate limit 2275 can be detected by clients comparing their instances of the Signed 2276 Tree Heads. There are various ways this could be done, for example 2277 via gossip (see [I-D.ietf-trans-gossip]) or peer-to-peer 2278 communications or by sending STHs to monitors (who could then 2279 directly check against their own copy of the relevant log). Proof of 2280 misbehavior in such cases would be: a series of STHs that were issued 2281 too closely together, proving violation of the STH issuance rate 2282 limit; or an STH with a root hash that does not match the one 2283 calculated from a copy of the log, proving violation of the append- 2284 only property. 2286 11.4. Preventing Tracking Clients 2288 Clients that gossip STHs or report back SCTs can be tracked or traced 2289 if a log produces multiple STHs or SCTs with the same timestamp and 2290 data but different signatures. Logs SHOULD mitigate this risk by 2291 either: 2293 o Using deterministic signature schemes, or 2295 o Producing no more than one SCT for each distinct submission and no 2296 more than one STH for each distinct tree_size. Each of these SCTs 2297 and STHs can be stored by the log and served to other clients that 2298 submit the same certificate or request the same STH. 2300 11.5. Multiple SCTs 2302 By requiring TLS servers to offer multiple SCTs, each from a 2303 different log, TLS clients reduce the effectiveness of an attack 2304 where a CA and a log collude (see Section 6.1). 2306 12. Acknowledgements 2308 The authors would like to thank Erwann Abelea, Robin Alden, Andrew 2309 Ayer, Richard Barnes, Al Cutter, David Drysdale, Francis Dupont, Adam 2310 Eijdenberg, Stephen Farrell, Daniel Kahn Gillmor, Paul Hadfield, Brad 2311 Hill, Jeff Hodges, Paul Hoffman, Jeffrey Hutzelman, Kat Joyce, 2312 Stephen Kent, SM, Alexey Melnikov, Linus Nordberg, Chris Palmer, 2313 Trevor Perrin, Pierre Phaneuf, Eric Rescorla, Melinda Shore, Ryan 2314 Sleevi, Martin Smith, Carl Wallace and Paul Wouters for their 2315 valuable contributions. 2317 A big thank you to Symantec for kindly donating the OIDs from the 2318 1.3.101 arc that are used in this document. 2320 13. References 2322 13.1. Normative References 2324 [FIPS186-4] 2325 NIST, "FIPS PUB 186-4", July 2013, 2326 . 2329 [HTML401] Raggett, D., Le Hors, A., and I. Jacobs, "HTML 4.01 2330 Specification", World Wide Web Consortium Recommendation 2331 REC-html401-19991224, December 1999, 2332 . 2334 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2335 Requirement Levels", BCP 14, RFC 2119, 2336 DOI 10.17487/RFC2119, March 1997, . 2339 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 2340 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 2341 . 2343 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 2344 Housley, R., and W. Polk, "Internet X.509 Public Key 2345 Infrastructure Certificate and Certificate Revocation List 2346 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 2347 . 2349 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2350 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2351 . 2353 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 2354 Extensions: Extension Definitions", RFC 6066, 2355 DOI 10.17487/RFC6066, January 2011, . 2358 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 2359 Galperin, S., and C. Adams, "X.509 Internet Public Key 2360 Infrastructure Online Certificate Status Protocol - OCSP", 2361 RFC 6960, DOI 10.17487/RFC6960, June 2013, 2362 . 2364 [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) 2365 Multiple Certificate Status Request Extension", RFC 6961, 2366 DOI 10.17487/RFC6961, June 2013, . 2369 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2370 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 2371 2014, . 2373 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2374 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2375 DOI 10.17487/RFC7231, June 2014, . 2378 [RFC7633] Hallam-Baker, P., "X.509v3 Transport Layer Security (TLS) 2379 Feature Extension", RFC 7633, DOI 10.17487/RFC7633, 2380 October 2015, . 2382 [RFC7807] Nottingham, M. and E. Wilde, "Problem Details for HTTP 2383 APIs", RFC 7807, DOI 10.17487/RFC7807, March 2016, 2384 . 2386 [RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security 2387 (TLS) Cached Information Extension", RFC 7924, 2388 DOI 10.17487/RFC7924, July 2016, . 2391 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 2392 Signature Algorithm (EdDSA)", RFC 8032, 2393 DOI 10.17487/RFC8032, January 2017, . 2396 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 2397 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 2398 . 2400 [UNIXTIME] 2401 IEEE, "The Open Group Base Specifications Issue 7 IEEE Std 2402 1003.1-2008, 2016 Edition", n.d., . 2406 13.2. Informative References 2408 [Chromium.Log.Policy] 2409 The Chromium Projects, "Chromium Certificate Transparency 2410 Log Policy", 2014, . 2413 [Chromium.Policy] 2414 The Chromium Projects, "Chromium Certificate 2415 Transparency", 2014, . 2418 [CrosbyWallach] 2419 Crosby, S. and D. Wallach, "Efficient Data Structures for 2420 Tamper-Evident Logging", Proceedings of the 18th USENIX 2421 Security Symposium, Montreal, August 2009, 2422 . 2425 [I-D.ietf-trans-gossip] 2426 Nordberg, L., Gillmor, D., and T. Ritter, "Gossiping in 2427 CT", draft-ietf-trans-gossip-05 (work in progress), 2428 January 2018. 2430 [I-D.ietf-trans-threat-analysis] 2431 Kent, S., "Attack and Threat Model for Certificate 2432 Transparency", draft-ietf-trans-threat-analysis-16 (work 2433 in progress), October 2018. 2435 [JSON.Metadata] 2436 The Chromium Projects, "Chromium Log Metadata JSON 2437 Schema", 2014, . 2440 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 2441 IANA Considerations Section in RFCs", RFC 5226, 2442 DOI 10.17487/RFC5226, May 2008, . 2445 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 2446 (SHA and SHA-based HMAC and HKDF)", RFC 6234, 2447 DOI 10.17487/RFC6234, May 2011, . 2450 [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate 2451 Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013, 2452 . 2454 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 2455 Algorithm (DSA) and Elliptic Curve Digital Signature 2456 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2457 2013, . 2459 [RFC7320] Nottingham, M., "URI Design and Ownership", BCP 190, 2460 RFC 7320, DOI 10.17487/RFC7320, July 2014, 2461 . 2463 Appendix A. Supporting v1 and v2 simultaneously 2465 Certificate Transparency logs have to be either v1 (conforming to 2466 [RFC6962]) or v2 (conforming to this document), as the data 2467 structures are incompatible and so a v2 log could not issue a valid 2468 v1 SCT. 2470 CT clients, however, can support v1 and v2 SCTs, for the same 2471 certificate, simultaneously, as v1 SCTs are delivered in different 2472 TLS, X.509 and OCSP extensions than v2 SCTs. 2474 v1 and v2 SCTs for X.509 certificates can be validated independently. 2475 For precertificates, v2 SCTs should be embedded in the TBSCertificate 2476 before submission of the TBSCertificate (inside a v1 precertificate, 2477 as described in Section 3.1. of [RFC6962]) to a v1 log so that TLS 2478 clients conforming to [RFC6962] but not this document are oblivious 2479 to the embedded v2 SCTs. An issuer can follow these steps to produce 2480 an X.509 certificate with embedded v1 and v2 SCTs: 2482 o Create a CMS precertificate as described in Section 3.2 and submit 2483 it to v2 logs. 2485 o Embed the obtained v2 SCTs in the TBSCertificate, as described in 2486 Section 7.1.2. 2488 o Use that TBSCertificate to create a v1 precertificate, as 2489 described in Section 3.1. of [RFC6962] and submit it to v1 logs. 2491 o Embed the v1 SCTs in the TBSCertificate, as described in 2492 Section 3.3 of [RFC6962]. 2494 o Sign that TBSCertificate (which now contains v1 and v2 SCTs) to 2495 issue the final X.509 certificate. 2497 Authors' Addresses 2499 Ben Laurie 2500 Google UK Ltd. 2502 Email: benl@google.com 2504 Adam Langley 2505 Google Inc. 2507 Email: agl@google.com 2509 Emilia Kasper 2510 Google Switzerland GmbH 2512 Email: ekasper@google.com 2514 Eran Messeri 2515 Google UK Ltd. 2517 Email: eranm@google.com 2518 Rob Stradling 2519 Comodo CA Ltd. 2521 Email: rob@comodoca.com