idnits 2.17.1 draft-ietf-trans-rfc6962-bis-20.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 5 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 31, 2016) is 2733 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 546 -- Looks like a reference, but probably isn't: '7' on line 551 -- Looks like a reference, but probably isn't: '0' on line 541 -- Looks like a reference, but probably isn't: '2' on line 543 -- Possible downref: Non-RFC (?) normative reference: ref. 'DSS' -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS180-4' -- Possible downref: Non-RFC (?) normative reference: ref. 'HTML401' ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) ** 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) ** Downref: Normative reference to an Informational RFC: RFC 6979 == 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 6962 (Obsoleted by RFC 9162) Summary: 7 errors (**), 0 flaws (~~), 4 warnings (==), 9 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 Intended status: Standards Track E. Kasper 5 Expires: May 4, 2017 E. Messeri 6 Google 7 R. Stradling 8 Comodo 9 October 31, 2016 11 Certificate Transparency 12 draft-ietf-trans-rfc6962-bis-20 14 Abstract 16 This document describes a protocol for publicly logging the existence 17 of Transport Layer Security (TLS) server certificates as they are 18 issued or observed, in a manner that allows anyone to audit 19 certification authority (CA) activity and notice the issuance of 20 suspect certificates as well as to audit the certificate logs 21 themselves. The intent is that eventually clients would refuse to 22 honor certificates that do not appear in a log, effectively forcing 23 CAs to add all issued certificates to the logs. 25 Logs are network services that implement the protocol operations for 26 submissions and queries that are defined in this document. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at http://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on May 4, 2017. 45 Copyright Notice 47 Copyright (c) 2016 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (http://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 63 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5 64 1.2. Data Structures . . . . . . . . . . . . . . . . . . . . . 5 65 2. Cryptographic Components . . . . . . . . . . . . . . . . . . 5 66 2.1. Merkle Hash Trees . . . . . . . . . . . . . . . . . . . . 5 67 2.1.1. Merkle Inclusion Proofs . . . . . . . . . . . . . . . 6 68 2.1.2. Merkle Consistency Proofs . . . . . . . . . . . . . . 7 69 2.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 8 70 2.1.4. Signatures . . . . . . . . . . . . . . . . . . . . . 10 71 3. Submitters . . . . . . . . . . . . . . . . . . . . . . . . . 10 72 3.1. Certificates . . . . . . . . . . . . . . . . . . . . . . 11 73 3.2. Precertificates . . . . . . . . . . . . . . . . . . . . . 11 74 4. Private Domain Name Labels . . . . . . . . . . . . . . . . . 12 75 4.1. Wildcard Certificates . . . . . . . . . . . . . . . . . . 12 76 4.2. Using a Name-Constrained Intermediate CA . . . . . . . . 12 77 5. Log Format and Operation . . . . . . . . . . . . . . . . . . 13 78 5.1. Accepting Submissions . . . . . . . . . . . . . . . . . . 14 79 5.2. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 14 80 5.3. Log ID . . . . . . . . . . . . . . . . . . . . . . . . . 15 81 5.4. TransItem Structure . . . . . . . . . . . . . . . . . . . 16 82 5.5. Merkle Tree Leaves . . . . . . . . . . . . . . . . . . . 17 83 5.6. Signed Certificate Timestamp (SCT) . . . . . . . . . . . 18 84 5.7. Merkle Tree Head . . . . . . . . . . . . . . . . . . . . 19 85 5.8. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 20 86 5.9. Merkle Consistency Proofs . . . . . . . . . . . . . . . . 21 87 5.10. Merkle Inclusion Proofs . . . . . . . . . . . . . . . . . 21 88 5.11. Shutting down a log . . . . . . . . . . . . . . . . . . . 22 89 6. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 22 90 6.1. Add Chain to Log . . . . . . . . . . . . . . . . . . . . 24 91 6.2. Add PreCertChain to Log . . . . . . . . . . . . . . . . . 25 92 6.3. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 25 93 6.4. Retrieve Merkle Consistency Proof between Two Signed Tree 94 Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 25 95 6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 26 96 6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and 97 Consistency Proof by Leaf Hash . . . . . . . . . . . . . 27 98 6.7. Retrieve Entries and STH from Log . . . . . . . . . . . . 29 99 6.8. Retrieve Accepted Trust Anchors . . . . . . . . . . . . . 30 100 7. Optional Client Messages . . . . . . . . . . . . . . . . . . 30 101 7.1. Get Entry Number for SCT . . . . . . . . . . . . . . . . 30 102 7.2. Get Entry Numbers for TBSCertificate . . . . . . . . . . 31 103 8. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 32 104 8.1. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . . 33 105 8.2. TransItemList Structure . . . . . . . . . . . . . . . . . 33 106 8.3. Presenting SCTs, inclusion proofs and STHs . . . . . . . 34 107 8.4. Presenting SCTs only . . . . . . . . . . . . . . . . . . 34 108 8.5. transparency_info TLS Extension . . . . . . . . . . . . . 34 109 8.6. cached_info TLS Extension . . . . . . . . . . . . . . . . 35 110 9. Certification Authorities . . . . . . . . . . . . . . . . . . 35 111 9.1. Transparency Information X.509v3 Extension . . . . . . . 35 112 9.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 35 113 9.1.2. Certificate Extension . . . . . . . . . . . . . . . . 36 114 9.2. TLS Feature Extension . . . . . . . . . . . . . . . . . . 36 115 10. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 116 10.1. Metadata . . . . . . . . . . . . . . . . . . . . . . . . 36 117 10.2. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 37 118 10.2.1. Receiving SCTs . . . . . . . . . . . . . . . . . . . 37 119 10.2.2. Reconstructing the TBSCertificate . . . . . . . . . 37 120 10.2.3. Validating SCTs . . . . . . . . . . . . . . . . . . 38 121 10.2.4. Validating inclusion proofs . . . . . . . . . . . . 38 122 10.2.5. Evaluating compliance . . . . . . . . . . . . . . . 39 123 10.2.6. TLS Feature Extension . . . . . . . . . . . . . . . 39 124 10.2.7. cached_info TLS Extension . . . . . . . . . . . . . 39 125 10.2.8. Handling of Non-compliance . . . . . . . . . . . . . 39 126 10.3. Monitor . . . . . . . . . . . . . . . . . . . . . . . . 39 127 10.4. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 40 128 10.4.1. Verifying an inclusion proof . . . . . . . . . . . . 41 129 10.4.2. Verifying consistency between two STHs . . . . . . . 42 130 10.4.3. Verifying root hash given entries . . . . . . . . . 43 131 11. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 44 132 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 44 133 12.1. TLS Extension Type . . . . . . . . . . . . . . . . . . . 44 134 12.2. New Entry to the TLS CachedInformationType registry . . 44 135 12.3. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 44 136 12.4. Signature Algorithms . . . . . . . . . . . . . . . . . . 45 137 12.5. SCT Extensions . . . . . . . . . . . . . . . . . . . . . 45 138 12.6. STH Extensions . . . . . . . . . . . . . . . . . . . . . 45 139 12.7. Object Identifiers . . . . . . . . . . . . . . . . . . . 45 140 12.7.1. Log ID Registry 1 . . . . . . . . . . . . . . . . . 46 141 12.7.2. Log ID Registry 2 . . . . . . . . . . . . . . . . . 46 142 13. Security Considerations . . . . . . . . . . . . . . . . . . . 46 143 13.1. Misissued Certificates . . . . . . . . . . . . . . . . . 47 144 13.2. Detection of Misissue . . . . . . . . . . . . . . . . . 47 145 13.3. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 47 146 13.4. Deterministic Signatures . . . . . . . . . . . . . . . . 48 147 13.5. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 48 148 14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 48 149 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 48 150 15.1. Normative References . . . . . . . . . . . . . . . . . . 48 151 15.2. Informative References . . . . . . . . . . . . . . . . . 50 152 Appendix A. Supporting v1 and v2 simultaneously . . . . . . . . 51 153 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 52 155 1. Introduction 157 Certificate transparency aims to mitigate the problem of misissued 158 certificates by providing append-only logs of issued certificates. 159 The logs do not need to be trusted because they are publicly 160 auditable. Anyone may verify the correctness of each log and monitor 161 when new certificates are added to it. The logs do not themselves 162 prevent misissue, but they ensure that interested parties 163 (particularly those named in certificates) can detect such 164 misissuance. Note that this is a general mechanism that could be 165 used for transparently logging any form of binary data, subject to 166 some kind of inclusion criteria. In this document, we only describe 167 its use for public TLS server certificates (i.e., where the inclusion 168 criteria is a valid certificate issued by a public certification 169 authority (CA)). 171 Each log contains certificate chains, which can be submitted by 172 anyone. It is expected that public CAs will contribute all their 173 newly issued certificates to one or more logs; however certificate 174 holders can also contribute their own certificate chains, as can 175 third parties. In order to avoid logs being rendered useless by the 176 submission of large numbers of spurious certificates, it is required 177 that each chain ends with a trust anchor that is accepted by the log. 178 When a chain is accepted by a log, a signed timestamp is returned, 179 which can later be used to provide evidence to TLS clients that the 180 chain has been submitted. TLS clients can thus require that all 181 certificates they accept as valid are accompanied by signed 182 timestamps. 184 Those who are concerned about misissuance can monitor the logs, 185 asking them regularly for all new entries, and can thus check whether 186 domains for which they are responsible have had certificates issued 187 that they did not expect. What they do with this information, 188 particularly when they find that a misissuance has happened, is 189 beyond the scope of this document. However, broadly speaking, they 190 can invoke existing business mechanisms for dealing with misissued 191 certificates, such as working with the CA to get the certificate 192 revoked, or with maintainers of trust anchor lists to get the CA 193 removed. Of course, anyone who wants can monitor the logs and, if 194 they believe a certificate is incorrectly issued, take action as they 195 see fit. 197 Similarly, those who have seen signed timestamps from a particular 198 log can later demand a proof of inclusion from that log. If the log 199 is unable to provide this (or, indeed, if the corresponding 200 certificate is absent from monitors' copies of that log), that is 201 evidence of the incorrect operation of the log. The checking 202 operation is asynchronous to allow clients to proceed without delay, 203 despite possible issues such as network connectivity and the vagaries 204 of firewalls. 206 The append-only property of each log is achieved using Merkle Trees, 207 which can be used to show that any particular instance of the log is 208 a superset of any particular previous instance. Likewise, Merkle 209 Trees avoid the need to blindly trust logs: if a log attempts to show 210 different things to different people, this can be efficiently 211 detected by comparing tree roots and consistency proofs. Similarly, 212 other misbehaviors of any log (e.g., issuing signed timestamps for 213 certificates they then don't log) can be efficiently detected and 214 proved to the world at large. 216 1.1. Requirements Language 218 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 219 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 220 document are to be interpreted as described in RFC 2119 [RFC2119]. 222 1.2. Data Structures 224 Data structures are defined according to the conventions laid out in 225 Section 4 of [RFC5246]. 227 2. Cryptographic Components 229 2.1. Merkle Hash Trees 231 Logs use a binary Merkle Hash Tree for efficient auditing. The 232 hashing algorithm used by each log is expected to be specified as 233 part of the metadata relating to that log (see Section 10.1). We 234 have established a registry of acceptable algorithms, see 235 Section 12.3. The hashing algorithm in use is referred to as HASH 236 throughout this document and the size of its output in bytes as 237 HASH_SIZE. The input to the Merkle Tree Hash is a list of data 238 entries; these entries will be hashed to form the leaves of the 239 Merkle Hash Tree. The output is a single HASH_SIZE Merkle Tree Hash. 240 Given an ordered list of n inputs, D[n] = {d(0), d(1), ..., d(n-1)}, 241 the Merkle Tree Hash (MTH) is thus defined as follows: 243 The hash of an empty list is the hash of an empty string: 245 MTH({}) = HASH(). 247 The hash of a list with one entry (also known as a leaf hash) is: 249 MTH({d(0)}) = HASH(0x00 || d(0)). 251 For n > 1, let k be the largest power of two smaller than n (i.e., k 252 < n <= 2k). The Merkle Tree Hash of an n-element list D[n] is then 253 defined recursively as 255 MTH(D[n]) = HASH(0x01 || MTH(D[0:k]) || MTH(D[k:n])), 257 where || is concatenation and D[k1:k2] denotes the list {d(k1), 258 d(k1+1), ..., d(k2-1)} of length (k2 - k1). (Note that the hash 259 calculations for leaves and nodes differ. This domain separation is 260 required to give second preimage resistance.) 262 Note that we do not require the length of the input list to be a 263 power of two. The resulting Merkle Tree may thus not be balanced; 264 however, its shape is uniquely determined by the number of leaves. 265 (Note: This Merkle Tree is essentially the same as the history tree 266 [CrosbyWallach] proposal, except our definition handles non-full 267 trees differently.) 269 2.1.1. Merkle Inclusion Proofs 271 A Merkle inclusion proof for a leaf in a Merkle Hash Tree is the 272 shortest list of additional nodes in the Merkle Tree required to 273 compute the Merkle Tree Hash for that tree. Each node in the tree is 274 either a leaf node or is computed from the two nodes immediately 275 below it (i.e., towards the leaves). At each step up the tree 276 (towards the root), a node from the inclusion proof is combined with 277 the node computed so far. In other words, the inclusion proof 278 consists of the list of missing nodes required to compute the nodes 279 leading from a leaf to the root of the tree. If the root computed 280 from the inclusion proof matches the true root, then the inclusion 281 proof proves that the leaf exists in the tree. 283 Given an ordered list of n inputs to the tree, D[n] = {d(0), ..., 284 d(n-1)}, the Merkle inclusion proof PATH(m, D[n]) for the (m+1)th 285 input d(m), 0 <= m < n, is defined as follows: 287 The proof for the single leaf in a tree with a one-element input list 288 D[1] = {d(0)} is empty: 290 PATH(0, {d(0)}) = {} 292 For n > 1, let k be the largest power of two smaller than n. The 293 proof for the (m+1)th element d(m) in a list of n > m elements is 294 then defined recursively as 296 PATH(m, D[n]) = PATH(m, D[0:k]) : MTH(D[k:n]) for m < k; and 298 PATH(m, D[n]) = PATH(m - k, D[k:n]) : MTH(D[0:k]) for m >= k, 300 where : is concatenation of lists and D[k1:k2] denotes the length (k2 301 - k1) list {d(k1), d(k1+1),..., d(k2-1)} as before. 303 2.1.2. Merkle Consistency Proofs 305 Merkle consistency proofs prove the append-only property of the tree. 306 A Merkle consistency proof for a Merkle Tree Hash MTH(D[n]) and a 307 previously advertised hash MTH(D[0:m]) of the first m leaves, m <= n, 308 is the list of nodes in the Merkle Tree required to verify that the 309 first m inputs D[0:m] are equal in both trees. Thus, a consistency 310 proof must contain a set of intermediate nodes (i.e., commitments to 311 inputs) sufficient to verify MTH(D[n]), such that (a subset of) the 312 same nodes can be used to verify MTH(D[0:m]). We define an algorithm 313 that outputs the (unique) minimal consistency proof. 315 Given an ordered list of n inputs to the tree, D[n] = {d(0), ..., 316 d(n-1)}, the Merkle consistency proof PROOF(m, D[n]) for a previous 317 Merkle Tree Hash MTH(D[0:m]), 0 < m < n, is defined as: 319 PROOF(m, D[n]) = SUBPROOF(m, D[n], true) 321 In SUBPROOF, the boolean value represents whether the subtree created 322 from D[0:m] is a complete subtree of the Merkle Tree created from 323 D[n], and, consequently, whether the subtree Merkle Tree Hash 324 MTH(D[0:m]) is known. The initial call to SUBPROOF sets this to be 325 true, and SUBPROOF is then defined as follows: 327 The subproof for m = n is empty if m is the value for which PROOF was 328 originally requested (meaning that the subtree created from D[0:m] is 329 a complete subtree of the Merkle Tree created from the original D[n] 330 for which PROOF was requested, and the subtree Merkle Tree Hash 331 MTH(D[0:m]) is known): 333 SUBPROOF(m, D[m], true) = {} 335 Otherwise, the subproof for m = n is the Merkle Tree Hash committing 336 inputs D[0:m]: 338 SUBPROOF(m, D[m], false) = {MTH(D[m])} 340 For m < n, let k be the largest power of two smaller than n. The 341 subproof is then defined recursively. 343 If m <= k, the right subtree entries D[k:n] only exist in the current 344 tree. We prove that the left subtree entries D[0:k] are consistent 345 and add a commitment to D[k:n]: 347 SUBPROOF(m, D[n], b) = SUBPROOF(m, D[0:k], b) : MTH(D[k:n]) 349 If m > k, the left subtree entries D[0:k] are identical in both 350 trees. We prove that the right subtree entries D[k:n] are consistent 351 and add a commitment to D[0:k]. 353 SUBPROOF(m, D[n], b) = SUBPROOF(m - k, D[k:n], false) : MTH(D[0:k]) 355 Here, : is a concatenation of lists, and D[k1:k2] denotes the length 356 (k2 - k1) list {d(k1), d(k1+1),..., d(k2-1)} as before. 358 The number of nodes in the resulting proof is bounded above by 359 ceil(log2(n)) + 1. 361 2.1.3. Example 363 The binary Merkle Tree with 7 leaves: 365 hash 366 / \ 367 / \ 368 / \ 369 / \ 370 / \ 371 k l 372 / \ / \ 373 / \ / \ 374 / \ / \ 375 g h i j 376 / \ / \ / \ | 377 a b c d e f d6 378 | | | | | | 379 d0 d1 d2 d3 d4 d5 381 The inclusion proof for d0 is [b, h, l]. 383 The inclusion proof for d3 is [c, g, l]. 385 The inclusion proof for d4 is [f, j, k]. 387 The inclusion proof for d6 is [i, k]. 389 The same tree, built incrementally in four steps: 391 hash0 hash1=k 392 / \ / \ 393 / \ / \ 394 / \ / \ 395 g c g h 396 / \ | / \ / \ 397 a b d2 a b c d 398 | | | | | | 399 d0 d1 d0 d1 d2 d3 401 hash2 hash 402 / \ / \ 403 / \ / \ 404 / \ / \ 405 / \ / \ 406 / \ / \ 407 k i k l 408 / \ / \ / \ / \ 409 / \ e f / \ / \ 410 / \ | | / \ / \ 411 g h d4 d5 g h i j 412 / \ / \ / \ / \ / \ | 413 a b c d a b c d e f d6 414 | | | | | | | | | | 415 d0 d1 d2 d3 d0 d1 d2 d3 d4 d5 417 The consistency proof between hash0 and hash is PROOF(3, D[7]) = [c, 418 d, g, l]. c, g are used to verify hash0, and d, l are additionally 419 used to show hash is consistent with hash0. 421 The consistency proof between hash1 and hash is PROOF(4, D[7]) = [l]. 422 hash can be verified using hash1=k and l. 424 The consistency proof between hash2 and hash is PROOF(6, D[7]) = [i, 425 j, k]. k, i are used to verify hash2, and j is additionally used to 426 show hash is consistent with hash2. 428 2.1.4. Signatures 430 Various data structures are signed. A log MUST use one of the 431 signature algorithms defined in Section 12.4. 433 3. Submitters 435 Submitters submit certificates or preannouncements of certificates 436 prior to issuance (precertificates) to logs for public auditing, as 437 described below. In order to enable attribution of each logged 438 certificate or precertificate to its issuer, each submission MUST be 439 accompanied by all additional certificates required to verify the 440 chain up to an accepted trust anchor. The trust anchor (a root or 441 intermediate CA certificate) MAY be omitted from the submission. 443 If a log accepts a submission, it will return a Signed Certificate 444 Timestamp (SCT) (see Section 5.6). The submitter SHOULD validate the 445 returned SCT as described in Section 10.2 if they understand its 446 format and they intend to use it directly in a TLS handshake or to 447 construct a certificate. If the submitter does not need the SCT (for 448 example, the certificate is being submitted simply to make it 449 available in the log), it MAY validate the SCT. 451 3.1. Certificates 453 Any entity can submit a certificate (Section 6.1) to a log. Since it 454 is anticipated that TLS clients will reject certificates that are not 455 logged, it is expected that certificate issuers and subjects will be 456 strongly motivated to submit them. 458 3.2. Precertificates 460 CAs may preannounce a certificate prior to issuance by submitting a 461 precertificate (Section 6.2) that the log can use to create an entry 462 that will be valid against the issued certificate. The CA MAY 463 incorporate the returned SCT in the issued certificate. One example 464 of where the returned SCT is not incorporated in the issued 465 certificate is when a CA sends the precertificate to multiple logs, 466 but only incorporates the SCTs that are returned first. 468 A precertificate is a CMS [RFC5652] "signed-data" object that 469 conforms to the following requirements: 471 o It MUST be DER encoded. 473 o "SignedData.encapContentInfo.eContentType" MUST be the OID 474 1.3.101.78. 476 o "SignedData.encapContentInfo.eContent" MUST contain a 477 TBSCertificate [RFC5280] that will be identical to the 478 TBSCertificate in the issued certificate, except that the 479 Transparency Information (Section 9.1) extension MUST be omitted. 481 o "SignedData.signerInfos" MUST contain a signature from the same 482 (root or intermediate) CA that will ultimately issue the 483 certificate. This signature indicates the CA's intent to issue 484 the certificate. This intent is considered binding (i.e., 485 misissuance of the precertificate is considered equivalent to 486 misissuance of the certificate). (Note that, because of the 487 structure of CMS, the signature on the CMS object will not be a 488 valid X.509v3 signature and so cannot be used to construct a 489 certificate from the precertificate). 491 o "SignedData.certificates" SHOULD be omitted. 493 4. Private Domain Name Labels 495 Some regard certain DNS domain name labels within their registered 496 domain space as private and security sensitive. Even though these 497 domains are often only accessible within the domain owner's private 498 network, it's common for them to be secured using publicly trusted 499 TLS server certificates. 501 4.1. Wildcard Certificates 503 A certificate containing a DNS-ID [RFC6125] of "*.example.com" could 504 be used to secure the domain "topsecret.example.com", without 505 revealing the string "topsecret" publicly. 507 Since TLS clients only match the wildcard character to the complete 508 leftmost label of the DNS domain name (see Section 6.4.3 of 509 [RFC6125]), a different approach is needed when any label other than 510 the leftmost label in a DNS-ID is considered private (e.g., 511 "top.secret.example.com"). Also, wildcard certificates are 512 prohibited in some cases, such as Extended Validation Certificates 513 [EVSSLGuidelines]. 515 4.2. Using a Name-Constrained Intermediate CA 517 An intermediate CA certificate or intermediate CA precertificate that 518 contains the Name Constraints [RFC5280] extension MAY be logged in 519 place of end-entity certificates issued by that intermediate CA, as 520 long as all of the following conditions are met: 522 o there MUST be a non-critical extension (OID 1.3.101.76, whose 523 extnValue OCTET STRING contains ASN.1 NULL data (0x05 0x00)). 524 This extension is an explicit indication that it is acceptable to 525 not log certificates issued by this intermediate CA. 527 o there MUST be a Name Constraints extension, in which: 529 * permittedSubtrees MUST specify one or more dNSNames. 531 * excludedSubtrees MUST specify the entire IPv4 and IPv6 address 532 ranges. 534 Below is an example Name Constraints extension that meets these 535 conditions: 537 SEQUENCE { 538 OBJECT IDENTIFIER '2 5 29 30' 539 OCTET STRING, encapsulates { 540 SEQUENCE { 541 [0] { 542 SEQUENCE { 543 [2] 'example.com' 544 } 545 } 546 [1] { 547 SEQUENCE { 548 [7] 00 00 00 00 00 00 00 00 549 } 550 SEQUENCE { 551 [7] 552 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 553 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 554 } 555 } 556 } 557 } 558 } 560 5. Log Format and Operation 562 A log is a single, append-only Merkle Tree of submitted certificate 563 and precertificate entries. 565 When it receives a valid submission, the log MUST return an SCT that 566 corresponds to the submitted certificate or precertificate. If the 567 log has previously seen this valid submission, it SHOULD return the 568 same SCT as it returned before (to reduce the ability to track 569 clients as described in Section 13.4). If different SCTs are 570 produced for the same submission, multiple log entries will have to 571 be created, one for each SCT (as the timestamp is a part of the leaf 572 structure). Note that if a certificate was previously logged as a 573 precertificate, then the precertificate's SCT of type 574 "precert_sct_v2" would not be appropriate; instead, a fresh SCT of 575 type "x509_sct_v2" should be generated. 577 An SCT is the log's promise to incorporate the submitted entry in its 578 Merkle Tree no later than a fixed amount of time, known as the 579 Maximum Merge Delay (MMD), after the issuance of the SCT. 580 Periodically, the log MUST append all its new entries to its Merkle 581 Tree and sign the root of the tree. 583 Log operators MUST NOT impose any conditions on retrieving or sharing 584 data from the log. 586 5.1. Accepting Submissions 588 Logs MUST verify that each submitted certificate or precertificate 589 has a valid signature chain to an accepted trust anchor, using the 590 chain of intermediate CA certificates provided by the submitter. 591 Logs MUST accept certificates and precertificates that are fully 592 valid according to RFC 5280 [RFC5280] verification rules and are 593 submitted with such a chain. Logs MAY accept certificates and 594 precertificates that have expired, are not yet valid, have been 595 revoked, or are otherwise not fully valid according to RFC 5280 596 verification rules in order to accommodate quirks of CA certificate- 597 issuing software. However, logs MUST reject submissions without a 598 valid signature chain to an accepted trust anchor. Logs MUST also 599 reject precertificates that do not conform to the requirements in 600 Section 3.2. 602 Logs SHOULD limit the length of chain they will accept. The maximum 603 chain length is specified in the log's metadata. 605 The log SHALL allow retrieval of its list of accepted trust anchors 606 (see Section 6.8), each of which is a root or intermediate CA 607 certificate. This list might usefully be the union of root 608 certificates trusted by major browser vendors. 610 5.2. Log Entries 612 If a submission is accepted and an SCT issued, the accepting log MUST 613 store the entire chain used for verification. This chain MUST 614 include the certificate or precertificate itself, the zero or more 615 intermediate CA certificates provided by the submitter, and the trust 616 anchor used to verify the chain (even if it was omitted from the 617 submission). The log MUST present this chain for auditing upon 618 request (see Section 6.7). This chain is required to prevent a CA 619 from avoiding blame by logging a partial or empty chain. 621 Each certificate entry in a log MUST include a "X509ChainEntry" 622 structure, and each precertificate entry MUST include a 623 "PrecertChainEntryV2" structure: 625 opaque ASN.1Cert<1..2^24-1>; 627 struct { 628 ASN.1Cert leaf_certificate; 629 ASN.1Cert certificate_chain<0..2^24-1>; 630 } X509ChainEntry; 632 opaque CMSPrecert<1..2^24-1>; 634 struct { 635 CMSPrecert pre_certificate; 636 ASN.1Cert precertificate_chain<1..2^24-1>; 637 } PrecertChainEntryV2; 639 "leaf_certificate" is a submitted certificate that has been accepted 640 by the log. 642 "certificate_chain" is a vector of 0 or more additional certificates 643 required to verify "leaf_certificate". The first certificate MUST 644 certify "leaf_certificate". Each following certificate MUST directly 645 certify the one preceding it. The final certificate MUST be a trust 646 anchor accepted by the log. If "leaf_certificate" is an accepted 647 trust anchor, then this vector is empty. 649 "pre_certificate" is a submitted precertificate that has been 650 accepted by the log. 652 "precertificate_chain" is a vector of 1 or more additional 653 certificates required to verify "pre_certificate". The first 654 certificate MUST certify "pre_certificate". Each following 655 certificate MUST directly certify the one preceding it. The final 656 certificate MUST be a trust anchor accepted by the log. 658 5.3. Log ID 660 Each log is identified by an OID, which is specified in the log's 661 metadata and which MUST NOT be used to identify any other log. A 662 log's operator MUST either allocate the OID themselves or request an 663 OID from one of the two Log ID Registries (see Section 12.7.1 and 664 Section 12.7.2). Various data structures include the DER encoding of 665 this OID, excluding the ASN.1 tag and length bytes, in an opaque 666 vector: 668 opaque LogID<2..127>; 670 Note that the ASN.1 length and the opaque vector length are identical 671 in size (1 byte) and value, so the DER encoding of the OID can be 672 reproduced simply by prepending an OBJECT IDENTIFIER tag (0x06) to 673 the opaque vector length and contents. 675 OIDs used to identify logs are limited such that the DER encoding of 676 their value is less than or equal to 127 octets. 678 5.4. TransItem Structure 680 Various data structures are encapsulated in the "TransItem" structure 681 to ensure that the type and version of each one is identified in a 682 common fashion: 684 enum { 685 reserved(0), 686 x509_entry_v2(1), precert_entry_v2(2), 687 x509_sct_v2(3), precert_sct_v2(4), 688 signed_tree_head_v2(5), consistency_proof_v2(6), 689 inclusion_proof_v2(7), x509_sct_with_proof_v2(8), 690 precert_sct_with_proof_v2(9), 691 (65535) 692 } VersionedTransType; 694 struct { 695 VersionedTransType versioned_type; 696 select (versioned_type) { 697 case x509_entry_v2: TimestampedCertificateEntryDataV2; 698 case precert_entry_v2: TimestampedCertificateEntryDataV2; 699 case x509_sct_v2: SignedCertificateTimestampDataV2; 700 case precert_sct_v2: SignedCertificateTimestampDataV2; 701 case signed_tree_head_v2: SignedTreeHeadDataV2; 702 case consistency_proof_v2: ConsistencyProofDataV2; 703 case inclusion_proof_v2: InclusionProofDataV2; 704 case x509_sct_with_proof_v2: SCTWithProofDataV2; 705 case precert_sct_with_proof_v2: SCTWithProofDataV2; 706 } data; 707 } TransItem; 709 "versioned_type" is the type of the encapsulated data structure and 710 the earliest version of this protocol to which it conforms. This 711 document is v2. 713 "data" is the encapsulated data structure. The various structures 714 named with the "DataV2" suffix are defined in later sections of this 715 document. 717 Note that "VersionedTransType" combines the v1 [RFC6962] type 718 enumerations "Version", "LogEntryType", "SignatureType" and 719 "MerkleLeafType". Note also that v1 did not define "TransItem", but 720 this document provides guidelines (see Appendix A) on how v2 721 implementations can co-exist with v1 implementations. 723 Future versions of this protocol may reuse "VersionedTransType" 724 values defined in this document as long as the corresponding data 725 structures are not modified, and may add new "VersionedTransType" 726 values for new or modified data structures. 728 5.5. Merkle Tree Leaves 730 The leaves of a log's Merkle Tree correspond to the log's entries 731 (see Section 5.2). Each leaf is the leaf hash (Section 2.1) of a 732 "TransItem" structure of type "x509_entry_v2" or "precert_entry_v2", 733 which encapsulates a "TimestampedCertificateEntryDataV2" structure. 734 Note that leaf hashes are calculated as HASH(0x00 || TransItem), 735 where the hashing algorithm is specified in the log's metadata. 737 opaque TBSCertificate<1..2^24-1>; 739 struct { 740 uint64 timestamp; 741 opaque issuer_key_hash<32..2^8-1>; 742 TBSCertificate tbs_certificate; 743 SctExtension sct_extensions<0..2^16-1>; 744 } TimestampedCertificateEntryDataV2; 746 "timestamp" is the NTP Time [RFC5905] at which the certificate or 747 precertificate was accepted by the log, measured in milliseconds 748 since the epoch (January 1, 1970, 00:00 UTC), ignoring leap seconds. 749 Note that the leaves of a log's Merkle Tree are not required to be in 750 strict chronological order. 752 "issuer_key_hash" is the HASH of the public key of the CA that issued 753 the certificate or precertificate, calculated over the DER encoding 754 of the key represented as SubjectPublicKeyInfo [RFC5280]. This is 755 needed to bind the CA to the certificate or precertificate, making it 756 impossible for the corresponding SCT to be valid for any other 757 certificate or precertificate whose TBSCertificate matches 758 "tbs_certificate". The length of the "issuer_key_hash" MUST match 759 HASH_SIZE. 761 "tbs_certificate" is the DER encoded TBSCertificate from either the 762 "leaf_certificate" (in the case of an "X509ChainEntry") or the 763 "pre_certificate" (in the case of a "PrecertChainEntryV2"). (Note 764 that a precertificate's TBSCertificate can be reconstructed from the 765 corresponding certificate as described in Section 10.2.2). 767 "sct_extensions" matches the SCT extensions of the corresponding SCT. 769 5.6. Signed Certificate Timestamp (SCT) 771 An SCT is a "TransItem" structure of type "x509_sct_v2" or 772 "precert_sct_v2", which encapsulates a 773 "SignedCertificateTimestampDataV2" structure: 775 enum { 776 reserved(65535) 777 } SctExtensionType; 779 struct { 780 SctExtensionType sct_extension_type; 781 opaque sct_extension_data<0..2^16-1>; 782 } SctExtension; 784 struct { 785 LogID log_id; 786 uint64 timestamp; 787 SctExtension sct_extensions<0..2^16-1>; 788 digitally-signed struct { 789 TransItem timestamped_entry; 790 } signature; 791 } SignedCertificateTimestampDataV2; 793 "log_id" is this log's unique ID, encoded in an opaque vector as 794 described in Section 5.3. 796 "timestamp" is equal to the timestamp from the 797 "TimestampedCertificateEntryDataV2" structure encapsulated in the 798 "timestamped_entry". 800 "sct_extension_type" identifies a single extension from the IANA 801 registry in Section 12.5. At the time of writing, no extensions are 802 specified. 804 The interpretation of the "sct_extension_data" field is determined 805 solely by the value of the "sct_extension_type" field. Each document 806 that registers a new "sct_extension_type" must describe how to 807 interpret the corresponding "sct_extension_data". 809 "sct_extensions" is a vector of 0 or more SCT extensions. This 810 vector MUST NOT include more than one extension with the same 811 "sct_extension_type". The extensions in the vector MUST be ordered 812 by the value of the "sct_extension_type" field, smallest value first. 813 If an implementation sees an extension that it does not understand, 814 it SHOULD ignore that extension. Furthermore, an implementation MAY 815 choose to ignore any extension(s) that it does understand. 817 The encoding of the digitally-signed element is defined in [RFC5246]. 819 "timestamped_entry" is a "TransItem" structure that MUST be of type 820 "x509_entry_v2" or "precert_entry_v2" (see Section 5.5). 822 5.7. Merkle Tree Head 824 The log stores information about its Merkle Tree in a 825 "TreeHeadDataV2": 827 opaque NodeHash<32..2^8-1>; 829 enum { 830 reserved(65535) 831 } SthExtensionType; 833 struct { 834 SthExtensionType sth_extension_type; 835 opaque sth_extension_data<0..2^16-1>; 836 } SthExtension; 838 struct { 839 uint64 timestamp; 840 uint64 tree_size; 841 NodeHash root_hash; 842 SthExtension sth_extensions<0..2^16-1>; 843 } TreeHeadDataV2; 845 The length of NodeHash MUST match HASH_SIZE of the log. 847 "sth_extension_type" identifies a single extension from the IANA 848 registry in Section 12.6. At the time of writing, no extensions are 849 specified. 851 The interpretation of the "sth_extension_data" field is determined 852 solely by the value of the "sth_extension_type" field. Each document 853 that registers a new "sth_extension_type" must describe how to 854 interpret the corresponding "sth_extension_data". 856 "timestamp" is the current NTP Time [RFC5905], measured in 857 milliseconds since the epoch (January 1, 1970, 00:00 UTC), ignoring 858 leap seconds. 860 "tree_size" is the number of entries currently in the log's Merkle 861 Tree. 863 "root_hash" is the root of the Merkle Hash Tree. 865 "sth_extensions" is a vector of 0 or more STH extensions. This 866 vector MUST NOT include more than one extension with the same 867 "sth_extension_type". The extensions in the vector MUST be ordered 868 by the value of the "sth_extension_type" field, smallest value first. 869 If an implementation sees an extension that it does not understand, 870 it SHOULD ignore that extension. Furthermore, an implementation MAY 871 choose to ignore any extension(s) that it does understand. 873 5.8. Signed Tree Head (STH) 875 Periodically each log SHOULD sign its current tree head information 876 (see Section 5.7) to produce an STH. When a client requests a log's 877 latest STH (see Section 6.3), the log MUST return an STH that is no 878 older than the log's MMD. However, STHs could be used to mark 879 individual clients (by producing a new one for each query), so logs 880 MUST NOT produce them more frequently than is declared in their 881 metadata. In general, there is no need to produce a new STH unless 882 there are new entries in the log; however, in the unlikely event that 883 it receives no new submissions during an MMD period, the log SHALL 884 sign the same Merkle Tree Hash with a fresh timestamp. 886 An STH is a "TransItem" structure of type "signed_tree_head_v2", 887 which encapsulates a "SignedTreeHeadDataV2" structure: 889 struct { 890 LogID log_id; 891 TreeHeadDataV2 tree_head; 892 digitally-signed struct { 893 TreeHeadDataV2 tree_head; 894 } signature; 895 } SignedTreeHeadDataV2; 897 "log_id" is this log's unique ID, encoded in an opaque vector as 898 described in Section 5.3. 900 The "timestamp" in "tree_head" MUST be at least as recent as the most 901 recent SCT timestamp in the tree. Each subsequent timestamp MUST be 902 more recent than the timestamp of the previous update. 904 "tree_head" contains the latest tree head information (see 905 Section 5.7). 907 "signature" is a signature over the encoded "tree_head" field. 909 5.9. Merkle Consistency Proofs 911 To prepare a Merkle Consistency Proof for distribution to clients, 912 the log produces a "TransItem" structure of type 913 "consistency_proof_v2", which encapsulates a "ConsistencyProofDataV2" 914 structure: 916 struct { 917 LogID log_id; 918 uint64 tree_size_1; 919 uint64 tree_size_2; 920 NodeHash consistency_path<1..2^16-1>; 921 } ConsistencyProofDataV2; 923 "log_id" is this log's unique ID, encoded in an opaque vector as 924 described in Section 5.3. 926 "tree_size_1" is the size of the older tree. 928 "tree_size_2" is the size of the newer tree. 930 "consistency_path" is a vector of Merkle Tree nodes proving the 931 consistency of two STHs. 933 5.10. Merkle Inclusion Proofs 935 To prepare a Merkle Inclusion Proof for distribution to clients, the 936 log produces a "TransItem" structure of type "inclusion_proof_v2", 937 which encapsulates an "InclusionProofDataV2" structure: 939 struct { 940 LogID log_id; 941 uint64 tree_size; 942 uint64 leaf_index; 943 NodeHash inclusion_path<1..2^16-1>; 944 } InclusionProofDataV2; 946 "log_id" is this log's unique ID, encoded in an opaque vector as 947 described in Section 5.3. 949 "tree_size" is the size of the tree on which this inclusion proof is 950 based. 952 "leaf_index" is the 0-based index of the log entry corresponding to 953 this inclusion proof. 955 "inclusion_path" is a vector of Merkle Tree nodes proving the 956 inclusion of the chosen certificate or precertificate. 958 5.11. Shutting down a log 960 Log operators may decide to shut down a log for various reasons, such 961 as deprecation of the signature algorithm. If there are entries in 962 the log for certificates that have not yet expired, simply making TLS 963 clients stop recognizing that log will have the effect of 964 invalidating SCTs from that log. To avoid that, the following 965 actions are suggested: 967 o Make it known to clients and monitors that the log will be frozen. 969 o Stop accepting new submissions (the error code "shutdown" should 970 be returned for such requests). 972 o Once MMD from the last accepted submission has passed and all 973 pending submissions are incorporated, issue a final STH and 974 publish it as a part of the log's metadata. Having an STH with a 975 timestamp that is after the MMD has passed from the last SCT 976 issuance allows clients to audit this log regularly without 977 special handling for the final STH. At this point the log's 978 private key is no longer needed and can be destroyed. 980 o Keep the log running until the certificates in all of its entries 981 have expired or exist in other logs (this can be determined by 982 scanning other logs or connecting to domains mentioned in the 983 certificates and inspecting the SCTs served). 985 6. Log Client Messages 987 Messages are sent as HTTPS GET or POST requests. Parameters for 988 POSTs and all responses are encoded as JavaScript Object Notation 989 (JSON) objects [RFC4627]. Parameters for GETs are encoded as order- 990 independent key/value URL parameters, using the "application/x-www- 991 form-urlencoded" format described in the "HTML 4.01 Specification" 992 [HTML401]. Binary data is base64 encoded [RFC4648] as specified in 993 the individual messages. 995 Note that JSON objects and URL parameters may contain fields not 996 specified here. These extra fields should be ignored. 998 The prefix, which is part of the log's metadata, MAY 999 include a path as well as a server name and a port. 1001 In practice, log servers may include multiple front-end machines. 1002 Since it is impractical to keep these machines in perfect sync, 1003 errors may occur that are caused by skew between the machines. Where 1004 such errors are possible, the front-end will return additional 1005 information (as specified below) making it possible for clients to 1006 make progress, if progress is possible. Front-ends MUST only serve 1007 data that is free of gaps (that is, for example, no front-end will 1008 respond with an STH unless it is also able to prove consistency from 1009 all log entries logged within that STH). 1011 For example, when a consistency proof between two STHs is requested, 1012 the front-end reached may not yet be aware of one or both STHs. In 1013 the case where it is unaware of both, it will return the latest STH 1014 it is aware of. Where it is aware of the first but not the second, 1015 it will return the latest STH it is aware of and a consistency proof 1016 from the first STH to the returned STH. The case where it knows the 1017 second but not the first should not arise (see the "no gaps" 1018 requirement above). 1020 If the log is unable to process a client's request, it MUST return an 1021 HTTP response code of 4xx/5xx (see [RFC2616]), and, in place of the 1022 responses outlined in the subsections below, the body SHOULD be a 1023 JSON structure containing at least the following field: 1025 error_message: A human-readable string describing the error which 1026 prevented the log from processing the request. 1028 In the case of a malformed request, the string SHOULD provide 1029 sufficient detail for the error to be rectified. 1031 error_code: An error code readable by the client. Some codes are 1032 generic and are detailed here. Others are detailed in the 1033 individual requests. Error codes are fixed text strings. 1035 +---------------+---------------------------------------------+ 1036 | Error Code | Meaning | 1037 +---------------+---------------------------------------------+ 1038 | not compliant | The request is not compliant with this RFC. | 1039 +---------------+---------------------------------------------+ 1041 e.g., In response to a request of "/ct/v2/get- 1042 entries?start=100&end=99", the log would return a "400 Bad Request" 1043 response code with a body similar to the following: 1045 { 1046 "error_message": "'start' cannot be greater than 'end'", 1047 "error_code": "not compliant", 1048 } 1050 Clients SHOULD treat "500 Internal Server Error" and "503 Service 1051 Unavailable" responses as transient failures and MAY retry the same 1052 request without modification at a later date. Note that as per 1053 [RFC2616], in the case of a 503 response the log MAY include a 1054 "Retry-After:" header in order to request a minimum time for the 1055 client to wait before retrying the request. 1057 6.1. Add Chain to Log 1059 POST https:///ct/v2/add-chain 1061 Inputs: 1063 chain: An array of base64 encoded certificates. The first 1064 element is the certificate for which the submitter desires an 1065 SCT; the second certifies the first and so on to the last, 1066 which either is, or is certified by, an accepted trust anchor. 1068 Outputs: 1070 sct: A base64 encoded "TransItem" of type "x509_sct_v2", signed 1071 by this log, that corresponds to the submitted certificate. 1073 Error codes: 1075 +-------------+-----------------------------------------------------+ 1076 | Error Code | Meaning | 1077 +-------------+-----------------------------------------------------+ 1078 | unknown | The last certificate in the chain both is not, and | 1079 | anchor | is not certified by, an accepted trust anchor. | 1080 | | | 1081 | bad chain | The alleged chain is not actually a chain of | 1082 | | certificates. | 1083 | | | 1084 | bad | One or more certificates in the chain are not valid | 1085 | certificate | (e.g., not properly encoded). | 1086 | | | 1087 | shutdown | The log has ceased operation and is not accepting | 1088 | | new submissions. | 1089 +-------------+-----------------------------------------------------+ 1091 If the version of "sct" is not v2, then a v2 client may be unable to 1092 verify the signature. It MUST NOT construe this as an error. This 1093 is to avoid forcing an upgrade of compliant v2 clients that do not 1094 use the returned SCTs. 1096 If a log detects bad encoding in a chain that otherwise verifies 1097 correctly then the log MUST either log the certificate or return the 1098 "bad certificate" error. If the certificate is logged, an SCT MUST 1099 be issued. Logging the certificate is useful, because monitors 1100 (Section 10.3) can then detect these encoding errors, which may be 1101 accepted by some TLS clients. 1103 6.2. Add PreCertChain to Log 1105 POST https:///ct/v2/add-pre-chain 1107 Inputs: 1109 precertificate: The base64 encoded precertificate. 1111 chain: An array of base64 encoded CA certificates. The first 1112 element is the signer of the precertificate; the second 1113 certifies the first and so on to the last, which either is, or 1114 is certified by, an accepted trust anchor. 1116 Outputs: 1118 sct: A base64 encoded "TransItem" of type "precert_sct_v2", 1119 signed by this log, that corresponds to the submitted 1120 precertificate. 1122 Errors are the same as in Section 6.1. 1124 6.3. Retrieve Latest Signed Tree Head 1126 GET https:///ct/v2/get-sth 1128 No inputs. 1130 Outputs: 1132 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1133 signed by this log, that is no older than the log's MMD. 1135 6.4. Retrieve Merkle Consistency Proof between Two Signed Tree Heads 1137 GET https:///ct/v2/get-sth-consistency 1139 Inputs: 1141 first: The tree_size of the older tree, in decimal. 1143 second: The tree_size of the newer tree, in decimal (optional). 1145 Both tree sizes must be from existing v2 STHs. However, because 1146 of skew, the receiving front-end may not know one or both of the 1147 existing STHs. If both are known, then only the "consistency" 1148 output is returned. If the first is known but the second is not 1149 (or has been omitted), then the latest known STH is returned, 1150 along with a consistency proof between the first STH and the 1151 latest. If neither are known, then the latest known STH is 1152 returned without a consistency proof. 1154 Outputs: 1156 consistency: A base64 encoded "TransItem" of type 1157 "consistency_proof_v2", whose "tree_size_1" MUST match the 1158 "first" input. If the "sth" output is omitted, then 1159 "tree_size_2" MUST match the "second" input. 1161 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1162 signed by this log. 1164 Note that no signature is required for the "consistency" output as 1165 it is used to verify the consistency between two STHs, which are 1166 signed. 1168 Error codes: 1170 +-------------+-----------------------------------------------------+ 1171 | Error Code | Meaning | 1172 +-------------+-----------------------------------------------------+ 1173 | first | "first" is before the latest known STH but is not | 1174 | unknown | from an existing STH. | 1175 | | | 1176 | second | "second" is before the latest known STH but is not | 1177 | unknown | from an existing STH. | 1178 +-------------+-----------------------------------------------------+ 1180 See Section 10.4.2 for an outline of how to use the "consistency" 1181 output. 1183 6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash 1185 GET https:///ct/v2/get-proof-by-hash 1187 Inputs: 1189 hash: A base64 encoded v2 leaf hash. 1191 tree_size: The tree_size of the tree on which to base the proof, 1192 in decimal. 1194 The "hash" must be calculated as defined in Section 5.5. The 1195 "tree_size" must designate an existing v2 STH. Because of skew, 1196 the front-end may not know the requested STH. In that case, it 1197 will return the latest STH it knows, along with an inclusion proof 1198 to that STH. If the front-end knows the requested STH then only 1199 "inclusion" is returned. 1201 Outputs: 1203 inclusion: A base64 encoded "TransItem" of type 1204 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1205 Tree nodes proves the inclusion of the chosen certificate in 1206 the selected STH. 1208 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1209 signed by this log. 1211 Note that no signature is required for the "inclusion" output as 1212 it is used to verify inclusion in the selected STH, which is 1213 signed. 1215 Error codes: 1217 +-----------+-------------------------------------------------------+ 1218 | Error | Meaning | 1219 | Code | | 1220 +-----------+-------------------------------------------------------+ 1221 | hash | "hash" is not the hash of a known leaf (may be caused | 1222 | unknown | by skew or by a known certificate not yet merged). | 1223 | | | 1224 | tree_size | "hash" is before the latest known STH but is not from | 1225 | unknown | an existing STH. | 1226 +-----------+-------------------------------------------------------+ 1228 See Section 10.4.1 for an outline of how to use the "inclusion" 1229 output. 1231 6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and Consistency 1232 Proof by Leaf Hash 1234 GET https:///ct/v2/get-all-by-hash 1236 Inputs: 1238 hash: A base64 encoded v2 leaf hash. 1240 tree_size: The tree_size of the tree on which to base the proofs, 1241 in decimal. 1243 The "hash" must be calculated as defined in Section 5.5. The 1244 "tree_size" must designate an existing v2 STH. 1246 Because of skew, the front-end may not know the requested STH or 1247 the requested hash, which leads to a number of cases. 1249 latest STH < requested STH Return latest STH. 1251 latest STH > requested STH Return latest STH and a consistency 1252 proof between it and the requested STH (see Section 6.4). 1254 index of requested hash < latest STH Return "inclusion". 1256 Note that more than one case can be true, in which case the 1257 returned data is their concatenation. It is also possible for 1258 none to be true, in which case the front-end MUST return an empty 1259 response. 1261 Outputs: 1263 inclusion: A base64 encoded "TransItem" of type 1264 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1265 Tree nodes proves the inclusion of the chosen certificate in 1266 the returned STH. 1268 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1269 signed by this log. 1271 consistency: A base64 encoded "TransItem" of type 1272 "consistency_proof_v2" that proves the consistency of the 1273 requested STH and the returned STH. 1275 Note that no signature is required for the "inclusion" or 1276 "consistency" outputs as they are used to verify inclusion in and 1277 consistency of STHs, which are signed. 1279 Errors are the same as in Section 6.5. 1281 See Section 10.4.1 for an outline of how to use the "inclusion" 1282 output, and see Section 10.4.2 for an outline of how to use the 1283 "consistency" output. 1285 6.7. Retrieve Entries and STH from Log 1287 GET https:///ct/v2/get-entries 1289 Inputs: 1291 start: 0-based index of first entry to retrieve, in decimal. 1293 end: 0-based index of last entry to retrieve, in decimal. 1295 Outputs: 1297 entries: An array of objects, each consisting of 1299 leaf_input: The base64 encoded "TransItem" structure of type 1300 "x509_entry_v2" or "precert_entry_v2" (see Section 5.5). 1302 log_entry: The base64 encoded log entry (see Section 5.2). In 1303 the case of an "x509_entry_v2" entry, this is the whole 1304 "X509ChainEntry"; and in the case of a "precert_entry_v2", 1305 this is the whole "PrecertChainEntryV2". 1307 sct: The base64 encoded "TransItem" of type "x509_sct_v2" or 1308 "precert_sct_v2" corresponding to this log entry. 1310 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1311 signed by this log. 1313 Note that this message is not signed -- the "entries" data can be 1314 verified by constructing the Merkle Tree Hash corresponding to a 1315 retrieved STH. All leaves MUST be v2. However, a compliant v2 1316 client MUST NOT construe an unrecognized TransItem type as an error. 1317 This means it may be unable to parse some entries, but note that each 1318 client can inspect the entries it does recognize as well as verify 1319 the integrity of the data by treating unrecognized leaves as opaque 1320 input to the tree. 1322 The "start" and "end" parameters SHOULD be within the range 0 <= x < 1323 "tree_size" as returned by "get-sth" in Section 6.3. 1325 The "start" parameter MUST be less than or equal to the "end" 1326 parameter. 1328 Log servers MUST honor requests where 0 <= "start" < "tree_size" and 1329 "end" >= "tree_size" by returning a partial response covering only 1330 the valid entries in the specified range. "end" >= "tree_size" could 1331 be caused by skew. Note that the following restriction may also 1332 apply: 1334 Logs MAY restrict the number of entries that can be retrieved per 1335 "get-entries" request. If a client requests more than the permitted 1336 number of entries, the log SHALL return the maximum number of entries 1337 permissible. These entries SHALL be sequential beginning with the 1338 entry specified by "start". 1340 Because of skew, it is possible the log server will not have any 1341 entries between "start" and "end". In this case it MUST return an 1342 empty "entries" array. 1344 In any case, the log server MUST return the latest STH it knows 1345 about. 1347 See Section 10.4.3 for an outline of how to use a complete list of 1348 "leaf_input" entries to verify the "root_hash". 1350 6.8. Retrieve Accepted Trust Anchors 1352 GET https:///ct/v2/get-anchors 1354 No inputs. 1356 Outputs: 1358 certificates: An array of base64 encoded trust anchors that are 1359 acceptable to the log. 1361 max_chain: If the server has chosen to limit the length of chains 1362 it accepts, this is the maximum number of certificates in the 1363 chain, in decimal. If there is no limit, this is omitted. 1365 7. Optional Client Messages 1367 Logs MAY implement these messages. They are not required for correct 1368 operation of logs or their clients, but may be convenient in some 1369 circumstances. 1371 7.1. Get Entry Number for SCT 1373 GET https:///ct/v2/get-entry-for-sct 1375 Inputs: 1377 sct: A base64 encoded "TransItem" of type "x509_sct_v2" or 1378 "precert_sct_v2" signed by this log. 1380 Outputs: 1382 entry: 0-based index of the log entry corresponding to the 1383 supplied SCT. 1385 Error codes: 1387 +-------------+-----------------------------------------------------+ 1388 | Error Code | Meaning | 1389 +-------------+-----------------------------------------------------+ 1390 | bad | "sct" is not signed by this log. | 1391 | signature | | 1392 | | | 1393 | not found | "sct" does not correspond to an entry that is | 1394 | | currently available. | 1395 +-------------+-----------------------------------------------------+ 1397 Note that any SCT signed by a log MUST have a corresponding entry in 1398 the log, but it may not be retrievable until the MMD has passed since 1399 the SCT was issued. 1401 7.2. Get Entry Numbers for TBSCertificate 1403 GET https:///ct/v2/get-entry-for-tbscertificate 1405 Inputs: 1407 hash: A base64 encoded HASH of a "TBSCertificate" for which the 1408 log has previously issued an SCT. (Note that a 1409 precertificate's TBSCertificate is reconstructed from the 1410 corresponding certificate as described in Section 10.2.2). 1412 Outputs: 1414 entries: An array of 0-based indices of log entries corresponding 1415 to the supplied HASH. 1417 Error codes: 1419 +-----------+-------------------------------------------------------+ 1420 | Error | Meaning | 1421 | Code | | 1422 +-----------+-------------------------------------------------------+ 1423 | bad hash | "hash" is not the right size or format. | 1424 | | | 1425 | not found | "sct" does not correspond to an entry that is | 1426 | | currently available. | 1427 +-----------+-------------------------------------------------------+ 1428 Note that it is possible for a certificate to be logged more than 1429 once. If that is the case, the log MAY return more than one entry 1430 index. If the certificate is present in the log, then the log MUST 1431 return at least one entry index. 1433 8. TLS Servers 1435 TLS servers MUST use at least one of the three mechanisms listed 1436 below to present one or more SCTs from one or more logs to each TLS 1437 client during full TLS handshakes, where each SCT corresponds to the 1438 server certificate or to a name-constrained intermediate the server 1439 certificate chains to. TLS servers SHOULD also present corresponding 1440 inclusion proofs and STHs (see Section 8.3). 1442 Three mechanisms are provided because they have different tradeoffs. 1444 o A TLS extension (Section 7.4.1.4 of [RFC5246]) with type 1445 "transparency_info" (see Section 8.5). This mechanism allows TLS 1446 servers to participate in CT without the cooperation of CAs, 1447 unlike the other two mechanisms. It also allows SCTs and 1448 inclusion proofs to be updated on the fly. 1450 o An Online Certificate Status Protocol (OCSP) [RFC6960] response 1451 extension (see Section 9.1.1), where the OCSP response is provided 1452 in the "CertificateStatus" message, provided that the TLS client 1453 included the "status_request" extension in the (extended) 1454 "ClientHello" (Section 8 of [RFC6066]). This mechanism, popularly 1455 known as OCSP stapling, is already widely (but not universally) 1456 implemented. It also allows SCTs and inclusion proofs to be 1457 updated on the fly. 1459 o An X509v3 certificate extension (see Section 9.1.2). This 1460 mechanism allows the use of unmodified TLS servers, but the SCTs 1461 and inclusion proofs cannot be updated on the fly. Since the logs 1462 from which the SCTs and inclusion proofs originated won't 1463 necessarily be accepted by TLS clients for the full lifetime of 1464 the certificate, there is a risk that TLS clients will 1465 subsequently consider the certificate to be non-compliant and in 1466 need of re-issuance. 1468 Additionally, a TLS server which supports presenting SCTs using an 1469 OCSP response MAY provide it when the TLS client included the 1470 "status_request_v2" extension ([RFC6961]) in the (extended) 1471 "ClientHello", but only in addition to at least one of the three 1472 mechanisms listed above. 1474 8.1. Multiple SCTs 1476 TLS servers SHOULD send SCTs from multiple logs in case one or more 1477 logs are not acceptable to the TLS client (for example, if a log has 1478 been struck off for misbehavior, has had a key compromise, or is not 1479 known to the TLS client). For example: 1481 o If a CA and a log collude, it is possible to temporarily hide 1482 misissuance from clients. Including SCTs from different logs 1483 makes it more difficult to mount this attack. 1485 o If a log misbehaves, a consequence may be that clients cease to 1486 trust it. Since the time an SCT may be in use can be considerable 1487 (several years is common in current practice when embedded in a 1488 certificate), servers may wish to reduce the probability of their 1489 certificates being rejected as a result by including SCTs from 1490 different logs. 1492 o TLS clients may have policies related to the above risks requiring 1493 servers to present multiple SCTs. For example, at the time of 1494 writing, Chromium [Chromium.Log.Policy] requires multiple SCTs to 1495 be presented with EV certificates in order for the EV indicator to 1496 be shown. 1498 To select the logs from which to obtain SCTs, a TLS server can, for 1499 example, examine the set of logs popular TLS clients accept and 1500 recognize. 1502 8.2. TransItemList Structure 1504 Multiple SCTs, inclusion proofs, and indeed "TransItem" structures of 1505 any type, are combined into a list as follows: 1507 opaque SerializedTransItem<1..2^16-1>; 1509 struct { 1510 SerializedTransItem trans_item_list<1..2^16-1>; 1511 } TransItemList; 1513 Here, "SerializedTransItem" is an opaque byte string that contains 1514 the serialized "TransItem" structure. This encoding ensures that TLS 1515 clients can decode each "TransItem" individually (so, for example, if 1516 there is a version upgrade, out-of-date clients can still parse old 1517 "TransItem" structures while skipping over new "TransItem" structures 1518 whose versions they don't understand). 1520 8.3. Presenting SCTs, inclusion proofs and STHs 1522 When constructing a "TransItemList" structure, a TLS server SHOULD 1523 construct and include "TransItem" structures of type 1524 "x509_sct_with_proof_v2" (for an SCT of type "x509_sct_v2") or 1525 "precert_sct_with_proof_v2" (for an SCT of type "precert_sct_v2"), 1526 both of which encapsulate a "SCTWithProofDataV2" structure: 1528 struct { 1529 SignedCertificateTimestampDataV2 sct; 1530 SignedTreeHeadDataV2 sth; 1531 InclusionProofDataV2 inclusion_proof; 1532 } SCTWithProofDataV2; 1534 "sct" is the encapsulated data structure from an SCT that corresponds 1535 to the server certificate or to a name-constrained intermediate the 1536 server certificate chains to. 1538 "sth" is the encapsulated data structure from an STH that was signed 1539 by the same log as "sct". 1541 "inclusion_proof" is the encapsulated data structure from an 1542 inclusion proof that corresponds to "sct" and can be used to compute 1543 the root in "sth". 1545 8.4. Presenting SCTs only 1547 Presenting inclusion proofs and STHs in the TLS handshake helps to 1548 protect the client's privacy (see Section 10.2.4) and reduces load on 1549 log servers. However, if a TLS server is unable to obtain an 1550 inclusion proof and STH that correspond to an SCT, then it MUST 1551 include "TransItem" structures of type "x509_sct_v2" or 1552 "precert_sct_v2" in the "TransItemList". 1554 8.5. transparency_info TLS Extension 1556 Provided that a TLS client includes the "transparency_info" extension 1557 type in the ClientHello, the TLS server SHOULD include the 1558 "transparency_info" extension in the ServerHello with 1559 "extension_data" set to a "TransItemList". The TLS server SHOULD 1560 ignore any "extension_data" sent by the TLS client. Additionally, 1561 the TLS server MUST NOT process or include this extension when a TLS 1562 session is resumed, since session resumption uses the original 1563 session information. 1565 8.6. cached_info TLS Extension 1567 When a TLS server includes the "transparency_info" extension in the 1568 ServerHello, it SHOULD NOT include any "TransItem" structures of type 1569 "x509_sct_with_proof_v2", "x509_sct_v2", "precert_sct_with_proof_v2" 1570 or "precert_sct_v2" in the "TransItemList" if all of the following 1571 conditions are met: 1573 o The TLS client includes the "transparency_info" extension type in 1574 the ClientHello. 1576 o The TLS client includes the "cached_info" ([RFC7924]) extension 1577 type in the ClientHello, with a "CachedObject" of type 1578 "ct_compliant" (see Section 10.2.7) and at least one 1579 "CachedObject" of type "cert". 1581 o The TLS server sends a modified Certificate message (as described 1582 in section 4.1 of [RFC7924]). 1584 TLS servers SHOULD ignore the "hash_value" fields of each 1585 "CachedObject" of type "ct_compliant" sent by TLS clients. 1587 9. Certification Authorities 1589 9.1. Transparency Information X.509v3 Extension 1591 The Transparency Information X.509v3 extension, which has OID 1592 1.3.101.75 and SHOULD be non-critical, contains one or more 1593 "TransItem" structures in a "TransItemList". This extension MAY be 1594 included in OCSP responses (see Section 9.1.1) and certificates (see 1595 Section 9.1.2). Since RFC5280 requires the "extnValue" field (an 1596 OCTET STRING) of each X.509v3 extension to include the DER encoding 1597 of an ASN.1 value, a "TransItemList" MUST NOT be included directly. 1598 Instead, it MUST be wrapped inside an additional OCTET STRING, which 1599 is then put into the "extnValue" field: 1601 TransparencyInformationSyntax ::= OCTET STRING 1603 "TransparencyInformationSyntax" contains a "TransItemList". 1605 9.1.1. OCSP Response Extension 1607 A certification authority MAY include a Transparency Information 1608 X.509v3 extension in the "singleExtensions" of a "SingleResponse" in 1609 an OCSP response. The included SCTs or inclusion proofs MUST be for 1610 the certificate identified by the "certID" of that "SingleResponse", 1611 or for a precertificate that corresponds to that certificate, or for 1612 a name-constrained intermediate to which that certificate chains. 1614 9.1.2. Certificate Extension 1616 A certification authority MAY include a Transparency Information 1617 X.509v3 extension in a certificate. Any included SCTs or inclusion 1618 proofs MUST be either for a precertificate that corresponds to this 1619 certificate, or for a name-constrained intermediate to which this 1620 certificate chains. 1622 9.2. TLS Feature Extension 1624 A certification authority MAY include the transparency_info 1625 (Section 8.5) TLS extension identifier in the TLS Feature [RFC7633] 1626 certificate extension in root, intermediate and end-entity 1627 certificates. When a certificate chain includes such a certificate, 1628 this indicates that CT compliance is required. 1630 10. Clients 1632 There are various different functions clients of logs might perform. 1633 We describe here some typical clients and how they should function. 1634 Any inconsistency may be used as evidence that a log has not behaved 1635 correctly, and the signatures on the data structures prevent the log 1636 from denying that misbehavior. 1638 All clients need various metadata in order to communicate with logs 1639 and verify their responses. This metadata is described below, but 1640 note that this document does not describe how the metadata is 1641 obtained, which is implementation dependent (see, for example, 1642 [Chromium.Policy]). 1644 Clients should somehow exchange STHs they see, or make them available 1645 for scrutiny, in order to ensure that they all have a consistent 1646 view. The exact mechanisms will be in separate documents, but it is 1647 expected there will be a variety. 1649 10.1. Metadata 1651 In order to communicate with and verify a log, clients need metadata 1652 about the log. 1654 Base URL: The URL to substitute for in Section 6. 1656 Hash Algorithm: The hash algorithm used for the Merkle Tree (see 1657 Section 12.3). 1659 Signing Algorithm: The signing algorithm used (see Section 2.1.4). 1661 Public Key: The public key used to verify signatures generated by 1662 the log. A log MUST NOT use the same keypair as any other log. 1664 Log ID: The OID that uniquely identifies the log. 1666 Maximum Merge Delay: The MMD the log has committed to. 1668 Version: The version of the protocol supported by the log (currently 1669 1 or 2). 1671 Maximum Chain Length: The longest chain submission the log is 1672 willing to accept, if the log chose to limit it. 1674 STH Frequency Count: The maximum number of STHs the log may produce 1675 in any period equal to the "Maximum Merge Delay" (see 1676 Section 5.8). 1678 Final STH: If a log has been closed down (i.e., no longer accepts 1679 new entries), existing entries may still be valid. In this case, 1680 the client should know the final valid STH in the log to ensure no 1681 new entries can be added without detection. The final STH should 1682 be provided in the form of a TransItem of type 1683 "signed_tree_head_v2". 1685 [JSON.Metadata] is an example of a metadata format which includes the 1686 above elements. 1688 10.2. TLS Client 1690 10.2.1. Receiving SCTs 1692 TLS clients receive SCTs alongside or in certificates. TLS clients 1693 MUST implement all of the three mechanisms by which TLS servers may 1694 present SCTs (see Section 8). TLS clients MAY also accept SCTs via 1695 the "status_request_v2" extension ([RFC6961]). TLS clients that 1696 support the "transparency_info" TLS extension SHOULD include it in 1697 ClientHello messages, with empty "extension_data". TLS clients may 1698 also receive inclusion proofs in addition to SCTs, which should be 1699 checked once the SCTs are validated. 1701 10.2.2. Reconstructing the TBSCertificate 1703 To reconstruct the TBSCertificate component of a precertificate from 1704 a certificate, TLS clients should remove the Transparency Information 1705 extension described in Section 9.1. 1707 If the SCT checked is for a Precertificate (where the "type" of the 1708 "TransItem" is "precert_sct_v2"), then the client SHOULD also remove 1709 embedded v1 SCTs, identified by OID 1.3.6.1.4.1.11129.2.4.2 (See 1710 Section 3.3. of [RFC6962]), in the process of reconstructing the 1711 TBSCertificate. That is to allow embedded v1 and v2 SCTs to co-exist 1712 in a certificate (See Appendix A). 1714 10.2.3. Validating SCTs 1716 In addition to normal validation of the server certificate and its 1717 chain, TLS clients SHOULD validate each received SCT for which they 1718 have the corresponding log's metadata. To validate an SCT, a TLS 1719 client computes the signature input from the SCT data and the 1720 corresponding certificate, and then verifies the signature using the 1721 corresponding log's public key. TLS clients MUST NOT consider valid 1722 any SCT whose timestamp is in the future. 1724 Before considering any SCT to be invalid, the TLS client MUST attempt 1725 to validate it against the server certificate and against each of the 1726 zero or more suitable name-constrained intermediates (Section 4.2) in 1727 the chain. These certificates may be evaluated in the order they 1728 appear in the chain, or, indeed, in any order. 1730 10.2.4. Validating inclusion proofs 1732 After validating a received SCT, a TLS client MAY request a 1733 corresponding inclusion proof (if one is not already available) and 1734 then verify it. An inclusion proof can be requested directly from a 1735 log using "get-proof-by-hash" (Section 6.5) or "get-all-by-hash" 1736 (Section 6.6), but note that this will disclose to the log which TLS 1737 server the client has been communicating with. 1739 Alternatively, if the TLS client has received an inclusion proof (and 1740 an STH) alongside the SCT, it can proceed to verifying the inclusion 1741 proof to the provided STH. The client then has to verify consistency 1742 between the provided STH and an STH it knows about, which is less 1743 sensitive from a privacy perspective. 1745 TLS clients SHOULD also verify each received inclusion proof (see 1746 Section 10.4.1) for which they have the corresponding log's metadata, 1747 to audit the log and gain confidence that the certificate is logged. 1749 If the TLS client holds an STH that predates the SCT, it MAY, in the 1750 process of auditing, request a new STH from the log (Section 6.3), 1751 then verify it by requesting a consistency proof (Section 6.4). Note 1752 that if the TLS client uses "get-all-by-hash", then it will already 1753 have the new STH. 1755 10.2.5. Evaluating compliance 1757 To be considered compliant, a certificate MUST be accompanied by at 1758 least one valid SCT. A certificate not accompanied by any valid SCTs 1759 MUST NOT be considered compliant by TLS clients. 1761 A TLS client MUST NOT evaluate compliance if it did not send both the 1762 "transparency_info" and "status_request" TLS extensions in the 1763 ClientHello. 1765 10.2.6. TLS Feature Extension 1767 If any certificate in a chain includes the transparency_info 1768 (Section 8.5) TLS extension identifier in the TLS Feature [RFC7633] 1769 certificate extension, then CT compliance (using any of the 1770 mechanisms from Section 8) is required. 1772 10.2.7. cached_info TLS Extension 1774 If a TLS client uses the "cached_info" TLS extension ([RFC7924]) to 1775 indicate 1 or more cached certificates, all of which it already 1776 considers to be CT compliant, the TLS client MAY also include a 1777 "CachedObject" of type "ct_compliant" in the "cached_info" extension. 1778 The "hash_value" field MUST be 1 byte long with the value 0. 1780 10.2.8. Handling of Non-compliance 1782 If a TLS server presents a certificate chain that is non-compliant, 1783 and the use of a compliant certificate is mandated by an explicit 1784 security policy, application protocol specification, the TLS Feature 1785 extension or any other means, the TLS client MUST refuse the 1786 connection. 1788 10.3. Monitor 1790 Monitors watch logs to check that they behave correctly, for 1791 certificates of interest, or both. For example, a monitor may be 1792 configured to report on all certificates that apply to a specific 1793 domain name when fetching new entries for consistency validation. 1795 A monitor needs to, at least, inspect every new entry in each log it 1796 watches. It may also want to keep copies of entire logs. In order 1797 to do this, it should follow these steps for each log: 1799 1. Fetch the current STH (Section 6.3). 1801 2. Verify the STH signature. 1803 3. Fetch all the entries in the tree corresponding to the STH 1804 (Section 6.7). 1806 4. Confirm that the tree made from the fetched entries produces the 1807 same hash as that in the STH. 1809 5. Fetch the current STH (Section 6.3). Repeat until the STH 1810 changes. 1812 6. Verify the STH signature. 1814 7. Fetch all the new entries in the tree corresponding to the STH 1815 (Section 6.7). If they remain unavailable for an extended 1816 period, then this should be viewed as misbehavior on the part of 1817 the log. 1819 8. Either: 1821 1. Verify that the updated list of all entries generates a tree 1822 with the same hash as the new STH. 1824 Or, if it is not keeping all log entries: 1826 1. Fetch a consistency proof for the new STH with the previous 1827 STH (Section 6.4). 1829 2. Verify the consistency proof. 1831 3. Verify that the new entries generate the corresponding 1832 elements in the consistency proof. 1834 9. Go to Step 5. 1836 10.4. Auditing 1838 Auditing ensures that the current published state of a log is 1839 reachable from previously published states that are known to be good, 1840 and that the promises made by the log in the form of SCTs have been 1841 kept. Audits are performed by monitors or TLS clients. 1843 In particular, there are four log behaviour properties that should be 1844 checked: 1846 o The Maximum Merge Delay (MMD). 1848 o The STH Frequency Count. 1850 o The append-only property. 1852 o The consistency of the log view presented to all query sources. 1854 A benign, conformant log publishes a series of STHs over time, each 1855 derived from the previous STH and the submitted entries incorporated 1856 into the log since publication of the previous STH. This can be 1857 proven through auditing of STHs. SCTs returned to TLS clients can be 1858 audited by verifying against the accompanying certificate, and using 1859 Merkle Inclusion Proofs, against the log's Merkle tree. 1861 The action taken by the auditor if an audit fails is not specified, 1862 but note that in general if audit fails, the auditor is in possession 1863 of signed proof of the log's misbehavior. 1865 A monitor (Section 10.3) can audit by verifying the consistency of 1866 STHs it receives, ensure that each entry can be fetched and that the 1867 STH is indeed the result of making a tree from all fetched entries. 1869 A TLS client (Section 10.2) can audit by verifying an SCT against any 1870 STH dated after the SCT timestamp + the Maximum Merge Delay by 1871 requesting a Merkle inclusion proof (Section 6.5). It can also 1872 verify that the SCT corresponds to the certificate it arrived with 1873 (i.e., the log entry is that certificate, is a precertificate for 1874 that certificate or is an appropriate name-constrained intermediate 1875 (Section 4.2). 1877 Checking of the consistency of the log view presented to all entities 1878 is more difficult to perform because it requires a way to share log 1879 responses among a set of CT-aware entities, and is discussed in 1880 Section 13.3. 1882 The following algorithm outlines may be useful for clients that wish 1883 to perform various audit operations. 1885 10.4.1. Verifying an inclusion proof 1887 When a client has received a "TransItem" of type "inclusion_proof_v2" 1888 and wishes to verify inclusion of an input "hash" for an STH with a 1889 given "tree_size" and "root_hash", the following algorithm may be 1890 used to prove the "hash" was included in the "root_hash": 1892 1. Compare "leaf_index" against "tree_size". If "leaf_index" is 1893 greater than or equal to "tree_size" fail the proof verification. 1895 2. Set "fn" to "leaf_index" and "sn" to "tree_size - 1". 1897 3. Set "r" to "hash". 1899 4. For each value "p" in the "inclusion_path" array: 1901 If "sn" is 0, stop the iteration and fail the proof verification. 1903 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 1905 1. Set "r" to "HASH(0x01 || p || r)" 1907 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 1908 equally until either "LSB(fn)" is set or "fn" is "0". 1910 Otherwise: 1912 1. Set "r" to "HASH(0x01 || r || p)" 1914 Finally, right-shift both "fn" and "sn" one time. 1916 5. Compare "sn" to 0. Compare "r" against the "root_hash". If "sn" 1917 is equal to 0, and "r" and the "root_hash" are equal, then the 1918 log has proven the inclusion of "hash". Otherwise, fail the 1919 proof verification. 1921 10.4.2. Verifying consistency between two STHs 1923 When a client has an STH "first_hash" for tree size "first", an STH 1924 "second_hash" for tree size "second" where "0 < first < second", and 1925 has received a "TransItem" of type "consistency_proof_v2" that they 1926 wish to use to verify both hashes, the following algorithm may be 1927 used: 1929 1. If "first" is an exact power of 2, then prepend "first_hash" to 1930 the "consistency_path" array. 1932 2. Set "fn" to "first - 1" and "sn" to "second - 1". 1934 3. If "LSB(fn)" is set, then right-shift both "fn" and "sn" equally 1935 until "LSB(fn)" is not set. 1937 4. Set both "fr" and "sr" to the first value in the 1938 "consistency_path" array. 1940 5. For each subsequent value "c" in the "consistency_path" array: 1942 If "sn" is 0, stop the iteration and fail the proof verification. 1944 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 1946 1. Set "fr" to "HASH(0x01 || c || fr)" 1947 Set "sr" to "HASH(0x01 || c || sr)" 1949 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 1950 equally until either "LSB(fn)" is set or "fn" is "0". 1952 Otherwise: 1954 1. Set "sr" to "HASH(0x01 || sr || c)" 1956 Finally, right-shift both "fn" and "sn" one time. 1958 6. After completing iterating through the "consistency_path" array 1959 as described above, verify that the "fr" calculated is equal to 1960 the "first_hash" supplied, that the "sr" calculated is equal to 1961 the "second_hash" supplied and that "sn" is 0. 1963 10.4.3. Verifying root hash given entries 1965 When a client has a complete list of leaf input "entries" from "0" up 1966 to "tree_size - 1" and wishes to verify this list against an STH 1967 "root_hash" returned by the log for the same "tree_size", the 1968 following algorithm may be used: 1970 1. Set "stack" to an empty stack. 1972 2. For each "i" from "0" up to "tree_size - 1": 1974 1. Push "HASH(0x00 || entries[i])" to "stack". 1976 2. Set "merge_count" to the lowest value ("0" included) such 1977 that "LSB(i >> merge_count)" is not set. In other words, set 1978 "merge_count" to the number of consecutive "1"s found 1979 starting at the least significant bit of "i". 1981 3. Repeat "merge_count" times: 1983 1. Pop "right" from "stack". 1985 2. Pop "left" from "stack". 1987 3. Push "HASH(0x01 || left || right)" to "stack". 1989 3. If there is more than one element in the "stack", repeat the same 1990 merge procedure (Step 2.3 above) until only a single element 1991 remains. 1993 4. The remaining element in "stack" is the Merkle Tree hash for the 1994 given "tree_size" and should be compared by equality against the 1995 supplied "root_hash". 1997 11. Algorithm Agility 1999 It is not possible for a log to change any of its algorithms part way 2000 through its lifetime: 2002 Signature algorithm: SCT signatures must remain valid so signature 2003 algorithms can only be added, not removed. 2005 Hash algorithm: A log would have to support the old and new hash 2006 algorithms to allow backwards-compatibility with clients that are 2007 not aware of a hash algorithm change. 2009 Allowing multiple signature or hash algorithms for a log would 2010 require that all data structures support it and would significantly 2011 complicate client implementation, which is why it is not supported by 2012 this document. 2014 If it should become necessary to deprecate an algorithm used by a 2015 live log, then the log should be frozen as specified in Section 10.1 2016 and a new log should be started. Certificates in the frozen log that 2017 have not yet expired and require new SCTs SHOULD be submitted to the 2018 new log and the SCTs from that log used instead. 2020 12. IANA Considerations 2022 12.1. TLS Extension Type 2024 IANA is asked to allocate an RFC 5246 ExtensionType value for the 2025 "transparency_info" TLS extension. IANA should update this extension 2026 type to point at this document. 2028 12.2. New Entry to the TLS CachedInformationType registry 2030 IANA is asked to add an entry for "ct_compliant(TBD)" to the "TLS 2031 CachedInformationType Values" registry that was defined in [RFC7924]. 2033 12.3. Hash Algorithms 2035 IANA is asked to establish a registry of hash algorithm values, 2036 initially consisting of: 2038 +-------+---------------------+ 2039 | Index | Hash | 2040 +-------+---------------------+ 2041 | 0 | SHA-256 [FIPS180-4] | 2042 | | | 2043 | 255 | reserved | 2044 +-------+---------------------+ 2046 12.4. Signature Algorithms 2048 IANA is asked to establish a registry of signature algorithm values, 2049 initially consisting of: 2051 +-------+-----------------------------------------------------------+ 2052 | Index | Signature Algorithm | 2053 +-------+-----------------------------------------------------------+ 2054 | 0 | deterministic ECDSA [RFC6979] using the NIST P-256 curve | 2055 | | (Section D.1.2.3 of the Digital Signature Standard [DSS]) | 2056 | | and HMAC-SHA256. | 2057 | | | 2058 | 1 | RSA signatures (RSASSA-PKCS1-v1_5 with SHA-256, Section | 2059 | | 8.2 of [RFC3447]) using a key of at least 2048 bits. | 2060 +-------+-----------------------------------------------------------+ 2062 12.5. SCT Extensions 2064 IANA is asked to establish a registry of SCT extensions, initially 2065 consisting of: 2067 +-------+-----------+ 2068 | Type | Extension | 2069 +-------+-----------+ 2070 | 65535 | reserved | 2071 +-------+-----------+ 2073 TBD: policy for adding to the registry 2075 12.6. STH Extensions 2077 IANA is asked to establish a registry of STH extensions, initially 2078 consisting of: 2080 +-------+-----------+ 2081 | Type | Extension | 2082 +-------+-----------+ 2083 | 65535 | reserved | 2084 +-------+-----------+ 2086 TBD: policy for adding to the registry 2088 12.7. Object Identifiers 2090 This document uses object identifiers (OIDs) to identify Log IDs (see 2091 Section 5.3), the precertificate CMS "eContentType" (see 2092 Section 3.2), and X.509v3 extensions in certificates (see Section 4.2 2093 and Section 9.1.2) and OCSP responses (see Section 9.1.1). The OIDs 2094 are defined in an arc that was selected due to its short encoding. 2096 12.7.1. Log ID Registry 1 2098 All OIDs in the range from 1.3.101.8192 to 1.3.101.16383 have been 2099 reserved. This is a limited resource of 8,192 OIDs, each of which 2100 has an encoded length of 4 octets. 2102 IANA is requested to establish a registry that will allocate Log IDs 2103 from this range. 2105 TBD: policy for adding to the registry. Perhaps "Expert Review"? 2107 12.7.2. Log ID Registry 2 2109 The 1.3.101.80 arc has been delegated. This is an unlimited 2110 resource, but only the 128 OIDs from 1.3.101.80.0 to 1.3.101.80.127 2111 have an encoded length of only 4 octets. 2113 IANA is requested to establish a registry that will allocate Log IDs 2114 from this arc. 2116 TBD: policy for adding to the registry. Perhaps "Expert Review"? 2118 13. Security Considerations 2120 With CAs, logs, and servers performing the actions described here, 2121 TLS clients can use logs and signed timestamps to reduce the 2122 likelihood that they will accept misissued certificates. If a server 2123 presents a valid signed timestamp for a certificate, then the client 2124 knows that a log has committed to publishing the certificate. From 2125 this, the client knows that monitors acting for the subject of the 2126 certificate have had some time to notice the misissue and take some 2127 action, such as asking a CA to revoke a misissued certificate, or 2128 that the log has misbehaved, which will be discovered when the SCT is 2129 audited. A signed timestamp is not a guarantee that the certificate 2130 is not misissued, since appropriate monitors might not have checked 2131 the logs or the CA might have refused to revoke the certificate. 2133 In addition, if TLS clients will not accept unlogged certificates, 2134 then site owners will have a greater incentive to submit certificates 2135 to logs, possibly with the assistance of their CA, increasing the 2136 overall transparency of the system. 2138 [I-D.ietf-trans-threat-analysis] provides a more detailed threat 2139 analysis of the Certificate Transparency architecture. 2141 13.1. Misissued Certificates 2143 Misissued certificates that have not been publicly logged, and thus 2144 do not have a valid SCT, are not considered compliant. Misissued 2145 certificates that do have an SCT from a log will appear in that 2146 public log within the Maximum Merge Delay, assuming the log is 2147 operating correctly. Thus, the maximum period of time during which a 2148 misissued certificate can be used without being available for audit 2149 is the MMD. 2151 13.2. Detection of Misissue 2153 The logs do not themselves detect misissued certificates; they rely 2154 instead on interested parties, such as domain owners, to monitor them 2155 and take corrective action when a misissue is detected. 2157 13.3. Misbehaving Logs 2159 A log can misbehave in several ways. Examples include failing to 2160 incorporate a certificate with an SCT in the Merkle Tree within the 2161 MMD, presenting different, conflicting views of the Merkle Tree at 2162 different times and/or to different parties and issuing STHs too 2163 frequently. Such misbehavior is detectable and the 2164 [I-D.ietf-trans-threat-analysis] provides more details on how this 2165 can be done. 2167 Violation of the MMD contract is detected by log clients requesting a 2168 Merkle inclusion proof (Section 6.5) for each observed SCT. These 2169 checks can be asynchronous and need only be done once per each 2170 certificate. In order to protect the clients' privacy, these checks 2171 need not reveal the exact certificate to the log. Instead, clients 2172 can request the proof from a trusted auditor (since anyone can 2173 compute the proofs from the log) or communicate with the log via 2174 proxies. 2176 Violation of the append-only property or the STH issuance rate limit 2177 can be detected by clients comparing their instances of the Signed 2178 Tree Heads. There are various ways this could be done, for example 2179 via gossip (see [I-D.ietf-trans-gossip]) or peer-to-peer 2180 communications or by sending STHs to monitors (who could then 2181 directly check against their own copy of the relevant log). A proof 2182 of misbehavior in such cases would be a series of STHs that were 2183 issued too closely together, proving violation of the STH issuance 2184 rate limit, or an STH with a root hash that does not match the one 2185 calculated from a copy of the log, proving violation of the append- 2186 only property. 2188 13.4. Deterministic Signatures 2190 Logs are required to use deterministic signatures for the following 2191 reasons: 2193 o Using non-deterministic ECDSA with a predictable source of 2194 randomness means that each signature can potentially expose the 2195 secret material of the signing key. 2197 o Clients that gossip STHs or report back SCTs can be tracked or 2198 traced if a log was to produce multiple STHs or SCTs with the same 2199 timestamp and data but different signatures. 2201 13.5. Multiple SCTs 2203 By offering multiple SCTs, each from a different log, TLS servers 2204 reduce the effectiveness of an attack where a CA and a log collude 2205 (see Section 8.1). 2207 14. Acknowledgements 2209 The authors would like to thank Erwann Abelea, Robin Alden, Andrew 2210 Ayer, Al Cutter, David Drysdale, Francis Dupont, Adam Eijdenberg, 2211 Stephen Farrell, Daniel Kahn Gillmor, Paul Hadfield, Brad Hill, Jeff 2212 Hodges, Paul Hoffman, Jeffrey Hutzelman, Kat Joyce, Stephen Kent, SM, 2213 Alexey Melnikov, Linus Nordberg, Chris Palmer, Trevor Perrin, Pierre 2214 Phaneuf, Melinda Shore, Ryan Sleevi, Martin Smith, Carl Wallace and 2215 Paul Wouters for their valuable contributions. 2217 A big thank you to Symantec for kindly donating the OIDs from the 2218 1.3.101 arc that are used in this document. 2220 15. References 2222 15.1. Normative References 2224 [DSS] National Institute of Standards and Technology, "Digital 2225 Signature Standard (DSS)", FIPS 186-3, June 2009, 2226 . 2229 [FIPS180-4] 2230 National Institute of Standards and Technology, "Secure 2231 Hash Standard", FIPS 180-4, March 2012, 2232 . 2235 [HTML401] Raggett, D., Le Hors, A., and I. Jacobs, "HTML 4.01 2236 Specification", World Wide Web Consortium Recommendation 2237 REC-html401-19991224, December 1999, 2238 . 2240 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2241 Requirement Levels", BCP 14, RFC 2119, 2242 DOI 10.17487/RFC2119, March 1997, 2243 . 2245 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 2246 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 2247 Transfer Protocol -- HTTP/1.1", RFC 2616, 2248 DOI 10.17487/RFC2616, June 1999, 2249 . 2251 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 2252 Standards (PKCS) #1: RSA Cryptography Specifications 2253 Version 2.1", RFC 3447, DOI 10.17487/RFC3447, February 2254 2003, . 2256 [RFC4627] Crockford, D., "The application/json Media Type for 2257 JavaScript Object Notation (JSON)", RFC 4627, 2258 DOI 10.17487/RFC4627, July 2006, 2259 . 2261 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 2262 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 2263 . 2265 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2266 (TLS) Protocol Version 1.2", RFC 5246, 2267 DOI 10.17487/RFC5246, August 2008, 2268 . 2270 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 2271 Housley, R., and W. Polk, "Internet X.509 Public Key 2272 Infrastructure Certificate and Certificate Revocation List 2273 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 2274 . 2276 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2277 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2278 . 2280 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 2281 "Network Time Protocol Version 4: Protocol and Algorithms 2282 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 2283 . 2285 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 2286 Extensions: Extension Definitions", RFC 6066, 2287 DOI 10.17487/RFC6066, January 2011, 2288 . 2290 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 2291 Verification of Domain-Based Application Service Identity 2292 within Internet Public Key Infrastructure Using X.509 2293 (PKIX) Certificates in the Context of Transport Layer 2294 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 2295 2011, . 2297 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 2298 Galperin, S., and C. Adams, "X.509 Internet Public Key 2299 Infrastructure Online Certificate Status Protocol - OCSP", 2300 RFC 6960, DOI 10.17487/RFC6960, June 2013, 2301 . 2303 [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) 2304 Multiple Certificate Status Request Extension", RFC 6961, 2305 DOI 10.17487/RFC6961, June 2013, 2306 . 2308 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 2309 Algorithm (DSA) and Elliptic Curve Digital Signature 2310 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2311 2013, . 2313 [RFC7633] Hallam-Baker, P., "X.509v3 Transport Layer Security (TLS) 2314 Feature Extension", RFC 7633, DOI 10.17487/RFC7633, 2315 October 2015, . 2317 [RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security 2318 (TLS) Cached Information Extension", RFC 7924, 2319 DOI 10.17487/RFC7924, July 2016, 2320 . 2322 15.2. Informative References 2324 [Chromium.Log.Policy] 2325 The Chromium Projects, "Chromium Certificate Transparency 2326 Log Policy", 2014, . 2329 [Chromium.Policy] 2330 The Chromium Projects, "Chromium Certificate 2331 Transparency", 2014, . 2334 [CrosbyWallach] 2335 Crosby, S. and D. Wallach, "Efficient Data Structures for 2336 Tamper-Evident Logging", Proceedings of the 18th USENIX 2337 Security Symposium, Montreal, August 2009, 2338 . 2341 [EVSSLGuidelines] 2342 CA/Browser Forum, "Guidelines For The Issuance And 2343 Management Of Extended Validation Certificates", 2007, 2344 . 2347 [I-D.ietf-trans-gossip] 2348 Nordberg, L., Gillmor, D., and T. Ritter, "Gossiping in 2349 CT", draft-ietf-trans-gossip-03 (work in progress), July 2350 2016. 2352 [I-D.ietf-trans-threat-analysis] 2353 Kent, S., "Attack and Threat Model for Certificate 2354 Transparency", draft-ietf-trans-threat-analysis-10 (work 2355 in progress), October 2016. 2357 [JSON.Metadata] 2358 The Chromium Projects, "Chromium Log Metadata JSON 2359 Schema", 2014, . 2362 [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate 2363 Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013, 2364 . 2366 Appendix A. Supporting v1 and v2 simultaneously 2368 Certificate Transparency logs have to be either v1 (conforming to 2369 [RFC6962]) or v2 (conforming to this document), as the data 2370 structures are incompatible and so a v2 log could not issue a valid 2371 v1 SCT. 2373 CT clients, however, can support v1 and v2 SCTs, for the same 2374 certificate, simultaneously, as v1 SCTs are delivered in different 2375 TLS, X.509 and OCSP extensions than v2 SCTs. 2377 v1 and v2 SCTs for X.509 certificates can be validated independently. 2378 For precertificates, v2 SCTs should be embedded in the TBSCertificate 2379 before submission of the TBSCertificate (inside a v1 precertificate, 2380 as described in Section 3.1. of [RFC6962]) to a v1 log so that TLS 2381 clients conforming to [RFC6962] but not this document are oblivious 2382 to the embedded v2 SCTs. An issuer can follow these steps to produce 2383 an X.509 certificate with embedded v1 and v2 SCTs: 2385 o Create a CMS precertificate as described in Section 3.2 and submit 2386 it to v2 logs. 2388 o Embed the obtained v2 SCTs in the TBSCertificate, as described in 2389 Section 9.1.2. 2391 o Use that TBSCertificate to create a v1 precertificate, as 2392 described in Section 3.1. of [RFC6962] and submit it to v1 logs. 2394 o Embed the v1 SCTs in the TBSCertificate, as described in 2395 Section 3.3. of [RFC6962]. 2397 o Sign that TBSCertificate (which now contains v1 and v2 SCTs) to 2398 issue the final X.509 certificate. 2400 Authors' Addresses 2402 Ben Laurie 2403 Google UK Ltd. 2405 Email: benl@google.com 2407 Adam Langley 2408 Google Inc. 2410 Email: agl@google.com 2412 Emilia Kasper 2413 Google Switzerland GmbH 2415 Email: ekasper@google.com 2417 Eran Messeri 2418 Google UK Ltd. 2420 Email: eranm@google.com 2421 Rob Stradling 2422 Comodo CA, Ltd. 2424 Email: rob.stradling@comodo.com