idnits 2.17.1 draft-ietf-trans-rfc6962-bis-31.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 (February 25, 2019) is 1880 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '0' on line 457 -- Looks like a reference, but probably isn't: '1' on line 457 -- Looks like a reference, but probably isn't: '7' on line 607 ** 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: August 29, 2019 Google 7 R. Stradling 8 Sectigo 9 February 25, 2019 11 Certificate Transparency Version 2.0 12 draft-ietf-trans-rfc6962-bis-31 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 August 29, 2019. 49 Copyright Notice 51 Copyright (c) 2019 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 56 (https://trustee.ietf.org/license-info) in effect on the date of 57 publication of this document. Please review these documents 58 carefully, as they describe your rights and restrictions with respect 59 to this document. Code Components extracted from this document must 60 include Simplified BSD License text as described in Section 4.e of 61 the Trust Legal Provisions and are provided without warranty as 62 described in the Simplified BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 67 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5 68 1.2. Data Structures . . . . . . . . . . . . . . . . . . . . . 5 69 1.3. Major Differences from CT 1.0 . . . . . . . . . . . . . . 5 70 2. Cryptographic Components . . . . . . . . . . . . . . . . . . 7 71 2.1. Merkle Hash Trees . . . . . . . . . . . . . . . . . . . . 7 72 2.1.1. Definition of the Merkle Tree . . . . . . . . . . . . 7 73 2.1.2. Verifying a Tree Head Given Entries . . . . . . . . . 8 74 2.1.3. Merkle Inclusion Proofs . . . . . . . . . . . . . . . 8 75 2.1.4. Merkle Consistency Proofs . . . . . . . . . . . . . . 10 76 2.1.5. Example . . . . . . . . . . . . . . . . . . . . . . . 12 77 2.2. Signatures . . . . . . . . . . . . . . . . . . . . . . . 13 78 3. Submitters . . . . . . . . . . . . . . . . . . . . . . . . . 13 79 3.1. Certificates . . . . . . . . . . . . . . . . . . . . . . 14 80 3.2. Precertificates . . . . . . . . . . . . . . . . . . . . . 14 81 4. Log Format and Operation . . . . . . . . . . . . . . . . . . 15 82 4.1. Log Parameters . . . . . . . . . . . . . . . . . . . . . 16 83 4.2. Evaluating Submissions . . . . . . . . . . . . . . . . . 17 84 4.2.1. Minimum Acceptance Criteria . . . . . . . . . . . . . 17 85 4.2.2. Discretionary Acceptance Criteria . . . . . . . . . . 18 86 4.3. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 18 87 4.4. Log ID . . . . . . . . . . . . . . . . . . . . . . . . . 19 88 4.5. TransItem Structure . . . . . . . . . . . . . . . . . . . 19 89 4.6. Log Artifact Extensions . . . . . . . . . . . . . . . . . 20 90 4.7. Merkle Tree Leaves . . . . . . . . . . . . . . . . . . . 21 91 4.8. Signed Certificate Timestamp (SCT) . . . . . . . . . . . 22 92 4.9. Merkle Tree Head . . . . . . . . . . . . . . . . . . . . 23 93 4.10. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 23 94 4.11. Merkle Consistency Proofs . . . . . . . . . . . . . . . . 24 95 4.12. Merkle Inclusion Proofs . . . . . . . . . . . . . . . . . 25 96 4.13. Shutting down a log . . . . . . . . . . . . . . . . . . . 25 98 5. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 26 99 5.1. Submit Entry to Log . . . . . . . . . . . . . . . . . . . 27 100 5.2. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 30 101 5.3. Retrieve Merkle Consistency Proof between Two Signed Tree 102 Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 30 103 5.4. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 31 104 5.5. Retrieve Merkle Inclusion Proof, Signed Tree Head and 105 Consistency Proof by Leaf Hash . . . . . . . . . . . . . 32 106 5.6. Retrieve Entries and STH from Log . . . . . . . . . . . . 33 107 5.7. Retrieve Accepted Trust Anchors . . . . . . . . . . . . . 35 108 6. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 35 109 6.1. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . . 36 110 6.2. TransItemList Structure . . . . . . . . . . . . . . . . . 37 111 6.3. Presenting SCTs, inclusions proofs and STHs . . . . . . . 37 112 6.4. transparency_info TLS Extension . . . . . . . . . . . . . 37 113 7. Certification Authorities . . . . . . . . . . . . . . . . . . 38 114 7.1. Transparency Information X.509v3 Extension . . . . . . . 38 115 7.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 38 116 7.1.2. Certificate Extension . . . . . . . . . . . . . . . . 38 117 7.2. TLS Feature X.509v3 Extension . . . . . . . . . . . . . . 39 118 8. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 119 8.1. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 39 120 8.1.1. Receiving SCTs and inclusion proofs . . . . . . . . . 39 121 8.1.2. Reconstructing the TBSCertificate . . . . . . . . . . 39 122 8.1.3. Validating SCTs . . . . . . . . . . . . . . . . . . . 40 123 8.1.4. Fetching inclusion proofs . . . . . . . . . . . . . . 40 124 8.1.5. Validating inclusion proofs . . . . . . . . . . . . . 41 125 8.1.6. Evaluating compliance . . . . . . . . . . . . . . . . 41 126 8.2. Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 41 127 8.3. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 42 128 9. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 43 129 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 44 130 10.1. New Entry to the TLS ExtensionType Registry . . . . . . 44 131 10.2. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 44 132 10.2.1. Expert Review guidelines . . . . . . . . . . . . . . 45 133 10.3. Signature Algorithms . . . . . . . . . . . . . . . . . . 45 134 10.3.1. Expert Review guidelines . . . . . . . . . . . . . . 45 135 10.4. VersionedTransTypes . . . . . . . . . . . . . . . . . . 45 136 10.4.1. Expert Review guidelines . . . . . . . . . . . . . . 46 137 10.5. Log Artifact Extension Registry . . . . . . . . . . . . 46 138 10.5.1. Expert Review guidelines . . . . . . . . . . . . . . 47 139 10.6. Object Identifiers . . . . . . . . . . . . . . . . . . . 47 140 10.6.1. Log ID Registry . . . . . . . . . . . . . . . . . . 47 141 11. Security Considerations . . . . . . . . . . . . . . . . . . . 48 142 11.1. Misissued Certificates . . . . . . . . . . . . . . . . . 49 143 11.2. Detection of Misissue . . . . . . . . . . . . . . . . . 49 144 11.3. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 49 145 11.4. Preventing Tracking Clients . . . . . . . . . . . . . . 50 146 11.5. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 50 147 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 50 148 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 50 149 13.1. Normative References . . . . . . . . . . . . . . . . . . 50 150 13.2. Informative References . . . . . . . . . . . . . . . . . 52 151 Appendix A. Supporting v1 and v2 simultaneously . . . . . . . . 53 152 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 54 154 1. Introduction 156 Certificate Transparency aims to mitigate the problem of misissued 157 certificates by providing append-only logs of issued certificates. 158 The logs do not themselves prevent misissuance, but they ensure that 159 interested parties (particularly those named in certificates) can 160 detect such misissuance. Note that this is a general mechanism that 161 could be used for transparently logging any form of binary data, 162 subject to some kind of inclusion criteria. In this document, we 163 only describe its use for public TLS server certificates (i.e., where 164 the inclusion criteria is a valid certificate issued by a public 165 certification authority (CA)). 167 Each log contains certificate chains, which can be submitted by 168 anyone. It is expected that public CAs will contribute all their 169 newly issued certificates to one or more logs; however certificate 170 holders can also contribute their own certificate chains, as can 171 third parties. In order to avoid logs being rendered useless by the 172 submission of large numbers of spurious certificates, it is required 173 that each chain ends with a trust anchor that is accepted by the log. 174 When a chain is accepted by a log, a signed timestamp is returned, 175 which can later be used to provide evidence to TLS clients that the 176 chain has been submitted. TLS clients can thus require that all 177 certificates they accept as valid are accompanied by signed 178 timestamps. 180 Those who are concerned about misissuance can monitor the logs, 181 asking them regularly for all new entries, and can thus check whether 182 domains for which they are responsible have had certificates issued 183 that they did not expect. What they do with this information, 184 particularly when they find that a misissuance has happened, is 185 beyond the scope of this document. However, broadly speaking, they 186 can invoke existing business mechanisms for dealing with misissued 187 certificates, such as working with the CA to get the certificate 188 revoked, or with maintainers of trust anchor lists to get the CA 189 removed. Of course, anyone who wants can monitor the logs and, if 190 they believe a certificate is incorrectly issued, take action as they 191 see fit. 193 Similarly, those who have seen signed timestamps from a particular 194 log can later demand a proof of inclusion from that log. If the log 195 is unable to provide this (or, indeed, if the corresponding 196 certificate is absent from monitors' copies of that log), that is 197 evidence of the incorrect operation of the log. The checking 198 operation is asynchronous to allow clients to proceed without delay, 199 despite possible issues such as network connectivity and the vagaries 200 of firewalls. 202 The append-only property of each log is achieved using Merkle Trees, 203 which can be used to efficiently prove that any particular instance 204 of the log is a superset of any particular previous instance and to 205 efficiently detect various misbehaviors of the log (e.g., issuing a 206 signed timestamp for a certificate that is not subsequently logged). 208 It is necessary to treat each log as a trusted third party, because 209 the log auditing mechanisms described in this document can be 210 circumvented by a misbehaving log that shows different, inconsistent 211 views of itself to different clients. Whilst it is anticipated that 212 additional mechanisms could be developed to address these 213 shortcomings and thereby avoid the need to blindly trust logs, such 214 mechanisms are outside the scope of this document. 216 1.1. Requirements Language 218 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 219 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 220 document are to be interpreted as described in [RFC2119]. 222 1.2. Data Structures 224 Data structures are defined and encoded according to the conventions 225 laid out in Section 3 of [RFC8446]. 227 1.3. Major Differences from CT 1.0 229 This document revises and obsoletes the experimental CT 1.0 [RFC6962] 230 protocol, drawing on insights gained from CT 1.0 deployments and on 231 feedback from the community. The major changes are: 233 o Hash and signature algorithm agility: permitted algorithms are now 234 specified in IANA registries. 236 o Precertificate format: precertificates are now CMS objects rather 237 than X.509 certificates, which avoids violating the certificate 238 serial number uniqueness requirement in Section 4.1.2.2 of 239 [RFC5280]. 241 o Removed precertificate signing certificates and the precertificate 242 poison extension: the change of precertificate format means that 243 these are no longer needed. 245 o Logs IDs: each log is now identified by an OID rather than by the 246 hash of its public key. OID allocations are managed by an IANA 247 registry. 249 o "TransItem" structure: this new data structure is used to 250 encapsulate most types of CT data. A "TransItemList", consisting 251 of one or more "TransItem" structures, can be used anywhere that 252 "SignedCertificateTimestampList" was used in [RFC6962]. 254 o Merkle tree leaves: the "MerkleTreeLeaf" structure has been 255 replaced by the "TransItem" structure, which eases extensibility 256 and simplifies the leaf structure by removing one layer of 257 abstraction. 259 o Unified leaf format: the structure for both certificate and 260 precertificate entries now includes only the TBSCertificate 261 (whereas certificate entries in [RFC6962] included the entire 262 certificate). 264 o Log Artifact Extensions: these are now typed and managed by an 265 IANA registry, and they can now appear not only in SCTs but also 266 in STHs. 268 o API outputs: complete "TransItem" structures are returned, rather 269 than the constituent parts of each structure. 271 o get-all-by-hash: new client API for obtaining an inclusion proof 272 and the corresponding consistency proof at the same time. 274 o submit-entry: new client API, replacing add-chain and add-pre- 275 chain. 277 o Presenting SCTs with proofs: TLS servers may present SCTs together 278 with the corresponding inclusion proofs using any of the 279 mechanisms that [RFC6962] defined for presenting SCTs only. 280 (Presenting SCTs only is still supported). 282 o CT TLS extension: the "signed_certificate_timestamp" TLS extension 283 has been replaced by the "transparency_info" TLS extension. 285 o Verification algorithms: added detailed algorithms for verifying 286 inclusion proofs, for verifying consistency between two STHs, and 287 for verifying a root hash given a complete list of the relevant 288 leaf input entries. 290 o Extensive clarifications and editorial work. 292 2. Cryptographic Components 294 2.1. Merkle Hash Trees 296 2.1.1. Definition of the Merkle Tree 298 The log uses a binary Merkle Hash Tree for efficient auditing. The 299 hash algorithm used is one of the log's parameters (see Section 4.1). 300 We have established a registry of acceptable hash algorithms (see 301 Section 10.2). Throughout this document, the hash algorithm in use 302 is referred to as HASH and the size of its output in bytes as 303 HASH_SIZE. The input to the Merkle Tree Hash is a list of data 304 entries; these entries will be hashed to form the leaves of the 305 Merkle Hash Tree. The output is a single HASH_SIZE Merkle Tree Hash. 306 Given an ordered list of n inputs, D_n = {d[0], d[1], ..., d[n-1]}, 307 the Merkle Tree Hash (MTH) is thus defined as follows: 309 The hash of an empty list is the hash of an empty string: 311 MTH({}) = HASH(). 313 The hash of a list with one entry (also known as a leaf hash) is: 315 MTH({d[0]}) = HASH(0x00 || d[0]). 317 For n > 1, let k be the largest power of two smaller than n (i.e., k 318 < n <= 2k). The Merkle Tree Hash of an n-element list D_n is then 319 defined recursively as 321 MTH(D_n) = HASH(0x01 || MTH(D[0:k]) || MTH(D[k:n])), 323 Where || is concatenation and D[k1:k2] = D'_(k2-k1) denotes the list 324 {d'[0] = d[k1], d'[1] = d[k1+1], ..., d'[k2-k1-1] = d[k2-1]} of 325 length (k2 - k1). (Note that the hash calculations for leaves and 326 nodes differ; this domain separation is required to give second 327 preimage resistance). 329 Note that we do not require the length of the input list to be a 330 power of two. The resulting Merkle Tree may thus not be balanced; 331 however, its shape is uniquely determined by the number of leaves. 332 (Note: This Merkle Tree is essentially the same as the history tree 333 [CrosbyWallach] proposal, except our definition handles non-full 334 trees differently). 336 2.1.2. Verifying a Tree Head Given Entries 338 When a client has a complete list of n input "entries" from "0" up to 339 "tree_size - 1" and wishes to verify this list against a tree head 340 "root_hash" returned by the log for the same "tree_size", the 341 following algorithm may be used: 343 1. Set "stack" to an empty stack. 345 2. For each "i" from "0" up to "tree_size - 1": 347 1. Push "HASH(0x00 || entries[i])" to "stack". 349 2. Set "merge_count" to the lowest value ("0" included) such 350 that "LSB(i >> merge_count)" is not set. In other words, set 351 "merge_count" to the number of consecutive "1"s found 352 starting at the least significant bit of "i". 354 3. Repeat "merge_count" times: 356 1. Pop "right" from "stack". 358 2. Pop "left" from "stack". 360 3. Push "HASH(0x01 || left || right)" to "stack". 362 3. If there is more than one element in the "stack", repeat the same 363 merge procedure (Step 2.3 above) until only a single element 364 remains. 366 4. The remaining element in "stack" is the Merkle Tree hash for the 367 given "tree_size" and should be compared by equality against the 368 supplied "root_hash". 370 2.1.3. Merkle Inclusion Proofs 372 A Merkle inclusion proof for a leaf in a Merkle Hash Tree is the 373 shortest list of additional nodes in the Merkle Tree required to 374 compute the Merkle Tree Hash for that tree. Each node in the tree is 375 either a leaf node or is computed from the two nodes immediately 376 below it (i.e., towards the leaves). At each step up the tree 377 (towards the root), a node from the inclusion proof is combined with 378 the node computed so far. In other words, the inclusion proof 379 consists of the list of missing nodes required to compute the nodes 380 leading from a leaf to the root of the tree. If the root computed 381 from the inclusion proof matches the true root, then the inclusion 382 proof proves that the leaf exists in the tree. 384 2.1.3.1. Generating an Inclusion Proof 386 Given an ordered list of n inputs to the tree, D_n = {d[0], d[1], 387 ..., d[n-1]}, the Merkle inclusion proof PATH(m, D_n) for the (m+1)th 388 input d[m], 0 <= m < n, is defined as follows: 390 The proof for the single leaf in a tree with a one-element input list 391 D[1] = {d[0]} is empty: 393 PATH(0, {d[0]}) = {} 395 For n > 1, let k be the largest power of two smaller than n. The 396 proof for the (m+1)th element d[m] in a list of n > m elements is 397 then defined recursively as 399 PATH(m, D_n) = PATH(m, D[0:k]) : MTH(D[k:n]) for m < k; and 401 PATH(m, D_n) = PATH(m - k, D[k:n]) : MTH(D[0:k]) for m >= k, 403 The : operator and D[k1:k2] are defined the same as in Section 2.1.1. 405 2.1.3.2. Verifying an Inclusion Proof 407 When a client has received an inclusion proof (e.g., in a "TransItem" 408 of type "inclusion_proof_v2") and wishes to verify inclusion of an 409 input "hash" for a given "tree_size" and "root_hash", the following 410 algorithm may be used to prove the "hash" was included in the 411 "root_hash": 413 1. Compare "leaf_index" against "tree_size". If "leaf_index" is 414 greater than or equal to "tree_size" then fail the proof 415 verification. 417 2. Set "fn" to "leaf_index" and "sn" to "tree_size - 1". 419 3. Set "r" to "hash". 421 4. For each value "p" in the "inclusion_path" array: 423 If "sn" is 0, stop the iteration and fail the proof verification. 425 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 427 1. Set "r" to "HASH(0x01 || p || r)" 429 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 430 equally until either "LSB(fn)" is set or "fn" is "0". 432 Otherwise: 434 1. Set "r" to "HASH(0x01 || r || p)" 436 Finally, right-shift both "fn" and "sn" one time. 438 5. Compare "sn" to 0. Compare "r" against the "root_hash". If "sn" 439 is equal to 0, and "r" and the "root_hash" are equal, then the 440 log has proven the inclusion of "hash". Otherwise, fail the 441 proof verification. 443 2.1.4. Merkle Consistency Proofs 445 Merkle consistency proofs prove the append-only property of the tree. 446 A Merkle consistency proof for a Merkle Tree Hash MTH(D_n) and a 447 previously advertised hash MTH(D[0:m]) of the first m leaves, m <= n, 448 is the list of nodes in the Merkle Tree required to verify that the 449 first m inputs D[0:m] are equal in both trees. Thus, a consistency 450 proof must contain a set of intermediate nodes (i.e., commitments to 451 inputs) sufficient to verify MTH(D_n), such that (a subset of) the 452 same nodes can be used to verify MTH(D[0:m]). We define an algorithm 453 that outputs the (unique) minimal consistency proof. 455 2.1.4.1. Generating a Consistency Proof 457 Given an ordered list of n inputs to the tree, D_n = {d[0], d[1], 458 ..., d[n-1]}, the Merkle consistency proof PROOF(m, D_n) for a 459 previous Merkle Tree Hash MTH(D[0:m]), 0 < m < n, is defined as: 461 PROOF(m, D_n) = SUBPROOF(m, D_n, true) 463 In SUBPROOF, the boolean value represents whether the subtree created 464 from D[0:m] is a complete subtree of the Merkle Tree created from 465 D_n, and, consequently, whether the subtree Merkle Tree Hash 466 MTH(D[0:m]) is known. The initial call to SUBPROOF sets this to be 467 true, and SUBPROOF is then defined as follows: 469 The subproof for m = n is empty if m is the value for which PROOF was 470 originally requested (meaning that the subtree created from D[0:m] is 471 a complete subtree of the Merkle Tree created from the original D_n 472 for which PROOF was requested, and the subtree Merkle Tree Hash 473 MTH(D[0:m]) is known): 475 SUBPROOF(m, D[m], true) = {} 477 Otherwise, the subproof for m = n is the Merkle Tree Hash committing 478 inputs D[0:m]: 480 SUBPROOF(m, D[m], false) = {MTH(D[m])} 482 For m < n, let k be the largest power of two smaller than n. The 483 subproof is then defined recursively. 485 If m <= k, the right subtree entries D[k:n] only exist in the current 486 tree. We prove that the left subtree entries D[0:k] are consistent 487 and add a commitment to D[k:n]: 489 SUBPROOF(m, D_n, b) = SUBPROOF(m, D[0:k], b) : MTH(D[k:n]) 491 If m > k, the left subtree entries D[0:k] are identical in both 492 trees. We prove that the right subtree entries D[k:n] are consistent 493 and add a commitment to D[0:k]. 495 SUBPROOF(m, D_n, b) = SUBPROOF(m - k, D[k:n], false) : MTH(D[0:k]) 497 The number of nodes in the resulting proof is bounded above by 498 ceil(log2(n)) + 1. 500 The : operator and D[k1:k2] are defined the same as in Section 2.1.1. 502 2.1.4.2. Verifying Consistency between Two Tree Heads 504 When a client has a tree head "first_hash" for tree size "first", a 505 tree head "second_hash" for tree size "second" where "0 < first < 506 second", and has received a consistency proof between the two (e.g., 507 in a "TransItem" of type "consistency_proof_v2"), the following 508 algorithm may be used to verify the consistency proof: 510 1. If "first" is an exact power of 2, then prepend "first_hash" to 511 the "consistency_path" array. 513 2. Set "fn" to "first - 1" and "sn" to "second - 1". 515 3. If "LSB(fn)" is set, then right-shift both "fn" and "sn" equally 516 until "LSB(fn)" is not set. 518 4. Set both "fr" and "sr" to the first value in the 519 "consistency_path" array. 521 5. For each subsequent value "c" in the "consistency_path" array: 523 If "sn" is 0, stop the iteration and fail the proof verification. 525 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 527 1. Set "fr" to "HASH(0x01 || c || fr)" 528 Set "sr" to "HASH(0x01 || c || sr)" 530 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 531 equally until either "LSB(fn)" is set or "fn" is "0". 533 Otherwise: 535 1. Set "sr" to "HASH(0x01 || sr || c)" 537 Finally, right-shift both "fn" and "sn" one time. 539 6. After completing iterating through the "consistency_path" array 540 as described above, verify that the "fr" calculated is equal to 541 the "first_hash" supplied, that the "sr" calculated is equal to 542 the "second_hash" supplied and that "sn" is 0. 544 2.1.5. Example 546 The binary Merkle Tree with 7 leaves: 548 hash 549 / \ 550 / \ 551 / \ 552 / \ 553 / \ 554 k l 555 / \ / \ 556 / \ / \ 557 / \ / \ 558 g h i j 559 / \ / \ / \ | 560 a b c d e f d6 561 | | | | | | 562 d0 d1 d2 d3 d4 d5 564 The inclusion proof for d0 is [b, h, l]. 566 The inclusion proof for d3 is [c, g, l]. 568 The inclusion proof for d4 is [f, j, k]. 570 The inclusion proof for d6 is [i, k]. 572 The same tree, built incrementally in four steps: 574 hash0 hash1=k 575 / \ / \ 576 / \ / \ 577 / \ / \ 578 g c g h 579 / \ | / \ / \ 580 a b d2 a b c d 581 | | | | | | 582 d0 d1 d0 d1 d2 d3 584 hash2 hash 585 / \ / \ 586 / \ / \ 587 / \ / \ 588 / \ / \ 589 / \ / \ 590 k i k l 591 / \ / \ / \ / \ 592 / \ e f / \ / \ 593 / \ | | / \ / \ 594 g h d4 d5 g h i j 595 / \ / \ / \ / \ / \ | 596 a b c d a b c d e f d6 597 | | | | | | | | | | 598 d0 d1 d2 d3 d0 d1 d2 d3 d4 d5 600 The consistency proof between hash0 and hash is PROOF(3, D[7]) = [c, 601 d, g, l]. c, g are used to verify hash0, and d, l are additionally 602 used to show hash is consistent with hash0. 604 The consistency proof between hash1 and hash is PROOF(4, D[7]) = [l]. 605 hash can be verified using hash1=k and l. 607 The consistency proof between hash2 and hash is PROOF(6, D[7]) = [i, 608 j, k]. k, i are used to verify hash2, and j is additionally used to 609 show hash is consistent with hash2. 611 2.2. Signatures 613 Various data structures Section 1.2 are signed. A log MUST use one 614 of the signature algorithms defined in Section 10.3. 616 3. Submitters 618 Submitters submit certificates or preannouncements of certificates 619 prior to issuance (precertificates) to logs for public auditing, as 620 described below. In order to enable attribution of each logged 621 certificate or precertificate to its issuer, each submission MUST be 622 accompanied by all additional certificates required to verify the 623 chain up to an accepted trust anchor (Section 5.7). The trust anchor 624 (a root or intermediate CA certificate) MAY be omitted from the 625 submission. 627 If a log accepts a submission, it will return a Signed Certificate 628 Timestamp (SCT) (see Section 4.8). The submitter SHOULD validate the 629 returned SCT as described in Section 8.1 if they understand its 630 format and they intend to use it directly in a TLS handshake or to 631 construct a certificate. If the submitter does not need the SCT (for 632 example, the certificate is being submitted simply to make it 633 available in the log), it MAY validate the SCT. 635 3.1. Certificates 637 Any entity can submit a certificate (Section 5.1) to a log. Since it 638 is anticipated that TLS clients will reject certificates that are not 639 logged, it is expected that certificate issuers and subjects will be 640 strongly motivated to submit them. 642 3.2. Precertificates 644 CAs may preannounce a certificate prior to issuance by submitting a 645 precertificate (Section 5.1) that the log can use to create an entry 646 that will be valid against the issued certificate. The CA MAY 647 incorporate the returned SCT in the issued certificate. One example 648 of where the returned SCT is not incorporated in the issued 649 certificate is when a CA sends the precertificate to multiple logs, 650 but only incorporates the SCTs that are returned first. 652 A precertificate is a CMS [RFC5652] "signed-data" object that 653 conforms to the following profile: 655 o It MUST be DER encoded. 657 o "SignedData.version" MUST be v3(3). 659 o "SignedData.digestAlgorithms" MUST only include the 660 "SignerInfo.digestAlgorithm" OID value (see below). 662 o "SignedData.encapContentInfo": 664 * "eContentType" MUST be the OID 1.3.101.78. 666 * "eContent" MUST contain a TBSCertificate [RFC5280] that will be 667 identical to the TBSCertificate in the issued certificate, 668 except that the Transparency Information (Section 7.1) 669 extension MUST be omitted. 671 o "SignedData.certificates" MUST be omitted. 673 o "SignedData.crls" MUST be omitted. 675 o "SignedData.signerInfos" MUST contain one "SignerInfo": 677 * "version" MUST be v3(3). 679 * "sid" MUST use the "subjectKeyIdentifier" option. 681 * "digestAlgorithm" MUST be one of the hash algorithm OIDs listed 682 in Section 10.2. 684 * "signedAttrs" MUST be present and MUST contain two attributes: 686 + A content-type attribute whose value is the same as 687 "SignedData.encapContentInfo.eContentType". 689 + A message-digest attribute whose value is the message digest 690 of "SignedData.encapContentInfo.eContent". 692 * "signatureAlgorithm" MUST be the same OID as 693 "TBSCertificate.signature". 695 * "signature" MUST be from the same (root or intermediate) CA 696 that will ultimately issue the certificate. This signature 697 indicates the CA's intent to issue the certificate. This 698 intent is considered binding (i.e., misissuance of the 699 precertificate is considered equivalent to misissuance of the 700 corresponding certificate). 702 * "unsignedAttrs" MUST be omitted. 704 "SignerInfo.signedAttrs" is included in the message digest 705 calculation process (see Section 5.4 of [RFC5652]), which ensures 706 that the "SignerInfo.signature" value will not be a valid X.509v3 707 signature that could be used in conjunction with the TBSCertificate 708 (from "SignedData.encapContentInfo.eContent") to construct a valid 709 certificate. 711 4. Log Format and Operation 713 A log is a single, append-only Merkle Tree of submitted certificate 714 and precertificate entries. 716 When it receives and accepts a valid submission, the log MUST return 717 an SCT that corresponds to the submitted certificate or 718 precertificate. If the log has previously seen this valid 719 submission, it SHOULD return the same SCT as it returned before (to 720 reduce the ability to track clients as described in Section 11.4). 721 If different SCTs are produced for the same submission, multiple log 722 entries will have to be created, one for each SCT (as the timestamp 723 is a part of the leaf structure). Note that if a certificate was 724 previously logged as a precertificate, then the precertificate's SCT 725 of type "precert_sct_v2" would not be appropriate; instead, a fresh 726 SCT of type "x509_sct_v2" should be generated. 728 An SCT is the log's promise to append to its Merkle Tree an entry for 729 the accepted submission. Upon producing an SCT, the log MUST fulfil 730 this promise by performing the following actions within a fixed 731 amount of time known as the Maximum Merge Delay (MMD), which is one 732 of the log's parameters (see Section 4.1): 734 o Allocate a tree index to the entry representing the accepted 735 submission. 737 o Calculate the root of the tree. 739 o Sign the root of the tree (see Section 4.10). 741 The log may append multiple entries before signing the root of the 742 tree. 744 Log operators SHOULD NOT impose any conditions on retrieving or 745 sharing data from the log. 747 4.1. Log Parameters 749 A log is defined by a collection of parameters, which are used by 750 clients to communicate with the log and to verify log artifacts. 752 Base URL: The URL to substitute for in Section 5. 754 Hash Algorithm: The hash algorithm used for the Merkle Tree (see 755 Section 10.2). 757 Signature Algorithm: The signature algorithm used (see Section 2.2). 759 Public Key: The public key used to verify signatures generated by 760 the log. A log MUST NOT use the same keypair as any other log. 762 Log ID: The OID that uniquely identifies the log. 764 Maximum Merge Delay: The MMD the log has committed to. 766 Version: The version of the protocol supported by the log (currently 767 1 or 2). 769 Maximum Chain Length: The longest chain submission the log is 770 willing to accept, if the log imposes any limit. 772 STH Frequency Count: The maximum number of STHs the log may produce 773 in any period equal to the "Maximum Merge Delay" (see 774 Section 4.10). 776 Final STH: If a log has been closed down (i.e., no longer accepts 777 new entries), existing entries may still be valid. In this case, 778 the client should know the final valid STH in the log to ensure no 779 new entries can be added without detection. The final STH should 780 be provided in the form of a TransItem of type 781 "signed_tree_head_v2". 783 [JSON.Metadata] is an example of a metadata format which includes the 784 above elements. 786 4.2. Evaluating Submissions 788 A log determines whether to accept or reject a submission by 789 evaluating it against the minimum acceptance criteria (see 790 Section 4.2.1) and against the log's discretionary acceptance 791 criteria (see Section 4.2.2). 793 If the acceptance criteria are met, the log SHOULD accept the 794 submission. (A log may decide, for example, to temporarily reject 795 acceptable submissions to protect itself against denial-of-service 796 attacks). 798 The log SHALL allow retrieval of its list of accepted trust anchors 799 (see Section 5.7), each of which is a root or intermediate CA 800 certificate. This list might usefully be the union of root 801 certificates trusted by major browser vendors. 803 4.2.1. Minimum Acceptance Criteria 805 To ensure that logged certificates and precertificates are 806 attributable to an accepted trust anchor, and to set clear 807 expectations for what monitors would find in the log, and to avoid 808 being overloaded by invalid submissions, the log MUST reject a 809 submission if any of the following conditions are not met: 811 o The "submission", "type" and "chain" inputs MUST be set as 812 described in Section 5.1. The log MUST NOT accommodate misordered 813 CA certificates or use any other source of intermediate CA 814 certificates to attempt certification path construction. 816 o Each of the zero or more intermediate CA certificates in the chain 817 MUST have one or both of the following features: 819 * The Basic Constraints extension with the cA boolean asserted. 821 * The Key Usage extension with the keyCertSign bit asserted. 823 o Each certificate in the chain MUST fall within the limits imposed 824 by the zero or more Basic Constraints pathLenConstraint values 825 found higher up the chain. 827 o Precertificate submissions MUST conform to all of the requirements 828 in Section 3.2. 830 4.2.2. Discretionary Acceptance Criteria 832 If the minimum acceptance criteria are met but the submission is not 833 fully valid according to [RFC5280] verification rules (e.g., the 834 certificate or precertificate has expired, is not yet valid, has been 835 revoked, exhibits ASN.1 DER encoding errors but the log can still 836 parse it, etc), then the acceptability of the submission is left to 837 the log's discretion. It is useful for logs to accept such 838 submissions in order to accommodate quirks of CA certificate-issuing 839 software and to facilitate monitoring of CA compliance with 840 applicable policies and technical standards. However, it is 841 impractical for this document to enumerate, and for logs to consider, 842 all of the ways that a submission might fail to comply with 843 [RFC5280]. 845 Logs SHOULD limit the length of chain they will accept. The maximum 846 chain length is one of the log's parameters (see Section 4.1). 848 4.3. Log Entries 850 If a submission is accepted and an SCT issued, the accepting log MUST 851 store the entire chain used for verification. This chain MUST 852 include the certificate or precertificate itself, the zero or more 853 intermediate CA certificates provided by the submitter, and the trust 854 anchor used to verify the chain (even if it was omitted from the 855 submission). The log MUST present this chain for auditing upon 856 request (see Section 5.6). This prevents the CA from avoiding blame 857 by logging a partial or empty chain. Each log entry is a "TransItem" 858 structure of type "x509_entry_v2" or "precert_entry_v2". However, a 859 log may store its entries in any format. If a log does not store 860 this "TransItem" in full, it must store the "timestamp" and 861 "sct_extensions" of the corresponding 862 "TimestampedCertificateEntryDataV2" structure. The "TransItem" can 863 be reconstructed from these fields and the entire chain that the log 864 used to verify the submission. 866 4.4. Log ID 868 Each log is identified by an OID, which is one of the log's 869 parameters (see Section 4.1) and which MUST NOT be used to identify 870 any other log. A log's operator MUST either allocate the OID 871 themselves or request an OID from the Log ID Registry (see 872 Section 10.6.1). Various data structures include the DER encoding of 873 this OID, excluding the ASN.1 tag and length bytes, in an opaque 874 vector: 876 opaque LogID<2..127>; 878 Note that the ASN.1 length and the opaque vector length are identical 879 in size (1 byte) and value, so the DER encoding of the OID can be 880 reproduced simply by prepending an OBJECT IDENTIFIER tag (0x06) to 881 the opaque vector length and contents. 883 OIDs used to identify logs are limited such that the DER encoding of 884 their value is less than or equal to 127 octets. 886 4.5. TransItem Structure 888 Various data structures are encapsulated in the "TransItem" structure 889 to ensure that the type and version of each one is identified in a 890 common fashion: 892 enum { 893 reserved(0), 894 x509_entry_v2(1), precert_entry_v2(2), 895 x509_sct_v2(3), precert_sct_v2(4), 896 signed_tree_head_v2(5), consistency_proof_v2(6), 897 inclusion_proof_v2(7), 898 (65535) 899 } VersionedTransType; 901 struct { 902 VersionedTransType versioned_type; 903 select (versioned_type) { 904 case x509_entry_v2: TimestampedCertificateEntryDataV2; 905 case precert_entry_v2: TimestampedCertificateEntryDataV2; 906 case x509_sct_v2: SignedCertificateTimestampDataV2; 907 case precert_sct_v2: SignedCertificateTimestampDataV2; 908 case signed_tree_head_v2: SignedTreeHeadDataV2; 909 case consistency_proof_v2: ConsistencyProofDataV2; 910 case inclusion_proof_v2: InclusionProofDataV2; 911 } data; 912 } TransItem; 914 "versioned_type" is a value from the IANA registry in Section 10.4 915 that identifies the type of the encapsulated data structure and the 916 earliest version of this protocol to which it conforms. This 917 document is v2. 919 "data" is the encapsulated data structure. The various structures 920 named with the "DataV2" suffix are defined in later sections of this 921 document. 923 Note that "VersionedTransType" combines the v1 [RFC6962] type 924 enumerations "Version", "LogEntryType", "SignatureType" and 925 "MerkleLeafType". Note also that v1 did not define "TransItem", but 926 this document provides guidelines (see Appendix A) on how v2 927 implementations can co-exist with v1 implementations. 929 Future versions of this protocol may reuse "VersionedTransType" 930 values defined in this document as long as the corresponding data 931 structures are not modified, and may add new "VersionedTransType" 932 values for new or modified data structures. 934 4.6. Log Artifact Extensions 935 enum { 936 reserved(65535) 937 } ExtensionType; 939 struct { 940 ExtensionType extension_type; 941 opaque extension_data<0..2^16-1>; 942 } Extension; 944 The "Extension" structure provides a generic extensibility for log 945 artifacts, including Signed Certificate Timestamps (Section 4.8) and 946 Signed Tree Heads (Section 4.10). The interpretation of the 947 "extension_data" field is determined solely by the value of the 948 "extension_type" field. 950 This document does not define any extensions, but it does establish a 951 registry for future "ExtensionType" values (see Section 10.5). Each 952 document that registers a new "ExtensionType" must specify the 953 context in which it may be used (e.g., SCT, STH, or both) and 954 describe how to interpret the corresponding "extension_data". 956 4.7. Merkle Tree Leaves 958 The leaves of a log's Merkle Tree correspond to the log's entries 959 (see Section 4.3). Each leaf is the leaf hash (Section 2.1) of a 960 "TransItem" structure of type "x509_entry_v2" or "precert_entry_v2", 961 which encapsulates a "TimestampedCertificateEntryDataV2" structure. 962 Note that leaf hashes are calculated as HASH(0x00 || TransItem), 963 where the hash algorithm is one of the log's parameters. 965 opaque TBSCertificate<1..2^24-1>; 967 struct { 968 uint64 timestamp; 969 opaque issuer_key_hash<32..2^8-1>; 970 TBSCertificate tbs_certificate; 971 Extension sct_extensions<0..2^16-1>; 972 } TimestampedCertificateEntryDataV2; 974 "timestamp" is the date and time at which the certificate or 975 precertificate was accepted by the log, in the form of a 64-bit 976 unsigned number of milliseconds elapsed since the Unix Epoch (1 977 January 1970 00:00:00 UTC - see [UNIXTIME]), ignoring leap seconds, 978 in network byte order. Note that the leaves of a log's Merkle Tree 979 are not required to be in strict chronological order. 981 "issuer_key_hash" is the HASH of the public key of the CA that issued 982 the certificate or precertificate, calculated over the DER encoding 983 of the key represented as SubjectPublicKeyInfo [RFC5280]. This is 984 needed to bind the CA to the certificate or precertificate, making it 985 impossible for the corresponding SCT to be valid for any other 986 certificate or precertificate whose TBSCertificate matches 987 "tbs_certificate". The length of the "issuer_key_hash" MUST match 988 HASH_SIZE. 990 "tbs_certificate" is the DER encoded TBSCertificate from the 991 submission. (Note that a precertificate's TBSCertificate can be 992 reconstructed from the corresponding certificate as described in 993 Section 8.1.2). 995 "sct_extensions" matches the SCT extensions of the corresponding SCT. 997 The type of the "TransItem" corresponds to the value of the "type" 998 parameter supplied in the Section 5.1 call. 1000 4.8. Signed Certificate Timestamp (SCT) 1002 An SCT is a "TransItem" structure of type "x509_sct_v2" or 1003 "precert_sct_v2", which encapsulates a 1004 "SignedCertificateTimestampDataV2" structure: 1006 struct { 1007 LogID log_id; 1008 uint64 timestamp; 1009 Extension sct_extensions<0..2^16-1>; 1010 opaque signature<0..2^16-1>; 1011 } SignedCertificateTimestampDataV2; 1013 "log_id" is this log's unique ID, encoded in an opaque vector as 1014 described in Section 4.4. 1016 "timestamp" is equal to the timestamp from the corresponding 1017 "TimestampedCertificateEntryDataV2" structure. 1019 "sct_extensions" is a vector of 0 or more SCT extensions. This 1020 vector MUST NOT include more than one extension with the same 1021 "extension_type". The extensions in the vector MUST be ordered by 1022 the value of the "extension_type" field, smallest value first. If an 1023 implementation sees an extension that it does not understand, it 1024 SHOULD ignore that extension. Furthermore, an implementation MAY 1025 choose to ignore any extension(s) that it does understand. 1027 "signature" is computed over a "TransItem" structure of type 1028 "x509_entry_v2" or "precert_entry_v2" (see Section 4.7) using the 1029 signature algorithm declared in the log's parameters (see 1030 Section 4.1). 1032 4.9. Merkle Tree Head 1034 The log stores information about its Merkle Tree in a 1035 "TreeHeadDataV2": 1037 opaque NodeHash<32..2^8-1>; 1039 struct { 1040 uint64 timestamp; 1041 uint64 tree_size; 1042 NodeHash root_hash; 1043 Extension sth_extensions<0..2^16-1>; 1044 } TreeHeadDataV2; 1046 The length of NodeHash MUST match HASH_SIZE of the log. 1048 "timestamp" is the current date and time, in the form of a 64-bit 1049 unsigned number of milliseconds elapsed since the Unix Epoch (1 1050 January 1970 00:00:00 UTC - see [UNIXTIME]), ignoring leap seconds, 1051 in network byte order. 1053 "tree_size" is the number of entries currently in the log's Merkle 1054 Tree. 1056 "root_hash" is the root of the Merkle Hash Tree. 1058 "sth_extensions" is a vector of 0 or more STH extensions. This 1059 vector MUST NOT include more than one extension with the same 1060 "extension_type". The extensions in the vector MUST be ordered by 1061 the value of the "extension_type" field, smallest value first. If an 1062 implementation sees an extension that it does not understand, it 1063 SHOULD ignore that extension. Furthermore, an implementation MAY 1064 choose to ignore any extension(s) that it does understand. 1066 4.10. Signed Tree Head (STH) 1068 Periodically each log SHOULD sign its current tree head information 1069 (see Section 4.9) to produce an STH. When a client requests a log's 1070 latest STH (see Section 5.2), the log MUST return an STH that is no 1071 older than the log's MMD. However, since STHs could be used to mark 1072 individual clients (by producing a new STH for each query), a log 1073 MUST NOT produce STHs more frequently than its parameters declare 1074 (see Section 4.1). In general, there is no need to produce a new STH 1075 unless there are new entries in the log; however, in the event that a 1076 log does not accept any submissions during an MMD period, the log 1077 MUST sign the same Merkle Tree Hash with a fresh timestamp. 1079 An STH is a "TransItem" structure of type "signed_tree_head_v2", 1080 which encapsulates a "SignedTreeHeadDataV2" structure: 1082 struct { 1083 LogID log_id; 1084 TreeHeadDataV2 tree_head; 1085 opaque signature<0..2^16-1>; 1086 } SignedTreeHeadDataV2; 1088 "log_id" is this log's unique ID, encoded in an opaque vector as 1089 described in Section 4.4. 1091 The "timestamp" in "tree_head" MUST be at least as recent as the most 1092 recent SCT timestamp in the tree. Each subsequent timestamp MUST be 1093 more recent than the timestamp of the previous update. 1095 "tree_head" contains the latest tree head information (see 1096 Section 4.9). 1098 "signature" is computed over the "tree_head" field using the 1099 signature algorithm declared in the log's parameters (see 1100 Section 4.1). 1102 4.11. Merkle Consistency Proofs 1104 To prepare a Merkle Consistency Proof for distribution to clients, 1105 the log produces a "TransItem" structure of type 1106 "consistency_proof_v2", which encapsulates a "ConsistencyProofDataV2" 1107 structure: 1109 struct { 1110 LogID log_id; 1111 uint64 tree_size_1; 1112 uint64 tree_size_2; 1113 NodeHash consistency_path<1..2^16-1>; 1114 } ConsistencyProofDataV2; 1116 "log_id" is this log's unique ID, encoded in an opaque vector as 1117 described in Section 4.4. 1119 "tree_size_1" is the size of the older tree. 1121 "tree_size_2" is the size of the newer tree. 1123 "consistency_path" is a vector of Merkle Tree nodes proving the 1124 consistency of two STHs. 1126 4.12. Merkle Inclusion Proofs 1128 To prepare a Merkle Inclusion Proof for distribution to clients, the 1129 log produces a "TransItem" structure of type "inclusion_proof_v2", 1130 which encapsulates an "InclusionProofDataV2" structure: 1132 struct { 1133 LogID log_id; 1134 uint64 tree_size; 1135 uint64 leaf_index; 1136 NodeHash inclusion_path<1..2^16-1>; 1137 } InclusionProofDataV2; 1139 "log_id" is this log's unique ID, encoded in an opaque vector as 1140 described in Section 4.4. 1142 "tree_size" is the size of the tree on which this inclusion proof is 1143 based. 1145 "leaf_index" is the 0-based index of the log entry corresponding to 1146 this inclusion proof. 1148 "inclusion_path" is a vector of Merkle Tree nodes proving the 1149 inclusion of the chosen certificate or precertificate. 1151 4.13. Shutting down a log 1153 Log operators may decide to shut down a log for various reasons, such 1154 as deprecation of the signature algorithm. If there are entries in 1155 the log for certificates that have not yet expired, simply making TLS 1156 clients stop recognizing that log will have the effect of 1157 invalidating SCTs from that log. To avoid that, the following 1158 actions are suggested: 1160 o Make it known to clients and monitors that the log will be frozen. 1162 o Stop accepting new submissions (the error code "shutdown" should 1163 be returned for such requests). 1165 o Once MMD from the last accepted submission has passed and all 1166 pending submissions are incorporated, issue a final STH and 1167 publish it as one of the log's parameters. Having an STH with a 1168 timestamp that is after the MMD has passed from the last SCT 1169 issuance allows clients to audit this log regularly without 1170 special handling for the final STH. At this point the log's 1171 private key is no longer needed and can be destroyed. 1173 o Keep the log running until the certificates in all of its entries 1174 have expired or exist in other logs (this can be determined by 1175 scanning other logs or connecting to domains mentioned in the 1176 certificates and inspecting the SCTs served). 1178 5. Log Client Messages 1180 Messages are sent as HTTPS GET or POST requests. Parameters for 1181 POSTs and all responses are encoded as JavaScript Object Notation 1182 (JSON) objects [RFC8259]. Parameters for GETs are encoded as order- 1183 independent key/value URL parameters, using the "application/x-www- 1184 form-urlencoded" format described in the "HTML 4.01 Specification" 1185 [HTML401]. Binary data is base64 encoded [RFC4648] as specified in 1186 the individual messages. 1188 Clients are configured with a base URL for a log and construct URLs 1189 for requests by appending suffixes to this base URL. This structure 1190 places some degree of restriction on how log operators can deploy 1191 these services, as noted in [RFC7320]. However, operational 1192 experience with version 1 of this protocol has not indicated that 1193 these restrictions are a problem in practice. 1195 Note that JSON objects and URL parameters may contain fields not 1196 specified here. These extra fields SHOULD be ignored. 1198 The prefix, which is one of the log's parameters, MAY 1199 include a path as well as a server name and a port. 1201 In practice, log servers may include multiple front-end machines. 1202 Since it is impractical to keep these machines in perfect sync, 1203 errors may occur that are caused by skew between the machines. Where 1204 such errors are possible, the front-end will return additional 1205 information (as specified below) making it possible for clients to 1206 make progress, if progress is possible. Front-ends MUST only serve 1207 data that is free of gaps (that is, for example, no front-end will 1208 respond with an STH unless it is also able to prove consistency from 1209 all log entries logged within that STH). 1211 For example, when a consistency proof between two STHs is requested, 1212 the front-end reached may not yet be aware of one or both STHs. In 1213 the case where it is unaware of both, it will return the latest STH 1214 it is aware of. Where it is aware of the first but not the second, 1215 it will return the latest STH it is aware of and a consistency proof 1216 from the first STH to the returned STH. The case where it knows the 1217 second but not the first should not arise (see the "no gaps" 1218 requirement above). 1220 If the log is unable to process a client's request, it MUST return an 1221 HTTP response code of 4xx/5xx (see [RFC7231]), and, in place of the 1222 responses outlined in the subsections below, the body SHOULD be a 1223 JSON Problem Details Object (see [RFC7807] Section 3), containing: 1225 type: A URN reference identifying the problem. To facilitate 1226 automated response to errors, this document defines a set of 1227 standard tokens for use in the "type" field, within the URN 1228 namespace of: "urn:ietf:params:trans:error:". 1230 detail: A human-readable string describing the error that prevented 1231 the log from processing the request, ideally with sufficient 1232 detail to enable the error to be rectified. 1234 e.g., In response to a request of "/ct/v2/get- 1235 entries?start=100&end=99", the log would return a "400 Bad Request" 1236 response code with a body similar to the following: 1238 { 1239 "type": "urn:ietf:params:trans:error:endBeforeStart", 1240 "detail": "'start' cannot be greater than 'end'" 1241 } 1243 Most error types are specific to the type of request and are defined 1244 in the respective subsections below. The one exception is the 1245 "malformed" error type, which indicates that the log server could not 1246 parse the client's request because it did not comply with this 1247 document: 1249 +-----------+----------------------------------+ 1250 | type | detail | 1251 +-----------+----------------------------------+ 1252 | malformed | The request could not be parsed. | 1253 +-----------+----------------------------------+ 1255 Clients SHOULD treat "500 Internal Server Error" and "503 Service 1256 Unavailable" responses as transient failures and MAY retry the same 1257 request without modification at a later date. Note that as per 1258 [RFC7231], in the case of a 503 response the log MAY include a 1259 "Retry-After:" header in order to request a minimum time for the 1260 client to wait before retrying the request. 1262 5.1. Submit Entry to Log 1264 POST https:///ct/v2/submit-entry 1266 Inputs: 1268 submission: The base64 encoded certificate or precertificate. 1270 type: The "VersionedTransType" integer value that indicates the 1271 type of the "submission": 1 for "x509_entry_v2", or 2 for 1272 "precert_entry_v2". 1274 chain: An array of zero or more base64 encoded CA certificates. 1275 The first element is the certifier of the "submission"; the 1276 second certifies the first; etc. The last element of "chain" 1277 (or, if "chain" is an empty array, the "submission") is 1278 certified by an accepted trust anchor. 1280 Outputs: 1282 sct: A base64 encoded "TransItem" of type "x509_sct_v2" or 1283 "precert_sct_v2", signed by this log, that corresponds to the 1284 "submission". 1286 If the submitted entry is immediately appended to (or already 1287 exists in) this log's tree, then the log SHOULD also output: 1289 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1290 signed by this log. 1292 inclusion: A base64 encoded "TransItem" of type 1293 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1294 Tree nodes proves the inclusion of the "submission" in the 1295 returned "sth". 1297 Error codes: 1299 +----------------+--------------------------------------------------+ 1300 | type | detail | 1301 +----------------+--------------------------------------------------+ 1302 | badSubmission | "submission" is neither a valid certificate nor | 1303 | | a valid precertificate. | 1304 | | | 1305 | badType | "type" is neither 1 nor 2. | 1306 | | | 1307 | badChain | The first element of "chain" is not the | 1308 | | certifier of the "submission", or the second | 1309 | | element does not certify the first, etc. | 1310 | | | 1311 | badCertificate | One or more certificates in the "chain" are not | 1312 | | valid (e.g., not properly encoded). | 1313 | | | 1314 | unknownAnchor | The last element of "chain" (or, if "chain" is | 1315 | | an empty array, the "submission") both is not, | 1316 | | and is not certified by, an accepted trust | 1317 | | anchor. | 1318 | | | 1319 | shutdown | The log is no longer accepting submissions. | 1320 +----------------+--------------------------------------------------+ 1322 If the version of "sct" is not v2, then a v2 client may be unable to 1323 verify the signature. It MUST NOT construe this as an error. This 1324 is to avoid forcing an upgrade of compliant v2 clients that do not 1325 use the returned SCTs. 1327 If a log detects bad encoding in a chain that otherwise verifies 1328 correctly then the log MUST either log the certificate or return the 1329 "bad certificate" error. If the certificate is logged, an SCT MUST 1330 be issued. Logging the certificate is useful, because monitors 1331 (Section 8.2) can then detect these encoding errors, which may be 1332 accepted by some TLS clients. 1334 If "submission" is an accepted trust anchor whose certifier is 1335 neither an accepted trust anchor nor the first element of "chain", 1336 then the log MUST return the "unknown anchor" error. A log cannot 1337 generate an SCT for a submission if it does not have access to the 1338 issuer's public key. 1340 If the returned "sct" is intended to be provided to TLS clients, then 1341 "sth" and "inclusion" (if returned) SHOULD also be provided to TLS 1342 clients (e.g., if "type" was 2 (for "precert_sct_v2") then all three 1343 "TransItem"s could be embedded in the certificate). 1345 5.2. Retrieve Latest Signed Tree Head 1347 GET https:///ct/v2/get-sth 1349 No inputs. 1351 Outputs: 1353 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1354 signed by this log, that is no older than the log's MMD. 1356 5.3. Retrieve Merkle Consistency Proof between Two Signed Tree Heads 1358 GET https:///ct/v2/get-sth-consistency 1360 Inputs: 1362 first: The tree_size of the older tree, in decimal. 1364 second: The tree_size of the newer tree, in decimal (optional). 1366 Both tree sizes must be from existing v2 STHs. However, because 1367 of skew, the receiving front-end may not know one or both of the 1368 existing STHs. If both are known, then only the "consistency" 1369 output is returned. If the first is known but the second is not 1370 (or has been omitted), then the latest known STH is returned, 1371 along with a consistency proof between the first STH and the 1372 latest. If neither are known, then the latest known STH is 1373 returned without a consistency proof. 1375 Outputs: 1377 consistency: A base64 encoded "TransItem" of type 1378 "consistency_proof_v2", whose "tree_size_1" MUST match the 1379 "first" input. If the "sth" output is omitted, then 1380 "tree_size_2" MUST match the "second" input. If "first" and 1381 "second" are equal and correspond to a known STH, the returned 1382 consistency proof MUST be empty (a "consistency_path" array 1383 with zero elements). 1385 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1386 signed by this log. 1388 Note that no signature is required for the "consistency" output as 1389 it is used to verify the consistency between two STHs, which are 1390 signed. 1392 Error codes: 1394 +-------------------+-----------------------------------------------+ 1395 | type | detail | 1396 +-------------------+-----------------------------------------------+ 1397 | firstUnknown | "first" is before the latest known STH but is | 1398 | | not from an existing STH. | 1399 | | | 1400 | secondUnknown | "second" is before the latest known STH but | 1401 | | is not from an existing STH. | 1402 | | | 1403 | secondBeforeFirst | "second" is smaller than "first". | 1404 +-------------------+-----------------------------------------------+ 1406 See Section 2.1.4.2 for an outline of how to use the "consistency" 1407 output. 1409 5.4. Retrieve Merkle Inclusion Proof from Log by Leaf Hash 1411 GET https:///ct/v2/get-proof-by-hash 1413 Inputs: 1415 hash: A base64 encoded v2 leaf hash. 1417 tree_size: The tree_size of the tree on which to base the proof, 1418 in decimal. 1420 The "hash" must be calculated as defined in Section 4.7. The 1421 "tree_size" must designate an existing v2 STH. Because of skew, 1422 the front-end may not know the requested STH. In that case, it 1423 will return the latest STH it knows, along with an inclusion proof 1424 to that STH. If the front-end knows the requested STH then only 1425 "inclusion" is returned. 1427 Outputs: 1429 inclusion: A base64 encoded "TransItem" of type 1430 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1431 Tree nodes proves the inclusion of the chosen certificate in 1432 the selected STH. 1434 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1435 signed by this log. 1437 Note that no signature is required for the "inclusion" output as 1438 it is used to verify inclusion in the selected STH, which is 1439 signed. 1441 Error codes: 1443 +-----------------+-------------------------------------------------+ 1444 | type | detail | 1445 +-----------------+-------------------------------------------------+ 1446 | hashUnknown | "hash" is not the hash of a known leaf (may be | 1447 | | caused by skew or by a known certificate not | 1448 | | yet merged). | 1449 | | | 1450 | treeSizeUnknown | "hash" is before the latest known STH but is | 1451 | | not from an existing STH. | 1452 +-----------------+-------------------------------------------------+ 1454 See Section 2.1.3.2 for an outline of how to use the "inclusion" 1455 output. 1457 5.5. Retrieve Merkle Inclusion Proof, Signed Tree Head and Consistency 1458 Proof by Leaf Hash 1460 GET https:///ct/v2/get-all-by-hash 1462 Inputs: 1464 hash: A base64 encoded v2 leaf hash. 1466 tree_size: The tree_size of the tree on which to base the proofs, 1467 in decimal. 1469 The "hash" must be calculated as defined in Section 4.7. The 1470 "tree_size" must designate an existing v2 STH. 1472 Because of skew, the front-end may not know the requested STH or the 1473 requested hash, which leads to a number of cases: 1475 +--------------------+----------------------------------------------+ 1476 | Case | Response | 1477 +--------------------+----------------------------------------------+ 1478 | latest STH < | Return latest STH | 1479 | requested STH | | 1480 | | | 1481 | latest STH > | Return latest STH and a consistency proof | 1482 | requested STH | between it and the requested STH (see | 1483 | | Section 5.3) | 1484 | | | 1485 | index of requested | Return "inclusion" | 1486 | hash < latest STH | | 1487 +--------------------+----------------------------------------------+ 1488 Note that more than one case can be true, in which case the returned 1489 data is their union. It is also possible for none to be true, in 1490 which case the front-end MUST return an empty response. 1492 Outputs: 1494 inclusion: A base64 encoded "TransItem" of type 1495 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1496 Tree nodes proves the inclusion of the chosen certificate in 1497 the returned STH. 1499 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1500 signed by this log. 1502 consistency: A base64 encoded "TransItem" of type 1503 "consistency_proof_v2" that proves the consistency of the 1504 requested STH and the returned STH. 1506 Note that no signature is required for the "inclusion" or 1507 "consistency" outputs as they are used to verify inclusion in and 1508 consistency of STHs, which are signed. 1510 Errors are the same as in Section 5.4. 1512 See Section 2.1.3.2 for an outline of how to use the "inclusion" 1513 output, and see Section 2.1.4.2 for an outline of how to use the 1514 "consistency" output. 1516 5.6. Retrieve Entries and STH from Log 1518 GET https:///ct/v2/get-entries 1520 Inputs: 1522 start: 0-based index of first entry to retrieve, in decimal. 1524 end: 0-based index of last entry to retrieve, in decimal. 1526 Outputs: 1528 entries: An array of objects, each consisting of 1530 log_entry: The base64 encoded "TransItem" structure of type 1531 "x509_entry_v2" or "precert_entry_v2" (see Section 4.3). 1533 submitted_entry: JSON object representing the inputs that were 1534 submitted to "submit-entry", with the addition of the trust 1535 anchor to the "chain" field if the submission did not 1536 include it. 1538 sct: The base64 encoded "TransItem" of type "x509_sct_v2" or 1539 "precert_sct_v2" corresponding to this log entry. 1541 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1542 signed by this log. 1544 Note that this message is not signed -- the "entries" data can be 1545 verified by constructing the Merkle Tree Hash corresponding to a 1546 retrieved STH. All leaves MUST be v2. However, a compliant v2 1547 client MUST NOT construe an unrecognized TransItem type as an error. 1548 This means it may be unable to parse some entries, but note that each 1549 client can inspect the entries it does recognize as well as verify 1550 the integrity of the data by treating unrecognized leaves as opaque 1551 input to the tree. 1553 The "start" and "end" parameters SHOULD be within the range 0 <= x < 1554 "tree_size" as returned by "get-sth" in Section 5.2. 1556 The "start" parameter MUST be less than or equal to the "end" 1557 parameter. 1559 Each "submitted_entry" output parameter MUST include the trust anchor 1560 that the log used to verify the "submission", even if that trust 1561 anchor was not provided to "submit-entry" (see Section 5.1). If the 1562 "submission" does not certify itself, then the first element of 1563 "chain" MUST be present and MUST certify the "submission". 1565 Log servers MUST honor requests where 0 <= "start" < "tree_size" and 1566 "end" >= "tree_size" by returning a partial response covering only 1567 the valid entries in the specified range. "end" >= "tree_size" could 1568 be caused by skew. Note that the following restriction may also 1569 apply: 1571 Logs MAY restrict the number of entries that can be retrieved per 1572 "get-entries" request. If a client requests more than the permitted 1573 number of entries, the log SHALL return the maximum number of entries 1574 permissible. These entries SHALL be sequential beginning with the 1575 entry specified by "start". 1577 Because of skew, it is possible the log server will not have any 1578 entries between "start" and "end". In this case it MUST return an 1579 empty "entries" array. 1581 In any case, the log server MUST return the latest STH it knows 1582 about. 1584 See Section 2.1.2 for an outline of how to use a complete list of 1585 "log_entry" entries to verify the "root_hash". 1587 Error codes: 1589 +----------------+--------------------------------------------------+ 1590 | type | detail | 1591 +----------------+--------------------------------------------------+ 1592 | startUnknown | "start" is greater than the number of entries in | 1593 | | the Merkle tree. | 1594 | | | 1595 | endBeforeStart | "start" cannot be greater than "end". | 1596 +----------------+--------------------------------------------------+ 1598 5.7. Retrieve Accepted Trust Anchors 1600 GET https:///ct/v2/get-anchors 1602 No inputs. 1604 Outputs: 1606 certificates: An array of base64 encoded trust anchors that are 1607 acceptable to the log. 1609 max_chain_length: If the server has chosen to limit the length of 1610 chains it accepts, this is the maximum number of certificates 1611 in the chain, in decimal. If there is no limit, this is 1612 omitted. 1614 6. TLS Servers 1616 CT-using TLS servers MUST use at least one of the three mechanisms 1617 listed below to present one or more SCTs from one or more logs to 1618 each TLS client during full TLS handshakes, where each SCT 1619 corresponds to the server certificate. They SHOULD also present 1620 corresponding inclusion proofs and STHs. 1622 Three mechanisms are provided because they have different tradeoffs. 1624 o A TLS extension (Section 4.2 of [RFC8446]) with type 1625 "transparency_info" (see Section 6.4). This mechanism allows TLS 1626 servers to participate in CT without the cooperation of CAs, 1627 unlike the other two mechanisms. It also allows SCTs and 1628 inclusion proofs to be updated on the fly. 1630 o An Online Certificate Status Protocol (OCSP) [RFC6960] response 1631 extension (see Section 7.1.1), where the OCSP response is provided 1632 in the "CertificateStatus" message, provided that the TLS client 1633 included the "status_request" extension in the (extended) 1634 "ClientHello" (Section 8 of [RFC6066]). This mechanism, popularly 1635 known as OCSP stapling, is already widely (but not universally) 1636 implemented. It also allows SCTs and inclusion proofs to be 1637 updated on the fly. 1639 o An X509v3 certificate extension (see Section 7.1.2). This 1640 mechanism allows the use of unmodified TLS servers, but the SCTs 1641 and inclusion proofs cannot be updated on the fly. Since the logs 1642 from which the SCTs and inclusion proofs originated won't 1643 necessarily be accepted by TLS clients for the full lifetime of 1644 the certificate, there is a risk that TLS clients will 1645 subsequently consider the certificate to be non-compliant and in 1646 need of re-issuance. 1648 6.1. Multiple SCTs 1650 CT-using TLS servers SHOULD send SCTs from multiple logs, because: 1652 o One or more logs may not have become acceptable to all CT-using 1653 TLS clients. 1655 o If a CA and a log collude, it is possible to temporarily hide 1656 misissuance from clients. When a TLS client requires SCTs from 1657 multiple logs to be provided, it is more difficult to mount this 1658 attack. 1660 o If a log misbehaves or suffers a key compromise, a consequence may 1661 be that clients cease to trust it. Since the time an SCT may be 1662 in use can be considerable (several years is common in current 1663 practice when embedded in a certificate), including SCTs from 1664 multiple logs reduces the probability of the certificate being 1665 rejected by TLS clients. 1667 o TLS clients may have policies related to the above risks requiring 1668 TLS servers to present multiple SCTs. For example, at the time of 1669 writing, Chromium [Chromium.Log.Policy] requires multiple SCTs to 1670 be presented with EV certificates in order for the EV indicator to 1671 be shown. 1673 To select the logs from which to obtain SCTs, a TLS server can, for 1674 example, examine the set of logs popular TLS clients accept and 1675 recognize. 1677 6.2. TransItemList Structure 1679 Multiple SCTs, inclusion proofs, and indeed "TransItem" structures of 1680 any type, are combined into a list as follows: 1682 opaque SerializedTransItem<1..2^16-1>; 1684 struct { 1685 SerializedTransItem trans_item_list<1..2^16-1>; 1686 } TransItemList; 1688 Here, "SerializedTransItem" is an opaque byte string that contains 1689 the serialized "TransItem" structure. This encoding ensures that TLS 1690 clients can decode each "TransItem" individually (so, for example, if 1691 there is a version upgrade, out-of-date clients can still parse old 1692 "TransItem" structures while skipping over new "TransItem" structures 1693 whose versions they don't understand). 1695 6.3. Presenting SCTs, inclusions proofs and STHs 1697 In each "TransItemList" that is sent to a client during a TLS 1698 handshake, the TLS server MUST include a "TransItem" structure of 1699 type "x509_sct_v2" or "precert_sct_v2". 1701 Presenting inclusion proofs and STHs in the TLS handshake helps to 1702 protect the client's privacy (see Section 8.1.4) and reduces load on 1703 log servers. Therefore, if the TLS server can obtain them, it SHOULD 1704 also include "TransItem"s of type "inclusion_proof_v2" and 1705 "signed_tree_head_v2" in the "TransItemList". 1707 6.4. transparency_info TLS Extension 1709 Provided that a TLS client includes the "transparency_info" extension 1710 type in the ClientHello and the TLS server supports the 1711 "transparency_info" extension: 1713 o The TLS server MUST verify that the received "extension_data" is 1714 empty. 1716 o The TLS server MUST construct a "TransItemList" of relevant 1717 "TransItem"s (see Section 6.3), which SHOULD omit any "TransItem"s 1718 that are already embedded in the server certificate or the stapled 1719 OCSP response (see Section 7.1). If the constructed 1720 "TransItemList" is not empty, then the TLS server MUST include the 1721 "transparency_info" extension with the "extension_data" set to 1722 this "TransItemList". 1724 TLS servers MUST only include this extension in the following 1725 messages: 1727 o the ServerHello message (for TLS 1.2 or earlier). 1729 o the Certificate or CertificateRequest message (for TLS 1.3). 1731 TLS servers MUST NOT process or include this extension when a TLS 1732 session is resumed, since session resumption uses the original 1733 session information. 1735 7. Certification Authorities 1737 7.1. Transparency Information X.509v3 Extension 1739 The Transparency Information X.509v3 extension, which has OID 1740 1.3.101.75 and SHOULD be non-critical, contains one or more 1741 "TransItem" structures in a "TransItemList". This extension MAY be 1742 included in OCSP responses (see Section 7.1.1) and certificates (see 1743 Section 7.1.2). Since RFC5280 requires the "extnValue" field (an 1744 OCTET STRING) of each X.509v3 extension to include the DER encoding 1745 of an ASN.1 value, a "TransItemList" MUST NOT be included directly. 1746 Instead, it MUST be wrapped inside an additional OCTET STRING, which 1747 is then put into the "extnValue" field: 1749 TransparencyInformationSyntax ::= OCTET STRING 1751 "TransparencyInformationSyntax" contains a "TransItemList". 1753 7.1.1. OCSP Response Extension 1755 A certification authority MAY include a Transparency Information 1756 X.509v3 extension in the "singleExtensions" of a "SingleResponse" in 1757 an OCSP response. All included SCTs and inclusion proofs MUST be for 1758 the certificate identified by the "certID" of that "SingleResponse", 1759 or for a precertificate that corresponds to that certificate. 1761 7.1.2. Certificate Extension 1763 A certification authority MAY include a Transparency Information 1764 X.509v3 extension in a certificate. All included SCTs and inclusion 1765 proofs MUST be for a precertificate that corresponds to this 1766 certificate. 1768 7.2. TLS Feature X.509v3 Extension 1770 A certification authority SHOULD NOT issue any certificate that 1771 identifies the "transparency_info" TLS extension in a TLS feature 1772 extension [RFC7633], because TLS servers are not required to support 1773 the "transparency_info" TLS extension in order to participate in CT 1774 (see Section 6). 1776 8. Clients 1778 There are various different functions clients of logs might perform. 1779 We describe here some typical clients and how they should function. 1780 Any inconsistency may be used as evidence that a log has not behaved 1781 correctly, and the signatures on the data structures prevent the log 1782 from denying that misbehavior. 1784 All clients need various parameters in order to communicate with logs 1785 and verify their responses. These parameters are described in 1786 Section 4.1, but note that this document does not describe how the 1787 parameters are obtained, which is implementation-dependent (see, for 1788 example, [Chromium.Policy]). 1790 8.1. TLS Client 1792 8.1.1. Receiving SCTs and inclusion proofs 1794 TLS clients receive SCTs and inclusion proofs alongside or in 1795 certificates. CT-using TLS clients MUST implement all of the three 1796 mechanisms by which TLS servers may present SCTs (see Section 6). 1798 TLS clients that support the "transparency_info" TLS extension (see 1799 Section 6.4) SHOULD include it in ClientHello messages, with empty 1800 "extension_data". If a TLS server includes the "transparency_info" 1801 TLS extension when resuming a TLS session, the TLS client MUST abort 1802 the handshake. 1804 8.1.2. Reconstructing the TBSCertificate 1806 Validation of an SCT for a certificate (where the "type" of the 1807 "TransItem" is "x509_sct_v2") uses the unmodified TBSCertificate 1808 component of the certificate. 1810 Before an SCT for a precertificate (where the "type" of the 1811 "TransItem" is "precert_sct_v2") can be validated, the TBSCertificate 1812 component of the precertificate needs to be reconstructed from the 1813 TBSCertificate component of the certificate as follows: 1815 o Remove the Transparency Information extension (see Section 7.1). 1817 o Remove embedded v1 SCTs, identified by OID 1.3.6.1.4.1.11129.2.4.2 1818 (see section 3.3 of [RFC6962]). This allows embedded v1 and v2 1819 SCTs to co-exist in a certificate (see Appendix A). 1821 8.1.3. Validating SCTs 1823 In order to make use of a received SCT, the TLS client MUST first 1824 validate it as follows: 1826 o Compute the signature input by constructing a "TransItem" of type 1827 "x509_entry_v2" or "precert_entry_v2", depending on the SCT's 1828 "TransItem" type. The "TimestampedCertificateEntryDataV2" 1829 structure is constructed in the following manner: 1831 * "timestamp" is copied from the SCT. 1833 * "tbs_certificate" is the reconstructed TBSCertificate portion 1834 of the server certificate, as described in Section 8.1.2. 1836 * "issuer_key_hash" is computed as described in Section 4.7. 1838 * "sct_extensions" is copied from the SCT. 1840 o Verify the SCT's "signature" against the computed signature input 1841 using the public key of the corresponding log, which is identified 1842 by the "log_id". The required signature algorithm is one of the 1843 log's parameters. 1845 If the TLS client does not have the corresponding log's parameters, 1846 it cannot attempt to validate the SCT. When evaluating compliance 1847 (see Section 8.1.6), the TLS client will consider only those SCTs 1848 that it was able to validate. 1850 Note that SCT validation is not a substitute for the normal 1851 validation of the server certificate and its chain. 1853 8.1.4. Fetching inclusion proofs 1855 When a TLS client has validated a received SCT but does not yet 1856 possess a corresponding inclusion proof, the TLS client MAY request 1857 the inclusion proof directly from a log using "get-proof-by-hash" 1858 (Section 5.4) or "get-all-by-hash" (Section 5.5). 1860 Note that fetching inclusion proofs directly from a log will disclose 1861 to the log which TLS server the client has been communicating with. 1862 This may be regarded as a significant privacy concern, and so it is 1863 preferable for the TLS server to send the inclusion proofs (see 1864 Section 6.3). 1866 8.1.5. Validating inclusion proofs 1868 When a TLS client has received, or fetched, an inclusion proof (and 1869 an STH), it SHOULD proceed to verifying the inclusion proof to the 1870 provided STH. The TLS client SHOULD also verify consistency between 1871 the provided STH and an STH it knows about. 1873 If the TLS client holds an STH that predates the SCT, it MAY, in the 1874 process of auditing, request a new STH from the log (Section 5.2), 1875 then verify it by requesting a consistency proof (Section 5.3). Note 1876 that if the TLS client uses "get-all-by-hash", then it will already 1877 have the new STH. 1879 8.1.6. Evaluating compliance 1881 It is up to a client's local policy to specify the quantity and form 1882 of evidence (SCTs, inclusion proofs or a combination) needed to 1883 achieve compliance and how to handle non-compliance. 1885 A TLS client can only evaluate compliance if it has given the TLS 1886 server the opportunity to send SCTs and inclusion proofs by any of 1887 the three mechanisms that are mandatory to implement for CT-using TLS 1888 clients (see Section 8.1.1). Therefore, a TLS client MUST NOT 1889 evaluate compliance if it did not include both the 1890 "transparency_info" and "status_request" TLS extensions in the 1891 ClientHello. 1893 8.2. Monitor 1895 Monitors watch logs to check that they behave correctly, for 1896 certificates of interest, or both. For example, a monitor may be 1897 configured to report on all certificates that apply to a specific 1898 domain name when fetching new entries for consistency validation. 1900 A monitor MUST at least inspect every new entry in every log it 1901 watches, and it MAY also choose to keep copies of entire logs. 1903 To inspect all of the existing entries, the monitor SHOULD follow 1904 these steps once for each log: 1906 1. Fetch the current STH (Section 5.2). 1908 2. Verify the STH signature. 1910 3. Fetch all the entries in the tree corresponding to the STH 1911 (Section 5.6). 1913 4. If applicable, check each entry to see if it's a certificate of 1914 interest. 1916 5. Confirm that the tree made from the fetched entries produces the 1917 same hash as that in the STH. 1919 To inspect new entries, the monitor SHOULD follow these steps 1920 repeatedly for each log: 1922 1. Fetch the current STH (Section 5.2). Repeat until the STH 1923 changes. 1925 2. Verify the STH signature. 1927 3. Fetch all the new entries in the tree corresponding to the STH 1928 (Section 5.6). If they remain unavailable for an extended 1929 period, then this should be viewed as misbehavior on the part of 1930 the log. 1932 4. If applicable, check each entry to see if it's a certificate of 1933 interest. 1935 5. Either: 1937 1. Verify that the updated list of all entries generates a tree 1938 with the same hash as the new STH. 1940 Or, if it is not keeping all log entries: 1942 1. Fetch a consistency proof for the new STH with the previous 1943 STH (Section 5.3). 1945 2. Verify the consistency proof. 1947 3. Verify that the new entries generate the corresponding 1948 elements in the consistency proof. 1950 6. Repeat from step 1. 1952 8.3. Auditing 1954 Auditing ensures that the current published state of a log is 1955 reachable from previously published states that are known to be good, 1956 and that the promises made by the log in the form of SCTs have been 1957 kept. Audits are performed by monitors or TLS clients. 1959 In particular, there are four log behavior properties that should be 1960 checked: 1962 o The Maximum Merge Delay (MMD). 1964 o The STH Frequency Count. 1966 o The append-only property. 1968 o The consistency of the log view presented to all query sources. 1970 A benign, conformant log publishes a series of STHs over time, each 1971 derived from the previous STH and the submitted entries incorporated 1972 into the log since publication of the previous STH. This can be 1973 proven through auditing of STHs. SCTs returned to TLS clients can be 1974 audited by verifying against the accompanying certificate, and using 1975 Merkle Inclusion Proofs, against the log's Merkle tree. 1977 The action taken by the auditor if an audit fails is not specified, 1978 but note that in general if audit fails, the auditor is in possession 1979 of signed proof of the log's misbehavior. 1981 A monitor (Section 8.2) can audit by verifying the consistency of 1982 STHs it receives, ensure that each entry can be fetched and that the 1983 STH is indeed the result of making a tree from all fetched entries. 1985 A TLS client (Section 8.1) can audit by verifying an SCT against any 1986 STH dated after the SCT timestamp + the Maximum Merge Delay by 1987 requesting a Merkle inclusion proof (Section 5.4). It can also 1988 verify that the SCT corresponds to the server certificate it arrived 1989 with (i.e., the log entry is that certificate, or is a precertificate 1990 corresponding to that certificate). 1992 Checking of the consistency of the log view presented to all entities 1993 is more difficult to perform because it requires a way to share log 1994 responses among a set of CT-using entities, and is discussed in 1995 Section 11.3. 1997 9. Algorithm Agility 1999 It is not possible for a log to change any of its algorithms part way 2000 through its lifetime: 2002 Signature algorithm: SCT signatures must remain valid so signature 2003 algorithms can only be added, not removed. 2005 Hash algorithm: A log would have to support the old and new hash 2006 algorithms to allow backwards-compatibility with clients that are 2007 not aware of a hash algorithm change. 2009 Allowing multiple signature or hash algorithms for a log would 2010 require that all data structures support it and would significantly 2011 complicate client implementation, which is why it is not supported by 2012 this document. 2014 If it should become necessary to deprecate an algorithm used by a 2015 live log, then the log MUST be frozen as specified in Section 4.13 2016 and a new log SHOULD be started. Certificates in the frozen log that 2017 have not yet expired and require new SCTs SHOULD be submitted to the 2018 new log and the SCTs from that log used instead. 2020 10. IANA Considerations 2022 The assignment policy criteria mentioned in this section refer to the 2023 policies outlined in [RFC8126]. 2025 10.1. New Entry to the TLS ExtensionType Registry 2027 IANA is asked to add an entry for "transparency_info(TBD)" to the 2028 "TLS ExtensionType Values" registry defined in [RFC8446], setting the 2029 "Recommended" value to "Y", setting the "TLS 1.3" value to "CH, CR, 2030 CT", and citing this document as the "Reference". 2032 10.2. Hash Algorithms 2034 IANA is asked to establish a registry of hash algorithm values, named 2035 "CT Hash Algorithms", that initially consists of: 2037 +--------+------------+------------------------+--------------------+ 2038 | Value | Hash | OID | Reference / | 2039 | | Algorithm | | Assignment Policy | 2040 +--------+------------+------------------------+--------------------+ 2041 | 0x00 | SHA-256 | 2.16.840.1.101.3.4.2.1 | [RFC6234] | 2042 | | | | | 2043 | 0x01 - | Unassigned | | Specification | 2044 | 0xDF | | | Required and | 2045 | | | | Expert Review | 2046 | | | | | 2047 | 0xE0 - | Reserved | | Experimental Use | 2048 | 0xEF | | | | 2049 | | | | | 2050 | 0xF0 - | Reserved | | Private Use | 2051 | 0xFF | | | | 2052 +--------+------------+------------------------+--------------------+ 2054 10.2.1. Expert Review guidelines 2056 The appointed Expert should ensure that the proposed algorithm has a 2057 public specification and is suitable for use as a cryptographic hash 2058 algorithm with no known preimage or collision attacks. These attacks 2059 can damage the integrity of the log. 2061 10.3. Signature Algorithms 2063 IANA is asked to establish a registry of signature algorithm values, 2064 named "CT Signature Algorithms", that initially consists of: 2066 +--------------------------------+--------------------+-------------+ 2067 | SignatureScheme Value | Signature | Reference / | 2068 | | Algorithm | Assignment | 2069 | | | Policy | 2070 +--------------------------------+--------------------+-------------+ 2071 | ecdsa_secp256r1_sha256(0x0403) | ECDSA (NIST P-256) | [FIPS186-4] | 2072 | | with SHA-256 | | 2073 | | | | 2074 | ecdsa_secp256r1_sha256(0x0403) | Deterministic | [RFC6979] | 2075 | | ECDSA (NIST P-256) | | 2076 | | with HMAC-SHA256 | | 2077 | | | | 2078 | ed25519(0x0807) | Ed25519 (PureEdDSA | [RFC8032] | 2079 | | with the | | 2080 | | edwards25519 | | 2081 | | curve) | | 2082 | | | | 2083 | private_use(0xFE00..0xFFFF) | Reserved | Private Use | 2084 +--------------------------------+--------------------+-------------+ 2086 10.3.1. Expert Review guidelines 2088 The appointed Expert should ensure that the proposed algorithm has a 2089 public specification, has a value assigned to it in the TLS 2090 SignatureScheme Registry (that IANA is asked to establish in 2091 [RFC8446]) and is suitable for use as a cryptographic signature 2092 algorithm. 2094 10.4. VersionedTransTypes 2096 IANA is asked to establish a registry of "VersionedTransType" values, 2097 named "CT VersionedTransTypes", that initially consists of: 2099 +-------------+----------------------+------------------------------+ 2100 | Value | Type and Version | Reference / Assignment | 2101 | | | Policy | 2102 +-------------+----------------------+------------------------------+ 2103 | 0x0000 | Reserved | [RFC6962] (*) | 2104 | | | | 2105 | 0x0001 | x509_entry_v2 | RFCXXXX | 2106 | | | | 2107 | 0x0002 | precert_entry_v2 | RFCXXXX | 2108 | | | | 2109 | 0x0003 | x509_sct_v2 | RFCXXXX | 2110 | | | | 2111 | 0x0004 | precert_sct_v2 | RFCXXXX | 2112 | | | | 2113 | 0x0005 | signed_tree_head_v2 | RFCXXXX | 2114 | | | | 2115 | 0x0006 | consistency_proof_v2 | RFCXXXX | 2116 | | | | 2117 | 0x0007 | inclusion_proof_v2 | RFCXXXX | 2118 | | | | 2119 | 0x0008 - | Unassigned | Specification Required and | 2120 | 0xDFFF | | Expert Review | 2121 | | | | 2122 | 0xE000 - | Reserved | Experimental Use | 2123 | 0xEFFF | | | 2124 | | | | 2125 | 0xF000 - | Reserved | Private Use | 2126 | 0xFFFF | | | 2127 +-------------+----------------------+------------------------------+ 2129 (*) The 0x0000 value is reserved so that v1 SCTs are distinguishable 2130 from v2 SCTs and other "TransItem" structures. 2132 [RFC Editor: please update 'RFCXXXX' to refer to this document, once 2133 its RFC number is known.] 2135 10.4.1. Expert Review guidelines 2137 The appointed Expert should review the public specification to ensure 2138 that it is detailed enough to ensure implementation interoperability. 2140 10.5. Log Artifact Extension Registry 2142 IANA is asked to establish a registry of "ExtensionType" values, 2143 named "CT Log Artifact Extensions", that initially consists of: 2145 +---------------+------------+-----+--------------------------------+ 2146 | ExtensionType | Status | Use | Reference / Assignment Policy | 2147 +---------------+------------+-----+--------------------------------+ 2148 | 0x0000 - | Unassigned | n/a | Specification Required and | 2149 | 0xDFFF | | | Expert Review | 2150 | | | | | 2151 | 0xE000 - | Reserved | n/a | Experimental Use | 2152 | 0xEFFF | | | | 2153 | | | | | 2154 | 0xF000 - | Reserved | n/a | Private Use | 2155 | 0xFFFF | | | | 2156 +---------------+------------+-----+--------------------------------+ 2158 The "Use" column should contain one or both of the following values: 2160 o "SCT", for extensions specified for use in Signed Certificate 2161 Timestamps. 2163 o "STH", for extensions specified for use in Signed Tree Heads. 2165 10.5.1. Expert Review guidelines 2167 The appointed Expert should review the public specification to ensure 2168 that it is detailed enough to ensure implementation interoperability. 2169 The Expert should also verify that the extension is appropriate to 2170 the contexts in which it is specified to be used (SCT, STH, or both). 2172 10.6. Object Identifiers 2174 This document uses object identifiers (OIDs) to identify Log IDs (see 2175 Section 4.4), the precertificate CMS "eContentType" (see 2176 Section 3.2), and X.509v3 extensions in certificates (see 2177 Section 7.1.2) and OCSP responses (see Section 7.1.1). The OIDs are 2178 defined in an arc that was selected due to its short encoding. 2180 10.6.1. Log ID Registry 2182 IANA is asked to establish a registry of Log IDs, named "CT Log ID 2183 Registry", that initially consists of: 2185 +---------------------+------------+--------------------------------+ 2186 | Value | Log | Reference / Assignment Policy | 2187 +---------------------+------------+--------------------------------+ 2188 | 1.3.101.8192 - | Unassigned | Parameters Required and First | 2189 | 1.3.101.16383 | | Come First Served | 2190 | | | | 2191 | 1.3.101.80.0 - | Unassigned | Parameters Required and First | 2192 | 1.3.101.80.* | | Come First Served | 2193 +---------------------+------------+--------------------------------+ 2195 All OIDs in the range from 1.3.101.8192 to 1.3.101.16383 have been 2196 reserved. This is a limited resource of 8,192 OIDs, each of which 2197 has an encoded length of 4 octets. 2199 The 1.3.101.80 arc has been delegated. This is an unlimited 2200 resource, but only the 128 OIDs from 1.3.101.80.0 to 1.3.101.80.127 2201 have an encoded length of only 4 octets. 2203 Each application for the allocation of a Log ID should be accompanied 2204 by all of the required parameters (except for the Log ID) listed in 2205 Section 4.1. 2207 11. Security Considerations 2209 With CAs, logs, and servers performing the actions described here, 2210 TLS clients can use logs and signed timestamps to reduce the 2211 likelihood that they will accept misissued certificates. If a server 2212 presents a valid signed timestamp for a certificate, then the client 2213 knows that a log has committed to publishing the certificate. From 2214 this, the client knows that monitors acting for the subject of the 2215 certificate have had some time to notice the misissuance and take 2216 some action, such as asking a CA to revoke a misissued certificate. 2217 A signed timestamp does not guarantee this though, since appropriate 2218 monitors might not have checked the logs or the CA might have refused 2219 to revoke the certificate. 2221 In addition, if TLS clients will not accept unlogged certificates, 2222 then site owners will have a greater incentive to submit certificates 2223 to logs, possibly with the assistance of their CA, increasing the 2224 overall transparency of the system. 2226 [I-D.ietf-trans-threat-analysis] provides a more detailed threat 2227 analysis of the Certificate Transparency architecture. 2229 11.1. Misissued Certificates 2231 Misissued certificates that have not been publicly logged, and thus 2232 do not have a valid SCT, are not considered compliant. Misissued 2233 certificates that do have an SCT from a log will appear in that 2234 public log within the Maximum Merge Delay, assuming the log is 2235 operating correctly. Since a log is allowed to serve an STH of any 2236 age up to the MMD, the maximum period of time during which a 2237 misissued certificate can be used without being available for audit 2238 is twice the MMD. 2240 11.2. Detection of Misissue 2242 The logs do not themselves detect misissued certificates; they rely 2243 instead on interested parties, such as domain owners, to monitor them 2244 and take corrective action when a misissue is detected. 2246 11.3. Misbehaving Logs 2248 A log can misbehave in several ways. Examples include: failing to 2249 incorporate a certificate with an SCT in the Merkle Tree within the 2250 MMD; presenting different, conflicting views of the Merkle Tree at 2251 different times and/or to different parties; issuing STHs too 2252 frequently; mutating the signature of a logged certificate; and 2253 failing to present a chain containing the certifier of a logged 2254 certificate. Such misbehavior is detectable and 2255 [I-D.ietf-trans-threat-analysis] provides more details on how this 2256 can be done. 2258 Violation of the MMD contract is detected by log clients requesting a 2259 Merkle inclusion proof (Section 5.4) for each observed SCT. These 2260 checks can be asynchronous and need only be done once per 2261 certificate. However, note that there may be privacy concerns (see 2262 Section 8.1.4). 2264 Violation of the append-only property or the STH issuance rate limit 2265 can be detected by clients comparing their instances of the Signed 2266 Tree Heads. There are various ways this could be done, for example 2267 via gossip (see [I-D.ietf-trans-gossip]) or peer-to-peer 2268 communications or by sending STHs to monitors (who could then 2269 directly check against their own copy of the relevant log). Proof of 2270 misbehavior in such cases would be: a series of STHs that were issued 2271 too closely together, proving violation of the STH issuance rate 2272 limit; or an STH with a root hash that does not match the one 2273 calculated from a copy of the log, proving violation of the append- 2274 only property. 2276 11.4. Preventing Tracking Clients 2278 Clients that gossip STHs or report back SCTs can be tracked or traced 2279 if a log produces multiple STHs or SCTs with the same timestamp and 2280 data but different signatures. Logs SHOULD mitigate this risk by 2281 either: 2283 o Using deterministic signature schemes, or 2285 o Producing no more than one SCT for each distinct submission and no 2286 more than one STH for each distinct tree_size. Each of these SCTs 2287 and STHs can be stored by the log and served to other clients that 2288 submit the same certificate or request the same STH. 2290 11.5. Multiple SCTs 2292 By requiring TLS servers to offer multiple SCTs, each from a 2293 different log, TLS clients reduce the effectiveness of an attack 2294 where a CA and a log collude (see Section 6.1). 2296 12. Acknowledgements 2298 The authors would like to thank Erwann Abelea, Robin Alden, Andrew 2299 Ayer, Richard Barnes, Al Cutter, David Drysdale, Francis Dupont, Adam 2300 Eijdenberg, Stephen Farrell, Daniel Kahn Gillmor, Paul Hadfield, Brad 2301 Hill, Jeff Hodges, Paul Hoffman, Jeffrey Hutzelman, Kat Joyce, 2302 Stephen Kent, SM, Alexey Melnikov, Linus Nordberg, Chris Palmer, 2303 Trevor Perrin, Pierre Phaneuf, Eric Rescorla, Melinda Shore, Ryan 2304 Sleevi, Martin Smith, Carl Wallace and Paul Wouters for their 2305 valuable contributions. 2307 A big thank you to Symantec for kindly donating the OIDs from the 2308 1.3.101 arc that are used in this document. 2310 13. References 2312 13.1. Normative References 2314 [FIPS186-4] 2315 NIST, "FIPS PUB 186-4", July 2013, 2316 . 2319 [HTML401] Raggett, D., Le Hors, A., and I. Jacobs, "HTML 4.01 2320 Specification", World Wide Web Consortium Recommendation 2321 REC-html401-19991224, December 1999, 2322 . 2324 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2325 Requirement Levels", BCP 14, RFC 2119, 2326 DOI 10.17487/RFC2119, March 1997, 2327 . 2329 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 2330 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 2331 . 2333 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 2334 Housley, R., and W. Polk, "Internet X.509 Public Key 2335 Infrastructure Certificate and Certificate Revocation List 2336 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 2337 . 2339 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2340 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2341 . 2343 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 2344 Extensions: Extension Definitions", RFC 6066, 2345 DOI 10.17487/RFC6066, January 2011, 2346 . 2348 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 2349 Galperin, S., and C. Adams, "X.509 Internet Public Key 2350 Infrastructure Online Certificate Status Protocol - OCSP", 2351 RFC 6960, DOI 10.17487/RFC6960, June 2013, 2352 . 2354 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2355 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2356 DOI 10.17487/RFC7231, June 2014, 2357 . 2359 [RFC7633] Hallam-Baker, P., "X.509v3 Transport Layer Security (TLS) 2360 Feature Extension", RFC 7633, DOI 10.17487/RFC7633, 2361 October 2015, . 2363 [RFC7807] Nottingham, M. and E. Wilde, "Problem Details for HTTP 2364 APIs", RFC 7807, DOI 10.17487/RFC7807, March 2016, 2365 . 2367 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 2368 Signature Algorithm (EdDSA)", RFC 8032, 2369 DOI 10.17487/RFC8032, January 2017, 2370 . 2372 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2373 Interchange Format", STD 90, RFC 8259, 2374 DOI 10.17487/RFC8259, December 2017, 2375 . 2377 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 2378 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 2379 . 2381 [UNIXTIME] 2382 IEEE, "The Open Group Base Specifications Issue 7 IEEE Std 2383 1003.1-2008, 2016 Edition", n.d., . 2387 13.2. Informative References 2389 [Chromium.Log.Policy] 2390 The Chromium Projects, "Chromium Certificate Transparency 2391 Log Policy", 2014, . 2394 [Chromium.Policy] 2395 The Chromium Projects, "Chromium Certificate 2396 Transparency", 2014, . 2399 [CrosbyWallach] 2400 Crosby, S. and D. Wallach, "Efficient Data Structures for 2401 Tamper-Evident Logging", Proceedings of the 18th USENIX 2402 Security Symposium, Montreal, August 2009, 2403 . 2406 [I-D.ietf-trans-gossip] 2407 Nordberg, L., Gillmor, D., and T. Ritter, "Gossiping in 2408 CT", draft-ietf-trans-gossip-05 (work in progress), 2409 January 2018. 2411 [I-D.ietf-trans-threat-analysis] 2412 Kent, S., "Attack and Threat Model for Certificate 2413 Transparency", draft-ietf-trans-threat-analysis-16 (work 2414 in progress), October 2018. 2416 [JSON.Metadata] 2417 The Chromium Projects, "Chromium Log Metadata JSON 2418 Schema", 2014, . 2421 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 2422 (SHA and SHA-based HMAC and HKDF)", RFC 6234, 2423 DOI 10.17487/RFC6234, May 2011, 2424 . 2426 [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate 2427 Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013, 2428 . 2430 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 2431 Algorithm (DSA) and Elliptic Curve Digital Signature 2432 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2433 2013, . 2435 [RFC7320] Nottingham, M., "URI Design and Ownership", BCP 190, 2436 RFC 7320, DOI 10.17487/RFC7320, July 2014, 2437 . 2439 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2440 Writing an IANA Considerations Section in RFCs", BCP 26, 2441 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2442 . 2444 Appendix A. Supporting v1 and v2 simultaneously 2446 Certificate Transparency logs have to be either v1 (conforming to 2447 [RFC6962]) or v2 (conforming to this document), as the data 2448 structures are incompatible and so a v2 log could not issue a valid 2449 v1 SCT. 2451 CT clients, however, can support v1 and v2 SCTs, for the same 2452 certificate, simultaneously, as v1 SCTs are delivered in different 2453 TLS, X.509 and OCSP extensions than v2 SCTs. 2455 v1 and v2 SCTs for X.509 certificates can be validated independently. 2456 For precertificates, v2 SCTs should be embedded in the TBSCertificate 2457 before submission of the TBSCertificate (inside a v1 precertificate, 2458 as described in Section 3.1. of [RFC6962]) to a v1 log so that TLS 2459 clients conforming to [RFC6962] but not this document are oblivious 2460 to the embedded v2 SCTs. An issuer can follow these steps to produce 2461 an X.509 certificate with embedded v1 and v2 SCTs: 2463 o Create a CMS precertificate as described in Section 3.2 and submit 2464 it to v2 logs. 2466 o Embed the obtained v2 SCTs in the TBSCertificate, as described in 2467 Section 7.1.2. 2469 o Use that TBSCertificate to create a v1 precertificate, as 2470 described in Section 3.1. of [RFC6962] and submit it to v1 logs. 2472 o Embed the v1 SCTs in the TBSCertificate, as described in 2473 Section 3.3 of [RFC6962]. 2475 o Sign that TBSCertificate (which now contains v1 and v2 SCTs) to 2476 issue the final X.509 certificate. 2478 Authors' Addresses 2480 Ben Laurie 2481 Google UK Ltd. 2483 Email: benl@google.com 2485 Adam Langley 2486 Google Inc. 2488 Email: agl@google.com 2490 Emilia Kasper 2491 Google Switzerland GmbH 2493 Email: ekasper@google.com 2495 Eran Messeri 2496 Google UK Ltd. 2498 Email: eranm@google.com 2500 Rob Stradling 2501 Sectigo Ltd. 2503 Email: rob@sectigo.com