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