idnits 2.17.1 draft-ietf-trans-rfc6962-bis-22.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 8 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 (December 14, 2016) is 2683 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: '1' on line 626 -- Looks like a reference, but probably isn't: '7' on line 631 -- Looks like a reference, but probably isn't: '0' on line 621 -- Looks like a reference, but probably isn't: '2' on line 623 -- Possible downref: Non-RFC (?) normative reference: ref. 'HTML401' ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) ** 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 8017 == Outdated reference: A later version (-05) exists of draft-ietf-trans-gossip-03 == Outdated reference: A later version (-16) exists of draft-ietf-trans-threat-analysis-10 -- Obsolete informational reference (is this intentional?): RFC 4634 (Obsoleted by RFC 6234) -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) -- Obsolete informational reference (is this intentional?): RFC 6962 (Obsoleted by RFC 9162) Summary: 6 errors (**), 0 flaws (~~), 4 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: June 17, 2017 Google 7 R. Stradling 8 Comodo 9 December 14, 2016 11 Certificate Transparency Version 2.0 12 draft-ietf-trans-rfc6962-bis-22 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 June 17, 2017. 46 Copyright Notice 48 Copyright (c) 2016 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. Merkle Inclusion Proofs . . . . . . . . . . . . . . . 8 70 2.1.2. Merkle Consistency Proofs . . . . . . . . . . . . . . 9 71 2.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 10 72 2.1.4. Signatures . . . . . . . . . . . . . . . . . . . . . 11 73 3. Submitters . . . . . . . . . . . . . . . . . . . . . . . . . 11 74 3.1. Certificates . . . . . . . . . . . . . . . . . . . . . . 12 75 3.2. Precertificates . . . . . . . . . . . . . . . . . . . . . 12 76 4. Private Domain Name Labels . . . . . . . . . . . . . . . . . 13 77 4.1. Wildcard Certificates . . . . . . . . . . . . . . . . . . 13 78 4.2. Using a Name-Constrained Intermediate CA . . . . . . . . 13 79 5. Log Format and Operation . . . . . . . . . . . . . . . . . . 14 80 5.1. Accepting Submissions . . . . . . . . . . . . . . . . . . 15 81 5.2. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 15 82 5.3. Log ID . . . . . . . . . . . . . . . . . . . . . . . . . 16 83 5.4. TransItem Structure . . . . . . . . . . . . . . . . . . . 17 84 5.5. Merkle Tree Leaves . . . . . . . . . . . . . . . . . . . 18 85 5.6. Signed Certificate Timestamp (SCT) . . . . . . . . . . . 19 86 5.7. Merkle Tree Head . . . . . . . . . . . . . . . . . . . . 20 87 5.8. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 21 88 5.9. Merkle Consistency Proofs . . . . . . . . . . . . . . . . 22 89 5.10. Merkle Inclusion Proofs . . . . . . . . . . . . . . . . . 22 90 5.11. Shutting down a log . . . . . . . . . . . . . . . . . . . 23 91 6. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 23 92 6.1. Add Chain to Log . . . . . . . . . . . . . . . . . . . . 25 93 6.2. Add PreCertChain to Log . . . . . . . . . . . . . . . . . 26 94 6.3. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 26 95 6.4. Retrieve Merkle Consistency Proof between Two Signed Tree 96 Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 26 97 6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 27 98 6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and 99 Consistency Proof by Leaf Hash . . . . . . . . . . . . . 28 100 6.7. Retrieve Entries and STH from Log . . . . . . . . . . . . 30 101 6.8. Retrieve Accepted Trust Anchors . . . . . . . . . . . . . 31 102 7. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 31 103 7.1. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . . 32 104 7.2. TransItemList Structure . . . . . . . . . . . . . . . . . 33 105 7.3. Presenting SCTs, inclusion proofs and STHs . . . . . . . 33 106 7.4. Presenting SCTs only . . . . . . . . . . . . . . . . . . 34 107 7.5. transparency_info TLS Extension . . . . . . . . . . . . . 34 108 7.6. cached_info TLS Extension . . . . . . . . . . . . . . . . 34 109 8. Certification Authorities . . . . . . . . . . . . . . . . . . 34 110 8.1. Transparency Information X.509v3 Extension . . . . . . . 35 111 8.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 35 112 8.1.2. Certificate Extension . . . . . . . . . . . . . . . . 35 113 8.2. TLS Feature Extension . . . . . . . . . . . . . . . . . . 35 114 9. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 115 9.1. Metadata . . . . . . . . . . . . . . . . . . . . . . . . 36 116 9.2. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 37 117 9.2.1. Receiving SCTs . . . . . . . . . . . . . . . . . . . 37 118 9.2.2. Reconstructing the TBSCertificate . . . . . . . . . . 37 119 9.2.3. Validating SCTs . . . . . . . . . . . . . . . . . . . 37 120 9.2.4. Validating inclusion proofs . . . . . . . . . . . . . 38 121 9.2.5. Evaluating compliance . . . . . . . . . . . . . . . . 38 122 9.2.6. TLS Feature Extension . . . . . . . . . . . . . . . . 38 123 9.2.7. cached_info TLS Extension . . . . . . . . . . . . . . 38 124 9.2.8. Handling of Non-compliance . . . . . . . . . . . . . 39 125 9.3. Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 39 126 9.4. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 40 127 9.4.1. Verifying an inclusion proof . . . . . . . . . . . . 41 128 9.4.2. Verifying consistency between two STHs . . . . . . . 42 129 9.4.3. Verifying root hash given entries . . . . . . . . . . 42 130 10. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 43 131 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 44 132 11.1. TLS Extension Type . . . . . . . . . . . . . . . . . . . 44 133 11.2. New Entry to the TLS CachedInformationType registry . . 44 134 11.3. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 44 135 11.3.1. Expert Review guidelines . . . . . . . . . . . . . . 44 136 11.4. Signature Algorithms . . . . . . . . . . . . . . . . . . 45 137 11.4.1. Expert Review guidelines . . . . . . . . . . . . . . 45 138 11.5. VersionedTransTypes . . . . . . . . . . . . . . . . . . 45 139 11.5.1. Expert Review guidelines . . . . . . . . . . . . . . 46 140 11.6. SCT Extensions . . . . . . . . . . . . . . . . . . . . . 47 141 11.6.1. Expert Review guidelines . . . . . . . . . . . . . . 47 143 11.7. STH Extensions . . . . . . . . . . . . . . . . . . . . . 47 144 11.7.1. Expert Review guidelines . . . . . . . . . . . . . . 47 145 11.8. Object Identifiers . . . . . . . . . . . . . . . . . . . 48 146 11.8.1. Log ID Registry . . . . . . . . . . . . . . . . . . 48 147 11.8.2. Expert Review guidelines . . . . . . . . . . . . . . 48 148 12. Security Considerations . . . . . . . . . . . . . . . . . . . 49 149 12.1. Misissued Certificates . . . . . . . . . . . . . . . . . 49 150 12.2. Detection of Misissue . . . . . . . . . . . . . . . . . 49 151 12.3. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 49 152 12.4. Deterministic Signatures . . . . . . . . . . . . . . . . 50 153 12.5. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 50 154 13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 50 155 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 51 156 14.1. Normative References . . . . . . . . . . . . . . . . . . 51 157 14.2. Informative References . . . . . . . . . . . . . . . . . 52 158 Appendix A. Supporting v1 and v2 simultaneously . . . . . . . . 54 159 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 54 161 1. Introduction 163 Certificate transparency aims to mitigate the problem of misissued 164 certificates by providing append-only logs of issued certificates. 165 The logs do not need to be trusted because they are publicly 166 auditable. Anyone may verify the correctness of each log and monitor 167 when new certificates are added to it. The logs do not themselves 168 prevent misissue, but they ensure that interested parties 169 (particularly those named in certificates) can detect such 170 misissuance. Note that this is a general mechanism that could be 171 used for transparently logging any form of binary data, subject to 172 some kind of inclusion criteria. In this document, we only describe 173 its use for public TLS server certificates (i.e., where the inclusion 174 criteria is a valid certificate issued by a public certification 175 authority (CA)). 177 Each log contains certificate chains, which can be submitted by 178 anyone. It is expected that public CAs will contribute all their 179 newly issued certificates to one or more logs; however certificate 180 holders can also contribute their own certificate chains, as can 181 third parties. In order to avoid logs being rendered useless by the 182 submission of large numbers of spurious certificates, it is required 183 that each chain ends with a trust anchor that is accepted by the log. 184 When a chain is accepted by a log, a signed timestamp is returned, 185 which can later be used to provide evidence to TLS clients that the 186 chain has been submitted. TLS clients can thus require that all 187 certificates they accept as valid are accompanied by signed 188 timestamps. 190 Those who are concerned about misissuance can monitor the logs, 191 asking them regularly for all new entries, and can thus check whether 192 domains for which they are responsible have had certificates issued 193 that they did not expect. What they do with this information, 194 particularly when they find that a misissuance has happened, is 195 beyond the scope of this document. However, broadly speaking, they 196 can invoke existing business mechanisms for dealing with misissued 197 certificates, such as working with the CA to get the certificate 198 revoked, or with maintainers of trust anchor lists to get the CA 199 removed. Of course, anyone who wants can monitor the logs and, if 200 they believe a certificate is incorrectly issued, take action as they 201 see fit. 203 Similarly, those who have seen signed timestamps from a particular 204 log can later demand a proof of inclusion from that log. If the log 205 is unable to provide this (or, indeed, if the corresponding 206 certificate is absent from monitors' copies of that log), that is 207 evidence of the incorrect operation of the log. The checking 208 operation is asynchronous to allow clients to proceed without delay, 209 despite possible issues such as network connectivity and the vagaries 210 of firewalls. 212 The append-only property of each log is achieved using Merkle Trees, 213 which can be used to show that any particular instance of the log is 214 a superset of any particular previous instance. Likewise, Merkle 215 Trees avoid the need to blindly trust logs: if a log attempts to show 216 different things to different people, this can be efficiently 217 detected by comparing tree roots and consistency proofs. Similarly, 218 other misbehaviors of any log (e.g., issuing signed timestamps for 219 certificates they then don't log) can be efficiently detected and 220 proved to the world at large. 222 1.1. Requirements Language 224 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 225 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 226 document are to be interpreted as described in RFC 2119 [RFC2119]. 228 1.2. Data Structures 230 Data structures are defined according to the conventions laid out in 231 Section 4 of [RFC5246]. 233 1.3. Major Differences from CT 1.0 235 This document revises and obsoletes the experimental CT 1.0 [RFC6962] 236 protocol, drawing on insights gained from CT 1.0 deployments and on 237 feedback from the community. The major changes are: 239 o Hash and signature algorithm agility: permitted algorithms are now 240 specified in IANA registries. 242 o Precertificate format: precertificates are now CMS objects rather 243 than X.509 certificates, which avoids violating the certificate 244 serial number uniqueness requirement in Section 4.1.2.2 of 245 [RFC5280]. 247 o Removed precertificate signing certificates and the precertificate 248 poison extension: the change of precertificate format means that 249 these are no longer needed. 251 o Private domain name labels: added a mechanism for logging a name- 252 constrained intermediate in place of end-entity certificates 253 issued by that CA. 255 o Logs IDs: each log is now identified by an OID rather than by the 256 hash of its public key. OID allocations are managed by an IANA 257 registry. 259 o "TransItem" structure: this new data structure is used to 260 encapsulate most types of CT data. A "TransItemList", consisting 261 of one or more "TransItem" structures, can be used anywhere that 262 "SignedCertificateTimestampList" was used in [RFC6962]. 264 o Merkle tree leaves: the "MerkleTreeLeaf" structure has been 265 replaced by the "TransItem" structure, which eases extensibility 266 and simplifies the leaf structure by removing one layer of 267 abstraction. 269 o Unified leaf format: the structure for both certificate and 270 precertificate entries now includes only the TBSCertificate 271 (whereas certificate entries in [RFC6962] included the entire 272 certificate). 274 o SCT extensions: these are now typed and managed by an IANA 275 registry. 277 o STH extensions: STHs can now contain extensions, which are typed 278 and managed by an IANA registry. 280 o API outputs: complete "TransItem" structures are returned, rather 281 than the constituent parts of each structure. 283 o get-all-by-hash: new client API for obtaining an inclusion proof 284 and the corresponding consistency proof at the same time. 286 o Presenting SCTs with proofs: TLS servers may present SCTs together 287 with the corresponding inclusion proofs using any of the 288 mechanisms that [RFC6962] defined for presenting SCTs only. 289 (Presenting SCTs only is still supported). 291 o CT TLS extension: the "signed_certificate_timestamp" TLS extension 292 has been replaced by the "transparency_info" TLS extension. 294 o Other TLS extensions: "status_request_v2" may be used (in the same 295 manner as "status_request"); "cached_info" may be used to avoid 296 sending the same complete SCTs and inclusion proofs to the same 297 TLS clients multiple times. 299 o TLS Feature extension: this certificate extension may be used by a 300 CA to indicate that CT compliance is required. 302 o Verification algorithms: added detailed algorithms for verifying 303 inclusion proofs, for verifying consistency between two STHs, and 304 for verifying a root hash given a complete list of the relevant 305 leaf input entries. 307 o Extensive clarifications and editorial work. 309 2. Cryptographic Components 311 2.1. Merkle Hash Trees 313 Logs use a binary Merkle Hash Tree for efficient auditing. The 314 hashing algorithm used by each log is expected to be specified as 315 part of the metadata relating to that log (see Section 9.1). We have 316 established a registry of acceptable algorithms, see Section 11.3. 317 The hashing algorithm in use is referred to as HASH throughout this 318 document and the size of its output in bytes as HASH_SIZE. The input 319 to the Merkle Tree Hash is a list of data entries; these entries will 320 be hashed to form the leaves of the Merkle Hash Tree. The output is 321 a single HASH_SIZE Merkle Tree Hash. Given an ordered list of n 322 inputs, D[n] = {d(0), d(1), ..., d(n-1)}, the Merkle Tree Hash (MTH) 323 is thus defined as follows: 325 The hash of an empty list is the hash of an empty string: 327 MTH({}) = HASH(). 329 The hash of a list with one entry (also known as a leaf hash) is: 331 MTH({d(0)}) = HASH(0x00 || d(0)). 333 For n > 1, let k be the largest power of two smaller than n (i.e., k 334 < n <= 2k). The Merkle Tree Hash of an n-element list D[n] is then 335 defined recursively as 337 MTH(D[n]) = HASH(0x01 || MTH(D[0:k]) || MTH(D[k:n])), 339 where || is concatenation and D[k1:k2] denotes the list {d(k1), 340 d(k1+1), ..., d(k2-1)} of length (k2 - k1). (Note that the hash 341 calculations for leaves and nodes differ. This domain separation is 342 required to give second preimage resistance.) 344 Note that we do not require the length of the input list to be a 345 power of two. The resulting Merkle Tree may thus not be balanced; 346 however, its shape is uniquely determined by the number of leaves. 347 (Note: This Merkle Tree is essentially the same as the history tree 348 [CrosbyWallach] proposal, except our definition handles non-full 349 trees differently.) 351 2.1.1. Merkle Inclusion Proofs 353 A Merkle inclusion proof for a leaf in a Merkle Hash Tree is the 354 shortest list of additional nodes in the Merkle Tree required to 355 compute the Merkle Tree Hash for that tree. Each node in the tree is 356 either a leaf node or is computed from the two nodes immediately 357 below it (i.e., towards the leaves). At each step up the tree 358 (towards the root), a node from the inclusion proof is combined with 359 the node computed so far. In other words, the inclusion proof 360 consists of the list of missing nodes required to compute the nodes 361 leading from a leaf to the root of the tree. If the root computed 362 from the inclusion proof matches the true root, then the inclusion 363 proof proves that the leaf exists in the tree. 365 Given an ordered list of n inputs to the tree, D[n] = {d(0), ..., 366 d(n-1)}, the Merkle inclusion proof PATH(m, D[n]) for the (m+1)th 367 input d(m), 0 <= m < n, is defined as follows: 369 The proof for the single leaf in a tree with a one-element input list 370 D[1] = {d(0)} is empty: 372 PATH(0, {d(0)}) = {} 374 For n > 1, let k be the largest power of two smaller than n. The 375 proof for the (m+1)th element d(m) in a list of n > m elements is 376 then defined recursively as 378 PATH(m, D[n]) = PATH(m, D[0:k]) : MTH(D[k:n]) for m < k; and 380 PATH(m, D[n]) = PATH(m - k, D[k:n]) : MTH(D[0:k]) for m >= k, 381 where : is concatenation of lists and D[k1:k2] denotes the length (k2 382 - k1) list {d(k1), d(k1+1),..., d(k2-1)} as before. 384 2.1.2. Merkle Consistency Proofs 386 Merkle consistency proofs prove the append-only property of the tree. 387 A Merkle consistency proof for a Merkle Tree Hash MTH(D[n]) and a 388 previously advertised hash MTH(D[0:m]) of the first m leaves, m <= n, 389 is the list of nodes in the Merkle Tree required to verify that the 390 first m inputs D[0:m] are equal in both trees. Thus, a consistency 391 proof must contain a set of intermediate nodes (i.e., commitments to 392 inputs) sufficient to verify MTH(D[n]), such that (a subset of) the 393 same nodes can be used to verify MTH(D[0:m]). We define an algorithm 394 that outputs the (unique) minimal consistency proof. 396 Given an ordered list of n inputs to the tree, D[n] = {d(0), ..., 397 d(n-1)}, the Merkle consistency proof PROOF(m, D[n]) for a previous 398 Merkle Tree Hash MTH(D[0:m]), 0 < m < n, is defined as: 400 PROOF(m, D[n]) = SUBPROOF(m, D[n], true) 402 In SUBPROOF, the boolean value represents whether the subtree created 403 from D[0:m] is a complete subtree of the Merkle Tree created from 404 D[n], and, consequently, whether the subtree Merkle Tree Hash 405 MTH(D[0:m]) is known. The initial call to SUBPROOF sets this to be 406 true, and SUBPROOF is then defined as follows: 408 The subproof for m = n is empty if m is the value for which PROOF was 409 originally requested (meaning that the subtree created from D[0:m] is 410 a complete subtree of the Merkle Tree created from the original D[n] 411 for which PROOF was requested, and the subtree Merkle Tree Hash 412 MTH(D[0:m]) is known): 414 SUBPROOF(m, D[m], true) = {} 416 Otherwise, the subproof for m = n is the Merkle Tree Hash committing 417 inputs D[0:m]: 419 SUBPROOF(m, D[m], false) = {MTH(D[m])} 421 For m < n, let k be the largest power of two smaller than n. The 422 subproof is then defined recursively. 424 If m <= k, the right subtree entries D[k:n] only exist in the current 425 tree. We prove that the left subtree entries D[0:k] are consistent 426 and add a commitment to D[k:n]: 428 SUBPROOF(m, D[n], b) = SUBPROOF(m, D[0:k], b) : MTH(D[k:n]) 429 If m > k, the left subtree entries D[0:k] are identical in both 430 trees. We prove that the right subtree entries D[k:n] are consistent 431 and add a commitment to D[0:k]. 433 SUBPROOF(m, D[n], b) = SUBPROOF(m - k, D[k:n], false) : MTH(D[0:k]) 435 Here, : is a concatenation of lists, and D[k1:k2] denotes the length 436 (k2 - k1) list {d(k1), d(k1+1),..., d(k2-1)} as before. 438 The number of nodes in the resulting proof is bounded above by 439 ceil(log2(n)) + 1. 441 2.1.3. Example 443 The binary Merkle Tree with 7 leaves: 445 hash 446 / \ 447 / \ 448 / \ 449 / \ 450 / \ 451 k l 452 / \ / \ 453 / \ / \ 454 / \ / \ 455 g h i j 456 / \ / \ / \ | 457 a b c d e f d6 458 | | | | | | 459 d0 d1 d2 d3 d4 d5 461 The inclusion proof for d0 is [b, h, l]. 463 The inclusion proof for d3 is [c, g, l]. 465 The inclusion proof for d4 is [f, j, k]. 467 The inclusion proof for d6 is [i, k]. 469 The same tree, built incrementally in four steps: 471 hash0 hash1=k 472 / \ / \ 473 / \ / \ 474 / \ / \ 475 g c g h 476 / \ | / \ / \ 477 a b d2 a b c d 478 | | | | | | 479 d0 d1 d0 d1 d2 d3 481 hash2 hash 482 / \ / \ 483 / \ / \ 484 / \ / \ 485 / \ / \ 486 / \ / \ 487 k i k l 488 / \ / \ / \ / \ 489 / \ e f / \ / \ 490 / \ | | / \ / \ 491 g h d4 d5 g h i j 492 / \ / \ / \ / \ / \ | 493 a b c d a b c d e f d6 494 | | | | | | | | | | 495 d0 d1 d2 d3 d0 d1 d2 d3 d4 d5 497 The consistency proof between hash0 and hash is PROOF(3, D[7]) = [c, 498 d, g, l]. c, g are used to verify hash0, and d, l are additionally 499 used to show hash is consistent with hash0. 501 The consistency proof between hash1 and hash is PROOF(4, D[7]) = [l]. 502 hash can be verified using hash1=k and l. 504 The consistency proof between hash2 and hash is PROOF(6, D[7]) = [i, 505 j, k]. k, i are used to verify hash2, and j is additionally used to 506 show hash is consistent with hash2. 508 2.1.4. Signatures 510 Various data structures are signed. A log MUST use one of the 511 signature algorithms defined in Section 11.4. 513 3. Submitters 515 Submitters submit certificates or preannouncements of certificates 516 prior to issuance (precertificates) to logs for public auditing, as 517 described below. In order to enable attribution of each logged 518 certificate or precertificate to its issuer, each submission MUST be 519 accompanied by all additional certificates required to verify the 520 chain up to an accepted trust anchor. The trust anchor (a root or 521 intermediate CA certificate) MAY be omitted from the submission. 523 If a log accepts a submission, it will return a Signed Certificate 524 Timestamp (SCT) (see Section 5.6). The submitter SHOULD validate the 525 returned SCT as described in Section 9.2 if they understand its 526 format and they intend to use it directly in a TLS handshake or to 527 construct a certificate. If the submitter does not need the SCT (for 528 example, the certificate is being submitted simply to make it 529 available in the log), it MAY validate the SCT. 531 3.1. Certificates 533 Any entity can submit a certificate (Section 6.1) to a log. Since it 534 is anticipated that TLS clients will reject certificates that are not 535 logged, it is expected that certificate issuers and subjects will be 536 strongly motivated to submit them. 538 3.2. Precertificates 540 CAs may preannounce a certificate prior to issuance by submitting a 541 precertificate (Section 6.2) that the log can use to create an entry 542 that will be valid against the issued certificate. The CA MAY 543 incorporate the returned SCT in the issued certificate. One example 544 of where the returned SCT is not incorporated in the issued 545 certificate is when a CA sends the precertificate to multiple logs, 546 but only incorporates the SCTs that are returned first. 548 A precertificate is a CMS [RFC5652] "signed-data" object that 549 conforms to the following requirements: 551 o It MUST be DER encoded. 553 o "SignedData.encapContentInfo.eContentType" MUST be the OID 554 1.3.101.78. 556 o "SignedData.encapContentInfo.eContent" MUST contain a 557 TBSCertificate [RFC5280] that will be identical to the 558 TBSCertificate in the issued certificate, except that the 559 Transparency Information (Section 8.1) extension MUST be omitted. 561 o "SignedData.signerInfos" MUST contain a signature from the same 562 (root or intermediate) CA that will ultimately issue the 563 certificate. This signature indicates the CA's intent to issue 564 the certificate. This intent is considered binding (i.e., 565 misissuance of the precertificate is considered equivalent to 566 misissuance of the certificate). (Note that, because of the 567 structure of CMS, the signature on the CMS object will not be a 568 valid X.509v3 signature and so cannot be used to construct a 569 certificate from the precertificate). 571 o "SignedData.certificates" SHOULD be omitted. 573 4. Private Domain Name Labels 575 Some regard certain DNS domain name labels within their registered 576 domain space as private and security sensitive. Even though these 577 domains are often only accessible within the domain owner's private 578 network, it's common for them to be secured using publicly trusted 579 TLS server certificates. 581 4.1. Wildcard Certificates 583 A certificate containing a DNS-ID [RFC6125] of "*.example.com" could 584 be used to secure the domain "topsecret.example.com", without 585 revealing the string "topsecret" publicly. 587 Since TLS clients only match the wildcard character to the complete 588 leftmost label of the DNS domain name (see Section 6.4.3 of 589 [RFC6125]), a different approach is needed when any label other than 590 the leftmost label in a DNS-ID is considered private (e.g., 591 "top.secret.example.com"). Also, wildcard certificates are 592 prohibited in some cases, such as Extended Validation Certificates 593 [EVSSLGuidelines]. 595 4.2. Using a Name-Constrained Intermediate CA 597 An intermediate CA certificate or intermediate CA precertificate that 598 contains the Name Constraints [RFC5280] extension MAY be logged in 599 place of end-entity certificates issued by that intermediate CA, as 600 long as all of the following conditions are met: 602 o there MUST be a non-critical extension (OID 1.3.101.76, whose 603 extnValue OCTET STRING contains ASN.1 NULL data (0x05 0x00)). 604 This extension is an explicit indication that it is acceptable to 605 not log certificates issued by this intermediate CA. 607 o there MUST be a Name Constraints extension, in which: 609 * permittedSubtrees MUST specify one or more dNSNames. 611 * excludedSubtrees MUST specify the entire IPv4 and IPv6 address 612 ranges. 614 Below is an example Name Constraints extension that meets these 615 conditions: 617 SEQUENCE { 618 OBJECT IDENTIFIER '2 5 29 30' 619 OCTET STRING, encapsulates { 620 SEQUENCE { 621 [0] { 622 SEQUENCE { 623 [2] 'example.com' 624 } 625 } 626 [1] { 627 SEQUENCE { 628 [7] 00 00 00 00 00 00 00 00 629 } 630 SEQUENCE { 631 [7] 632 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 633 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 634 } 635 } 636 } 637 } 638 } 640 5. Log Format and Operation 642 A log is a single, append-only Merkle Tree of submitted certificate 643 and precertificate entries. 645 When it receives and accepts a valid submission, the log MUST return 646 an SCT that corresponds to the submitted certificate or 647 precertificate. If the log has previously seen this valid 648 submission, it SHOULD return the same SCT as it returned before (to 649 reduce the ability to track clients as described in Section 12.4). 650 If different SCTs are produced for the same submission, multiple log 651 entries will have to be created, one for each SCT (as the timestamp 652 is a part of the leaf structure). Note that if a certificate was 653 previously logged as a precertificate, then the precertificate's SCT 654 of type "precert_sct_v2" would not be appropriate; instead, a fresh 655 SCT of type "x509_sct_v2" should be generated. 657 An SCT is the log's promise to incorporate the submitted entry in its 658 Merkle Tree no later than a fixed amount of time, known as the 659 Maximum Merge Delay (MMD), after the issuance of the SCT. 660 Periodically, the log MUST append all its new entries to its Merkle 661 Tree and sign the root of the tree. 663 Log operators MUST NOT impose any conditions on retrieving or sharing 664 data from the log. 666 5.1. Accepting Submissions 668 Before accepting a submitted certificate or precertificate, the log 669 MUST verify that it has a valid signature chain to an accepted trust 670 anchor, using the chain of intermediate CA certificates provided by 671 the submitter. Logs SHOULD accept certificates and precertificates 672 that are fully valid according to RFC 5280 [RFC5280] verification 673 rules and are submitted with such a chain (A log may decide, for 674 example, to temporarily reject valid submissions to protect itself 675 against denial-of-service attacks). 677 Logs MAY accept certificates and precertificates that have expired, 678 are not yet valid, have been revoked, or are otherwise not fully 679 valid according to RFC 5280 verification rules in order to 680 accommodate quirks of CA certificate-issuing software. However, logs 681 MUST reject submissions without a valid signature chain to an 682 accepted trust anchor. Logs MUST also reject precertificates that do 683 not conform to the requirements in Section 3.2. 685 Logs SHOULD limit the length of chain they will accept. The maximum 686 chain length is specified in the log's metadata. 688 The log SHALL allow retrieval of its list of accepted trust anchors 689 (see Section 6.8), each of which is a root or intermediate CA 690 certificate. This list might usefully be the union of root 691 certificates trusted by major browser vendors. 693 5.2. Log Entries 695 If a submission is accepted and an SCT issued, the accepting log MUST 696 store the entire chain used for verification. This chain MUST 697 include the certificate or precertificate itself, the zero or more 698 intermediate CA certificates provided by the submitter, and the trust 699 anchor used to verify the chain (even if it was omitted from the 700 submission). The log MUST present this chain for auditing upon 701 request (see Section 6.7). This chain is required to prevent a CA 702 from avoiding blame by logging a partial or empty chain. 704 Each certificate entry in a log MUST include a "X509ChainEntry" 705 structure, and each precertificate entry MUST include a 706 "PrecertChainEntryV2" structure: 708 opaque ASN.1Cert<1..2^24-1>; 710 struct { 711 ASN.1Cert leaf_certificate; 712 ASN.1Cert certificate_chain<0..2^24-1>; 713 } X509ChainEntry; 715 opaque CMSPrecert<1..2^24-1>; 717 struct { 718 CMSPrecert pre_certificate; 719 ASN.1Cert precertificate_chain<1..2^24-1>; 720 } PrecertChainEntryV2; 722 "leaf_certificate" is a submitted certificate that has been accepted 723 by the log. 725 "certificate_chain" is a vector of 0 or more additional certificates 726 required to verify "leaf_certificate". The first certificate MUST 727 certify "leaf_certificate". Each following certificate MUST directly 728 certify the one preceding it. The final certificate MUST be a trust 729 anchor accepted by the log. If "leaf_certificate" is an accepted 730 trust anchor, then this vector is empty. 732 "pre_certificate" is a submitted precertificate that has been 733 accepted by the log. 735 "precertificate_chain" is a vector of 1 or more additional 736 certificates required to verify "pre_certificate". The first 737 certificate MUST certify "pre_certificate". Each following 738 certificate MUST directly certify the one preceding it. The final 739 certificate MUST be a trust anchor accepted by the log. 741 5.3. Log ID 743 Each log is identified by an OID, which is specified in the log's 744 metadata and which MUST NOT be used to identify any other log. A 745 log's operator MUST either allocate the OID themselves or request an 746 OID from the Log ID Registry (see Section 11.8.1. Various data 747 structures include the DER encoding of this OID, excluding the ASN.1 748 tag and length bytes, in an opaque vector: 750 opaque LogID<2..127>; 752 Note that the ASN.1 length and the opaque vector length are identical 753 in size (1 byte) and value, so the DER encoding of the OID can be 754 reproduced simply by prepending an OBJECT IDENTIFIER tag (0x06) to 755 the opaque vector length and contents. 757 OIDs used to identify logs are limited such that the DER encoding of 758 their value is less than or equal to 127 octets. 760 5.4. TransItem Structure 762 Various data structures are encapsulated in the "TransItem" structure 763 to ensure that the type and version of each one is identified in a 764 common fashion: 766 enum { 767 reserved(0), 768 x509_entry_v2(1), precert_entry_v2(2), 769 x509_sct_v2(3), precert_sct_v2(4), 770 signed_tree_head_v2(5), consistency_proof_v2(6), 771 inclusion_proof_v2(7), x509_sct_with_proof_v2(8), 772 precert_sct_with_proof_v2(9), 773 (65535) 774 } VersionedTransType; 776 struct { 777 VersionedTransType versioned_type; 778 select (versioned_type) { 779 case x509_entry_v2: TimestampedCertificateEntryDataV2; 780 case precert_entry_v2: TimestampedCertificateEntryDataV2; 781 case x509_sct_v2: SignedCertificateTimestampDataV2; 782 case precert_sct_v2: SignedCertificateTimestampDataV2; 783 case signed_tree_head_v2: SignedTreeHeadDataV2; 784 case consistency_proof_v2: ConsistencyProofDataV2; 785 case inclusion_proof_v2: InclusionProofDataV2; 786 case x509_sct_with_proof_v2: SCTWithProofDataV2; 787 case precert_sct_with_proof_v2: SCTWithProofDataV2; 788 } data; 789 } TransItem; 791 "versioned_type" is a value from the IANA registry in Section 11.5 792 that identifies the type of the encapsulated data structure and the 793 earliest version of this protocol to which it conforms. This 794 document is v2. 796 "data" is the encapsulated data structure. The various structures 797 named with the "DataV2" suffix are defined in later sections of this 798 document. 800 Note that "VersionedTransType" combines the v1 [RFC6962] type 801 enumerations "Version", "LogEntryType", "SignatureType" and 802 "MerkleLeafType". Note also that v1 did not define "TransItem", but 803 this document provides guidelines (see Appendix A) on how v2 804 implementations can co-exist with v1 implementations. 806 Future versions of this protocol may reuse "VersionedTransType" 807 values defined in this document as long as the corresponding data 808 structures are not modified, and may add new "VersionedTransType" 809 values for new or modified data structures. 811 5.5. Merkle Tree Leaves 813 The leaves of a log's Merkle Tree correspond to the log's entries 814 (see Section 5.2). Each leaf is the leaf hash (Section 2.1) of a 815 "TransItem" structure of type "x509_entry_v2" or "precert_entry_v2", 816 which encapsulates a "TimestampedCertificateEntryDataV2" structure. 817 Note that leaf hashes are calculated as HASH(0x00 || TransItem), 818 where the hashing algorithm is specified in the log's metadata. 820 opaque TBSCertificate<1..2^24-1>; 822 struct { 823 uint64 timestamp; 824 opaque issuer_key_hash<32..2^8-1>; 825 TBSCertificate tbs_certificate; 826 SctExtension sct_extensions<0..2^16-1>; 827 } TimestampedCertificateEntryDataV2; 829 "timestamp" is the NTP Time [RFC5905] at which the certificate or 830 precertificate was accepted by the log, measured in milliseconds 831 since the epoch (January 1, 1970, 00:00 UTC), ignoring leap seconds. 832 Note that the leaves of a log's Merkle Tree are not required to be in 833 strict chronological order. 835 "issuer_key_hash" is the HASH of the public key of the CA that issued 836 the certificate or precertificate, calculated over the DER encoding 837 of the key represented as SubjectPublicKeyInfo [RFC5280]. This is 838 needed to bind the CA to the certificate or precertificate, making it 839 impossible for the corresponding SCT to be valid for any other 840 certificate or precertificate whose TBSCertificate matches 841 "tbs_certificate". The length of the "issuer_key_hash" MUST match 842 HASH_SIZE. 844 "tbs_certificate" is the DER encoded TBSCertificate from either the 845 "leaf_certificate" (in the case of an "X509ChainEntry") or the 846 "pre_certificate" (in the case of a "PrecertChainEntryV2"). (Note 847 that a precertificate's TBSCertificate can be reconstructed from the 848 corresponding certificate as described in Section 9.2.2). 850 "sct_extensions" matches the SCT extensions of the corresponding SCT. 852 5.6. Signed Certificate Timestamp (SCT) 854 An SCT is a "TransItem" structure of type "x509_sct_v2" or 855 "precert_sct_v2", which encapsulates a 856 "SignedCertificateTimestampDataV2" structure: 858 enum { 859 reserved(65535) 860 } SctExtensionType; 862 struct { 863 SctExtensionType sct_extension_type; 864 opaque sct_extension_data<0..2^16-1>; 865 } SctExtension; 867 struct { 868 LogID log_id; 869 uint64 timestamp; 870 SctExtension sct_extensions<0..2^16-1>; 871 digitally-signed struct { 872 TransItem timestamped_entry; 873 } signature; 874 } SignedCertificateTimestampDataV2; 876 "log_id" is this log's unique ID, encoded in an opaque vector as 877 described in Section 5.3. 879 "timestamp" is equal to the timestamp from the 880 "TimestampedCertificateEntryDataV2" structure encapsulated in the 881 "timestamped_entry". 883 "sct_extension_type" identifies a single extension from the IANA 884 registry in Section 11.6. At the time of writing, no extensions are 885 specified. 887 The interpretation of the "sct_extension_data" field is determined 888 solely by the value of the "sct_extension_type" field. Each document 889 that registers a new "sct_extension_type" must describe how to 890 interpret the corresponding "sct_extension_data". 892 "sct_extensions" is a vector of 0 or more SCT extensions. This 893 vector MUST NOT include more than one extension with the same 894 "sct_extension_type". The extensions in the vector MUST be ordered 895 by the value of the "sct_extension_type" field, smallest value first. 896 If an implementation sees an extension that it does not understand, 897 it SHOULD ignore that extension. Furthermore, an implementation MAY 898 choose to ignore any extension(s) that it does understand. 900 The encoding of the digitally-signed element is defined in [RFC5246]. 902 "timestamped_entry" is a "TransItem" structure that MUST be of type 903 "x509_entry_v2" or "precert_entry_v2" (see Section 5.5). 905 5.7. Merkle Tree Head 907 The log stores information about its Merkle Tree in a 908 "TreeHeadDataV2": 910 opaque NodeHash<32..2^8-1>; 912 enum { 913 reserved(65535) 914 } SthExtensionType; 916 struct { 917 SthExtensionType sth_extension_type; 918 opaque sth_extension_data<0..2^16-1>; 919 } SthExtension; 921 struct { 922 uint64 timestamp; 923 uint64 tree_size; 924 NodeHash root_hash; 925 SthExtension sth_extensions<0..2^16-1>; 926 } TreeHeadDataV2; 928 The length of NodeHash MUST match HASH_SIZE of the log. 930 "sth_extension_type" identifies a single extension from the IANA 931 registry in Section 11.7. At the time of writing, no extensions are 932 specified. 934 The interpretation of the "sth_extension_data" field is determined 935 solely by the value of the "sth_extension_type" field. Each document 936 that registers a new "sth_extension_type" must describe how to 937 interpret the corresponding "sth_extension_data". 939 "timestamp" is the current NTP Time [RFC5905], measured in 940 milliseconds since the epoch (January 1, 1970, 00:00 UTC), ignoring 941 leap seconds. 943 "tree_size" is the number of entries currently in the log's Merkle 944 Tree. 946 "root_hash" is the root of the Merkle Hash Tree. 948 "sth_extensions" is a vector of 0 or more STH extensions. This 949 vector MUST NOT include more than one extension with the same 950 "sth_extension_type". The extensions in the vector MUST be ordered 951 by the value of the "sth_extension_type" field, smallest value first. 952 If an implementation sees an extension that it does not understand, 953 it SHOULD ignore that extension. Furthermore, an implementation MAY 954 choose to ignore any extension(s) that it does understand. 956 5.8. Signed Tree Head (STH) 958 Periodically each log SHOULD sign its current tree head information 959 (see Section 5.7) to produce an STH. When a client requests a log's 960 latest STH (see Section 6.3), the log MUST return an STH that is no 961 older than the log's MMD. However, STHs could be used to mark 962 individual clients (by producing a new one for each query), so logs 963 MUST NOT produce them more frequently than is declared in their 964 metadata. In general, there is no need to produce a new STH unless 965 there are new entries in the log; however, in the unlikely event that 966 it receives no new submissions during an MMD period, the log SHALL 967 sign the same Merkle Tree Hash with a fresh timestamp. 969 An STH is a "TransItem" structure of type "signed_tree_head_v2", 970 which encapsulates a "SignedTreeHeadDataV2" structure: 972 struct { 973 LogID log_id; 974 TreeHeadDataV2 tree_head; 975 digitally-signed struct { 976 TreeHeadDataV2 tree_head; 977 } signature; 978 } SignedTreeHeadDataV2; 980 "log_id" is this log's unique ID, encoded in an opaque vector as 981 described in Section 5.3. 983 The "timestamp" in "tree_head" MUST be at least as recent as the most 984 recent SCT timestamp in the tree. Each subsequent timestamp MUST be 985 more recent than the timestamp of the previous update. 987 "tree_head" contains the latest tree head information (see 988 Section 5.7). 990 "signature" is a signature over the encoded "tree_head" field. 992 5.9. Merkle Consistency Proofs 994 To prepare a Merkle Consistency Proof for distribution to clients, 995 the log produces a "TransItem" structure of type 996 "consistency_proof_v2", which encapsulates a "ConsistencyProofDataV2" 997 structure: 999 struct { 1000 LogID log_id; 1001 uint64 tree_size_1; 1002 uint64 tree_size_2; 1003 NodeHash consistency_path<1..2^16-1>; 1004 } ConsistencyProofDataV2; 1006 "log_id" is this log's unique ID, encoded in an opaque vector as 1007 described in Section 5.3. 1009 "tree_size_1" is the size of the older tree. 1011 "tree_size_2" is the size of the newer tree. 1013 "consistency_path" is a vector of Merkle Tree nodes proving the 1014 consistency of two STHs. 1016 5.10. Merkle Inclusion Proofs 1018 To prepare a Merkle Inclusion Proof for distribution to clients, the 1019 log produces a "TransItem" structure of type "inclusion_proof_v2", 1020 which encapsulates an "InclusionProofDataV2" structure: 1022 struct { 1023 LogID log_id; 1024 uint64 tree_size; 1025 uint64 leaf_index; 1026 NodeHash inclusion_path<1..2^16-1>; 1027 } InclusionProofDataV2; 1029 "log_id" is this log's unique ID, encoded in an opaque vector as 1030 described in Section 5.3. 1032 "tree_size" is the size of the tree on which this inclusion proof is 1033 based. 1035 "leaf_index" is the 0-based index of the log entry corresponding to 1036 this inclusion proof. 1038 "inclusion_path" is a vector of Merkle Tree nodes proving the 1039 inclusion of the chosen certificate or precertificate. 1041 5.11. Shutting down a log 1043 Log operators may decide to shut down a log for various reasons, such 1044 as deprecation of the signature algorithm. If there are entries in 1045 the log for certificates that have not yet expired, simply making TLS 1046 clients stop recognizing that log will have the effect of 1047 invalidating SCTs from that log. To avoid that, the following 1048 actions are suggested: 1050 o Make it known to clients and monitors that the log will be frozen. 1052 o Stop accepting new submissions (the error code "shutdown" should 1053 be returned for such requests). 1055 o Once MMD from the last accepted submission has passed and all 1056 pending submissions are incorporated, issue a final STH and 1057 publish it as a part of the log's metadata. Having an STH with a 1058 timestamp that is after the MMD has passed from the last SCT 1059 issuance allows clients to audit this log regularly without 1060 special handling for the final STH. At this point the log's 1061 private key is no longer needed and can be destroyed. 1063 o Keep the log running until the certificates in all of its entries 1064 have expired or exist in other logs (this can be determined by 1065 scanning other logs or connecting to domains mentioned in the 1066 certificates and inspecting the SCTs served). 1068 6. Log Client Messages 1070 Messages are sent as HTTPS GET or POST requests. Parameters for 1071 POSTs and all responses are encoded as JavaScript Object Notation 1072 (JSON) objects [RFC7159]. Parameters for GETs are encoded as order- 1073 independent key/value URL parameters, using the "application/x-www- 1074 form-urlencoded" format described in the "HTML 4.01 Specification" 1075 [HTML401]. Binary data is base64 encoded [RFC4648] as specified in 1076 the individual messages. 1078 Note that JSON objects and URL parameters may contain fields not 1079 specified here. These extra fields should be ignored. 1081 The prefix, which is part of the log's metadata, MAY 1082 include a path as well as a server name and a port. 1084 In practice, log servers may include multiple front-end machines. 1085 Since it is impractical to keep these machines in perfect sync, 1086 errors may occur that are caused by skew between the machines. Where 1087 such errors are possible, the front-end will return additional 1088 information (as specified below) making it possible for clients to 1089 make progress, if progress is possible. Front-ends MUST only serve 1090 data that is free of gaps (that is, for example, no front-end will 1091 respond with an STH unless it is also able to prove consistency from 1092 all log entries logged within that STH). 1094 For example, when a consistency proof between two STHs is requested, 1095 the front-end reached may not yet be aware of one or both STHs. In 1096 the case where it is unaware of both, it will return the latest STH 1097 it is aware of. Where it is aware of the first but not the second, 1098 it will return the latest STH it is aware of and a consistency proof 1099 from the first STH to the returned STH. The case where it knows the 1100 second but not the first should not arise (see the "no gaps" 1101 requirement above). 1103 If the log is unable to process a client's request, it MUST return an 1104 HTTP response code of 4xx/5xx (see [RFC7231]), and, in place of the 1105 responses outlined in the subsections below, the body SHOULD be a 1106 JSON structure containing at least the following field: 1108 error_message: A human-readable string describing the error which 1109 prevented the log from processing the request. 1111 In the case of a malformed request, the string SHOULD provide 1112 sufficient detail for the error to be rectified. 1114 error_code: An error code readable by the client. Some codes are 1115 generic and are detailed here. Others are detailed in the 1116 individual requests. Error codes are fixed text strings. 1118 +---------------+---------------------------------------------+ 1119 | Error Code | Meaning | 1120 +---------------+---------------------------------------------+ 1121 | not compliant | The request is not compliant with this RFC. | 1122 +---------------+---------------------------------------------+ 1124 e.g., In response to a request of "/ct/v2/get- 1125 entries?start=100&end=99", the log would return a "400 Bad Request" 1126 response code with a body similar to the following: 1128 { 1129 "error_message": "'start' cannot be greater than 'end'", 1130 "error_code": "not compliant", 1131 } 1133 Clients SHOULD treat "500 Internal Server Error" and "503 Service 1134 Unavailable" responses as transient failures and MAY retry the same 1135 request without modification at a later date. Note that as per 1136 [RFC7231], in the case of a 503 response the log MAY include a 1137 "Retry-After:" header in order to request a minimum time for the 1138 client to wait before retrying the request. 1140 6.1. Add Chain to Log 1142 POST https:///ct/v2/add-chain 1144 Inputs: 1146 chain: An array of base64 encoded certificates. The first 1147 element is the certificate for which the submitter desires an 1148 SCT; the second certifies the first and so on to the last, 1149 which either is, or is certified by, an accepted trust anchor. 1151 Outputs: 1153 sct: A base64 encoded "TransItem" of type "x509_sct_v2", signed 1154 by this log, that corresponds to the submitted certificate. 1156 Error codes: 1158 +-------------+-----------------------------------------------------+ 1159 | Error Code | Meaning | 1160 +-------------+-----------------------------------------------------+ 1161 | unknown | The last certificate in the chain both is not, and | 1162 | anchor | is not certified by, an accepted trust anchor. | 1163 | | | 1164 | bad chain | The alleged chain is not actually a chain of | 1165 | | certificates. | 1166 | | | 1167 | bad | One or more certificates in the chain are not valid | 1168 | certificate | (e.g., not properly encoded). | 1169 | | | 1170 | shutdown | The log has ceased operation and is not accepting | 1171 | | new submissions. | 1172 +-------------+-----------------------------------------------------+ 1174 If the version of "sct" is not v2, then a v2 client may be unable to 1175 verify the signature. It MUST NOT construe this as an error. This 1176 is to avoid forcing an upgrade of compliant v2 clients that do not 1177 use the returned SCTs. 1179 If a log detects bad encoding in a chain that otherwise verifies 1180 correctly then the log MUST either log the certificate or return the 1181 "bad certificate" error. If the certificate is logged, an SCT MUST 1182 be issued. Logging the certificate is useful, because monitors 1183 (Section 9.3) can then detect these encoding errors, which may be 1184 accepted by some TLS clients. 1186 6.2. Add PreCertChain to Log 1188 POST https:///ct/v2/add-pre-chain 1190 Inputs: 1192 precertificate: The base64 encoded precertificate. 1194 chain: An array of base64 encoded CA certificates. The first 1195 element is the signer of the precertificate; the second 1196 certifies the first and so on to the last, which either is, or 1197 is certified by, an accepted trust anchor. 1199 Outputs: 1201 sct: A base64 encoded "TransItem" of type "precert_sct_v2", 1202 signed by this log, that corresponds to the submitted 1203 precertificate. 1205 Errors are the same as in Section 6.1. 1207 6.3. Retrieve Latest Signed Tree Head 1209 GET https:///ct/v2/get-sth 1211 No inputs. 1213 Outputs: 1215 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1216 signed by this log, that is no older than the log's MMD. 1218 6.4. Retrieve Merkle Consistency Proof between Two Signed Tree Heads 1220 GET https:///ct/v2/get-sth-consistency 1222 Inputs: 1224 first: The tree_size of the older tree, in decimal. 1226 second: The tree_size of the newer tree, in decimal (optional). 1228 Both tree sizes must be from existing v2 STHs. However, because 1229 of skew, the receiving front-end may not know one or both of the 1230 existing STHs. If both are known, then only the "consistency" 1231 output is returned. If the first is known but the second is not 1232 (or has been omitted), then the latest known STH is returned, 1233 along with a consistency proof between the first STH and the 1234 latest. If neither are known, then the latest known STH is 1235 returned without a consistency proof. 1237 Outputs: 1239 consistency: A base64 encoded "TransItem" of type 1240 "consistency_proof_v2", whose "tree_size_1" MUST match the 1241 "first" input. If the "sth" output is omitted, then 1242 "tree_size_2" MUST match the "second" input. 1244 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1245 signed by this log. 1247 Note that no signature is required for the "consistency" output as 1248 it is used to verify the consistency between two STHs, which are 1249 signed. 1251 Error codes: 1253 +-------------+-----------------------------------------------------+ 1254 | Error Code | Meaning | 1255 +-------------+-----------------------------------------------------+ 1256 | first | "first" is before the latest known STH but is not | 1257 | unknown | from an existing STH. | 1258 | | | 1259 | second | "second" is before the latest known STH but is not | 1260 | unknown | from an existing STH. | 1261 +-------------+-----------------------------------------------------+ 1263 See Section 9.4.2 for an outline of how to use the "consistency" 1264 output. 1266 6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash 1268 GET https:///ct/v2/get-proof-by-hash 1270 Inputs: 1272 hash: A base64 encoded v2 leaf hash. 1274 tree_size: The tree_size of the tree on which to base the proof, 1275 in decimal. 1277 The "hash" must be calculated as defined in Section 5.5. The 1278 "tree_size" must designate an existing v2 STH. Because of skew, 1279 the front-end may not know the requested STH. In that case, it 1280 will return the latest STH it knows, along with an inclusion proof 1281 to that STH. If the front-end knows the requested STH then only 1282 "inclusion" is returned. 1284 Outputs: 1286 inclusion: A base64 encoded "TransItem" of type 1287 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1288 Tree nodes proves the inclusion of the chosen certificate in 1289 the selected STH. 1291 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1292 signed by this log. 1294 Note that no signature is required for the "inclusion" output as 1295 it is used to verify inclusion in the selected STH, which is 1296 signed. 1298 Error codes: 1300 +-----------+-------------------------------------------------------+ 1301 | Error | Meaning | 1302 | Code | | 1303 +-----------+-------------------------------------------------------+ 1304 | hash | "hash" is not the hash of a known leaf (may be caused | 1305 | unknown | by skew or by a known certificate not yet merged). | 1306 | | | 1307 | tree_size | "hash" is before the latest known STH but is not from | 1308 | unknown | an existing STH. | 1309 +-----------+-------------------------------------------------------+ 1311 See Section 9.4.1 for an outline of how to use the "inclusion" 1312 output. 1314 6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and Consistency 1315 Proof by Leaf Hash 1317 GET https:///ct/v2/get-all-by-hash 1319 Inputs: 1321 hash: A base64 encoded v2 leaf hash. 1323 tree_size: The tree_size of the tree on which to base the proofs, 1324 in decimal. 1326 The "hash" must be calculated as defined in Section 5.5. The 1327 "tree_size" must designate an existing v2 STH. 1329 Because of skew, the front-end may not know the requested STH or 1330 the requested hash, which leads to a number of cases. 1332 latest STH < requested STH Return latest STH. 1334 latest STH > requested STH Return latest STH and a consistency 1335 proof between it and the requested STH (see Section 6.4). 1337 index of requested hash < latest STH Return "inclusion". 1339 Note that more than one case can be true, in which case the 1340 returned data is their concatenation. It is also possible for 1341 none to be true, in which case the front-end MUST return an empty 1342 response. 1344 Outputs: 1346 inclusion: A base64 encoded "TransItem" of type 1347 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1348 Tree nodes proves the inclusion of the chosen certificate in 1349 the returned STH. 1351 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1352 signed by this log. 1354 consistency: A base64 encoded "TransItem" of type 1355 "consistency_proof_v2" that proves the consistency of the 1356 requested STH and the returned STH. 1358 Note that no signature is required for the "inclusion" or 1359 "consistency" outputs as they are used to verify inclusion in and 1360 consistency of STHs, which are signed. 1362 Errors are the same as in Section 6.5. 1364 See Section 9.4.1 for an outline of how to use the "inclusion" 1365 output, and see Section 9.4.2 for an outline of how to use the 1366 "consistency" output. 1368 6.7. Retrieve Entries and STH from Log 1370 GET https:///ct/v2/get-entries 1372 Inputs: 1374 start: 0-based index of first entry to retrieve, in decimal. 1376 end: 0-based index of last entry to retrieve, in decimal. 1378 Outputs: 1380 entries: An array of objects, each consisting of 1382 leaf_input: The base64 encoded "TransItem" structure of type 1383 "x509_entry_v2" or "precert_entry_v2" (see Section 5.5). 1385 log_entry: The base64 encoded log entry (see Section 5.2). In 1386 the case of an "x509_entry_v2" entry, this is the whole 1387 "X509ChainEntry"; and in the case of a "precert_entry_v2", 1388 this is the whole "PrecertChainEntryV2". 1390 sct: The base64 encoded "TransItem" of type "x509_sct_v2" or 1391 "precert_sct_v2" corresponding to this log entry. 1393 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1394 signed by this log. 1396 Note that this message is not signed -- the "entries" data can be 1397 verified by constructing the Merkle Tree Hash corresponding to a 1398 retrieved STH. All leaves MUST be v2. However, a compliant v2 1399 client MUST NOT construe an unrecognized TransItem type as an error. 1400 This means it may be unable to parse some entries, but note that each 1401 client can inspect the entries it does recognize as well as verify 1402 the integrity of the data by treating unrecognized leaves as opaque 1403 input to the tree. 1405 The "start" and "end" parameters SHOULD be within the range 0 <= x < 1406 "tree_size" as returned by "get-sth" in Section 6.3. 1408 The "start" parameter MUST be less than or equal to the "end" 1409 parameter. 1411 Log servers MUST honor requests where 0 <= "start" < "tree_size" and 1412 "end" >= "tree_size" by returning a partial response covering only 1413 the valid entries in the specified range. "end" >= "tree_size" could 1414 be caused by skew. Note that the following restriction may also 1415 apply: 1417 Logs MAY restrict the number of entries that can be retrieved per 1418 "get-entries" request. If a client requests more than the permitted 1419 number of entries, the log SHALL return the maximum number of entries 1420 permissible. These entries SHALL be sequential beginning with the 1421 entry specified by "start". 1423 Because of skew, it is possible the log server will not have any 1424 entries between "start" and "end". In this case it MUST return an 1425 empty "entries" array. 1427 In any case, the log server MUST return the latest STH it knows 1428 about. 1430 See Section 9.4.3 for an outline of how to use a complete list of 1431 "leaf_input" entries to verify the "root_hash". 1433 6.8. Retrieve Accepted Trust Anchors 1435 GET https:///ct/v2/get-anchors 1437 No inputs. 1439 Outputs: 1441 certificates: An array of base64 encoded trust anchors that are 1442 acceptable to the log. 1444 max_chain: If the server has chosen to limit the length of chains 1445 it accepts, this is the maximum number of certificates in the 1446 chain, in decimal. If there is no limit, this is omitted. 1448 7. TLS Servers 1450 TLS servers MUST use at least one of the three mechanisms listed 1451 below to present one or more SCTs from one or more logs to each TLS 1452 client during full TLS handshakes, where each SCT corresponds to the 1453 server certificate or to a name-constrained intermediate the server 1454 certificate chains to. TLS servers SHOULD also present corresponding 1455 inclusion proofs and STHs (see Section 7.3). 1457 Three mechanisms are provided because they have different tradeoffs. 1459 o A TLS extension (Section 7.4.1.4 of [RFC5246]) with type 1460 "transparency_info" (see Section 7.5). This mechanism allows TLS 1461 servers to participate in CT without the cooperation of CAs, 1462 unlike the other two mechanisms. It also allows SCTs and 1463 inclusion proofs to be updated on the fly. 1465 o An Online Certificate Status Protocol (OCSP) [RFC6960] response 1466 extension (see Section 8.1.1), where the OCSP response is provided 1467 in the "CertificateStatus" message, provided that the TLS client 1468 included the "status_request" extension in the (extended) 1469 "ClientHello" (Section 8 of [RFC6066]). This mechanism, popularly 1470 known as OCSP stapling, is already widely (but not universally) 1471 implemented. It also allows SCTs and inclusion proofs to be 1472 updated on the fly. 1474 o An X509v3 certificate extension (see Section 8.1.2). This 1475 mechanism allows the use of unmodified TLS servers, but the SCTs 1476 and inclusion proofs cannot be updated on the fly. Since the logs 1477 from which the SCTs and inclusion proofs originated won't 1478 necessarily be accepted by TLS clients for the full lifetime of 1479 the certificate, there is a risk that TLS clients will 1480 subsequently consider the certificate to be non-compliant and in 1481 need of re-issuance. 1483 Additionally, a TLS server which supports presenting SCTs using an 1484 OCSP response MAY provide it when the TLS client included the 1485 "status_request_v2" extension ([RFC6961]) in the (extended) 1486 "ClientHello", but only in addition to at least one of the three 1487 mechanisms listed above. 1489 7.1. Multiple SCTs 1491 TLS servers SHOULD send SCTs from multiple logs in case one or more 1492 logs are not acceptable to the TLS client (for example, if a log has 1493 been struck off for misbehavior, has had a key compromise, or is not 1494 known to the TLS client). For example: 1496 o If a CA and a log collude, it is possible to temporarily hide 1497 misissuance from clients. Including SCTs from different logs 1498 makes it more difficult to mount this attack. 1500 o If a log misbehaves, a consequence may be that clients cease to 1501 trust it. Since the time an SCT may be in use can be considerable 1502 (several years is common in current practice when embedded in a 1503 certificate), servers may wish to reduce the probability of their 1504 certificates being rejected as a result by including SCTs from 1505 different logs. 1507 o TLS clients may have policies related to the above risks requiring 1508 servers to present multiple SCTs. For example, at the time of 1509 writing, Chromium [Chromium.Log.Policy] requires multiple SCTs to 1510 be presented with EV certificates in order for the EV indicator to 1511 be shown. 1513 To select the logs from which to obtain SCTs, a TLS server can, for 1514 example, examine the set of logs popular TLS clients accept and 1515 recognize. 1517 7.2. TransItemList Structure 1519 Multiple SCTs, inclusion proofs, and indeed "TransItem" structures of 1520 any type, are combined into a list as follows: 1522 opaque SerializedTransItem<1..2^16-1>; 1524 struct { 1525 SerializedTransItem trans_item_list<1..2^16-1>; 1526 } TransItemList; 1528 Here, "SerializedTransItem" is an opaque byte string that contains 1529 the serialized "TransItem" structure. This encoding ensures that TLS 1530 clients can decode each "TransItem" individually (so, for example, if 1531 there is a version upgrade, out-of-date clients can still parse old 1532 "TransItem" structures while skipping over new "TransItem" structures 1533 whose versions they don't understand). 1535 7.3. Presenting SCTs, inclusion proofs and STHs 1537 When constructing a "TransItemList" structure, a TLS server SHOULD 1538 construct and include "TransItem" structures of type 1539 "x509_sct_with_proof_v2" (for an SCT of type "x509_sct_v2") or 1540 "precert_sct_with_proof_v2" (for an SCT of type "precert_sct_v2"), 1541 both of which encapsulate a "SCTWithProofDataV2" structure: 1543 struct { 1544 SignedCertificateTimestampDataV2 sct; 1545 SignedTreeHeadDataV2 sth; 1546 InclusionProofDataV2 inclusion_proof; 1547 } SCTWithProofDataV2; 1549 "sct" is the encapsulated data structure from an SCT that corresponds 1550 to the server certificate or to a name-constrained intermediate the 1551 server certificate chains to. 1553 "sth" is the encapsulated data structure from an STH that was signed 1554 by the same log as "sct". 1556 "inclusion_proof" is the encapsulated data structure from an 1557 inclusion proof that corresponds to "sct" and can be used to compute 1558 the root in "sth". 1560 7.4. Presenting SCTs only 1562 Presenting inclusion proofs and STHs in the TLS handshake helps to 1563 protect the client's privacy (see Section 9.2.4) and reduces load on 1564 log servers. However, if a TLS server is unable to obtain an 1565 inclusion proof and STH that correspond to an SCT, then it MUST 1566 include "TransItem" structures of type "x509_sct_v2" or 1567 "precert_sct_v2" in the "TransItemList". 1569 7.5. transparency_info TLS Extension 1571 Provided that a TLS client includes the "transparency_info" extension 1572 type in the ClientHello, the TLS server SHOULD include the 1573 "transparency_info" extension in the ServerHello with 1574 "extension_data" set to a "TransItemList". The TLS server SHOULD 1575 ignore any "extension_data" sent by the TLS client. Additionally, 1576 the TLS server MUST NOT process or include this extension when a TLS 1577 session is resumed, since session resumption uses the original 1578 session information. 1580 7.6. cached_info TLS Extension 1582 When a TLS server includes the "transparency_info" extension in the 1583 ServerHello, it SHOULD NOT include any "TransItem" structures of type 1584 "x509_sct_with_proof_v2", "x509_sct_v2", "precert_sct_with_proof_v2" 1585 or "precert_sct_v2" in the "TransItemList" if all of the following 1586 conditions are met: 1588 o The TLS client includes the "transparency_info" extension type in 1589 the ClientHello. 1591 o The TLS client includes the "cached_info" ([RFC7924]) extension 1592 type in the ClientHello, with a "CachedObject" of type 1593 "ct_compliant" (see Section 9.2.7) and at least one "CachedObject" 1594 of type "cert". 1596 o The TLS server sends a modified Certificate message (as described 1597 in section 4.1 of [RFC7924]). 1599 TLS servers SHOULD ignore the "hash_value" fields of each 1600 "CachedObject" of type "ct_compliant" sent by TLS clients. 1602 8. Certification Authorities 1603 8.1. Transparency Information X.509v3 Extension 1605 The Transparency Information X.509v3 extension, which has OID 1606 1.3.101.75 and SHOULD be non-critical, contains one or more 1607 "TransItem" structures in a "TransItemList". This extension MAY be 1608 included in OCSP responses (see Section 8.1.1) and certificates (see 1609 Section 8.1.2). Since RFC5280 requires the "extnValue" field (an 1610 OCTET STRING) of each X.509v3 extension to include the DER encoding 1611 of an ASN.1 value, a "TransItemList" MUST NOT be included directly. 1612 Instead, it MUST be wrapped inside an additional OCTET STRING, which 1613 is then put into the "extnValue" field: 1615 TransparencyInformationSyntax ::= OCTET STRING 1617 "TransparencyInformationSyntax" contains a "TransItemList". 1619 8.1.1. OCSP Response Extension 1621 A certification authority MAY include a Transparency Information 1622 X.509v3 extension in the "singleExtensions" of a "SingleResponse" in 1623 an OCSP response. The included SCTs or inclusion proofs MUST be for 1624 the certificate identified by the "certID" of that "SingleResponse", 1625 or for a precertificate that corresponds to that certificate, or for 1626 a name-constrained intermediate to which that certificate chains. 1628 8.1.2. Certificate Extension 1630 A certification authority MAY include a Transparency Information 1631 X.509v3 extension in a certificate. Any included SCTs or inclusion 1632 proofs MUST be either for a precertificate that corresponds to this 1633 certificate, or for a name-constrained intermediate to which this 1634 certificate chains. 1636 8.2. TLS Feature Extension 1638 A certification authority MAY include the transparency_info 1639 (Section 7.5) TLS extension identifier in the TLS Feature [RFC7633] 1640 certificate extension in root, intermediate and end-entity 1641 certificates. When a certificate chain includes such a certificate, 1642 this indicates that CT compliance is required. 1644 9. Clients 1646 There are various different functions clients of logs might perform. 1647 We describe here some typical clients and how they should function. 1648 Any inconsistency may be used as evidence that a log has not behaved 1649 correctly, and the signatures on the data structures prevent the log 1650 from denying that misbehavior. 1652 All clients need various metadata in order to communicate with logs 1653 and verify their responses. This metadata is described below, but 1654 note that this document does not describe how the metadata is 1655 obtained, which is implementation dependent (see, for example, 1656 [Chromium.Policy]). 1658 Clients should somehow exchange STHs they see, or make them available 1659 for scrutiny, in order to ensure that they all have a consistent 1660 view. The exact mechanisms will be in separate documents, but it is 1661 expected there will be a variety. 1663 9.1. Metadata 1665 In order to communicate with and verify a log, clients need metadata 1666 about the log. 1668 Base URL: The URL to substitute for in Section 6. 1670 Hash Algorithm: The hash algorithm used for the Merkle Tree (see 1671 Section 11.3). 1673 Signing Algorithm: The signing algorithm used (see Section 2.1.4). 1675 Public Key: The public key used to verify signatures generated by 1676 the log. A log MUST NOT use the same keypair as any other log. 1678 Log ID: The OID that uniquely identifies the log. 1680 Maximum Merge Delay: The MMD the log has committed to. 1682 Version: The version of the protocol supported by the log (currently 1683 1 or 2). 1685 Maximum Chain Length: The longest chain submission the log is 1686 willing to accept, if the log chose to limit it. 1688 STH Frequency Count: The maximum number of STHs the log may produce 1689 in any period equal to the "Maximum Merge Delay" (see 1690 Section 5.8). 1692 Final STH: If a log has been closed down (i.e., no longer accepts 1693 new entries), existing entries may still be valid. In this case, 1694 the client should know the final valid STH in the log to ensure no 1695 new entries can be added without detection. The final STH should 1696 be provided in the form of a TransItem of type 1697 "signed_tree_head_v2". 1699 [JSON.Metadata] is an example of a metadata format which includes the 1700 above elements. 1702 9.2. TLS Client 1704 9.2.1. Receiving SCTs 1706 TLS clients receive SCTs alongside or in certificates. TLS clients 1707 MUST implement all of the three mechanisms by which TLS servers may 1708 present SCTs (see Section 7). TLS clients MAY also accept SCTs via 1709 the "status_request_v2" extension ([RFC6961]). TLS clients that 1710 support the "transparency_info" TLS extension SHOULD include it in 1711 ClientHello messages, with empty "extension_data". TLS clients may 1712 also receive inclusion proofs in addition to SCTs, which should be 1713 checked once the SCTs are validated. 1715 9.2.2. Reconstructing the TBSCertificate 1717 To reconstruct the TBSCertificate component of a precertificate from 1718 a certificate, TLS clients should remove the Transparency Information 1719 extension described in Section 8.1. 1721 If the SCT checked is for a Precertificate (where the "type" of the 1722 "TransItem" is "precert_sct_v2"), then the client SHOULD also remove 1723 embedded v1 SCTs, identified by OID 1.3.6.1.4.1.11129.2.4.2 (See 1724 Section 3.3. of [RFC6962]), in the process of reconstructing the 1725 TBSCertificate. That is to allow embedded v1 and v2 SCTs to co-exist 1726 in a certificate (See Appendix A). 1728 9.2.3. Validating SCTs 1730 In addition to normal validation of the server certificate and its 1731 chain, TLS clients SHOULD validate each received SCT for which they 1732 have the corresponding log's metadata. To validate an SCT, a TLS 1733 client computes the signature input from the SCT data and the 1734 corresponding certificate, and then verifies the signature using the 1735 corresponding log's public key. TLS clients MUST NOT consider valid 1736 any SCT whose timestamp is in the future. 1738 Before considering any SCT to be invalid, the TLS client MUST attempt 1739 to validate it against the server certificate and against each of the 1740 zero or more suitable name-constrained intermediates (Section 4.2) in 1741 the chain. These certificates may be evaluated in the order they 1742 appear in the chain, or, indeed, in any order. 1744 9.2.4. Validating inclusion proofs 1746 After validating a received SCT, a TLS client MAY request a 1747 corresponding inclusion proof (if one is not already available) and 1748 then verify it. An inclusion proof can be requested directly from a 1749 log using "get-proof-by-hash" (Section 6.5) or "get-all-by-hash" 1750 (Section 6.6), but note that this will disclose to the log which TLS 1751 server the client has been communicating with. 1753 Alternatively, if the TLS client has received an inclusion proof (and 1754 an STH) alongside the SCT, it can proceed to verifying the inclusion 1755 proof to the provided STH. The client then has to verify consistency 1756 between the provided STH and an STH it knows about, which is less 1757 sensitive from a privacy perspective. 1759 TLS clients SHOULD also verify each received inclusion proof (see 1760 Section 9.4.1) for which they have the corresponding log's metadata, 1761 to audit the log and gain confidence that the certificate is logged. 1763 If the TLS client holds an STH that predates the SCT, it MAY, in the 1764 process of auditing, request a new STH from the log (Section 6.3), 1765 then verify it by requesting a consistency proof (Section 6.4). Note 1766 that if the TLS client uses "get-all-by-hash", then it will already 1767 have the new STH. 1769 9.2.5. Evaluating compliance 1771 To be considered compliant, a certificate MUST be accompanied by at 1772 least one valid SCT. A certificate not accompanied by any valid SCTs 1773 MUST NOT be considered compliant by TLS clients. 1775 A TLS client MUST NOT evaluate compliance if it did not send both the 1776 "transparency_info" and "status_request" TLS extensions in the 1777 ClientHello. 1779 9.2.6. TLS Feature Extension 1781 If any certificate in a chain includes the transparency_info 1782 (Section 7.5) TLS extension identifier in the TLS Feature [RFC7633] 1783 certificate extension, then CT compliance (using any of the 1784 mechanisms from Section 7) is required. 1786 9.2.7. cached_info TLS Extension 1788 If a TLS client uses the "cached_info" TLS extension ([RFC7924]) to 1789 indicate 1 or more cached certificates, all of which it already 1790 considers to be CT compliant, the TLS client MAY also include a 1791 "CachedObject" of type "ct_compliant" in the "cached_info" extension. 1792 The "hash_value" field MUST be 1 byte long with the value 0. 1794 9.2.8. Handling of Non-compliance 1796 If a TLS server presents a certificate chain that is non-compliant, 1797 and the use of a compliant certificate is mandated by an explicit 1798 security policy, application protocol specification, the TLS Feature 1799 extension or any other means, the TLS client MUST refuse the 1800 connection. 1802 9.3. Monitor 1804 Monitors watch logs to check that they behave correctly, for 1805 certificates of interest, or both. For example, a monitor may be 1806 configured to report on all certificates that apply to a specific 1807 domain name when fetching new entries for consistency validation. 1809 A monitor needs to, at least, inspect every new entry in each log it 1810 watches. It may also want to keep copies of entire logs. In order 1811 to do this, it should follow these steps for each log: 1813 1. Fetch the current STH (Section 6.3). 1815 2. Verify the STH signature. 1817 3. Fetch all the entries in the tree corresponding to the STH 1818 (Section 6.7). 1820 4. Confirm that the tree made from the fetched entries produces the 1821 same hash as that in the STH. 1823 5. Fetch the current STH (Section 6.3). Repeat until the STH 1824 changes. 1826 6. Verify the STH signature. 1828 7. Fetch all the new entries in the tree corresponding to the STH 1829 (Section 6.7). If they remain unavailable for an extended 1830 period, then this should be viewed as misbehavior on the part of 1831 the log. 1833 8. Either: 1835 1. Verify that the updated list of all entries generates a tree 1836 with the same hash as the new STH. 1838 Or, if it is not keeping all log entries: 1840 1. Fetch a consistency proof for the new STH with the previous 1841 STH (Section 6.4). 1843 2. Verify the consistency proof. 1845 3. Verify that the new entries generate the corresponding 1846 elements in the consistency proof. 1848 9. Go to Step 5. 1850 9.4. Auditing 1852 Auditing ensures that the current published state of a log is 1853 reachable from previously published states that are known to be good, 1854 and that the promises made by the log in the form of SCTs have been 1855 kept. Audits are performed by monitors or TLS clients. 1857 In particular, there are four log behaviour properties that should be 1858 checked: 1860 o The Maximum Merge Delay (MMD). 1862 o The STH Frequency Count. 1864 o The append-only property. 1866 o The consistency of the log view presented to all query sources. 1868 A benign, conformant log publishes a series of STHs over time, each 1869 derived from the previous STH and the submitted entries incorporated 1870 into the log since publication of the previous STH. This can be 1871 proven through auditing of STHs. SCTs returned to TLS clients can be 1872 audited by verifying against the accompanying certificate, and using 1873 Merkle Inclusion Proofs, against the log's Merkle tree. 1875 The action taken by the auditor if an audit fails is not specified, 1876 but note that in general if audit fails, the auditor is in possession 1877 of signed proof of the log's misbehavior. 1879 A monitor (Section 9.3) can audit by verifying the consistency of 1880 STHs it receives, ensure that each entry can be fetched and that the 1881 STH is indeed the result of making a tree from all fetched entries. 1883 A TLS client (Section 9.2) can audit by verifying an SCT against any 1884 STH dated after the SCT timestamp + the Maximum Merge Delay by 1885 requesting a Merkle inclusion proof (Section 6.5). It can also 1886 verify that the SCT corresponds to the certificate it arrived with 1887 (i.e., the log entry is that certificate, is a precertificate for 1888 that certificate or is an appropriate name-constrained intermediate 1889 (Section 4.2). 1891 Checking of the consistency of the log view presented to all entities 1892 is more difficult to perform because it requires a way to share log 1893 responses among a set of CT-aware entities, and is discussed in 1894 Section 12.3. 1896 The following algorithm outlines may be useful for clients that wish 1897 to perform various audit operations. 1899 9.4.1. Verifying an inclusion proof 1901 When a client has received a "TransItem" of type "inclusion_proof_v2" 1902 and wishes to verify inclusion of an input "hash" for an STH with a 1903 given "tree_size" and "root_hash", the following algorithm may be 1904 used to prove the "hash" was included in the "root_hash": 1906 1. Compare "leaf_index" against "tree_size". If "leaf_index" is 1907 greater than or equal to "tree_size" fail the proof verification. 1909 2. Set "fn" to "leaf_index" and "sn" to "tree_size - 1". 1911 3. Set "r" to "hash". 1913 4. For each value "p" in the "inclusion_path" array: 1915 If "sn" is 0, stop the iteration and fail the proof verification. 1917 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 1919 1. Set "r" to "HASH(0x01 || p || r)" 1921 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 1922 equally until either "LSB(fn)" is set or "fn" is "0". 1924 Otherwise: 1926 1. Set "r" to "HASH(0x01 || r || p)" 1928 Finally, right-shift both "fn" and "sn" one time. 1930 5. Compare "sn" to 0. Compare "r" against the "root_hash". If "sn" 1931 is equal to 0, and "r" and the "root_hash" are equal, then the 1932 log has proven the inclusion of "hash". Otherwise, fail the 1933 proof verification. 1935 9.4.2. Verifying consistency between two STHs 1937 When a client has an STH "first_hash" for tree size "first", an STH 1938 "second_hash" for tree size "second" where "0 < first < second", and 1939 has received a "TransItem" of type "consistency_proof_v2" that they 1940 wish to use to verify both hashes, the following algorithm may be 1941 used: 1943 1. If "first" is an exact power of 2, then prepend "first_hash" to 1944 the "consistency_path" array. 1946 2. Set "fn" to "first - 1" and "sn" to "second - 1". 1948 3. If "LSB(fn)" is set, then right-shift both "fn" and "sn" equally 1949 until "LSB(fn)" is not set. 1951 4. Set both "fr" and "sr" to the first value in the 1952 "consistency_path" array. 1954 5. For each subsequent value "c" in the "consistency_path" array: 1956 If "sn" is 0, stop the iteration and fail the proof verification. 1958 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 1960 1. Set "fr" to "HASH(0x01 || c || fr)" 1961 Set "sr" to "HASH(0x01 || c || sr)" 1963 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 1964 equally until either "LSB(fn)" is set or "fn" is "0". 1966 Otherwise: 1968 1. Set "sr" to "HASH(0x01 || sr || c)" 1970 Finally, right-shift both "fn" and "sn" one time. 1972 6. After completing iterating through the "consistency_path" array 1973 as described above, verify that the "fr" calculated is equal to 1974 the "first_hash" supplied, that the "sr" calculated is equal to 1975 the "second_hash" supplied and that "sn" is 0. 1977 9.4.3. Verifying root hash given entries 1979 When a client has a complete list of leaf input "entries" from "0" up 1980 to "tree_size - 1" and wishes to verify this list against an STH 1981 "root_hash" returned by the log for the same "tree_size", the 1982 following algorithm may be used: 1984 1. Set "stack" to an empty stack. 1986 2. For each "i" from "0" up to "tree_size - 1": 1988 1. Push "HASH(0x00 || entries[i])" to "stack". 1990 2. Set "merge_count" to the lowest value ("0" included) such 1991 that "LSB(i >> merge_count)" is not set. In other words, set 1992 "merge_count" to the number of consecutive "1"s found 1993 starting at the least significant bit of "i". 1995 3. Repeat "merge_count" times: 1997 1. Pop "right" from "stack". 1999 2. Pop "left" from "stack". 2001 3. Push "HASH(0x01 || left || right)" to "stack". 2003 3. If there is more than one element in the "stack", repeat the same 2004 merge procedure (Step 2.3 above) until only a single element 2005 remains. 2007 4. The remaining element in "stack" is the Merkle Tree hash for the 2008 given "tree_size" and should be compared by equality against the 2009 supplied "root_hash". 2011 10. Algorithm Agility 2013 It is not possible for a log to change any of its algorithms part way 2014 through its lifetime: 2016 Signature algorithm: SCT signatures must remain valid so signature 2017 algorithms can only be added, not removed. 2019 Hash algorithm: A log would have to support the old and new hash 2020 algorithms to allow backwards-compatibility with clients that are 2021 not aware of a hash algorithm change. 2023 Allowing multiple signature or hash algorithms for a log would 2024 require that all data structures support it and would significantly 2025 complicate client implementation, which is why it is not supported by 2026 this document. 2028 If it should become necessary to deprecate an algorithm used by a 2029 live log, then the log should be frozen as specified in Section 9.1 2030 and a new log should be started. Certificates in the frozen log that 2031 have not yet expired and require new SCTs SHOULD be submitted to the 2032 new log and the SCTs from that log used instead. 2034 11. IANA Considerations 2036 The assignment policy criteria mentioned in this section refer to the 2037 policies outlined in [RFC5226]. 2039 11.1. TLS Extension Type 2041 IANA is asked to allocate an RFC 5246 ExtensionType value for the 2042 "transparency_info" TLS extension. IANA should update this extension 2043 type to point at this document. 2045 11.2. New Entry to the TLS CachedInformationType registry 2047 IANA is asked to add an entry for "ct_compliant(TBD)" to the "TLS 2048 CachedInformationType Values" registry that was defined in [RFC7924]. 2050 11.3. Hash Algorithms 2052 IANA is asked to establish a registry of hash algorithm values, named 2053 "CT Hash Algorithms", that initially consists of: 2055 +------------+---------------+--------------------------------------+ 2056 | Value | Hash | Reference / Assignment Policy | 2057 | | Algorithm | | 2058 +------------+---------------+--------------------------------------+ 2059 | 0x00 | SHA-256 | [RFC4634] | 2060 | | | | 2061 | 0x01 - | Unassigned | Specification Required and Expert | 2062 | 0xDF | | Review | 2063 | | | | 2064 | 0xE0 - | Reserved | Experimental Use | 2065 | 0xEF | | | 2066 | | | | 2067 | 0xF0 - | Reserved | Private Use | 2068 | 0xFF | | | 2069 +------------+---------------+--------------------------------------+ 2071 11.3.1. Expert Review guidelines 2073 The appointed Expert should ensure that the proposed algorithm has a 2074 public specification and is suitable for use as a cryptographic hash 2075 algorithm with no known preimage or collision attacks. These attacks 2076 can damage the integrity of the log. 2078 11.4. Signature Algorithms 2080 IANA is asked to establish a registry of signature algorithm values, 2081 named "CT Signature Algorithms", that initially consists of: 2083 +---------+-------------------------------+-------------------------+ 2084 | Value | Signature Algorithm | Reference / Assignment | 2085 | | | Policy | 2086 +---------+-------------------------------+-------------------------+ 2087 | 0x00 | Deterministic ECDSA (NIST | [RFC6979] | 2088 | | P-256) with HMAC-SHA256 | | 2089 | | | | 2090 | 0x01 | RSA (RSASSA-PKCS1-v1_5, key | [RFC8017] | 2091 | | >= 2048 bits) with SHA-256 | | 2092 | | | | 2093 | 0x02 - | Unassigned | Specification Required | 2094 | 0xDF | | and Expert Review | 2095 | | | | 2096 | 0xE0 - | Reserved | Experimental Use | 2097 | 0xEF | | | 2098 | | | | 2099 | 0xF0 - | Reserved | Private Use | 2100 | 0xFF | | | 2101 +---------+-------------------------------+-------------------------+ 2103 11.4.1. Expert Review guidelines 2105 The appointed Expert should ensure that the proposed algorithm has a 2106 public specification and is suitable for use as a cryptographic 2107 signature algorithm that always generates signatures 2108 deterministically (for the reasons listed in Section 12.4). 2110 11.5. VersionedTransTypes 2112 IANA is asked to establish a registry of "VersionedTransType" values, 2113 named "CT VersionedTransTypes", that initially consists of: 2115 +------------+---------------------------+--------------------------+ 2116 | Value | Type and Version | Reference / Assignment | 2117 | | | Policy | 2118 +------------+---------------------------+--------------------------+ 2119 | 0x0000 | Reserved | [RFC6962] (*) | 2120 | | | | 2121 | 0x0001 | x509_entry_v2 | RFCXXXX | 2122 | | | | 2123 | 0x0002 | precert_entry_v2 | RFCXXXX | 2124 | | | | 2125 | 0x0003 | x509_sct_v2 | RFCXXXX | 2126 | | | | 2127 | 0x0004 | precert_sct_v2 | RFCXXXX | 2128 | | | | 2129 | 0x0005 | signed_tree_head_v2 | RFCXXXX | 2130 | | | | 2131 | 0x0006 | consistency_proof_v2 | RFCXXXX | 2132 | | | | 2133 | 0x0007 | inclusion_proof_v2 | RFCXXXX | 2134 | | | | 2135 | 0x0008 | x509_sct_with_proof_v2 | RFCXXXX | 2136 | | | | 2137 | 0x0009 | precert_sct_with_proof_v2 | RFCXXXX | 2138 | | | | 2139 | 0x0010 - | Unassigned | Specification Required | 2140 | 0xDFFF | | and Expert Review | 2141 | | | | 2142 | 0xE000 - | Reserved | Experimental Use | 2143 | 0xEFFF | | | 2144 | | | | 2145 | 0xF000 - | Reserved | Private Use | 2146 | 0xFFFF | | | 2147 +------------+---------------------------+--------------------------+ 2149 (*) The 0x0000 value is reserved so that v1 SCTs are distinguishable 2150 from v2 SCTs and other "TransItem" structures. 2152 [RFC Editor: please update 'RFCXXXX' to refer to this document, once 2153 its RFC number is known.] 2155 11.5.1. Expert Review guidelines 2157 The appointed Expert should review the public specification to ensure 2158 that it is detailed enough to ensure implementation interoperability. 2160 11.6. SCT Extensions 2162 IANA is asked to establish a registry of SCT extensions, named "CT 2163 Extension Types for SCT", that initially consists of: 2165 +----------------+------------+-------------------------------------+ 2166 | Value | Extension | Reference / Assignment Policy | 2167 +----------------+------------+-------------------------------------+ 2168 | 0x0000 - | Unassigned | Specification Required and Expert | 2169 | 0xDFFF | | Review | 2170 | | | | 2171 | 0xE000 - | Reserved | Experimental Use | 2172 | 0xEFFF | | | 2173 | | | | 2174 | 0xF000 - | Reserved | Private Use | 2175 | 0xFFFF | | | 2176 +----------------+------------+-------------------------------------+ 2178 11.6.1. Expert Review guidelines 2180 The appointed Expert should review the public specification to ensure 2181 that it is detailed enough to ensure implementation interoperability. 2183 11.7. STH Extensions 2185 IANA is asked to establish a registry of STH extensions, named "CT 2186 Extension Types for STH", that initially consists of: 2188 +----------------+------------+-------------------------------------+ 2189 | Value | Extension | Reference / Assignment Policy | 2190 +----------------+------------+-------------------------------------+ 2191 | 0x0000 - | Unassigned | Specification Required and Expert | 2192 | 0xDFFF | | Review | 2193 | | | | 2194 | 0xE000 - | Reserved | Experimental Use | 2195 | 0xEFFF | | | 2196 | | | | 2197 | 0xF000 - | Reserved | Private Use | 2198 | 0xFFFF | | | 2199 +----------------+------------+-------------------------------------+ 2201 11.7.1. Expert Review guidelines 2203 The appointed Expert should review the public specification to ensure 2204 that it is detailed enough to ensure implementation interoperability. 2206 11.8. Object Identifiers 2208 This document uses object identifiers (OIDs) to identify Log IDs (see 2209 Section 5.3), the precertificate CMS "eContentType" (see 2210 Section 3.2), and X.509v3 extensions in certificates (see Section 4.2 2211 and Section 8.1.2) and OCSP responses (see Section 8.1.1). The OIDs 2212 are defined in an arc that was selected due to its short encoding. 2214 11.8.1. Log ID Registry 2216 IANA is asked to establish a registry of Log IDs, named "CT Log ID 2217 Registry", that initially consists of: 2219 +-------------------------+------------+----------------------------+ 2220 | Value | Log | Reference / Assignment | 2221 | | | Policy | 2222 +-------------------------+------------+----------------------------+ 2223 | 1.3.101.8192 - | Unassigned | Metadata Required and | 2224 | 1.3.101.16383 | | Expert Review | 2225 | | | | 2226 | 1.3.101.80.0 - | Unassigned | Metadata Required and | 2227 | 1.3.101.80.127 | | Expert Review | 2228 | | | | 2229 | 1.3.101.80.128 - | Unassigned | First Come First Served | 2230 | 1.3.101.80.* | | | 2231 +-------------------------+------------+----------------------------+ 2233 All OIDs in the range from 1.3.101.8192 to 1.3.101.16383 have been 2234 reserved. This is a limited resource of 8,192 OIDs, each of which 2235 has an encoded length of 4 octets. 2237 The 1.3.101.80 arc has been delegated. This is an unlimited 2238 resource, but only the 128 OIDs from 1.3.101.80.0 to 1.3.101.80.127 2239 have an encoded length of only 4 octets. 2241 Each application for the allocation of a Log ID should be accompanied 2242 by all of the required metadata (except for the Log ID) listed in 2243 Section 9.1. 2245 11.8.2. Expert Review guidelines 2247 Since the Log IDs with the shortest encodings are a limited resource, 2248 the appointed Expert should review the submitted metadata and judge 2249 whether or not the applicant is requesting a Log ID in good faith 2250 (with the intention of actually running a CT log that will be 2251 identified by the allocated Log ID). 2253 12. Security Considerations 2255 With CAs, logs, and servers performing the actions described here, 2256 TLS clients can use logs and signed timestamps to reduce the 2257 likelihood that they will accept misissued certificates. If a server 2258 presents a valid signed timestamp for a certificate, then the client 2259 knows that a log has committed to publishing the certificate. From 2260 this, the client knows that monitors acting for the subject of the 2261 certificate have had some time to notice the misissue and take some 2262 action, such as asking a CA to revoke a misissued certificate, or 2263 that the log has misbehaved, which will be discovered when the SCT is 2264 audited. A signed timestamp is not a guarantee that the certificate 2265 is not misissued, since appropriate monitors might not have checked 2266 the logs or the CA might have refused to revoke the certificate. 2268 In addition, if TLS clients will not accept unlogged certificates, 2269 then site owners will have a greater incentive to submit certificates 2270 to logs, possibly with the assistance of their CA, increasing the 2271 overall transparency of the system. 2273 [I-D.ietf-trans-threat-analysis] provides a more detailed threat 2274 analysis of the Certificate Transparency architecture. 2276 12.1. Misissued Certificates 2278 Misissued certificates that have not been publicly logged, and thus 2279 do not have a valid SCT, are not considered compliant. Misissued 2280 certificates that do have an SCT from a log will appear in that 2281 public log within the Maximum Merge Delay, assuming the log is 2282 operating correctly. Thus, the maximum period of time during which a 2283 misissued certificate can be used without being available for audit 2284 is the MMD. 2286 12.2. Detection of Misissue 2288 The logs do not themselves detect misissued certificates; they rely 2289 instead on interested parties, such as domain owners, to monitor them 2290 and take corrective action when a misissue is detected. 2292 12.3. Misbehaving Logs 2294 A log can misbehave in several ways. Examples include failing to 2295 incorporate a certificate with an SCT in the Merkle Tree within the 2296 MMD, presenting different, conflicting views of the Merkle Tree at 2297 different times and/or to different parties and issuing STHs too 2298 frequently. Such misbehavior is detectable and the 2299 [I-D.ietf-trans-threat-analysis] provides more details on how this 2300 can be done. 2302 Violation of the MMD contract is detected by log clients requesting a 2303 Merkle inclusion proof (Section 6.5) for each observed SCT. These 2304 checks can be asynchronous and need only be done once per each 2305 certificate. In order to protect the clients' privacy, these checks 2306 need not reveal the exact certificate to the log. Instead, clients 2307 can request the proof from a trusted auditor (since anyone can 2308 compute the proofs from the log) or communicate with the log via 2309 proxies. 2311 Violation of the append-only property or the STH issuance rate limit 2312 can be detected by clients comparing their instances of the Signed 2313 Tree Heads. There are various ways this could be done, for example 2314 via gossip (see [I-D.ietf-trans-gossip]) or peer-to-peer 2315 communications or by sending STHs to monitors (who could then 2316 directly check against their own copy of the relevant log). A proof 2317 of misbehavior in such cases would be a series of STHs that were 2318 issued too closely together, proving violation of the STH issuance 2319 rate limit, or an STH with a root hash that does not match the one 2320 calculated from a copy of the log, proving violation of the append- 2321 only property. 2323 12.4. Deterministic Signatures 2325 Logs are required to use deterministic signatures for the following 2326 reasons: 2328 o Using non-deterministic ECDSA with a predictable source of 2329 randomness means that each signature can potentially expose the 2330 secret material of the signing key. 2332 o Clients that gossip STHs or report back SCTs can be tracked or 2333 traced if a log was to produce multiple STHs or SCTs with the same 2334 timestamp and data but different signatures. 2336 12.5. Multiple SCTs 2338 By offering multiple SCTs, each from a different log, TLS servers 2339 reduce the effectiveness of an attack where a CA and a log collude 2340 (see Section 7.1). 2342 13. Acknowledgements 2344 The authors would like to thank Erwann Abelea, Robin Alden, Andrew 2345 Ayer, Al Cutter, David Drysdale, Francis Dupont, Adam Eijdenberg, 2346 Stephen Farrell, Daniel Kahn Gillmor, Paul Hadfield, Brad Hill, Jeff 2347 Hodges, Paul Hoffman, Jeffrey Hutzelman, Kat Joyce, Stephen Kent, SM, 2348 Alexey Melnikov, Linus Nordberg, Chris Palmer, Trevor Perrin, Pierre 2349 Phaneuf, Melinda Shore, Ryan Sleevi, Martin Smith, Carl Wallace and 2350 Paul Wouters for their valuable contributions. 2352 A big thank you to Symantec for kindly donating the OIDs from the 2353 1.3.101 arc that are used in this document. 2355 14. References 2357 14.1. Normative References 2359 [HTML401] Raggett, D., Le Hors, A., and I. Jacobs, "HTML 4.01 2360 Specification", World Wide Web Consortium Recommendation 2361 REC-html401-19991224, December 1999, 2362 . 2364 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2365 Requirement Levels", BCP 14, RFC 2119, 2366 DOI 10.17487/RFC2119, March 1997, 2367 . 2369 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 2370 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 2371 . 2373 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2374 (TLS) Protocol Version 1.2", RFC 5246, 2375 DOI 10.17487/RFC5246, August 2008, 2376 . 2378 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 2379 Housley, R., and W. Polk, "Internet X.509 Public Key 2380 Infrastructure Certificate and Certificate Revocation List 2381 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 2382 . 2384 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2385 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2386 . 2388 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 2389 "Network Time Protocol Version 4: Protocol and Algorithms 2390 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 2391 . 2393 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 2394 Extensions: Extension Definitions", RFC 6066, 2395 DOI 10.17487/RFC6066, January 2011, 2396 . 2398 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 2399 Verification of Domain-Based Application Service Identity 2400 within Internet Public Key Infrastructure Using X.509 2401 (PKIX) Certificates in the Context of Transport Layer 2402 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 2403 2011, . 2405 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 2406 Galperin, S., and C. Adams, "X.509 Internet Public Key 2407 Infrastructure Online Certificate Status Protocol - OCSP", 2408 RFC 6960, DOI 10.17487/RFC6960, June 2013, 2409 . 2411 [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) 2412 Multiple Certificate Status Request Extension", RFC 6961, 2413 DOI 10.17487/RFC6961, June 2013, 2414 . 2416 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2417 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 2418 2014, . 2420 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2421 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2422 DOI 10.17487/RFC7231, June 2014, 2423 . 2425 [RFC7633] Hallam-Baker, P., "X.509v3 Transport Layer Security (TLS) 2426 Feature Extension", RFC 7633, DOI 10.17487/RFC7633, 2427 October 2015, . 2429 [RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security 2430 (TLS) Cached Information Extension", RFC 7924, 2431 DOI 10.17487/RFC7924, July 2016, 2432 . 2434 [RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, 2435 "PKCS #1: RSA Cryptography Specifications Version 2.2", 2436 RFC 8017, DOI 10.17487/RFC8017, November 2016, 2437 . 2439 14.2. Informative References 2441 [Chromium.Log.Policy] 2442 The Chromium Projects, "Chromium Certificate Transparency 2443 Log Policy", 2014, . 2446 [Chromium.Policy] 2447 The Chromium Projects, "Chromium Certificate 2448 Transparency", 2014, . 2451 [CrosbyWallach] 2452 Crosby, S. and D. Wallach, "Efficient Data Structures for 2453 Tamper-Evident Logging", Proceedings of the 18th USENIX 2454 Security Symposium, Montreal, August 2009, 2455 . 2458 [EVSSLGuidelines] 2459 CA/Browser Forum, "Guidelines For The Issuance And 2460 Management Of Extended Validation Certificates", 2007, 2461 . 2464 [I-D.ietf-trans-gossip] 2465 Nordberg, L., Gillmor, D., and T. Ritter, "Gossiping in 2466 CT", draft-ietf-trans-gossip-03 (work in progress), July 2467 2016. 2469 [I-D.ietf-trans-threat-analysis] 2470 Kent, S., "Attack and Threat Model for Certificate 2471 Transparency", draft-ietf-trans-threat-analysis-10 (work 2472 in progress), October 2016. 2474 [JSON.Metadata] 2475 The Chromium Projects, "Chromium Log Metadata JSON 2476 Schema", 2014, . 2479 [RFC4634] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 2480 (SHA and HMAC-SHA)", RFC 4634, DOI 10.17487/RFC4634, July 2481 2006, . 2483 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 2484 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 2485 DOI 10.17487/RFC5226, May 2008, 2486 . 2488 [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate 2489 Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013, 2490 . 2492 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 2493 Algorithm (DSA) and Elliptic Curve Digital Signature 2494 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2495 2013, . 2497 Appendix A. Supporting v1 and v2 simultaneously 2499 Certificate Transparency logs have to be either v1 (conforming to 2500 [RFC6962]) or v2 (conforming to this document), as the data 2501 structures are incompatible and so a v2 log could not issue a valid 2502 v1 SCT. 2504 CT clients, however, can support v1 and v2 SCTs, for the same 2505 certificate, simultaneously, as v1 SCTs are delivered in different 2506 TLS, X.509 and OCSP extensions than v2 SCTs. 2508 v1 and v2 SCTs for X.509 certificates can be validated independently. 2509 For precertificates, v2 SCTs should be embedded in the TBSCertificate 2510 before submission of the TBSCertificate (inside a v1 precertificate, 2511 as described in Section 3.1. of [RFC6962]) to a v1 log so that TLS 2512 clients conforming to [RFC6962] but not this document are oblivious 2513 to the embedded v2 SCTs. An issuer can follow these steps to produce 2514 an X.509 certificate with embedded v1 and v2 SCTs: 2516 o Create a CMS precertificate as described in Section 3.2 and submit 2517 it to v2 logs. 2519 o Embed the obtained v2 SCTs in the TBSCertificate, as described in 2520 Section 8.1.2. 2522 o Use that TBSCertificate to create a v1 precertificate, as 2523 described in Section 3.1. of [RFC6962] and submit it to v1 logs. 2525 o Embed the v1 SCTs in the TBSCertificate, as described in 2526 Section 3.3. of [RFC6962]. 2528 o Sign that TBSCertificate (which now contains v1 and v2 SCTs) to 2529 issue the final X.509 certificate. 2531 Authors' Addresses 2533 Ben Laurie 2534 Google UK Ltd. 2536 Email: benl@google.com 2537 Adam Langley 2538 Google Inc. 2540 Email: agl@google.com 2542 Emilia Kasper 2543 Google Switzerland GmbH 2545 Email: ekasper@google.com 2547 Eran Messeri 2548 Google UK Ltd. 2550 Email: eranm@google.com 2552 Rob Stradling 2553 Comodo CA, Ltd. 2555 Email: rob.stradling@comodo.com