idnits 2.17.1 draft-ietf-trans-rfc6962-bis-35.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. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (25 March 2021) is 1118 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '0' on line 470 -- Looks like a reference, but probably isn't: '1' on line 470 -- Looks like a reference, but probably isn't: '7' on line 620 ** 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 6962 (Obsoleted by RFC 9162) -- Obsolete informational reference (is this intentional?): RFC 7320 (Obsoleted by RFC 8820) Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 6 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: 26 September 2021 Google 7 R. Stradling 8 Sectigo 9 25 March 2021 11 Certificate Transparency Version 2.0 12 draft-ietf-trans-rfc6962-bis-35 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 This document obsoletes RFC 6962. It also specifies a new TLS 27 extension that is used to send various CT log artifacts. 29 Logs are network services that implement the protocol operations for 30 submissions and queries that are defined in this document. 32 Status of This Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at https://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on 26 September 2021. 49 Copyright Notice 51 Copyright (c) 2021 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 56 license-info) in effect on the date of publication of this document. 57 Please review these documents carefully, as they describe your rights 58 and restrictions with respect to this document. Code Components 59 extracted from this document must include Simplified BSD License text 60 as described in Section 4.e of the Trust Legal Provisions and are 61 provided without warranty as described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 66 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5 67 1.2. Data Structures . . . . . . . . . . . . . . . . . . . . . 5 68 1.3. Major Differences from CT 1.0 . . . . . . . . . . . . . . 5 69 2. Cryptographic Components . . . . . . . . . . . . . . . . . . 7 70 2.1. Merkle Hash Trees . . . . . . . . . . . . . . . . . . . . 7 71 2.1.1. Definition of the Merkle Tree . . . . . . . . . . . . 7 72 2.1.2. Verifying a Tree Head Given Entries . . . . . . . . . 8 73 2.1.3. Merkle Inclusion Proofs . . . . . . . . . . . . . . . 9 74 2.1.4. Merkle Consistency Proofs . . . . . . . . . . . . . . 10 75 2.1.5. Example . . . . . . . . . . . . . . . . . . . . . . . 12 76 2.2. Signatures . . . . . . . . . . . . . . . . . . . . . . . 14 77 3. Submitters . . . . . . . . . . . . . . . . . . . . . . . . . 15 78 3.1. Certificates . . . . . . . . . . . . . . . . . . . . . . 15 79 3.2. Precertificates . . . . . . . . . . . . . . . . . . . . . 15 80 3.2.1. Binding Intent to Issue . . . . . . . . . . . . . . . 17 81 4. Log Format and Operation . . . . . . . . . . . . . . . . . . 17 82 4.1. Log Parameters . . . . . . . . . . . . . . . . . . . . . 18 83 4.2. Evaluating Submissions . . . . . . . . . . . . . . . . . 19 84 4.2.1. Minimum Acceptance Criteria . . . . . . . . . . . . . 19 85 4.2.2. Discretionary Acceptance Criteria . . . . . . . . . . 20 86 4.3. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 21 87 4.4. Log ID . . . . . . . . . . . . . . . . . . . . . . . . . 21 88 4.5. TransItem Structure . . . . . . . . . . . . . . . . . . . 21 89 4.6. Log Artifact Extensions . . . . . . . . . . . . . . . . . 22 90 4.7. Merkle Tree Leaves . . . . . . . . . . . . . . . . . . . 23 91 4.8. Signed Certificate Timestamp (SCT) . . . . . . . . . . . 24 92 4.9. Merkle Tree Head . . . . . . . . . . . . . . . . . . . . 25 93 4.10. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 25 94 4.11. Merkle Consistency Proofs . . . . . . . . . . . . . . . . 26 95 4.12. Merkle Inclusion Proofs . . . . . . . . . . . . . . . . . 27 96 4.13. Shutting down a log . . . . . . . . . . . . . . . . . . . 27 98 5. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 28 99 5.1. Submit Entry to Log . . . . . . . . . . . . . . . . . . . 30 100 5.2. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 32 101 5.3. Retrieve Merkle Consistency Proof between Two Signed Tree 102 Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 32 103 5.4. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 33 104 5.5. Retrieve Merkle Inclusion Proof, Signed Tree Head and 105 Consistency Proof by Leaf Hash . . . . . . . . . . . . . 34 106 5.6. Retrieve Entries and STH from Log . . . . . . . . . . . . 35 107 5.7. Retrieve Accepted Trust Anchors . . . . . . . . . . . . . 37 108 6. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 38 109 6.1. TLS Client Authentication . . . . . . . . . . . . . . . . 38 110 6.2. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . . 39 111 6.3. TransItemList Structure . . . . . . . . . . . . . . . . . 39 112 6.4. Presenting SCTs, inclusions proofs and STHs . . . . . . . 40 113 6.5. transparency_info TLS Extension . . . . . . . . . . . . . 40 114 7. Certification Authorities . . . . . . . . . . . . . . . . . . 40 115 7.1. Transparency Information X.509v3 Extension . . . . . . . 41 116 7.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 41 117 7.1.2. Certificate Extension . . . . . . . . . . . . . . . . 41 118 7.2. TLS Feature X.509v3 Extension . . . . . . . . . . . . . . 41 119 8. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 120 8.1. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 42 121 8.1.1. Receiving SCTs and inclusion proofs . . . . . . . . . 42 122 8.1.2. Reconstructing the TBSCertificate . . . . . . . . . . 42 123 8.1.3. Validating SCTs . . . . . . . . . . . . . . . . . . . 42 124 8.1.4. Fetching inclusion proofs . . . . . . . . . . . . . . 43 125 8.1.5. Validating inclusion proofs . . . . . . . . . . . . . 43 126 8.1.6. Evaluating compliance . . . . . . . . . . . . . . . . 44 127 8.2. Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 44 128 8.3. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 45 129 9. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 46 130 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 47 131 10.1. New Entry to the TLS ExtensionType Registry . . . . . . 47 132 10.2. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 47 133 10.2.1. Specification Required guidance . . . . . . . . . . 47 134 10.3. Signature Algorithms . . . . . . . . . . . . . . . . . . 48 135 10.3.1. Expert Review guidelines . . . . . . . . . . . . . . 48 136 10.4. VersionedTransTypes . . . . . . . . . . . . . . . . . . 49 137 10.4.1. Specification Required guidance . . . . . . . . . . 49 138 10.5. Log Artifact Extension Registry . . . . . . . . . . . . 50 139 10.5.1. Specification Required guidance . . . . . . . . . . 50 140 10.6. Object Identifiers . . . . . . . . . . . . . . . . . . . 50 141 10.6.1. Log ID Registry . . . . . . . . . . . . . . . . . . 50 142 10.7. URN Sub-namespace for TRANS errors 143 (urn:ietf:params:trans:error) . . . . . . . . . . . . . 51 144 10.7.1. TRANS Error Types . . . . . . . . . . . . . . . . . 52 145 11. Security Considerations . . . . . . . . . . . . . . . . . . . 53 146 11.1. Misissued Certificates . . . . . . . . . . . . . . . . . 54 147 11.2. Detection of Misissue . . . . . . . . . . . . . . . . . 54 148 11.3. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 54 149 11.4. Preventing Tracking Clients . . . . . . . . . . . . . . 55 150 11.5. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 55 151 11.6. Leakage of DNS Information . . . . . . . . . . . . . . . 55 152 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 55 153 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 56 154 13.1. Normative References . . . . . . . . . . . . . . . . . . 56 155 13.2. Informative References . . . . . . . . . . . . . . . . . 57 156 Appendix A. Supporting v1 and v2 simultaneously . . . . . . . . 59 157 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 60 159 1. Introduction 161 Certificate Transparency aims to mitigate the problem of misissued 162 certificates by providing append-only logs of issued certificates. 163 The logs do not themselves prevent misissuance, but they ensure that 164 interested parties (particularly those named in certificates) can 165 detect such misissuance. Note that this is a general mechanism that 166 could be used for transparently logging any form of binary data, 167 subject to some kind of inclusion criteria. In this document, we 168 only describe its use for public TLS server certificates (i.e., where 169 the inclusion criteria is a valid certificate issued by a public 170 certification authority (CA)). 172 Each log contains certificate chains, which can be submitted by 173 anyone. It is expected that public CAs will contribute all their 174 newly issued certificates to one or more logs; however certificate 175 holders can also contribute their own certificate chains, as can 176 third parties. In order to avoid logs being rendered useless by the 177 submission of large numbers of spurious certificates, it is required 178 that each chain ends with a trust anchor that is accepted by the log. 179 When a chain is accepted by a log, a signed timestamp is returned, 180 which can later be used to provide evidence to TLS clients that the 181 chain has been submitted. TLS clients can thus require that all 182 certificates they accept as valid are accompanied by signed 183 timestamps. 185 Those who are concerned about misissuance can monitor the logs, 186 asking them regularly for all new entries, and can thus check whether 187 domains for which they are responsible have had certificates issued 188 that they did not expect. What they do with this information, 189 particularly when they find that a misissuance has happened, is 190 beyond the scope of this document. However, broadly speaking, they 191 can invoke existing business mechanisms for dealing with misissued 192 certificates, such as working with the CA to get the certificate 193 revoked, or with maintainers of trust anchor lists to get the CA 194 removed. Of course, anyone who wants can monitor the logs and, if 195 they believe a certificate is incorrectly issued, take action as they 196 see fit. 198 Similarly, those who have seen signed timestamps from a particular 199 log can later demand a proof of inclusion from that log. If the log 200 is unable to provide this (or, indeed, if the corresponding 201 certificate is absent from monitors' copies of that log), that is 202 evidence of the incorrect operation of the log. The checking 203 operation is asynchronous to allow clients to proceed without delay, 204 despite possible issues such as network connectivity and the vagaries 205 of firewalls. 207 The append-only property of each log is achieved using Merkle Trees, 208 which can be used to efficiently prove that any particular instance 209 of the log is a superset of any particular previous instance and to 210 efficiently detect various misbehaviors of the log (e.g., issuing a 211 signed timestamp for a certificate that is not subsequently logged). 213 It is necessary to treat each log as a trusted third party, because 214 the log auditing mechanisms described in this document can be 215 circumvented by a misbehaving log that shows different, inconsistent 216 views of itself to different clients. Whilst it is anticipated that 217 additional mechanisms could be developed to address these 218 shortcomings and thereby avoid the need to blindly trust logs, such 219 mechanisms are outside the scope of this document. 221 1.1. Requirements Language 223 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 224 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 225 "OPTIONAL" in this document are to be interpreted as described in BCP 226 14 [RFC2119] [RFC8174] when, and only when, they appear in all 227 capitals, as shown here. 229 1.2. Data Structures 231 Data structures are defined and encoded according to the conventions 232 laid out in Section 3 of [RFC8446]. 234 1.3. Major Differences from CT 1.0 236 This document revises and obsoletes the CT 1.0 [RFC6962] protocol, 237 drawing on insights gained from CT 1.0 deployments and on feedback 238 from the community. The major changes are: 240 * Hash and signature algorithm agility: permitted algorithms are now 241 specified in IANA registries. 243 * Precertificate format: precertificates are now CMS objects rather 244 than X.509 certificates, which avoids violating the certificate 245 serial number uniqueness requirement in Section 4.1.2.2 of 246 [RFC5280]. 248 * Removed precertificate signing certificates and the precertificate 249 poison extension: the change of precertificate format means that 250 these are no longer needed. 252 * Logs IDs: each log is now identified by an OID rather than by the 253 hash of its public key. OID allocations are managed by an IANA 254 registry. 256 * "TransItem" structure: this new data structure is used to 257 encapsulate most types of CT data. A "TransItemList", consisting 258 of one or more "TransItem" structures, can be used anywhere that 259 "SignedCertificateTimestampList" was used in [RFC6962]. 261 * Merkle tree leaves: the "MerkleTreeLeaf" structure has been 262 replaced by the "TransItem" structure, which eases extensibility 263 and simplifies the leaf structure by removing one layer of 264 abstraction. 266 * Unified leaf format: the structure for both certificate and 267 precertificate entries now includes only the TBSCertificate 268 (whereas certificate entries in [RFC6962] included the entire 269 certificate). 271 * Log Artifact Extensions: these are now typed and managed by an 272 IANA registry, and they can now appear not only in SCTs but also 273 in STHs. 275 * API outputs: complete "TransItem" structures are returned, rather 276 than the constituent parts of each structure. 278 * get-all-by-hash: new client API for obtaining an inclusion proof 279 and the corresponding consistency proof at the same time. 281 * submit-entry: new client API, replacing add-chain and add-pre- 282 chain. 284 * Presenting SCTs with proofs: TLS servers may present SCTs together 285 with the corresponding inclusion proofs using any of the 286 mechanisms that [RFC6962] defined for presenting SCTs only. 287 (Presenting SCTs only is still supported). 289 * CT TLS extension: the "signed_certificate_timestamp" TLS extension 290 has been replaced by the "transparency_info" TLS extension. 292 * Verification algorithms: added detailed algorithms for verifying 293 inclusion proofs, for verifying consistency between two STHs, and 294 for verifying a root hash given a complete list of the relevant 295 leaf input entries. 297 * Extensive clarifications and editorial work. 299 2. Cryptographic Components 301 2.1. Merkle Hash Trees 303 2.1.1. Definition of the Merkle Tree 305 The log uses a binary Merkle Hash Tree for efficient auditing. The 306 hash algorithm used is one of the log's parameters (see Section 4.1). 307 This document establishes a registry of acceptable hash algorithms 308 (see Section 10.2). Throughout this document, the hash algorithm in 309 use is referred to as HASH and the size of its output in bytes as 310 HASH_SIZE. The input to the Merkle Tree Hash is a list of data 311 entries; these entries will be hashed to form the leaves of the 312 Merkle Hash Tree. The output is a single HASH_SIZE Merkle Tree Hash. 313 Given an ordered list of n inputs, D_n = {d[0], d[1], ..., d[n-1]}, 314 the Merkle Tree Hash (MTH) is thus defined as follows: 316 The hash of an empty list is the hash of an empty string: 318 MTH({}) = HASH(). 320 The hash of a list with one entry (also known as a leaf hash) is: 322 MTH({d[0]}) = HASH(0x00 || d[0]). 324 For n > 1, let k be the largest power of two smaller than n (i.e., k 325 < n <= 2k). The Merkle Tree Hash of an n-element list D_n is then 326 defined recursively as 328 MTH(D_n) = HASH(0x01 || MTH(D[0:k]) || MTH(D[k:n])), 330 where: 332 * || denotes concatenation 334 * : denotes concatenation of lists 336 * D[k1:k2] = D'_(k2-k1) denotes the list {d'[0] = d[k1], d'[1] = 337 d[k1+1], ..., d'[k2-k1-1] = d[k2-1]} of length (k2 - k1). 339 Note that the hash calculations for leaves and nodes differ; this 340 domain separation is required to give second preimage resistance. 342 Note that we do not require the length of the input list to be a 343 power of two. The resulting Merkle Tree may thus not be balanced; 344 however, its shape is uniquely determined by the number of leaves. 345 (Note: This Merkle Tree is essentially the same as the history tree 346 [CrosbyWallach] proposal, except our definition handles non-full 347 trees differently). 349 2.1.2. Verifying a Tree Head Given Entries 351 When a client has a complete list of n input "entries" from "0" up to 352 "tree_size - 1" and wishes to verify this list against a tree head 353 "root_hash" returned by the log for the same "tree_size", the 354 following algorithm may be used: 356 1. Set "stack" to an empty stack. 358 2. For each "i" from "0" up to "tree_size - 1": 360 1. Push "HASH(0x00 || entries[i])" to "stack". 362 2. Set "merge_count" to the lowest value ("0" included) such 363 that "LSB(i >> merge_count)" is not set. In other words, set 364 "merge_count" to the number of consecutive "1"s found 365 starting at the least significant bit of "i". 367 3. Repeat "merge_count" times: 369 1. Pop "right" from "stack". 371 2. Pop "left" from "stack". 373 3. Push "HASH(0x01 || left || right)" to "stack". 375 3. If there is more than one element in the "stack", repeat the same 376 merge procedure (Step 2.3 above) until only a single element 377 remains. 379 4. The remaining element in "stack" is the Merkle Tree hash for the 380 given "tree_size" and should be compared by equality against the 381 supplied "root_hash". 383 2.1.3. Merkle Inclusion Proofs 385 A Merkle inclusion proof for a leaf in a Merkle Hash Tree is the 386 shortest list of additional nodes in the Merkle Tree required to 387 compute the Merkle Tree Hash for that tree. Each node in the tree is 388 either a leaf node or is computed from the two nodes immediately 389 below it (i.e., towards the leaves). At each step up the tree 390 (towards the root), a node from the inclusion proof is combined with 391 the node computed so far. In other words, the inclusion proof 392 consists of the list of missing nodes required to compute the nodes 393 leading from a leaf to the root of the tree. If the root computed 394 from the inclusion proof matches the true root, then the inclusion 395 proof proves that the leaf exists in the tree. 397 2.1.3.1. Generating an Inclusion Proof 399 Given an ordered list of n inputs to the tree, D_n = {d[0], d[1], 400 ..., d[n-1]}, the Merkle inclusion proof PATH(m, D_n) for the (m+1)th 401 input d[m], 0 <= m < n, is defined as follows: 403 The proof for the single leaf in a tree with a one-element input list 404 D[1] = {d[0]} is empty: 406 PATH(0, {d[0]}) = {} 408 For n > 1, let k be the largest power of two smaller than n. The 409 proof for the (m+1)th element d[m] in a list of n > m elements is 410 then defined recursively as 412 PATH(m, D_n) = PATH(m, D[0:k]) : MTH(D[k:n]) for m < k; and 414 PATH(m, D_n) = PATH(m - k, D[k:n]) : MTH(D[0:k]) for m >= k, 416 The : operator and D[k1:k2] are defined the same as in Section 2.1.1. 418 2.1.3.2. Verifying an Inclusion Proof 420 When a client has received an inclusion proof (e.g., in a "TransItem" 421 of type "inclusion_proof_v2") and wishes to verify inclusion of an 422 input "hash" for a given "tree_size" and "root_hash", the following 423 algorithm may be used to prove the "hash" was included in the 424 "root_hash": 426 1. Compare "leaf_index" against "tree_size". If "leaf_index" is 427 greater than or equal to "tree_size" then fail the proof 428 verification. 430 2. Set "fn" to "leaf_index" and "sn" to "tree_size - 1". 432 3. Set "r" to "hash". 434 4. For each value "p" in the "inclusion_path" array: 436 If "sn" is 0, stop the iteration and fail the proof verification. 438 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 440 1. Set "r" to "HASH(0x01 || p || r)" 442 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 443 equally until either "LSB(fn)" is set or "fn" is "0". 445 Otherwise: 447 1. Set "r" to "HASH(0x01 || r || p)" 449 Finally, right-shift both "fn" and "sn" one time. 451 5. Compare "sn" to 0. Compare "r" against the "root_hash". If "sn" 452 is equal to 0, and "r" and the "root_hash" are equal, then the 453 log has proven the inclusion of "hash". Otherwise, fail the 454 proof verification. 456 2.1.4. Merkle Consistency Proofs 458 Merkle consistency proofs prove the append-only property of the tree. 459 A Merkle consistency proof for a Merkle Tree Hash MTH(D_n) and a 460 previously advertised hash MTH(D[0:m]) of the first m leaves, m <= n, 461 is the list of nodes in the Merkle Tree required to verify that the 462 first m inputs D[0:m] are equal in both trees. Thus, a consistency 463 proof must contain a set of intermediate nodes (i.e., commitments to 464 inputs) sufficient to verify MTH(D_n), such that (a subset of) the 465 same nodes can be used to verify MTH(D[0:m]). We define an algorithm 466 that outputs the (unique) minimal consistency proof. 468 2.1.4.1. Generating a Consistency Proof 470 Given an ordered list of n inputs to the tree, D_n = {d[0], d[1], 471 ..., d[n-1]}, the Merkle consistency proof PROOF(m, D_n) for a 472 previous Merkle Tree Hash MTH(D[0:m]), 0 < m < n, is defined as: 474 PROOF(m, D_n) = SUBPROOF(m, D_n, true) 475 In SUBPROOF, the boolean value represents whether the subtree created 476 from D[0:m] is a complete subtree of the Merkle Tree created from 477 D_n, and, consequently, whether the subtree Merkle Tree Hash 478 MTH(D[0:m]) is known. The initial call to SUBPROOF sets this to be 479 true, and SUBPROOF is then defined as follows: 481 The subproof for m = n is empty if m is the value for which PROOF was 482 originally requested (meaning that the subtree created from D[0:m] is 483 a complete subtree of the Merkle Tree created from the original D_n 484 for which PROOF was requested, and the subtree Merkle Tree Hash 485 MTH(D[0:m]) is known): 487 SUBPROOF(m, D[m], true) = {} 489 Otherwise, the subproof for m = n is the Merkle Tree Hash committing 490 inputs D[0:m]: 492 SUBPROOF(m, D[m], false) = {MTH(D[m])} 494 For m < n, let k be the largest power of two smaller than n. The 495 subproof is then defined recursively. 497 If m <= k, the right subtree entries D[k:n] only exist in the current 498 tree. We prove that the left subtree entries D[0:k] are consistent 499 and add a commitment to D[k:n]: 501 SUBPROOF(m, D_n, b) = SUBPROOF(m, D[0:k], b) : MTH(D[k:n]) 503 If m > k, the left subtree entries D[0:k] are identical in both 504 trees. We prove that the right subtree entries D[k:n] are consistent 505 and add a commitment to D[0:k]. 507 SUBPROOF(m, D_n, b) = SUBPROOF(m - k, D[k:n], false) : MTH(D[0:k]) 509 The number of nodes in the resulting proof is bounded above by 510 ceil(log2(n)) + 1. 512 The : operator and D[k1:k2] are defined the same as in Section 2.1.1. 514 2.1.4.2. Verifying Consistency between Two Tree Heads 516 When a client has a tree head "first_hash" for tree size "first", a 517 tree head "second_hash" for tree size "second" where "0 < first < 518 second", and has received a consistency proof between the two (e.g., 519 in a "TransItem" of type "consistency_proof_v2"), the following 520 algorithm may be used to verify the consistency proof: 522 1. If "first" is an exact power of 2, then prepend "first_hash" to 523 the "consistency_path" array. 525 2. Set "fn" to "first - 1" and "sn" to "second - 1". 527 3. If "LSB(fn)" is set, then right-shift both "fn" and "sn" equally 528 until "LSB(fn)" is not set. 530 4. Set both "fr" and "sr" to the first value in the 531 "consistency_path" array. 533 5. For each subsequent value "c" in the "consistency_path" array: 535 If "sn" is 0, stop the iteration and fail the proof verification. 537 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 539 1. Set "fr" to "HASH(0x01 || c || fr)" 541 Set "sr" to "HASH(0x01 || c || sr)" 543 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 544 equally until either "LSB(fn)" is set or "fn" is "0". 546 Otherwise: 548 1. Set "sr" to "HASH(0x01 || sr || c)" 550 Finally, right-shift both "fn" and "sn" one time. 552 6. After completing iterating through the "consistency_path" array 553 as described above, verify that the "fr" calculated is equal to 554 the "first_hash" supplied, that the "sr" calculated is equal to 555 the "second_hash" supplied and that "sn" is 0. 557 2.1.5. Example 559 The binary Merkle Tree with 7 leaves: 561 hash 562 / \ 563 / \ 564 / \ 565 / \ 566 / \ 567 k l 568 / \ / \ 569 / \ / \ 570 / \ / \ 571 g h i j 572 / \ / \ / \ | 573 a b c d e f d6 574 | | | | | | 575 d0 d1 d2 d3 d4 d5 577 The inclusion proof for d0 is [b, h, l]. 579 The inclusion proof for d3 is [c, g, l]. 581 The inclusion proof for d4 is [f, j, k]. 583 The inclusion proof for d6 is [i, k]. 585 The same tree, built incrementally in four steps: 587 hash0 hash1=k 588 / \ / \ 589 / \ / \ 590 / \ / \ 591 g c g h 592 / \ | / \ / \ 593 a b d2 a b c d 594 | | | | | | 595 d0 d1 d0 d1 d2 d3 597 hash2 hash 598 / \ / \ 599 / \ / \ 600 / \ / \ 601 / \ / \ 602 / \ / \ 603 k i k l 604 / \ / \ / \ / \ 605 / \ e f / \ / \ 606 / \ | | / \ / \ 607 g h d4 d5 g h i j 608 / \ / \ / \ / \ / \ | 609 a b c d a b c d e f d6 610 | | | | | | | | | | 611 d0 d1 d2 d3 d0 d1 d2 d3 d4 d5 613 The consistency proof between hash0 and hash is PROOF(3, D[7]) = [c, 614 d, g, l]. c, g are used to verify hash0, and d, l are additionally 615 used to show hash is consistent with hash0. 617 The consistency proof between hash1 and hash is PROOF(4, D[7]) = [l]. 618 hash can be verified using hash1=k and l. 620 The consistency proof between hash2 and hash is PROOF(6, D[7]) = [i, 621 j, k]. k, i are used to verify hash2, and j is additionally used to 622 show hash is consistent with hash2. 624 2.2. Signatures 626 Various data structures Section 1.2 are signed. A log MUST use one 627 of the signature algorithms defined in Section 10.3. 629 3. Submitters 631 Submitters submit certificates or preannouncements of certificates 632 prior to issuance (precertificates) to logs for public auditing, as 633 described below. In order to enable attribution of each logged 634 certificate or precertificate to its issuer, each submission MUST be 635 accompanied by all additional certificates required to verify the 636 chain up to an accepted trust anchor (Section 5.7). The trust anchor 637 (a root or intermediate CA certificate) MAY be omitted from the 638 submission. 640 If a log accepts a submission, it will return a Signed Certificate 641 Timestamp (SCT) (see Section 4.8). The submitter SHOULD validate the 642 returned SCT as described in Section 8.1 if they understand its 643 format and they intend to use it directly in a TLS handshake or to 644 construct a certificate. If the submitter does not need the SCT (for 645 example, the certificate is being submitted simply to make it 646 available in the log), it MAY validate the SCT. 648 3.1. Certificates 650 Any entity can submit a certificate (Section 5.1) to a log. Since it 651 is anticipated that TLS clients will reject certificates that are not 652 logged, it is expected that certificate issuers and subjects will be 653 strongly motivated to submit them. 655 3.2. Precertificates 657 CAs may preannounce a certificate prior to issuance by submitting a 658 precertificate (Section 5.1) that the log can use to create an entry 659 that will be valid against the issued certificate. The CA MAY 660 incorporate the returned SCT in the issued certificate. One example 661 of where the returned SCT is not incorporated in the issued 662 certificate is when a CA sends the precertificate to multiple logs, 663 but only incorporates the SCTs that are returned first. 665 A precertificate is a CMS [RFC5652] "signed-data" object that 666 conforms to the following profile: 668 * It MUST be DER encoded. 670 * "SignedData.version" MUST be v3(3). 672 * "SignedData.digestAlgorithms" MUST only include the 673 "SignerInfo.digestAlgorithm" OID value (see below). 675 * "SignedData.encapContentInfo": 677 - "eContentType" MUST be the OID 1.3.101.78. 679 - "eContent" MUST contain a TBSCertificate [RFC5280] that will be 680 identical to the TBSCertificate in the issued certificate, 681 except that the Transparency Information (Section 7.1) 682 extension MUST be omitted. 684 * "SignedData.certificates" MUST be omitted. 686 * "SignedData.crls" MUST be omitted. 688 * "SignedData.signerInfos" MUST contain one "SignerInfo": 690 - "version" MUST be v3(3). 692 - "sid" MUST use the "subjectKeyIdentifier" option. 694 - "digestAlgorithm" MUST be one of the hash algorithm OIDs listed 695 in Section 10.2. 697 - "signedAttrs" MUST be present and MUST contain two attributes: 699 o A content-type attribute whose value is the same as 700 "SignedData.encapContentInfo.eContentType". 702 o A message-digest attribute whose value is the message digest 703 of "SignedData.encapContentInfo.eContent". 705 - "signatureAlgorithm" MUST be the same OID as 706 "TBSCertificate.signature". 708 - "signature" MUST be from the same (root or intermediate) CA 709 that intends to issue the corresponding certificate (see 710 Section 3.2.1). 712 - "unsignedAttrs" MUST be omitted. 714 "SignerInfo.signedAttrs" is included in the message digest 715 calculation process (see Section 5.4 of [RFC5652]), which ensures 716 that the "SignerInfo.signature" value will not be a valid X.509v3 717 signature that could be used in conjunction with the TBSCertificate 718 (from "SignedData.encapContentInfo.eContent") to construct a valid 719 certificate. 721 3.2.1. Binding Intent to Issue 723 Under normal circumstances, there will be a short delay between 724 precertificate submission and issuance of the corresponding 725 certificate. Longer delays are to be expected occasionally (e.g., 726 due to log server downtime), and in some cases the CA might not 727 actually issue the corresponding certificate. Nevertheless, a 728 precertificate's "signature" indicates the CA's binding intent to 729 issue the corresponding certificate, which means that: 731 * Misissuance of a precertificate is considered equivalent to 732 misissuance of the corresponding certificate. The CA should 733 expect to be held to account, even if the corresponding 734 certificate has not actually been issued. 736 * Upon observing a precertificate, a client can reasonably presume 737 that the corresponding certificate has been issued. A client may 738 wish to obtain status information (e.g., by using the Online 739 Certificate Status Protocol [RFC6960] or by checking a Certificate 740 Revocation List [RFC5280]) about a certificate that is presumed to 741 exist, especially if there is evidence or suspicion that the 742 corresponding precertificate was misissued. 744 * TLS clients may have policies that require CAs to be able to 745 revoke, and to provide certificate status services for, each 746 certificate that is presumed to exist based on the existence of a 747 corresponding precertificate. 749 4. Log Format and Operation 751 A log is a single, append-only Merkle Tree of submitted certificate 752 and precertificate entries. 754 When it receives and accepts a valid submission, the log MUST return 755 an SCT that corresponds to the submitted certificate or 756 precertificate. If the log has previously seen this valid 757 submission, it SHOULD return the same SCT as it returned before (to 758 reduce the ability to track clients as described in Section 11.4). 759 If different SCTs are produced for the same submission, multiple log 760 entries will have to be created, one for each SCT (as the timestamp 761 is a part of the leaf structure). Note that if a certificate was 762 previously logged as a precertificate, then the precertificate's SCT 763 of type "precert_sct_v2" would not be appropriate; instead, a fresh 764 SCT of type "x509_sct_v2" should be generated. 766 An SCT is the log's promise to append to its Merkle Tree an entry for 767 the accepted submission. Upon producing an SCT, the log MUST fulfil 768 this promise by performing the following actions within a fixed 769 amount of time known as the Maximum Merge Delay (MMD), which is one 770 of the log's parameters (see Section 4.1): 772 * Allocate a tree index to the entry representing the accepted 773 submission. 775 * Calculate the root of the tree. 777 * Sign the root of the tree (see Section 4.10). 779 The log may append multiple entries before signing the root of the 780 tree. 782 Log operators SHOULD NOT impose any conditions on retrieving or 783 sharing data from the log. 785 4.1. Log Parameters 787 A log is defined by a collection of immutable parameters, which are 788 used by clients to communicate with the log and to verify log 789 artifacts. Except for the Final Signed Tree Head (STH), each of 790 these parameters MUST be established before the log operator begins 791 to operate the log. 793 Base URL: The prefix used to construct URLs for client messages (see 794 Section 5). The base URL MUST be an "https" URL, MAY contain a 795 port, MAY contain a path with any number of path segments, but 796 MUST NOT contain a query string, fragment, or trailing "/". 797 Example: https://ct.example.org/blue 799 Hash Algorithm: The hash algorithm used for the Merkle Tree (see 800 Section 10.2). 802 Signature Algorithm: The signature algorithm used (see Section 2.2). 804 Public Key: The public key used to verify signatures generated by 805 the log. A log MUST NOT use the same keypair as any other log. 807 Log ID: The OID that uniquely identifies the log. 809 Maximum Merge Delay: The MMD the log has committed to. 811 Version: The version of the protocol supported by the log (currently 812 1 or 2). 814 Maximum Chain Length: The longest chain submission the log is 815 willing to accept, if the log imposes any limit. 817 STH Frequency Count: The maximum number of STHs the log may produce 818 in any period equal to the "Maximum Merge Delay" (see 819 Section 4.10). 821 Final STH: If a log has been closed down (i.e., no longer accepts 822 new entries), existing entries may still be valid. In this case, 823 the client should know the final valid STH in the log to ensure no 824 new entries can be added without detection. The final STH should 825 be provided in the form of a TransItem of type 826 "signed_tree_head_v2". 828 [JSON.Metadata] is an example of a metadata format which includes the 829 above elements. 831 4.2. Evaluating Submissions 833 A log determines whether to accept or reject a submission by 834 evaluating it against the minimum acceptance criteria (see 835 Section 4.2.1) and against the log's discretionary acceptance 836 criteria (see Section 4.2.2). 838 If the acceptance criteria are met, the log SHOULD accept the 839 submission. (A log may decide, for example, to temporarily reject 840 acceptable submissions to protect itself against denial-of-service 841 attacks). 843 The log SHALL allow retrieval of its list of accepted trust anchors 844 (see Section 5.7), each of which is a root or intermediate CA 845 certificate. This list might usefully be the union of root 846 certificates trusted by major browser vendors. 848 4.2.1. Minimum Acceptance Criteria 850 To ensure that logged certificates and precertificates are 851 attributable to an accepted trust anchor, and to set clear 852 expectations for what monitors would find in the log, and to avoid 853 being overloaded by invalid submissions, the log MUST reject a 854 submission if any of the following conditions are not met: 856 * The "submission", "type" and "chain" inputs MUST be set as 857 described in Section 5.1. The log MUST NOT accommodate misordered 858 CA certificates or use any other source of intermediate CA 859 certificates to attempt certification path construction. 861 * Each of the zero or more intermediate CA certificates in the chain 862 MUST have one or both of the following features: 864 - The Basic Constraints extension with the cA boolean asserted. 866 - The Key Usage extension with the keyCertSign bit asserted. 868 * Each certificate in the chain MUST fall within the limits imposed 869 by the zero or more Basic Constraints pathLenConstraint values 870 found higher up the chain. 872 * Precertificate submissions MUST conform to all of the requirements 873 in Section 3.2. 875 4.2.2. Discretionary Acceptance Criteria 877 If the minimum acceptance criteria are met but the submission is not 878 fully valid according to [RFC5280] verification rules (e.g., the 879 certificate or precertificate has expired, is not yet valid, has been 880 revoked, exhibits ASN.1 DER encoding errors but the log can still 881 parse it, etc), then the acceptability of the submission is left to 882 the log's discretion. It is useful for logs to accept such 883 submissions in order to accommodate quirks of CA certificate-issuing 884 software and to facilitate monitoring of CA compliance with 885 applicable policies and technical standards. However, it is 886 impractical for this document to enumerate, and for logs to consider, 887 all of the ways that a submission might fail to comply with 888 [RFC5280]. 890 Logs SHOULD limit the length of chain they will accept. The maximum 891 chain length is one of the log's parameters (see Section 4.1). 893 4.3. Log Entries 895 If a submission is accepted and an SCT issued, the accepting log MUST 896 store the entire chain used for verification. This chain MUST 897 include the certificate or precertificate itself, the zero or more 898 intermediate CA certificates provided by the submitter, and the trust 899 anchor used to verify the chain (even if it was omitted from the 900 submission). The log MUST present this chain for auditing upon 901 request (see Section 5.6). This prevents the CA from avoiding blame 902 by logging a partial or empty chain. Each log entry is a "TransItem" 903 structure of type "x509_entry_v2" or "precert_entry_v2". However, a 904 log may store its entries in any format. If a log does not store 905 this "TransItem" in full, it must store the "timestamp" and 906 "sct_extensions" of the corresponding 907 "TimestampedCertificateEntryDataV2" structure. The "TransItem" can 908 be reconstructed from these fields and the entire chain that the log 909 used to verify the submission. 911 4.4. Log ID 913 Each log is identified by an OID, which is one of the log's 914 parameters (see Section 4.1) and which MUST NOT be used to identify 915 any other log. A log's operator MUST either allocate the OID 916 themselves or request an OID from the Log ID Registry (see 917 Section 10.6.1). Various data structures include the DER encoding of 918 this OID, excluding the ASN.1 tag and length bytes, in an opaque 919 vector: 921 opaque LogID<2..127>; 923 Note that the ASN.1 length and the opaque vector length are identical 924 in size (1 byte) and value, so the DER encoding of the OID can be 925 reproduced simply by prepending an OBJECT IDENTIFIER tag (0x06) to 926 the opaque vector length and contents. 928 OIDs used to identify logs are limited such that the DER encoding of 929 their value is less than or equal to 127 octets. 931 4.5. TransItem Structure 933 Various data structures are encapsulated in the "TransItem" structure 934 to ensure that the type and version of each one is identified in a 935 common fashion: 937 enum { 938 reserved(0), 939 x509_entry_v2(1), precert_entry_v2(2), 940 x509_sct_v2(3), precert_sct_v2(4), 941 signed_tree_head_v2(5), consistency_proof_v2(6), 942 inclusion_proof_v2(7), 943 (65535) 944 } VersionedTransType; 946 struct { 947 VersionedTransType versioned_type; 948 select (versioned_type) { 949 case x509_entry_v2: TimestampedCertificateEntryDataV2; 950 case precert_entry_v2: TimestampedCertificateEntryDataV2; 951 case x509_sct_v2: SignedCertificateTimestampDataV2; 952 case precert_sct_v2: SignedCertificateTimestampDataV2; 953 case signed_tree_head_v2: SignedTreeHeadDataV2; 954 case consistency_proof_v2: ConsistencyProofDataV2; 955 case inclusion_proof_v2: InclusionProofDataV2; 956 } data; 957 } TransItem; 959 "versioned_type" is a value from the IANA registry in Section 10.4 960 that identifies the type of the encapsulated data structure and the 961 earliest version of this protocol to which it conforms. This 962 document is v2. 964 "data" is the encapsulated data structure. The various structures 965 named with the "DataV2" suffix are defined in later sections of this 966 document. 968 Note that "VersionedTransType" combines the v1 [RFC6962] type 969 enumerations "Version", "LogEntryType", "SignatureType" and 970 "MerkleLeafType". Note also that v1 did not define "TransItem", but 971 this document provides guidelines (see Appendix A) on how v2 972 implementations can co-exist with v1 implementations. 974 Future versions of this protocol may reuse "VersionedTransType" 975 values defined in this document as long as the corresponding data 976 structures are not modified, and may add new "VersionedTransType" 977 values for new or modified data structures. 979 4.6. Log Artifact Extensions 980 enum { 981 reserved(65535) 982 } ExtensionType; 984 struct { 985 ExtensionType extension_type; 986 opaque extension_data<0..2^16-1>; 987 } Extension; 989 The "Extension" structure provides a generic extensibility for log 990 artifacts, including Signed Certificate Timestamps (Section 4.8) and 991 Signed Tree Heads (Section 4.10). The interpretation of the 992 "extension_data" field is determined solely by the value of the 993 "extension_type" field. 995 This document does not define any extensions, but it does establish a 996 registry for future "ExtensionType" values (see Section 10.5). Each 997 document that registers a new "ExtensionType" must specify the 998 context in which it may be used (e.g., SCT, STH, or both) and 999 describe how to interpret the corresponding "extension_data". 1001 4.7. Merkle Tree Leaves 1003 The leaves of a log's Merkle Tree correspond to the log's entries 1004 (see Section 4.3). Each leaf is the leaf hash (Section 2.1) of a 1005 "TransItem" structure of type "x509_entry_v2" or "precert_entry_v2", 1006 which encapsulates a "TimestampedCertificateEntryDataV2" structure. 1007 Note that leaf hashes are calculated as HASH(0x00 || TransItem), 1008 where the hash algorithm is one of the log's parameters. 1010 opaque TBSCertificate<1..2^24-1>; 1012 struct { 1013 uint64 timestamp; 1014 opaque issuer_key_hash<32..2^8-1>; 1015 TBSCertificate tbs_certificate; 1016 Extension sct_extensions<0..2^16-1>; 1017 } TimestampedCertificateEntryDataV2; 1019 "timestamp" is the date and time at which the certificate or 1020 precertificate was accepted by the log, in the form of a 64-bit 1021 unsigned number of milliseconds elapsed since the Unix Epoch (1 1022 January 1970 00:00:00 UTC - see [UNIXTIME]), ignoring leap seconds, 1023 in network byte order. Note that the leaves of a log's Merkle Tree 1024 are not required to be in strict chronological order. 1026 "issuer_key_hash" is the HASH of the public key of the CA that issued 1027 the certificate or precertificate, calculated over the DER encoding 1028 of the key represented as SubjectPublicKeyInfo [RFC5280]. This is 1029 needed to bind the CA to the certificate or precertificate, making it 1030 impossible for the corresponding SCT to be valid for any other 1031 certificate or precertificate whose TBSCertificate matches 1032 "tbs_certificate". The length of the "issuer_key_hash" MUST match 1033 HASH_SIZE. 1035 "tbs_certificate" is the DER encoded TBSCertificate from the 1036 submission. (Note that a precertificate's TBSCertificate can be 1037 reconstructed from the corresponding certificate as described in 1038 Section 8.1.2). 1040 "sct_extensions" matches the SCT extensions of the corresponding SCT. 1042 The type of the "TransItem" corresponds to the value of the "type" 1043 parameter supplied in the Section 5.1 call. 1045 4.8. Signed Certificate Timestamp (SCT) 1047 An SCT is a "TransItem" structure of type "x509_sct_v2" or 1048 "precert_sct_v2", which encapsulates a 1049 "SignedCertificateTimestampDataV2" structure: 1051 struct { 1052 LogID log_id; 1053 uint64 timestamp; 1054 Extension sct_extensions<0..2^16-1>; 1055 opaque signature<0..2^16-1>; 1056 } SignedCertificateTimestampDataV2; 1058 "log_id" is this log's unique ID, encoded in an opaque vector as 1059 described in Section 4.4. 1061 "timestamp" is equal to the timestamp from the corresponding 1062 "TimestampedCertificateEntryDataV2" structure. 1064 "sct_extensions" is a vector of 0 or more SCT extensions. This 1065 vector MUST NOT include more than one extension with the same 1066 "extension_type". The extensions in the vector MUST be ordered by 1067 the value of the "extension_type" field, smallest value first. If an 1068 implementation sees an extension that it does not understand, it 1069 SHOULD ignore that extension. Furthermore, an implementation MAY 1070 choose to ignore any extension(s) that it does understand. 1072 "signature" is computed over a "TransItem" structure of type 1073 "x509_entry_v2" or "precert_entry_v2" (see Section 4.7) using the 1074 signature algorithm declared in the log's parameters (see 1075 Section 4.1). 1077 4.9. Merkle Tree Head 1079 The log stores information about its Merkle Tree in a 1080 "TreeHeadDataV2": 1082 opaque NodeHash<32..2^8-1>; 1084 struct { 1085 uint64 timestamp; 1086 uint64 tree_size; 1087 NodeHash root_hash; 1088 Extension sth_extensions<0..2^16-1>; 1089 } TreeHeadDataV2; 1091 The length of NodeHash MUST match HASH_SIZE of the log. 1093 "timestamp" is the current date and time, in the form of a 64-bit 1094 unsigned number of milliseconds elapsed since the Unix Epoch (1 1095 January 1970 00:00:00 UTC - see [UNIXTIME]), ignoring leap seconds, 1096 in network byte order. 1098 "tree_size" is the number of entries currently in the log's Merkle 1099 Tree. 1101 "root_hash" is the root of the Merkle Hash Tree. 1103 "sth_extensions" is a vector of 0 or more STH extensions. This 1104 vector MUST NOT include more than one extension with the same 1105 "extension_type". The extensions in the vector MUST be ordered by 1106 the value of the "extension_type" field, smallest value first. If an 1107 implementation sees an extension that it does not understand, it 1108 SHOULD ignore that extension. Furthermore, an implementation MAY 1109 choose to ignore any extension(s) that it does understand. 1111 4.10. Signed Tree Head (STH) 1113 Periodically each log SHOULD sign its current tree head information 1114 (see Section 4.9) to produce an STH. When a client requests a log's 1115 latest STH (see Section 5.2), the log MUST return an STH that is no 1116 older than the log's MMD. However, since STHs could be used to mark 1117 individual clients (by producing a new STH for each query), a log 1118 MUST NOT produce STHs more frequently than its parameters declare 1119 (see Section 4.1). In general, there is no need to produce a new STH 1120 unless there are new entries in the log; however, in the event that a 1121 log does not accept any submissions during an MMD period, the log 1122 MUST sign the same Merkle Tree Hash with a fresh timestamp. 1124 An STH is a "TransItem" structure of type "signed_tree_head_v2", 1125 which encapsulates a "SignedTreeHeadDataV2" structure: 1127 struct { 1128 LogID log_id; 1129 TreeHeadDataV2 tree_head; 1130 opaque signature<0..2^16-1>; 1131 } SignedTreeHeadDataV2; 1133 "log_id" is this log's unique ID, encoded in an opaque vector as 1134 described in Section 4.4. 1136 The "timestamp" in "tree_head" MUST be at least as recent as the most 1137 recent SCT timestamp in the tree. Each subsequent timestamp MUST be 1138 more recent than the timestamp of the previous update. 1140 "tree_head" contains the latest tree head information (see 1141 Section 4.9). 1143 "signature" is computed over the "tree_head" field using the 1144 signature algorithm declared in the log's parameters (see 1145 Section 4.1). 1147 4.11. Merkle Consistency Proofs 1149 To prepare a Merkle Consistency Proof for distribution to clients, 1150 the log produces a "TransItem" structure of type 1151 "consistency_proof_v2", which encapsulates a "ConsistencyProofDataV2" 1152 structure: 1154 struct { 1155 LogID log_id; 1156 uint64 tree_size_1; 1157 uint64 tree_size_2; 1158 NodeHash consistency_path<1..2^16-1>; 1159 } ConsistencyProofDataV2; 1161 "log_id" is this log's unique ID, encoded in an opaque vector as 1162 described in Section 4.4. 1164 "tree_size_1" is the size of the older tree. 1166 "tree_size_2" is the size of the newer tree. 1168 "consistency_path" is a vector of Merkle Tree nodes proving the 1169 consistency of two STHs. 1171 4.12. Merkle Inclusion Proofs 1173 To prepare a Merkle Inclusion Proof for distribution to clients, the 1174 log produces a "TransItem" structure of type "inclusion_proof_v2", 1175 which encapsulates an "InclusionProofDataV2" structure: 1177 struct { 1178 LogID log_id; 1179 uint64 tree_size; 1180 uint64 leaf_index; 1181 NodeHash inclusion_path<1..2^16-1>; 1182 } InclusionProofDataV2; 1184 "log_id" is this log's unique ID, encoded in an opaque vector as 1185 described in Section 4.4. 1187 "tree_size" is the size of the tree on which this inclusion proof is 1188 based. 1190 "leaf_index" is the 0-based index of the log entry corresponding to 1191 this inclusion proof. 1193 "inclusion_path" is a vector of Merkle Tree nodes proving the 1194 inclusion of the chosen certificate or precertificate. 1196 4.13. Shutting down a log 1198 Log operators may decide to shut down a log for various reasons, such 1199 as deprecation of the signature algorithm. If there are entries in 1200 the log for certificates that have not yet expired, simply making TLS 1201 clients stop recognizing that log will have the effect of 1202 invalidating SCTs from that log. To avoid that, the following 1203 actions are suggested: 1205 * Make it known to clients and monitors that the log will be frozen. 1207 * Stop accepting new submissions (the error code "shutdown" should 1208 be returned for such requests). 1210 * Once MMD from the last accepted submission has passed and all 1211 pending submissions are incorporated, issue a final STH and 1212 publish it as one of the log's parameters. Having an STH with a 1213 timestamp that is after the MMD has passed from the last SCT 1214 issuance allows clients to audit this log regularly without 1215 special handling for the final STH. At this point the log's 1216 private key is no longer needed and can be destroyed. 1218 * Keep the log running until the certificates in all of its entries 1219 have expired or exist in other logs (this can be determined by 1220 scanning other logs or connecting to domains mentioned in the 1221 certificates and inspecting the SCTs served). 1223 5. Log Client Messages 1225 Messages are sent as HTTPS GET or POST requests. Parameters for 1226 POSTs and all responses are encoded as JavaScript Object Notation 1227 (JSON) objects [RFC8259]. Parameters for GETs are encoded as order- 1228 independent key/value URL parameters, using the "application/x-www- 1229 form-urlencoded" format described in the "HTML 4.01 Specification" 1230 [HTML401]. Binary data is base64 encoded [RFC4648] as specified in 1231 the individual messages. 1233 Clients are configured with a log's base URL, which is one of the 1234 log's parameters. Clients construct URLs for requests by appending 1235 suffixes to this base URL. This structure places some degree of 1236 restriction on how log operators can deploy these services, as noted 1237 in [RFC7320]. However, operational experience with version 1 of this 1238 protocol has not indicated that these restrictions are a problem in 1239 practice. 1241 Note that JSON objects and URL parameters may contain fields not 1242 specified here. These extra fields SHOULD be ignored. 1244 In practice, log servers may include multiple front-end machines. 1245 Since it is impractical to keep these machines in perfect sync, 1246 errors may occur that are caused by skew between the machines. Where 1247 such errors are possible, the front-end will return additional 1248 information (as specified below) making it possible for clients to 1249 make progress, if progress is possible. Front-ends MUST only serve 1250 data that is free of gaps (that is, for example, no front-end will 1251 respond with an STH unless it is also able to prove consistency from 1252 all log entries logged within that STH). 1254 For example, when a consistency proof between two STHs is requested, 1255 the front-end reached may not yet be aware of one or both STHs. In 1256 the case where it is unaware of both, it will return the latest STH 1257 it is aware of. Where it is aware of the first but not the second, 1258 it will return the latest STH it is aware of and a consistency proof 1259 from the first STH to the returned STH. The case where it knows the 1260 second but not the first should not arise (see the "no gaps" 1261 requirement above). 1263 If the log is unable to process a client's request, it MUST return an 1264 HTTP response code of 4xx/5xx (see [RFC7231]), and, in place of the 1265 responses outlined in the subsections below, the body SHOULD be a 1266 JSON Problem Details Object (see [RFC7807] Section 3), containing: 1268 type: A URN reference identifying the problem. To facilitate 1269 automated response to errors, this document defines a set of 1270 standard tokens for use in the "type" field, within the URN 1271 namespace of: "urn:ietf:params:trans:error:". 1273 detail: A human-readable string describing the error that prevented 1274 the log from processing the request, ideally with sufficient 1275 detail to enable the error to be rectified. 1277 e.g., In response to a request of "/ct/v2/get- 1278 entries?start=100&end=99", the log would return a "400 Bad Request" 1279 response code with a body similar to the following: 1281 { 1282 "type": "urn:ietf:params:trans:error:endBeforeStart", 1283 "detail": "'start' cannot be greater than 'end'" 1284 } 1286 Most error types are specific to the type of request and are defined 1287 in the respective subsections below. The one exception is the 1288 "malformed" error type, which indicates that the log server could not 1289 parse the client's request because it did not comply with this 1290 document: 1292 +===========+==================================+ 1293 | type | detail | 1294 +===========+==================================+ 1295 | malformed | The request could not be parsed. | 1296 +-----------+----------------------------------+ 1298 Table 1 1300 Clients SHOULD treat "500 Internal Server Error" and "503 Service 1301 Unavailable" responses as transient failures and MAY retry the same 1302 request without modification at a later date. Note that as per 1303 [RFC7231], in the case of a 503 response the log MAY include a 1304 "Retry-After:" header in order to request a minimum time for the 1305 client to wait before retrying the request. 1307 5.1. Submit Entry to Log 1309 POST /ct/v2/submit-entry 1311 Inputs: submission: The base64 encoded certificate or 1312 precertificate. 1314 type: The "VersionedTransType" integer value that indicates 1315 the type of the "submission": 1 for "x509_entry_v2", or 2 for 1316 "precert_entry_v2". 1318 chain: An array of zero or more base64 encoded CA 1319 certificates. The first element is the certifier of the 1320 "submission"; the second certifies the first; etc. The last 1321 element of "chain" (or, if "chain" is an empty array, the 1322 "submission") is certified by an accepted trust anchor. 1324 Outputs: sct: A base64 encoded "TransItem" of type "x509_sct_v2" or 1325 "precert_sct_v2", signed by this log, that corresponds to the 1326 "submission". 1328 If the submitted entry is immediately appended to (or already 1329 exists in) this log's tree, then the log SHOULD also output: 1331 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1332 signed by this log. 1334 inclusion: A base64 encoded "TransItem" of type 1335 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1336 Tree nodes proves the inclusion of the "submission" in the 1337 returned "sth". 1339 Error codes: 1341 +================+==============================================+ 1342 | type | detail | 1343 +================+==============================================+ 1344 | badSubmission | "submission" is neither a valid certificate | 1345 | | nor a valid precertificate. | 1346 +----------------+----------------------------------------------+ 1347 | badType | "type" is neither 1 nor 2. | 1348 +----------------+----------------------------------------------+ 1349 | badChain | The first element of "chain" is not the | 1350 | | certifier of the "submission", or the second | 1351 | | element does not certify the first, etc. | 1352 +----------------+----------------------------------------------+ 1353 | badCertificate | One or more certificates in the "chain" are | 1354 | | not valid (e.g., not properly encoded). | 1355 +----------------+----------------------------------------------+ 1356 | unknownAnchor | The last element of "chain" (or, if "chain" | 1357 | | is an empty array, the "submission") both is | 1358 | | not, and is not certified by, an accepted | 1359 | | trust anchor. | 1360 +----------------+----------------------------------------------+ 1361 | shutdown | The log is no longer accepting submissions. | 1362 +----------------+----------------------------------------------+ 1364 Table 2 1366 If the version of "sct" is not v2, then a v2 client may be unable to 1367 verify the signature. It MUST NOT construe this as an error. This 1368 is to avoid forcing an upgrade of compliant v2 clients that do not 1369 use the returned SCTs. 1371 If a log detects bad encoding in a chain that otherwise verifies 1372 correctly then the log MUST either log the certificate or return the 1373 "bad certificate" error. If the certificate is logged, an SCT MUST 1374 be issued. Logging the certificate is useful, because monitors 1375 (Section 8.2) can then detect these encoding errors, which may be 1376 accepted by some TLS clients. 1378 If "submission" is an accepted trust anchor whose certifier is 1379 neither an accepted trust anchor nor the first element of "chain", 1380 then the log MUST return the "unknown anchor" error. A log cannot 1381 generate an SCT for a submission if it does not have access to the 1382 issuer's public key. 1384 If the returned "sct" is intended to be provided to TLS clients, then 1385 "sth" and "inclusion" (if returned) SHOULD also be provided to TLS 1386 clients (e.g., if "type" was 2 (for "precert_sct_v2") then all three 1387 "TransItem"s could be embedded in the certificate). 1389 5.2. Retrieve Latest Signed Tree Head 1391 GET /ct/v2/get-sth 1393 No inputs. 1395 Outputs: sth: A base64 encoded "TransItem" of type 1396 "signed_tree_head_v2", signed by this log, that is no older 1397 than the log's MMD. 1399 5.3. Retrieve Merkle Consistency Proof between Two Signed Tree Heads 1401 GET /ct/v2/get-sth-consistency 1403 Inputs: first: The tree_size of the older tree, in decimal. 1405 second: The tree_size of the newer tree, in decimal 1406 (optional). 1408 Both tree sizes must be from existing v2 STHs. However, because 1409 of skew, the receiving front-end may not know one or both of the 1410 existing STHs. If both are known, then only the "consistency" 1411 output is returned. If the first is known but the second is not 1412 (or has been omitted), then the latest known STH is returned, 1413 along with a consistency proof between the first STH and the 1414 latest. If neither are known, then the latest known STH is 1415 returned without a consistency proof. 1417 Outputs: consistency: A base64 encoded "TransItem" of type 1418 "consistency_proof_v2", whose "tree_size_1" MUST match the 1419 "first" input. If the "sth" output is omitted, then 1420 "tree_size_2" MUST match the "second" input. If "first" and 1421 "second" are equal and correspond to a known STH, the returned 1422 consistency proof MUST be empty (a "consistency_path" array 1423 with zero elements). 1425 sth: A base64 encoded "TransItem" of type 1426 "signed_tree_head_v2", signed by this log. 1428 Note that no signature is required for the "consistency" output as 1429 it is used to verify the consistency between two STHs, which are 1430 signed. 1432 Error codes: 1434 +===================+======================================+ 1435 | type | detail | 1436 +===================+======================================+ 1437 | firstUnknown | "first" is before the latest known | 1438 | | STH but is not from an existing STH. | 1439 +-------------------+--------------------------------------+ 1440 | secondUnknown | "second" is before the latest known | 1441 | | STH but is not from an existing STH. | 1442 +-------------------+--------------------------------------+ 1443 | secondBeforeFirst | "second" is smaller than "first". | 1444 +-------------------+--------------------------------------+ 1446 Table 3 1448 See Section 2.1.4.2 for an outline of how to use the "consistency" 1449 output. 1451 5.4. Retrieve Merkle Inclusion Proof from Log by Leaf Hash 1453 GET /ct/v2/get-proof-by-hash 1455 Inputs: hash: A base64 encoded v2 leaf hash. 1457 tree_size: The tree_size of the tree on which to base the 1458 proof, in decimal. 1460 The "hash" must be calculated as defined in Section 4.7. The 1461 "tree_size" must designate an existing v2 STH. Because of skew, 1462 the front-end may not know the requested STH. In that case, it 1463 will return the latest STH it knows, along with an inclusion proof 1464 to that STH. If the front-end knows the requested STH then only 1465 "inclusion" is returned. 1467 Outputs: inclusion: A base64 encoded "TransItem" of type 1468 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1469 Tree nodes proves the inclusion of the chosen certificate in 1470 the selected STH. 1472 sth: A base64 encoded "TransItem" of type 1473 "signed_tree_head_v2", signed by this log. 1475 Note that no signature is required for the "inclusion" output as 1476 it is used to verify inclusion in the selected STH, which is 1477 signed. 1479 Error codes: 1481 +=================+=====================================+ 1482 | type | detail | 1483 +=================+=====================================+ 1484 | hashUnknown | "hash" is not the hash of a known | 1485 | | leaf (may be caused by skew or by a | 1486 | | known certificate not yet merged). | 1487 +-----------------+-------------------------------------+ 1488 | treeSizeUnknown | "hash" is before the latest known | 1489 | | STH but is not from an existing | 1490 | | STH. | 1491 +-----------------+-------------------------------------+ 1493 Table 4 1495 See Section 2.1.3.2 for an outline of how to use the "inclusion" 1496 output. 1498 5.5. Retrieve Merkle Inclusion Proof, Signed Tree Head and Consistency 1499 Proof by Leaf Hash 1501 GET /ct/v2/get-all-by-hash 1503 Inputs: hash: A base64 encoded v2 leaf hash. 1505 tree_size: The tree_size of the tree on which to base the 1506 proofs, in decimal. 1508 The "hash" must be calculated as defined in Section 4.7. The 1509 "tree_size" must designate an existing v2 STH. 1511 Because of skew, the front-end may not know the requested STH or the 1512 requested hash, which leads to a number of cases: 1514 +================+=====================================+ 1515 | Case | Response | 1516 +================+=====================================+ 1517 | latest STH < | Return latest STH | 1518 | requested STH | | 1519 +----------------+-------------------------------------+ 1520 | latest STH > | Return latest STH and a consistency | 1521 | requested STH | proof between it and the requested | 1522 | | STH (see Section 5.3) | 1523 +----------------+-------------------------------------+ 1524 | index of | Return "inclusion" | 1525 | requested hash | | 1526 | < latest STH | | 1527 +----------------+-------------------------------------+ 1529 Table 5 1531 Note that more than one case can be true, in which case the returned 1532 data is their union. It is also possible for none to be true, in 1533 which case the front-end MUST return an empty response. 1535 Outputs: inclusion: A base64 encoded "TransItem" of type 1536 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1537 Tree nodes proves the inclusion of the chosen certificate in 1538 the returned STH. 1540 sth: A base64 encoded "TransItem" of type 1541 "signed_tree_head_v2", signed by this log. 1543 consistency: A base64 encoded "TransItem" of type 1544 "consistency_proof_v2" that proves the consistency of the 1545 requested STH and the returned STH. 1547 Note that no signature is required for the "inclusion" or 1548 "consistency" outputs as they are used to verify inclusion in and 1549 consistency of STHs, which are signed. 1551 Errors are the same as in Section 5.4. 1553 See Section 2.1.3.2 for an outline of how to use the "inclusion" 1554 output, and see Section 2.1.4.2 for an outline of how to use the 1555 "consistency" output. 1557 5.6. Retrieve Entries and STH from Log 1559 GET /ct/v2/get-entries 1561 Inputs: start: 0-based index of first entry to retrieve, in 1562 decimal. 1564 end: 0-based index of last entry to retrieve, in decimal. 1566 Outputs: entries: An array of objects, each consisting of 1568 log_entry: The base64 encoded "TransItem" structure of type 1569 "x509_entry_v2" or "precert_entry_v2" (see Section 4.3). 1571 submitted_entry: JSON object representing the inputs that were 1572 submitted to "submit-entry", with the addition of the trust 1573 anchor to the "chain" field if the submission did not 1574 include it. 1576 sct: The base64 encoded "TransItem" of type "x509_sct_v2" or 1577 "precert_sct_v2" corresponding to this log entry. 1579 sth: A base64 encoded "TransItem" of type 1580 "signed_tree_head_v2", signed by this log. 1582 Note that this message is not signed -- the "entries" data can be 1583 verified by constructing the Merkle Tree Hash corresponding to a 1584 retrieved STH. All leaves MUST be v2. However, a compliant v2 1585 client MUST NOT construe an unrecognized TransItem type as an error. 1586 This means it may be unable to parse some entries, but note that each 1587 client can inspect the entries it does recognize as well as verify 1588 the integrity of the data by treating unrecognized leaves as opaque 1589 input to the tree. 1591 The "start" and "end" parameters SHOULD be within the range 0 <= x < 1592 "tree_size" as returned by "get-sth" in Section 5.2. 1594 The "start" parameter MUST be less than or equal to the "end" 1595 parameter. 1597 Each "submitted_entry" output parameter MUST include the trust anchor 1598 that the log used to verify the "submission", even if that trust 1599 anchor was not provided to "submit-entry" (see Section 5.1). If the 1600 "submission" does not certify itself, then the first element of 1601 "chain" MUST be present and MUST certify the "submission". 1603 Log servers MUST honor requests where 0 <= "start" < "tree_size" and 1604 "end" >= "tree_size" by returning a partial response covering only 1605 the valid entries in the specified range. "end" >= "tree_size" could 1606 be caused by skew. Note that the following restriction may also 1607 apply: 1609 Logs MAY restrict the number of entries that can be retrieved per 1610 "get-entries" request. If a client requests more than the permitted 1611 number of entries, the log SHALL return the maximum number of entries 1612 permissible. These entries SHALL be sequential beginning with the 1613 entry specified by "start". 1615 Because of skew, it is possible the log server will not have any 1616 entries between "start" and "end". In this case it MUST return an 1617 empty "entries" array. 1619 In any case, the log server MUST return the latest STH it knows 1620 about. 1622 See Section 2.1.2 for an outline of how to use a complete list of 1623 "log_entry" entries to verify the "root_hash". 1625 Error codes: 1627 +================+====================================+ 1628 | type | detail | 1629 +================+====================================+ 1630 | startUnknown | "start" is greater than the number | 1631 | | of entries in the Merkle tree. | 1632 +----------------+------------------------------------+ 1633 | endBeforeStart | "start" cannot be greater than | 1634 | | "end". | 1635 +----------------+------------------------------------+ 1637 Table 6 1639 5.7. Retrieve Accepted Trust Anchors 1641 GET /ct/v2/get-anchors 1643 No inputs. 1645 Outputs: certificates: An array of base64 encoded trust anchors 1646 that are acceptable to the log. 1648 max_chain_length: If the server has chosen to limit the 1649 length of chains it accepts, this is the maximum number of 1650 certificates in the chain, in decimal. If there is no limit, 1651 this is omitted. 1653 6. TLS Servers 1655 CT-using TLS servers MUST use at least one of the mechanisms 1656 described below to present one or more SCTs from one or more logs to 1657 each TLS client during full TLS handshakes, where each SCT 1658 corresponds to the server certificate. They SHOULD also present 1659 corresponding inclusion proofs and STHs. 1661 A server can provide SCTs using a TLS 1.3 extension (Section 4.2 of 1662 [RFC8446]) with type "transparency_info" (see Section 6.5). This 1663 mechanism allows TLS servers to participate in CT without the 1664 cooperation of CAs, unlike the other two mechanisms. It also allows 1665 SCTs and inclusion proofs to be updated on the fly. 1667 The server may also use an Online Certificate Status Protocol (OCSP) 1668 [RFC6960] response extension (see Section 7.1.1), providing the OCSP 1669 response as part of the TLS handshake. Providing a response during a 1670 TLS handshake is popularly known as "OCSP stapling." For TLS 1.3, 1671 the information is encoded as an extension in the "status_request" 1672 extension data; see Section 4.4.2.1 of [RFC8446]. For TLS 1.2, the 1673 information is encoded as an extension in the "CertificateStatus" 1674 message; see Section 8 of [RFC6066]. Using stapling also allows SCTs 1675 and inclusion proofs to be updated on the fly. 1677 CT information can also be encoded as an extension in the X.509v3 1678 certificate (see Section 7.1.2). This mechanism allows the use of 1679 unmodified TLS servers, but the SCTs and inclusion proofs cannot be 1680 updated on the fly. Since the logs from which the SCTs and inclusion 1681 proofs originated won't necessarily be accepted by TLS clients for 1682 the full lifetime of the certificate, there is a risk that TLS 1683 clients may subsequently consider the certificate to be non-compliant 1684 and in need of re-issuance or the use of one of the other two methods 1685 for delivering CT information. 1687 6.1. TLS Client Authentication 1689 This specification includes no description of how a TLS server can 1690 use CT for TLS client certificates. While this may be useful, it is 1691 not documented here for the following reasons: 1693 * The greater security exposure is for clients to end up interacting 1694 with an illegitimate server. 1696 * In general, TLS client certificates are not expected to be 1697 submitted to CT logs, particularly those intended for general 1698 public use. 1700 A future version could include such information. 1702 6.2. Multiple SCTs 1704 CT-using TLS servers SHOULD send SCTs from multiple logs, because: 1706 * One or more logs may not have become acceptable to all CT-using 1707 TLS clients. 1709 * If a CA and a log collude, it is possible to temporarily hide 1710 misissuance from clients. When a TLS client requires SCTs from 1711 multiple logs to be provided, it is more difficult to mount this 1712 attack. 1714 * If a log misbehaves or suffers a key compromise, a consequence may 1715 be that clients cease to trust it. Since the time an SCT may be 1716 in use can be considerable (several years is common in current 1717 practice when embedded in a certificate), including SCTs from 1718 multiple logs reduces the probability of the certificate being 1719 rejected by TLS clients. 1721 * TLS clients may have policies related to the above risks requiring 1722 TLS servers to present multiple SCTs. For example, at the time of 1723 writing, Chromium [Chromium.Log.Policy] requires multiple SCTs to 1724 be presented with EV certificates in order for the EV indicator to 1725 be shown. 1727 To select the logs from which to obtain SCTs, a TLS server can, for 1728 example, examine the set of logs popular TLS clients accept and 1729 recognize. 1731 6.3. TransItemList Structure 1733 Multiple SCTs, inclusion proofs, and indeed "TransItem" structures of 1734 any type, are combined into a list as follows: 1736 opaque SerializedTransItem<1..2^16-1>; 1738 struct { 1739 SerializedTransItem trans_item_list<1..2^16-1>; 1740 } TransItemList; 1742 Here, "SerializedTransItem" is an opaque byte string that contains 1743 the serialized "TransItem" structure. This encoding ensures that TLS 1744 clients can decode each "TransItem" individually (so, for example, if 1745 there is a version upgrade, out-of-date clients can still parse old 1746 "TransItem" structures while skipping over new "TransItem" structures 1747 whose versions they don't understand). 1749 6.4. Presenting SCTs, inclusions proofs and STHs 1751 In each "TransItemList" that is sent to a client during a TLS 1752 handshake, the TLS server MUST include a "TransItem" structure of 1753 type "x509_sct_v2" or "precert_sct_v2". 1755 Presenting inclusion proofs and STHs in the TLS handshake helps to 1756 protect the client's privacy (see Section 8.1.4) and reduces load on 1757 log servers. Therefore, if the TLS server can obtain them, it SHOULD 1758 also include "TransItem"s of type "inclusion_proof_v2" and 1759 "signed_tree_head_v2" in the "TransItemList". 1761 6.5. transparency_info TLS Extension 1763 Provided that a TLS client includes the "transparency_info" extension 1764 type in the ClientHello and the TLS server supports the 1765 "transparency_info" extension: 1767 * The TLS server MUST verify that the received "extension_data" is 1768 empty. 1770 * The TLS server MUST construct a "TransItemList" of relevant 1771 "TransItem"s (see Section 6.4), which SHOULD omit any "TransItem"s 1772 that are already embedded in the server certificate or the stapled 1773 OCSP response (see Section 7.1). If the constructed 1774 "TransItemList" is not empty, then the TLS server MUST include the 1775 "transparency_info" extension with the "extension_data" set to 1776 this "TransItemList". 1778 TLS servers MUST only include this extension in the following 1779 messages: 1781 * the ServerHello message (for TLS 1.2 or earlier). 1783 * the Certificate or CertificateRequest message (for TLS 1.3). 1785 TLS servers MUST NOT process or include this extension when a TLS 1786 session is resumed, since session resumption uses the original 1787 session information. 1789 7. Certification Authorities 1790 7.1. Transparency Information X.509v3 Extension 1792 The Transparency Information X.509v3 extension, which has OID 1793 1.3.101.75 and SHOULD be non-critical, contains one or more 1794 "TransItem" structures in a "TransItemList". This extension MAY be 1795 included in OCSP responses (see Section 7.1.1) and certificates (see 1796 Section 7.1.2). Since RFC5280 requires the "extnValue" field (an 1797 OCTET STRING) of each X.509v3 extension to include the DER encoding 1798 of an ASN.1 value, a "TransItemList" MUST NOT be included directly. 1799 Instead, it MUST be wrapped inside an additional OCTET STRING, which 1800 is then put into the "extnValue" field: 1802 TransparencyInformationSyntax ::= OCTET STRING 1804 "TransparencyInformationSyntax" contains a "TransItemList". 1806 7.1.1. OCSP Response Extension 1808 A certification authority MAY include a Transparency Information 1809 X.509v3 extension in the "singleExtensions" of a "SingleResponse" in 1810 an OCSP response. All included SCTs and inclusion proofs MUST be for 1811 the certificate identified by the "certID" of that "SingleResponse", 1812 or for a precertificate that corresponds to that certificate. 1814 7.1.2. Certificate Extension 1816 A certification authority MAY include a Transparency Information 1817 X.509v3 extension in a certificate. All included SCTs and inclusion 1818 proofs MUST be for a precertificate that corresponds to this 1819 certificate. 1821 7.2. TLS Feature X.509v3 Extension 1823 A certification authority SHOULD NOT issue any certificate that 1824 identifies the "transparency_info" TLS extension in a TLS feature 1825 extension [RFC7633], because TLS servers are not required to support 1826 the "transparency_info" TLS extension in order to participate in CT 1827 (see Section 6). 1829 8. Clients 1831 There are various different functions clients of logs might perform. 1832 We describe here some typical clients and how they should function. 1833 Any inconsistency may be used as evidence that a log has not behaved 1834 correctly, and the signatures on the data structures prevent the log 1835 from denying that misbehavior. 1837 All clients need various parameters in order to communicate with logs 1838 and verify their responses. These parameters are described in 1839 Section 4.1, but note that this document does not describe how the 1840 parameters are obtained, which is implementation-dependent (see, for 1841 example, [Chromium.Policy]). 1843 8.1. TLS Client 1845 8.1.1. Receiving SCTs and inclusion proofs 1847 TLS clients receive SCTs and inclusion proofs alongside or in 1848 certificates. CT-using TLS clients MUST implement all of the three 1849 mechanisms by which TLS servers may present SCTs (see Section 6). 1851 TLS clients that support the "transparency_info" TLS extension (see 1852 Section 6.5) SHOULD include it in ClientHello messages, with empty 1853 "extension_data". If a TLS server includes the "transparency_info" 1854 TLS extension when resuming a TLS session, the TLS client MUST abort 1855 the handshake. 1857 8.1.2. Reconstructing the TBSCertificate 1859 Validation of an SCT for a certificate (where the "type" of the 1860 "TransItem" is "x509_sct_v2") uses the unmodified TBSCertificate 1861 component of the certificate. 1863 Before an SCT for a precertificate (where the "type" of the 1864 "TransItem" is "precert_sct_v2") can be validated, the TBSCertificate 1865 component of the precertificate needs to be reconstructed from the 1866 TBSCertificate component of the certificate as follows: 1868 * Remove the Transparency Information extension (see Section 7.1). 1870 * Remove embedded v1 SCTs, identified by OID 1.3.6.1.4.1.11129.2.4.2 1871 (see section 3.3 of [RFC6962]). This allows embedded v1 and v2 1872 SCTs to co-exist in a certificate (see Appendix A). 1874 8.1.3. Validating SCTs 1876 In order to make use of a received SCT, the TLS client MUST first 1877 validate it as follows: 1879 * Compute the signature input by constructing a "TransItem" of type 1880 "x509_entry_v2" or "precert_entry_v2", depending on the SCT's 1881 "TransItem" type. The "TimestampedCertificateEntryDataV2" 1882 structure is constructed in the following manner: 1884 - "timestamp" is copied from the SCT. 1886 - "tbs_certificate" is the reconstructed TBSCertificate portion 1887 of the server certificate, as described in Section 8.1.2. 1889 - "issuer_key_hash" is computed as described in Section 4.7. 1891 - "sct_extensions" is copied from the SCT. 1893 * Verify the SCT's "signature" against the computed signature input 1894 using the public key of the corresponding log, which is identified 1895 by the "log_id". The required signature algorithm is one of the 1896 log's parameters. 1898 If the TLS client does not have the corresponding log's parameters, 1899 it cannot attempt to validate the SCT. When evaluating compliance 1900 (see Section 8.1.6), the TLS client will consider only those SCTs 1901 that it was able to validate. 1903 Note that SCT validation is not a substitute for the normal 1904 validation of the server certificate and its chain. 1906 8.1.4. Fetching inclusion proofs 1908 When a TLS client has validated a received SCT but does not yet 1909 possess a corresponding inclusion proof, the TLS client MAY request 1910 the inclusion proof directly from a log using "get-proof-by-hash" 1911 (Section 5.4) or "get-all-by-hash" (Section 5.5). 1913 Note that fetching inclusion proofs directly from a log will disclose 1914 to the log which TLS server the client has been communicating with. 1915 This may be regarded as a significant privacy concern, and so it is 1916 preferable for the TLS server to send the inclusion proofs (see 1917 Section 6.4). 1919 8.1.5. Validating inclusion proofs 1921 When a TLS client has received, or fetched, an inclusion proof (and 1922 an STH), it SHOULD proceed to verifying the inclusion proof to the 1923 provided STH. The TLS client SHOULD also verify consistency between 1924 the provided STH and an STH it knows about. 1926 If the TLS client holds an STH that predates the SCT, it MAY, in the 1927 process of auditing, request a new STH from the log (Section 5.2), 1928 then verify it by requesting a consistency proof (Section 5.3). Note 1929 that if the TLS client uses "get-all-by-hash", then it will already 1930 have the new STH. 1932 8.1.6. Evaluating compliance 1934 It is up to a client's local policy to specify the quantity and form 1935 of evidence (SCTs, inclusion proofs or a combination) needed to 1936 achieve compliance and how to handle non-compliance. 1938 A TLS client can only evaluate compliance if it has given the TLS 1939 server the opportunity to send SCTs and inclusion proofs by any of 1940 the three mechanisms that are mandatory to implement for CT-using TLS 1941 clients (see Section 8.1.1). Therefore, a TLS client MUST NOT 1942 evaluate compliance if it did not include both the 1943 "transparency_info" and "status_request" TLS extensions in the 1944 ClientHello. 1946 8.2. Monitor 1948 Monitors watch logs to check that they behave correctly, for 1949 certificates of interest, or both. For example, a monitor may be 1950 configured to report on all certificates that apply to a specific 1951 domain name when fetching new entries for consistency validation. 1953 A monitor MUST at least inspect every new entry in every log it 1954 watches, and it MAY also choose to keep copies of entire logs. 1956 To inspect all of the existing entries, the monitor SHOULD follow 1957 these steps once for each log: 1959 1. Fetch the current STH (Section 5.2). 1961 2. Verify the STH signature. 1963 3. Fetch all the entries in the tree corresponding to the STH 1964 (Section 5.6). 1966 4. If applicable, check each entry to see if it's a certificate of 1967 interest. 1969 5. Confirm that the tree made from the fetched entries produces the 1970 same hash as that in the STH. 1972 To inspect new entries, the monitor SHOULD follow these steps 1973 repeatedly for each log: 1975 1. Fetch the current STH (Section 5.2). Repeat until the STH 1976 changes. 1978 2. Verify the STH signature. 1980 3. Fetch all the new entries in the tree corresponding to the STH 1981 (Section 5.6). If they remain unavailable for an extended 1982 period, then this should be viewed as misbehavior on the part of 1983 the log. 1985 4. If applicable, check each entry to see if it's a certificate of 1986 interest. 1988 5. Either: 1990 1. Verify that the updated list of all entries generates a tree 1991 with the same hash as the new STH. 1993 Or, if it is not keeping all log entries: 1995 1. Fetch a consistency proof for the new STH with the previous 1996 STH (Section 5.3). 1998 2. Verify the consistency proof. 2000 3. Verify that the new entries generate the corresponding 2001 elements in the consistency proof. 2003 6. Repeat from step 1. 2005 8.3. Auditing 2007 Auditing ensures that the current published state of a log is 2008 reachable from previously published states that are known to be good, 2009 and that the promises made by the log in the form of SCTs have been 2010 kept. Audits are performed by monitors or TLS clients. 2012 In particular, there are four log behavior properties that should be 2013 checked: 2015 * The Maximum Merge Delay (MMD). 2017 * The STH Frequency Count. 2019 * The append-only property. 2021 * The consistency of the log view presented to all query sources. 2023 A benign, conformant log publishes a series of STHs over time, each 2024 derived from the previous STH and the submitted entries incorporated 2025 into the log since publication of the previous STH. This can be 2026 proven through auditing of STHs. SCTs returned to TLS clients can be 2027 audited by verifying against the accompanying certificate, and using 2028 Merkle Inclusion Proofs, against the log's Merkle tree. 2030 The action taken by the auditor if an audit fails is not specified, 2031 but note that in general if audit fails, the auditor is in possession 2032 of signed proof of the log's misbehavior. 2034 A monitor (Section 8.2) can audit by verifying the consistency of 2035 STHs it receives, ensure that each entry can be fetched and that the 2036 STH is indeed the result of making a tree from all fetched entries. 2038 A TLS client (Section 8.1) can audit by verifying an SCT against any 2039 STH dated after the SCT timestamp + the Maximum Merge Delay by 2040 requesting a Merkle inclusion proof (Section 5.4). It can also 2041 verify that the SCT corresponds to the server certificate it arrived 2042 with (i.e., the log entry is that certificate, or is a precertificate 2043 corresponding to that certificate). 2045 Checking of the consistency of the log view presented to all entities 2046 is more difficult to perform because it requires a way to share log 2047 responses among a set of CT-using entities, and is discussed in 2048 Section 11.3. 2050 9. Algorithm Agility 2052 It is not possible for a log to change any of its algorithms part way 2053 through its lifetime: 2055 Signature algorithm: SCT signatures must remain valid so signature 2056 algorithms can only be added, not removed. 2058 Hash algorithm: A log would have to support the old and new hash 2059 algorithms to allow backwards-compatibility with clients that are 2060 not aware of a hash algorithm change. 2062 Allowing multiple signature or hash algorithms for a log would 2063 require that all data structures support it and would significantly 2064 complicate client implementation, which is why it is not supported by 2065 this document. 2067 If it should become necessary to deprecate an algorithm used by a 2068 live log, then the log MUST be frozen as specified in Section 4.13 2069 and a new log SHOULD be started. Certificates in the frozen log that 2070 have not yet expired and require new SCTs SHOULD be submitted to the 2071 new log and the SCTs from that log used instead. 2073 10. IANA Considerations 2075 The assignment policy criteria mentioned in this section refer to the 2076 policies outlined in [RFC8126]. 2078 10.1. New Entry to the TLS ExtensionType Registry 2080 IANA is asked to add an entry for "transparency_info(TBD)" to the 2081 "TLS ExtensionType Values" registry defined in [RFC8446], setting the 2082 "Recommended" value to "Y", setting the "TLS 1.3" value to "CH, CR, 2083 CT", and citing this document as the "Reference". 2085 10.2. Hash Algorithms 2087 IANA is asked to establish a registry of hash algorithm values, named 2088 "CT Hash Algorithms", that initially consists of: 2090 +========+============+========================+===================+ 2091 | Value | Hash | OID | Reference / | 2092 | | Algorithm | | Assignment Policy | 2093 +========+============+========================+===================+ 2094 | 0x00 | SHA-256 | 2.16.840.1.101.3.4.2.1 | [RFC6234] | 2095 +--------+------------+------------------------+-------------------+ 2096 | 0x01 - | Unassigned | | Specification | 2097 | 0xDF | | | Required | 2098 +--------+------------+------------------------+-------------------+ 2099 | 0xE0 - | Reserved | | Experimental Use | 2100 | 0xEF | | | | 2101 +--------+------------+------------------------+-------------------+ 2102 | 0xF0 - | Reserved | | Private Use | 2103 | 0xFF | | | | 2104 +--------+------------+------------------------+-------------------+ 2106 Table 7 2108 10.2.1. Specification Required guidance 2110 The appointed Expert should ensure that the proposed algorithm has a 2111 public specification and is suitable for use as a cryptographic hash 2112 algorithm with no known preimage or collision attacks. These attacks 2113 can damage the integrity of the log. 2115 10.3. Signature Algorithms 2117 IANA is asked to establish a registry of signature algorithm values, 2118 named "CT Signature Algorithms", that initially consists of: 2120 +================================+==================+==============+ 2121 | SignatureScheme Value | Signature | Reference / | 2122 | | Algorithm | Assignment | 2123 | | | Policy | 2124 +================================+==================+==============+ 2125 | 0x0000 - 0x0402 | Unassigned | Expert | 2126 | | | Review | 2127 +--------------------------------+------------------+--------------+ 2128 | ecdsa_secp256r1_sha256(0x0403) | ECDSA (NIST | [FIPS186-4] | 2129 | | P-256) with | | 2130 | | SHA-256 | | 2131 +--------------------------------+------------------+--------------+ 2132 | ecdsa_secp256r1_sha256(0x0403) | Deterministic | [RFC6979] | 2133 | | ECDSA (NIST | | 2134 | | P-256) with | | 2135 | | HMAC-SHA256 | | 2136 +--------------------------------+------------------+--------------+ 2137 | 0x0404 - 0x0806 | Unassigned | Expert | 2138 | | | Review | 2139 +--------------------------------+------------------+--------------+ 2140 | ed25519(0x0807) | Ed25519 | [RFC8032] | 2141 | | (PureEdDSA with | | 2142 | | the edwards25519 | | 2143 | | curve) | | 2144 +--------------------------------+------------------+--------------+ 2145 | 0x0808 - 0xFDFF | Unassigned | Expert | 2146 | | | Review | 2147 +--------------------------------+------------------+--------------+ 2148 | 0xFE00 - 0xFEFF | Reserved | Experimental | 2149 | | | Use | 2150 +--------------------------------+------------------+--------------+ 2151 | 0xFF00 - 0xFFFF | Reserved | Private Use | 2152 +--------------------------------+------------------+--------------+ 2154 Table 8 2156 10.3.1. Expert Review guidelines 2158 The appointed Expert should ensure that the proposed algorithm has a 2159 public specification, has a value assigned to it in the TLS 2160 SignatureScheme Registry (that IANA is asked to establish in 2161 [RFC8446]) and is suitable for use as a cryptographic signature 2162 algorithm. 2164 10.4. VersionedTransTypes 2166 IANA is asked to establish a registry of "VersionedTransType" values, 2167 named "CT VersionedTransTypes", that initially consists of: 2169 +==========+======================+===============================+ 2170 | Value | Type and Version | Reference / Assignment Policy | 2171 +==========+======================+===============================+ 2172 | 0x0000 | Reserved | [RFC6962] * | 2173 +----------+----------------------+-------------------------------+ 2174 | 0x0001 | x509_entry_v2 | RFCXXXX | 2175 +----------+----------------------+-------------------------------+ 2176 | 0x0002 | precert_entry_v2 | RFCXXXX | 2177 +----------+----------------------+-------------------------------+ 2178 | 0x0003 | x509_sct_v2 | RFCXXXX | 2179 +----------+----------------------+-------------------------------+ 2180 | 0x0004 | precert_sct_v2 | RFCXXXX | 2181 +----------+----------------------+-------------------------------+ 2182 | 0x0005 | signed_tree_head_v2 | RFCXXXX | 2183 +----------+----------------------+-------------------------------+ 2184 | 0x0006 | consistency_proof_v2 | RFCXXXX | 2185 +----------+----------------------+-------------------------------+ 2186 | 0x0007 | inclusion_proof_v2 | RFCXXXX | 2187 +----------+----------------------+-------------------------------+ 2188 | 0x0008 - | Unassigned | Specification Required | 2189 | 0xDFFF | | | 2190 +----------+----------------------+-------------------------------+ 2191 | 0xE000 - | Reserved | Experimental Use | 2192 | 0xEFFF | | | 2193 +----------+----------------------+-------------------------------+ 2194 | 0xF000 - | Reserved | Private Use | 2195 | 0xFFFF | | | 2196 +----------+----------------------+-------------------------------+ 2198 Table 9 2200 * The 0x0000 value is reserved so that v1 SCTs are distinguishable 2201 from v2 SCTs and other "TransItem" structures. 2203 [RFC Editor: please update 'RFCXXXX' to refer to this document, once 2204 its RFC number is known through the document.] 2206 10.4.1. Specification Required guidance 2208 The appointed Expert should review the public specification to ensure 2209 that it is detailed enough to ensure implementation interoperability. 2211 10.5. Log Artifact Extension Registry 2213 IANA is asked to establish a registry of "ExtensionType" values, 2214 named "CT Log Artifact Extensions", that initially consists of: 2216 +===============+============+=====+===============================+ 2217 | ExtensionType | Status | Use | Reference / Assignment Policy | 2218 +===============+============+=====+===============================+ 2219 | 0x0000 - | Unassigned | n/a | Specification Required | 2220 | 0xDFFF | | | | 2221 +---------------+------------+-----+-------------------------------+ 2222 | 0xE000 - | Reserved | n/a | Experimental Use | 2223 | 0xEFFF | | | | 2224 +---------------+------------+-----+-------------------------------+ 2225 | 0xF000 - | Reserved | n/a | Private Use | 2226 | 0xFFFF | | | | 2227 +---------------+------------+-----+-------------------------------+ 2229 Table 10 2231 The "Use" column should contain one or both of the following values: 2233 * "SCT", for extensions specified for use in Signed Certificate 2234 Timestamps. 2236 * "STH", for extensions specified for use in Signed Tree Heads. 2238 10.5.1. Specification Required guidance 2240 The appointed Expert should review the public specification to ensure 2241 that it is detailed enough to ensure implementation interoperability. 2242 The Expert should also verify that the extension is appropriate to 2243 the contexts in which it is specified to be used (SCT, STH, or both). 2245 10.6. Object Identifiers 2247 This document uses object identifiers (OIDs) to identify Log IDs (see 2248 Section 4.4), the precertificate CMS "eContentType" (see 2249 Section 3.2), and X.509v3 extensions in certificates (see 2250 Section 7.1.2) and OCSP responses (see Section 7.1.1). The OIDs are 2251 defined in an arc that was selected due to its short encoding. 2253 10.6.1. Log ID Registry 2255 IANA is asked to establish a registry of Log IDs, named "CT Log ID 2256 Registry", that initially consists of: 2258 +================+==============+==============+===================+ 2259 | Log ID | Log Base URL | Log Operator | Reference / | 2260 | | | | Assignment Policy | 2261 +================+==============+==============+===================+ 2262 | 1.3.101.8192 - | Unassigned | Unassigned | First Come First | 2263 | 1.3.101.16383 | | | Served | 2264 +----------------+--------------+--------------+-------------------+ 2265 | 1.3.101.80.0 - | Unassigned | Unassigned | First Come First | 2266 | 1.3.101.80.* | | | Served | 2267 +----------------+--------------+--------------+-------------------+ 2269 Table 11 2271 All OIDs in the range from 1.3.101.8192 to 1.3.101.16383 have been 2272 reserved. This is a limited resource of 8,192 OIDs, each of which 2273 has an encoded length of 4 octets. 2275 The 1.3.101.80 arc has been delegated. This is an unlimited 2276 resource, but only the 128 OIDs from 1.3.101.80.0 to 1.3.101.80.127 2277 have an encoded length of only 4 octets. 2279 Each application for the allocation of a Log ID MUST be accompanied 2280 by: 2282 * the Log's Base URL (see Section 4.1). 2284 * the Log Operator's contact details. 2286 IANA is asked to reject any request to update a Log ID or Log Base 2287 URL in this registry, because these fields are immutable (see 2288 Section 4.1). 2290 IANA is asked to accept requests from log operators to update their 2291 contact details in this registry. 2293 Since log operators can choose to not use this registry (see 2294 Section 4.4), it is not expected to be a global directory of all 2295 logs. 2297 10.7. URN Sub-namespace for TRANS errors (urn:ietf:params:trans:error) 2299 IANA is requested to add a new entry in the "IETF URN Sub-namespace 2300 for Registered Protocol Parameter Identifiers" registry, following 2301 the template in [RFC3553]: 2303 Registry name: trans:error 2305 Specification: RFCXXXX 2306 Repository: https://www.iana.org/assignments/trans 2308 Index value: No transformation needed. 2310 10.7.1. TRANS Error Types 2312 IANA is requested to create a new registry for errors. Requirements 2313 for this registry are Specification Required. 2315 This registry should have the following three fields: 2317 +============+========+===========+ 2318 | Field Name | Type | Reference | 2319 +============+========+===========+ 2320 | identifier | string | RFCXXXX | 2321 +------------+--------+-----------+ 2322 | meaning | string | RFCXXXX | 2323 +------------+--------+-----------+ 2324 | reference | string | RFCXXXX | 2325 +------------+--------+-----------+ 2327 Table 12 2329 The initial values are as follows, taken from the text above: 2331 +===================+===============================+===========+ 2332 | Identifier | Meaning | Reference | 2333 +===================+===============================+===========+ 2334 | malformed | The request could not be | RFCXXXX | 2335 | | parsed. | | 2336 +-------------------+-------------------------------+-----------+ 2337 | badSubmission | "submission" is neither a | RFCXXXX | 2338 | | valid certificate nor a valid | | 2339 | | precertificate | | 2340 +-------------------+-------------------------------+-----------+ 2341 | badType | "type" is neither 1 nor 2 | RFCXXXX | 2342 +-------------------+-------------------------------+-----------+ 2343 | badChain | The first element of "chain" | RFCXXXX | 2344 | | is not the certifier of the | | 2345 | | "submission", or the second | | 2346 | | element does not certify the | | 2347 | | first, etc. | | 2348 +-------------------+-------------------------------+-----------+ 2349 | badCertificate | One or more certificates in | RFCXXXX | 2350 | | the "chain" are not valid | | 2351 | | (e.g., not properly encoded) | | 2352 +-------------------+-------------------------------+-----------+ 2353 | unknownAnchor | The last element of "chain" | RFCXXXX | 2354 | | (or, if "chain" is an empty | | 2355 | | array, the "submission") both | | 2356 | | is not, and is not certified | | 2357 | | by, an accepted trust anchor | | 2358 +-------------------+-------------------------------+-----------+ 2359 | shutdown | The log is no longer | RFCXXXX | 2360 | | accepting submissions | | 2361 +-------------------+-------------------------------+-----------+ 2362 | firstUnknown | "first" is before the latest | RFCXXXX | 2363 | | known STH but is not from an | | 2364 | | existing STH. | | 2365 +-------------------+-------------------------------+-----------+ 2366 | secondUnknown | "second" is before the latest | RFCXXXX | 2367 | | known STH but is not from an | | 2368 | | existing STH. | | 2369 +-------------------+-------------------------------+-----------+ 2370 | secondBeforeFirst | "second" is smaller than | RFCXXXX | 2371 | | "first". | | 2372 +-------------------+-------------------------------+-----------+ 2373 | hashUnknown | "hash" is not the hash of a | RFCXXXX | 2374 | | known leaf (may be caused by | | 2375 | | skew or by a known | | 2376 | | certificate not yet merged). | | 2377 +-------------------+-------------------------------+-----------+ 2378 | treeSizeUnknown | "hash" is before the latest | RFCXXXX | 2379 | | known STH but is not from an | | 2380 | | existing STH. | | 2381 +-------------------+-------------------------------+-----------+ 2382 | startUnknown | "start" is greater than the | RFCXXXX | 2383 | | number of entries in the | | 2384 | | Merkle tree. | | 2385 +-------------------+-------------------------------+-----------+ 2386 | endBeforeStart | "start" cannot be greater | RFCXXXX | 2387 | | than "end". | | 2388 +-------------------+-------------------------------+-----------+ 2390 Table 13 2392 11. Security Considerations 2394 With CAs, logs, and servers performing the actions described here, 2395 TLS clients can use logs and signed timestamps to reduce the 2396 likelihood that they will accept misissued certificates. If a server 2397 presents a valid signed timestamp for a certificate, then the client 2398 knows that a log has committed to publishing the certificate. From 2399 this, the client knows that monitors acting for the subject of the 2400 certificate have had some time to notice the misissuance and take 2401 some action, such as asking a CA to revoke a misissued certificate. 2403 A signed timestamp does not guarantee this though, since appropriate 2404 monitors might not have checked the logs or the CA might have refused 2405 to revoke the certificate. 2407 In addition, if TLS clients will not accept unlogged certificates, 2408 then site owners will have a greater incentive to submit certificates 2409 to logs, possibly with the assistance of their CA, increasing the 2410 overall transparency of the system. 2412 [I-D.ietf-trans-threat-analysis] provides a more detailed threat 2413 analysis of the Certificate Transparency architecture. 2415 11.1. Misissued Certificates 2417 Misissued certificates that have not been publicly logged, and thus 2418 do not have a valid SCT, are not considered compliant. Misissued 2419 certificates that do have an SCT from a log will appear in that 2420 public log within the Maximum Merge Delay, assuming the log is 2421 operating correctly. Since a log is allowed to serve an STH of any 2422 age up to the MMD, the maximum period of time during which a 2423 misissued certificate can be used without being available for audit 2424 is twice the MMD. 2426 11.2. Detection of Misissue 2428 The logs do not themselves detect misissued certificates; they rely 2429 instead on interested parties, such as domain owners, to monitor them 2430 and take corrective action when a misissue is detected. 2432 11.3. Misbehaving Logs 2434 A log can misbehave in several ways. Examples include: failing to 2435 incorporate a certificate with an SCT in the Merkle Tree within the 2436 MMD; presenting different, conflicting views of the Merkle Tree at 2437 different times and/or to different parties; issuing STHs too 2438 frequently; mutating the signature of a logged certificate; and 2439 failing to present a chain containing the certifier of a logged 2440 certificate. Such misbehavior is detectable and 2441 [I-D.ietf-trans-threat-analysis] provides more details on how this 2442 can be done. 2444 Violation of the MMD contract is detected by log clients requesting a 2445 Merkle inclusion proof (Section 5.4) for each observed SCT. These 2446 checks can be asynchronous and need only be done once per 2447 certificate. However, note that there may be privacy concerns (see 2448 Section 8.1.4). 2450 Violation of the append-only property or the STH issuance rate limit 2451 can be detected by clients comparing their instances of the Signed 2452 Tree Heads. There are various ways this could be done, for example 2453 via gossip (see [I-D.ietf-trans-gossip]) or peer-to-peer 2454 communications or by sending STHs to monitors (who could then 2455 directly check against their own copy of the relevant log). Proof of 2456 misbehavior in such cases would be: a series of STHs that were issued 2457 too closely together, proving violation of the STH issuance rate 2458 limit; or an STH with a root hash that does not match the one 2459 calculated from a copy of the log, proving violation of the append- 2460 only property. 2462 11.4. Preventing Tracking Clients 2464 Clients that gossip STHs or report back SCTs can be tracked or traced 2465 if a log produces multiple STHs or SCTs with the same timestamp and 2466 data but different signatures. Logs SHOULD mitigate this risk by 2467 either: 2469 * Using deterministic signature schemes, or 2471 * Producing no more than one SCT for each distinct submission and no 2472 more than one STH for each distinct tree_size. Each of these SCTs 2473 and STHs can be stored by the log and served to other clients that 2474 submit the same certificate or request the same STH. 2476 11.5. Multiple SCTs 2478 By requiring TLS servers to offer multiple SCTs, each from a 2479 different log, TLS clients reduce the effectiveness of an attack 2480 where a CA and a log collude (see Section 6.2). 2482 11.6. Leakage of DNS Information 2484 Malicious monitors can use logs to learn about the existence of 2485 domain names that might not otherwise be easy to discover. Some 2486 subdomain labels may reveal information about the service and 2487 software for which the subdomain is used, which in turn might 2488 facilitate targeted attacks. 2490 12. Acknowledgements 2492 The authors would like to thank Erwann Abelea, Robin Alden, Andrew 2493 Ayer, Richard Barnes, Al Cutter, David Drysdale, Francis Dupont, Adam 2494 Eijdenberg, Stephen Farrell, Daniel Kahn Gillmor, Paul Hadfield, Brad 2495 Hill, Jeff Hodges, Paul Hoffman, Jeffrey Hutzelman, Kat Joyce, 2496 Stephen Kent, SM, Alexey Melnikov, Linus Nordberg, Chris Palmer, 2497 Trevor Perrin, Pierre Phaneuf, Eric Rescorla, Rich Salz, Melinda 2498 Shore, Ryan Sleevi, Martin Smith, Carl Wallace and Paul Wouters for 2499 their valuable contributions. 2501 A big thank you to Symantec for kindly donating the OIDs from the 2502 1.3.101 arc that are used in this document. 2504 13. References 2506 13.1. Normative References 2508 [FIPS186-4] 2509 NIST, "FIPS PUB 186-4", 1 July 2013, 2510 . 2513 [HTML401] Raggett, D., Le Hors, A., and I. Jacobs, "HTML 4.01 2514 Specification", World Wide Web Consortium Recommendation 2515 REC-html401-19991224, 24 December 1999, 2516 . 2518 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2519 Requirement Levels", BCP 14, RFC 2119, 2520 DOI 10.17487/RFC2119, March 1997, 2521 . 2523 [RFC3553] Mealling, M., Masinter, L., Hardie, T., and G. Klyne, "An 2524 IETF URN Sub-namespace for Registered Protocol 2525 Parameters", BCP 73, RFC 3553, DOI 10.17487/RFC3553, June 2526 2003, . 2528 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 2529 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 2530 . 2532 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 2533 Housley, R., and W. Polk, "Internet X.509 Public Key 2534 Infrastructure Certificate and Certificate Revocation List 2535 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 2536 . 2538 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2539 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2540 . 2542 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 2543 Extensions: Extension Definitions", RFC 6066, 2544 DOI 10.17487/RFC6066, January 2011, 2545 . 2547 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 2548 Galperin, S., and C. Adams, "X.509 Internet Public Key 2549 Infrastructure Online Certificate Status Protocol - OCSP", 2550 RFC 6960, DOI 10.17487/RFC6960, June 2013, 2551 . 2553 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2554 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2555 DOI 10.17487/RFC7231, June 2014, 2556 . 2558 [RFC7633] Hallam-Baker, P., "X.509v3 Transport Layer Security (TLS) 2559 Feature Extension", RFC 7633, DOI 10.17487/RFC7633, 2560 October 2015, . 2562 [RFC7807] Nottingham, M. and E. Wilde, "Problem Details for HTTP 2563 APIs", RFC 7807, DOI 10.17487/RFC7807, March 2016, 2564 . 2566 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 2567 Signature Algorithm (EdDSA)", RFC 8032, 2568 DOI 10.17487/RFC8032, January 2017, 2569 . 2571 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2572 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2573 May 2017, . 2575 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2576 Interchange Format", STD 90, RFC 8259, 2577 DOI 10.17487/RFC8259, December 2017, 2578 . 2580 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 2581 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 2582 . 2584 [UNIXTIME] IEEE, "The Open Group Base Specifications Issue 7 IEEE Std 2585 1003.1-2008, 2016 Edition", n.d., 2586 . 2590 13.2. Informative References 2592 [Chromium.Log.Policy] 2593 The Chromium Projects, "Chromium Certificate Transparency 2594 Log Policy", 2014, . 2597 [Chromium.Policy] 2598 The Chromium Projects, "Chromium Certificate 2599 Transparency", 2014, . 2602 [CrosbyWallach] 2603 Crosby, S. and D. Wallach, "Efficient Data Structures for 2604 Tamper-Evident Logging", Proceedings of the 18th USENIX 2605 Security Symposium, Montreal, August 2009, 2606 . 2609 [I-D.ietf-trans-gossip] 2610 Nordberg, L., Gillmor, D. K., and T. Ritter, "Gossiping in 2611 CT", Work in Progress, Internet-Draft, draft-ietf-trans- 2612 gossip-05, 14 January 2018, 2613 . 2616 [I-D.ietf-trans-threat-analysis] 2617 Kent, S., "Attack and Threat Model for Certificate 2618 Transparency", Work in Progress, Internet-Draft, draft- 2619 ietf-trans-threat-analysis-16, 5 October 2018, 2620 . 2623 [JSON.Metadata] 2624 The Chromium Projects, "Chromium Log Metadata JSON 2625 Schema", 2014, . 2628 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 2629 (SHA and SHA-based HMAC and HKDF)", RFC 6234, 2630 DOI 10.17487/RFC6234, May 2011, 2631 . 2633 [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate 2634 Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013, 2635 . 2637 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 2638 Algorithm (DSA) and Elliptic Curve Digital Signature 2639 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2640 2013, . 2642 [RFC7320] Nottingham, M., "URI Design and Ownership", RFC 7320, 2643 DOI 10.17487/RFC7320, July 2014, 2644 . 2646 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2647 Writing an IANA Considerations Section in RFCs", BCP 26, 2648 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2649 . 2651 Appendix A. Supporting v1 and v2 simultaneously 2653 Certificate Transparency logs have to be either v1 (conforming to 2654 [RFC6962]) or v2 (conforming to this document), as the data 2655 structures are incompatible and so a v2 log could not issue a valid 2656 v1 SCT. 2658 CT clients, however, can support v1 and v2 SCTs, for the same 2659 certificate, simultaneously, as v1 SCTs are delivered in different 2660 TLS, X.509 and OCSP extensions than v2 SCTs. 2662 v1 and v2 SCTs for X.509 certificates can be validated independently. 2663 For precertificates, v2 SCTs should be embedded in the TBSCertificate 2664 before submission of the TBSCertificate (inside a v1 precertificate, 2665 as described in Section 3.1. of [RFC6962]) to a v1 log so that TLS 2666 clients conforming to [RFC6962] but not this document are oblivious 2667 to the embedded v2 SCTs. An issuer can follow these steps to produce 2668 an X.509 certificate with embedded v1 and v2 SCTs: 2670 * Create a CMS precertificate as described in Section 3.2 and submit 2671 it to v2 logs. 2673 * Embed the obtained v2 SCTs in the TBSCertificate, as described in 2674 Section 7.1.2. 2676 * Use that TBSCertificate to create a v1 precertificate, as 2677 described in Section 3.1. of [RFC6962] and submit it to v1 logs. 2679 * Embed the v1 SCTs in the TBSCertificate, as described in 2680 Section 3.3 of [RFC6962]. 2682 * Sign that TBSCertificate (which now contains v1 and v2 SCTs) to 2683 issue the final X.509 certificate. 2685 Authors' Addresses 2687 Ben Laurie 2688 Google UK Ltd. 2690 Email: benl@google.com 2692 Adam Langley 2693 Google Inc. 2695 Email: agl@google.com 2697 Emilia Kasper 2698 Google Switzerland GmbH 2700 Email: ekasper@google.com 2702 Eran Messeri 2703 Google UK Ltd. 2705 Email: eranm@google.com 2707 Rob Stradling 2708 Sectigo Ltd. 2710 Email: rob@sectigo.com