idnits 2.17.1 draft-ietf-trans-rfc6962-bis-17.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 6 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 (July 21, 2016) is 2829 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 607 -- Looks like a reference, but probably isn't: '7' on line 612 -- Looks like a reference, but probably isn't: '0' on line 602 -- Looks like a reference, but probably isn't: '2' on line 604 -- Possible downref: Non-RFC (?) normative reference: ref. 'DSS' -- 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-01 == Outdated reference: A later version (-16) exists of draft-ietf-trans-threat-analysis-03 -- Obsolete informational reference (is this intentional?): RFC 6962 (Obsoleted by RFC 9162) Summary: 7 errors (**), 0 flaws (~~), 4 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Public Notary Transparency Working Group B. Laurie 3 Internet-Draft A. Langley 4 Intended status: Standards Track E. Kasper 5 Expires: January 22, 2017 E. Messeri 6 Google 7 R. Stradling 8 Comodo 9 July 21, 2016 11 Certificate Transparency 12 draft-ietf-trans-rfc6962-bis-17 14 Abstract 16 This document describes a protocol for publicly logging the existence 17 of Transport Layer Security (TLS) certificates as they are issued or 18 observed, in a manner that allows anyone to audit certification 19 authority (CA) activity and notice the issuance of suspect 20 certificates as well as to audit the certificate logs themselves. 21 The intent is that eventually clients would refuse to honor 22 certificates that do not appear in a log, effectively forcing CAs to 23 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 January 22, 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 . . . . . . . . . . . . . . . . . . . . . . . . . 11 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. Redaction of Domain Name Labels . . . . . . . . . . . . . 13 77 4.2.1. Redacting Labels in Precertificates . . . . . . . . . 13 78 4.2.2. redactedSubjectAltName Certificate Extension . . . . 13 79 4.3. Using a Name-Constrained Intermediate CA . . . . . . . . 14 80 5. Log Format and Operation . . . . . . . . . . . . . . . . . . 15 81 5.1. Accepting Submissions . . . . . . . . . . . . . . . . . . 15 82 5.2. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 16 83 5.3. Log ID . . . . . . . . . . . . . . . . . . . . . . . . . 17 84 5.4. TransItem Structure . . . . . . . . . . . . . . . . . . . 17 85 5.5. Merkle Tree Leaves . . . . . . . . . . . . . . . . . . . 19 86 5.6. Signed Certificate Timestamp (SCT) . . . . . . . . . . . 19 87 5.7. Merkle Tree Head . . . . . . . . . . . . . . . . . . . . 21 88 5.8. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 21 89 5.9. Merkle Consistency Proofs . . . . . . . . . . . . . . . . 23 90 5.10. Merkle Inclusion Proofs . . . . . . . . . . . . . . . . . 23 91 5.11. Shutting down a log . . . . . . . . . . . . . . . . . . . 24 92 6. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 24 93 6.1. Add Chain to Log . . . . . . . . . . . . . . . . . . . . 26 94 6.2. Add PreCertChain to Log . . . . . . . . . . . . . . . . . 27 95 6.3. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 27 96 6.4. Retrieve Merkle Consistency Proof between Two Signed Tree 97 Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 27 98 6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 28 99 6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and 100 Consistency Proof by Leaf Hash . . . . . . . . . . . . . 29 101 6.7. Retrieve Entries and STH from Log . . . . . . . . . . . . 30 102 6.8. Retrieve Accepted Trust Anchors . . . . . . . . . . . . . 32 103 7. Optional Client Messages . . . . . . . . . . . . . . . . . . 32 104 7.1. Get Entry Number for SCT . . . . . . . . . . . . . . . . 32 105 7.2. Get Entry Numbers for Certificate . . . . . . . . . . . . 33 106 8. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 33 107 8.1. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . . 34 108 8.2. TransItemList Structure . . . . . . . . . . . . . . . . . 35 109 8.3. Presenting SCTs, inclusion proofs and STHs . . . . . . . 35 110 8.4. Presenting SCTs only . . . . . . . . . . . . . . . . . . 36 111 8.5. transparency_info TLS Extension . . . . . . . . . . . . . 36 112 9. Certification Authorities . . . . . . . . . . . . . . . . . . 36 113 9.1. Transparency Information X.509v3 Extension . . . . . . . 36 114 9.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 36 115 9.1.2. Certificate Extension . . . . . . . . . . . . . . . . 37 116 9.2. TLS Feature Extension . . . . . . . . . . . . . . . . . . 37 117 10. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 118 10.1. Metadata . . . . . . . . . . . . . . . . . . . . . . . . 37 119 10.2. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 38 120 10.2.1. Receiving SCTs . . . . . . . . . . . . . . . . . . . 38 121 10.2.2. Reconstructing the TBSCertificate . . . . . . . . . 38 122 10.2.3. Verifying the redactedSubjectAltName extension . . . 39 123 10.2.4. Validating SCTs . . . . . . . . . . . . . . . . . . 39 124 10.2.5. Validating inclusion proofs . . . . . . . . . . . . 40 125 10.2.6. Evaluating compliance . . . . . . . . . . . . . . . 40 126 10.2.7. TLS Feature Extension . . . . . . . . . . . . . . . 40 127 10.2.8. Handling of Non-compliance . . . . . . . . . . . . . 41 128 10.3. Monitor . . . . . . . . . . . . . . . . . . . . . . . . 41 129 10.4. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 42 130 10.4.1. Verifying an inclusion proof . . . . . . . . . . . . 43 131 10.4.2. Verifying consistency between two STHs . . . . . . . 43 132 10.4.3. Verifying root hash given entries . . . . . . . . . 44 133 11. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 45 134 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 46 135 12.1. TLS Extension Type . . . . . . . . . . . . . . . . . . . 46 136 12.2. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 46 137 12.3. Signature Algorithms . . . . . . . . . . . . . . . . . . 46 138 12.4. SCT Extensions . . . . . . . . . . . . . . . . . . . . . 46 139 12.5. STH Extensions . . . . . . . . . . . . . . . . . . . . . 47 140 12.6. Object Identifiers . . . . . . . . . . . . . . . . . . . 47 141 12.6.1. Log ID Registry 1 . . . . . . . . . . . . . . . . . 47 142 12.6.2. Log ID Registry 2 . . . . . . . . . . . . . . . . . 47 143 13. Security Considerations . . . . . . . . . . . . . . . . . . . 48 144 13.1. Misissued Certificates . . . . . . . . . . . . . . . . . 48 145 13.2. Detection of Misissue . . . . . . . . . . . . . . . . . 48 146 13.3. Avoiding Overly Redacting Domain Name Labels . . . . . . 48 147 13.4. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 49 148 13.5. Deterministic Signatures . . . . . . . . . . . . . . . . 49 149 13.6. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 50 150 14. Privacy Considerations . . . . . . . . . . . . . . . . . . . 50 151 14.1. Ensuring Effective Redaction . . . . . . . . . . . . . . 50 152 15. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 50 153 16. References . . . . . . . . . . . . . . . . . . . . . . . . . 51 154 16.1. Normative References . . . . . . . . . . . . . . . . . . 51 155 16.2. Informative References . . . . . . . . . . . . . . . . . 52 156 Appendix A. Supporting v1 and v2 simultaneously . . . . . . . . 54 158 1. Introduction 160 Certificate transparency aims to mitigate the problem of misissued 161 certificates by providing append-only logs of issued certificates. 162 The logs do not need to be trusted because they are publicly 163 auditable. Anyone may verify the correctness of each log and monitor 164 when new certificates are added to it. The logs do not themselves 165 prevent misissue, but they ensure that interested parties 166 (particularly those named in certificates) can detect such 167 misissuance. Note that this is a general mechanism; but in this 168 document, we only describe its use for public TLS server certificates 169 issued by public certification authorities (CAs). 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; but, broadly speaking, they can 190 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.2. 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 362 The binary Merkle Tree with 7 leaves: 364 hash 365 / \ 366 / \ 367 / \ 368 / \ 369 / \ 370 k l 371 / \ / \ 372 / \ / \ 373 / \ / \ 374 g h i j 375 / \ / \ / \ | 376 a b c d e f d6 377 | | | | | | 378 d0 d1 d2 d3 d4 d5 380 The inclusion proof for d0 is [b, h, l]. 382 The inclusion proof for d3 is [c, g, l]. 384 The inclusion proof for d4 is [f, j, k]. 386 The inclusion proof for d6 is [i, k]. 388 The same tree, built incrementally in four steps: 390 hash0 hash1=k 391 / \ / \ 392 / \ / \ 393 / \ / \ 394 g c g h 395 / \ | / \ / \ 396 a b d2 a b c d 397 | | | | | | 398 d0 d1 d0 d1 d2 d3 400 hash2 hash 401 / \ / \ 402 / \ / \ 403 / \ / \ 404 / \ / \ 405 / \ / \ 406 k i k l 407 / \ / \ / \ / \ 408 / \ e f / \ / \ 409 / \ | | / \ / \ 410 g h d4 d5 g h i j 411 / \ / \ / \ / \ / \ | 412 a b c d a b c d e f d6 413 | | | | | | | | | | 414 d0 d1 d2 d3 d0 d1 d2 d3 d4 d5 416 The consistency proof between hash0 and hash is PROOF(3, D[7]) = [c, 417 d, g, l]. c, g are used to verify hash0, and d, l are additionally 418 used to show hash is consistent with hash0. 420 The consistency proof between hash1 and hash is PROOF(4, D[7]) = [l]. 421 hash can be verified using hash1=k and l. 423 The consistency proof between hash2 and hash is PROOF(6, D[7]) = [i, 424 j, k]. k, i are used to verify hash2, and j is additionally used to 425 show hash is consistent with hash2. 427 2.1.4. Signatures 429 Various data structures are signed. A log MUST use one of the 430 signature algorithms defined in the Section 12.3. 432 3. Submitters 434 Submitters submit certificates or preannouncements of certificates 435 prior to issuance (precertificates) to logs for public auditing, as 436 described below. In order to enable attribution of each logged 437 certificate or precertificate to its issuer, each submission MUST be 438 accompanied by all additional certificates required to verify the 439 chain up to an accepted trust anchor. The trust anchor (a root or 440 intermediate CA certificate) MAY be omitted from the submission. 442 If a log accepts a submission, it will return a Signed Certificate 443 Timestamp (SCT) (see Section 5.6). The submitter SHOULD validate the 444 returned SCT as described in Section 10.2 if they understand its 445 format and they intend to use it directly in a TLS handshake or to 446 construct a certificate. If the submitter does not need the SCT (for 447 example, the certificate is being submitted simply to make it 448 available in the log), it MAY validate the SCT. 450 3.1. Certificates 452 Any entity can submit a certificate (Section 6.1) to a log. Since it 453 is anticipated that TLS clients will reject certificates that are not 454 logged, it is expected that certificate issuers and subjects will be 455 strongly motivated to submit them. 457 3.2. Precertificates 459 CAs may preannounce a certificate prior to issuance by submitting a 460 precertificate (Section 6.2) that the log can use to create an entry 461 that will be valid against the issued certificate. The CA MAY 462 incorporate the returned SCT in the issued certificate. Examples of 463 situations where the returned SCT is not incorporated into the issued 464 certificate would be when a CA sends the precertificate to multiple 465 logs, but only incorporates the SCTs that are returned first, or the 466 CA is using domain name redaction (Section 4.2) and intends to use 467 another mechanism to publish SCTs (such as an OCSP response 468 (Section 9.1.1) or the TLS extension (Section 8.5)). 470 A precertificate is a CMS [RFC5652] "signed-data" object that 471 conforms to the following requirements: 473 o It MUST be DER encoded. 475 o "SignedData.encapContentInfo.eContentType" MUST be the OID 476 1.3.101.78. 478 o "SignedData.encapContentInfo.eContent" MUST contain a 479 TBSCertificate [RFC5280] that will be identical to the 480 TBSCertificate in the issued certificate, except that: 482 * the Transparency Information (Section 9.1) extension MUST be 483 omitted. 485 * the subjectAltName [RFC5280] extension MUST be omitted when the 486 CA is using domain name redaction (Section 4.2). 488 o "SignedData.signerInfos" MUST contain a signature from the same 489 (root or intermediate) CA that will ultimately issue the 490 certificate. This signature indicates the CA's intent to issue 491 the certificate. This intent is considered binding (i.e. 492 misissuance of the precertificate is considered equivalent to 493 misissuance of the certificate). (Note that, because of the 494 structure of CMS, the signature on the CMS object will not be a 495 valid X.509v3 signature and so cannot be used to construct a 496 certificate from the precertificate). 498 o "SignedData.certificates" SHOULD be omitted. 500 4. Private Domain Name Labels 502 Some regard certain DNS domain name labels within their registered 503 domain space as private and security sensitive. Even though these 504 domains are often only accessible within the domain owner's private 505 network, it's common for them to be secured using publicly trusted 506 TLS server certificates. We define a mechanism (see Section 4.2) to 507 allow these private labels to not appear in public logs, while still 508 retaining most of the security benefits that accrue from using 509 Certificate Transparency mechanisms. 511 4.1. Wildcard Certificates 513 A certificate containing a DNS-ID [RFC6125] of "*.example.com" could 514 be used to secure the domain "topsecret.example.com", without 515 revealing the string "topsecret" publicly. 517 Since TLS clients only match the wildcard character to the complete 518 leftmost label of the DNS domain name (see Section 6.4.3 of 519 [RFC6125]), a different approach is needed when any label other than 520 the leftmost label in a DNS-ID is considered private (e.g. 521 "top.secret.example.com"). Also, wildcard certificates are 522 prohibited in some cases, such as Extended Validation Certificates 523 [EVSSLGuidelines]. 525 4.2. Redaction of Domain Name Labels 527 4.2.1. Redacting Labels in Precertificates 529 When creating a precertificate, the CA MAY omit the subjectAltName 530 extension. Instead, the CA MUST include a redactedSubjectAltName 531 (Section 4.2.2) extension that contains, in a redacted form, the same 532 identities that will be included in the certificate's subjectAltName 533 extension. 535 Wildcard "*" labels MUST NOT be redacted, but one or more non- 536 wildcard labels in each DNS-ID [RFC6125] can each be replaced with a 537 redacted label as follows: 539 REDACT(label) = prefix || BASE32(index || LABELHASH(keyid || label)) 541 "label" is the case-sensitive label to be redacted. 543 "prefix" is the "?" character (ASCII value 63). 545 "||" denotes length-encoded concatenation. Each concatenated value 546 is preceded by a single byte that contains the length (in bytes) of 547 that value. 549 "BASE32" is the Base 32 Encoding function (section 6 of [RFC4648]). 550 Pad characters MUST NOT be appended to the encoded data. 552 "index" is the 1 byte index of a hash function in Section 12.2. The 553 value 255 is reserved. 555 "LABELHASH" is the hash function identified by "index". 557 "keyid" is the keyIdentifier from the Subject Key Identifier 558 extension (section 4.2.1.2 of [RFC5280]), excluding the ASN.1 OCTET 559 STRING tag and length bytes. 561 4.2.2. redactedSubjectAltName Certificate Extension 563 The redactedSubjectAltName extension is a non-critical extension (OID 564 1.3.101.77) that is identical in structure to the subjectAltName 565 extension, except that dNSName identities MAY contain redacted labels 566 (see Section 4.2.1). 568 When used, the redactedSubjectAltName extension MUST be present in 569 both the precertificate and the corresponding certificate. 571 This extension informs TLS clients of the dNSNames that were redacted 572 and the degree of redaction, while minimizing the complexity of 573 TBSCertificate reconstruction (as described in Section 10.2.2). 574 Hashing the redacted labels allows the legitimate domain owner to 575 identify whether or not each redacted label correlates to a label 576 they know of. 578 4.3. Using a Name-Constrained Intermediate CA 580 An intermediate CA certificate or intermediate CA precertificate that 581 contains the Name Constraints [RFC5280] extension MAY be logged in 582 place of end-entity certificates issued by that intermediate CA, as 583 long as all of the following conditions are met: 585 o there MUST be a non-critical extension (OID 1.3.101.76, whose 586 extnValue OCTET STRING contains ASN.1 NULL data (0x05 0x00)). 587 This extension is an explicit indication that it is acceptable to 588 not log certificates issued by this intermediate CA. 590 o permittedSubtrees MUST specify one or more dNSNames. 592 o excludedSubtrees MUST specify the entire IPv4 and IPv6 address 593 ranges. 595 Below is an example Name Constraints extension that meets these 596 conditions: 598 SEQUENCE { 599 OBJECT IDENTIFIER '2 5 29 30' 600 OCTET STRING, encapsulates { 601 SEQUENCE { 602 [0] { 603 SEQUENCE { 604 [2] 'example.com' 605 } 606 } 607 [1] { 608 SEQUENCE { 609 [7] 00 00 00 00 00 00 00 00 610 } 611 SEQUENCE { 612 [7] 613 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 614 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 615 } 616 } 617 } 618 } 619 } 621 5. Log Format and Operation 623 A log is a single, append-only Merkle Tree of submitted certificate 624 and precertificate entries. 626 When it receives a valid submission, the log MUST return an SCT that 627 corresponds to the submitted certificate or precertificate. If the 628 log has previously seen this valid submission, it SHOULD return the 629 same SCT as it returned before (to reduce the ability to track 630 clients as described in Section 13.5). If different SCTs are 631 produced for the same submission, multiple log entries will have to 632 be created, one for each SCT (as the timestamp is a part of the leaf 633 structure). Note that if a certificate was previously logged as a 634 precertificate, then the precertificate's SCT of type 635 "precert_sct_v2" would not be appropriate; instead, a fresh SCT of 636 type "x509_sct_v2" should be generated. 638 An SCT is the log's promise to incorporate the submitted entry in its 639 Merkle Tree no later than a fixed amount of time, known as the 640 Maximum Merge Delay (MMD), after the issuance of the SCT. 641 Periodically, the log MUST append all its new entries to its Merkle 642 Tree and sign the root of the tree. 644 Log operators MUST NOT impose any conditions on retrieving or sharing 645 data from the log. 647 5.1. Accepting Submissions 649 Logs MUST verify that each submitted certificate or precertificate 650 has a valid signature chain to an accepted trust anchor, using the 651 chain of intermediate CA certificates provided by the submitter. 652 Logs MUST accept certificates and precertificates that are fully 653 valid according to RFC 5280 [RFC5280] verification rules and are 654 submitted with such a chain. Logs MAY accept certificates and 655 precertificates that have expired, are not yet valid, have been 656 revoked, or are otherwise not fully valid according to RFC 5280 657 verification rules in order to accommodate quirks of CA certificate- 658 issuing software. However, logs MUST reject submissions without a 659 valid signature chain to an accepted trust anchor. Logs MUST also 660 reject precertificates that do not conform to the requirements in 661 Section 3.2. 663 Logs SHOULD limit the length of chain they will accept. The maximum 664 chain length is specified in the log's metadata. 666 The log SHALL allow retrieval of its list of accepted trust anchors 667 (see Section 6.8), each of which is a root or intermediate CA 668 certificate. This list might usefully be the union of root 669 certificates trusted by major browser vendors. 671 5.2. Log Entries 673 If a submission is accepted and an SCT issued, the accepting log MUST 674 store the entire chain used for verification. This chain MUST 675 include the certificate or precertificate itself, the zero or more 676 intermediate CA certificates provided by the submitter, and the trust 677 anchor used to verify the chain (even if it was omitted from the 678 submission). The log MUST present this chain for auditing upon 679 request (see Section 6.7). This chain is required to prevent a CA 680 from avoiding blame by logging a partial or empty chain. 682 Each certificate entry in a log MUST include a "X509ChainEntry" 683 structure, and each precertificate entry MUST include a 684 "PrecertChainEntryV2" structure: 686 opaque ASN.1Cert<1..2^24-1>; 688 struct { 689 ASN.1Cert leaf_certificate; 690 ASN.1Cert certificate_chain<0..2^24-1>; 691 } X509ChainEntry; 693 opaque CMSPrecert<1..2^24-1>; 695 struct { 696 CMSPrecert pre_certificate; 697 ASN.1Cert precertificate_chain<1..2^24-1>; 698 } PrecertChainEntryV2; 700 "leaf_certificate" is a submitted certificate that has been accepted 701 by the log. 703 "certificate_chain" is a vector of 0 or more additional certificates 704 required to verify "leaf_certificate". The first certificate MUST 705 certify "leaf_certificate". Each following certificate MUST directly 706 certify the one preceding it. The final certificate MUST be a trust 707 anchor accepted by the log. If "leaf_certificate" is an accepted 708 trust anchor, then this vector is empty. 710 "pre_certificate" is a submitted precertificate that has been 711 accepted by the log. 713 "precertificate_chain" is a vector of 1 or more additional 714 certificates required to verify "pre_certificate". The first 715 certificate MUST certify "pre_certificate". Each following 716 certificate MUST directly certify the one preceding it. The final 717 certificate MUST be a trust anchor accepted by the log. 719 5.3. Log ID 721 Each log is identified by an OID, which is specified in the log's 722 metadata and which MUST NOT be used to identify any other log. A 723 log's operator MUST either allocate the OID themselves or request an 724 OID from one of the two Log ID Registries (see Section 12.6.1 and 725 Section 12.6.2). Various data structures include the DER encoding of 726 this OID, excluding the ASN.1 tag and length bytes, in an opaque 727 vector: 729 opaque LogID<2..127>; 731 Note that the ASN.1 length and the opaque vector length are identical 732 in size (1 byte) and value, so the DER encoding of the OID can be 733 reproduced simply by prepending an OBJECT IDENTIFIER tag (0x06) to 734 the opaque vector length and contents. 736 5.4. TransItem Structure 737 Various data structures are encapsulated in the "TransItem" structure 738 to ensure that the type and version of each one is identified in a 739 common fashion: 741 enum { 742 reserved(0), 743 x509_entry_v2(1), precert_entry_v2(2), 744 x509_sct_v2(3), precert_sct_v2(4), 745 tree_head_v2(5), signed_tree_head_v2(6), 746 consistency_proof_v2(7), inclusion_proof_v2(8), 747 x509_sct_with_proof_v2(9), precert_sct_with_proof_v2(10), 748 (65535) 749 } VersionedTransType; 751 struct { 752 VersionedTransType versioned_type; 753 select (versioned_type) { 754 case x509_entry_v2: TimestampedCertificateEntryDataV2; 755 case precert_entry_v2: TimestampedCertificateEntryDataV2; 756 case x509_sct_v2: SignedCertificateTimestampDataV2; 757 case precert_sct_v2: SignedCertificateTimestampDataV2; 758 case tree_head_v2: TreeHeadDataV2; 759 case signed_tree_head_v2: SignedTreeHeadDataV2; 760 case consistency_proof_v2: ConsistencyProofDataV2; 761 case inclusion_proof_v2: InclusionProofDataV2; 762 case x509_sct_with_proof_v2: SCTWithProofDataV2; 763 case precert_sct_with_proof_v2: SCTWithProofDataV2; 764 } data; 765 } TransItem; 767 "versioned_type" is the type of the encapsulated data structure and 768 the earliest version of this protocol to which it conforms. This 769 document is v2. 771 "data" is the encapsulated data structure. The various structures 772 named with the "DataV2" suffix are defined in later sections of this 773 document. 775 Note that "VersionedTransType" combines the v1 [RFC6962] type 776 enumerations "Version", "LogEntryType", "SignatureType" and 777 "MerkleLeafType". Note also that v1 did not define "TransItem", but 778 this document provides guidelines (see Appendix A) on how v2 779 implementations can co-exist with v1 implementations. 781 Future versions of this protocol may reuse "VersionedTransType" 782 values defined in this document as long as the corresponding data 783 structures are not modified, and may add new "VersionedTransType" 784 values for new or modified data structures. 786 5.5. Merkle Tree Leaves 788 The leaves of a log's Merkle Tree correspond to the log's entries 789 (see Section 5.2). Each leaf is the leaf hash (Section 2.1) of a 790 "TransItem" structure of type "x509_entry_v2" or "precert_entry_v2", 791 which encapsulates a "TimestampedCertificateEntryDataV2" structure. 792 Note that leaf hashes are calculated as HASH(0x00 || TransItem), 793 where the hashing algorithm is specified in the log's metadata. 795 opaque TBSCertificate<1..2^24-1>; 797 struct { 798 uint64 timestamp; 799 opaque issuer_key_hash[HASH_SIZE]; 800 TBSCertificate tbs_certificate; 801 SctExtension sct_extensions<0..2^16-1>; 802 } TimestampedCertificateEntryDataV2; 804 "timestamp" is the NTP Time [RFC5905] at which the certificate or 805 precertificate was accepted by the log, measured in milliseconds 806 since the epoch (January 1, 1970, 00:00), ignoring leap seconds. 807 Note that the leaves of a log's Merkle Tree are not required to be in 808 strict chronological order. 810 "issuer_key_hash" is the HASH of the public key of the CA that issued 811 the certificate or precertificate, calculated over the DER encoding 812 of the key represented as SubjectPublicKeyInfo [RFC5280]. This is 813 needed to bind the CA to the certificate or precertificate, making it 814 impossible for the corresponding SCT to be valid for any other 815 certificate or precertificate whose TBSCertificate matches 816 "tbs_certificate". 818 "tbs_certificate" is the DER encoded TBSCertificate from either the 819 "leaf_certificate" (in the case of an "X509ChainEntry") or the 820 "pre_certificate" (in the case of a "PrecertChainEntryV2"). (Note 821 that a precertificate's TBSCertificate can be reconstructed from the 822 corresponding certificate as described in Section 10.2.2). 824 "sct_extensions" matches the SCT extensions of the corresponding SCT. 826 5.6. Signed Certificate Timestamp (SCT) 827 An SCT is a "TransItem" structure of type "x509_sct_v2" or 828 "precert_sct_v2", which encapsulates a 829 "SignedCertificateTimestampDataV2" structure: 831 enum { 832 reserved(65535) 833 } SctExtensionType; 835 struct { 836 SctExtensionType sct_extension_type; 837 opaque sct_extension_data<0..2^16-1>; 838 } SctExtension; 840 struct { 841 LogID log_id; 842 uint64 timestamp; 843 SctExtension sct_extensions<0..2^16-1>; 844 digitally-signed struct { 845 TransItem timestamped_entry; 846 } signature; 847 } SignedCertificateTimestampDataV2; 849 "log_id" is this log's unique ID, encoded in an opaque vector as 850 described in Section 5.3. 852 "timestamp" is equal to the timestamp from the 853 "TimestampedCertificateEntryDataV2" structure encapsulated in the 854 "timestamped_entry". 856 "sct_extension_type" identifies a single extension from the IANA 857 registry in Section 12.4. At the time of writing, no extensions are 858 specified. 860 The interpretation of the "sct_extension_data" field is determined 861 solely by the value of the "sct_extension_type" field. Each document 862 that registers a new "sct_extension_type" must describe how to 863 interpret the corresponding "sct_extension_data". 865 "sct_extensions" is a vector of 0 or more SCT extensions. This 866 vector MUST NOT include more than one extension with the same 867 "sct_extension_type". The extensions in the vector MUST be ordered 868 by the value of the "sct_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 The encoding of the digitally-signed element is defined in [RFC5246]. 875 "timestamped_entry" is a "TransItem" structure that MUST be of type 876 "x509_entry_v2" or "precert_entry_v2" (see Section 5.5). 878 5.7. Merkle Tree Head 880 The log stores information about its Merkle Tree in a "TransItem" 881 structure of type "tree_head_v2", which encapsulates a 882 "TreeHeadDataV2" structure: 884 opaque NodeHash[HASH_SIZE]; 886 struct { 887 uint64 timestamp; 888 uint64 tree_size; 889 NodeHash root_hash; 890 SthExtension sth_extensions<0..2^16-1>; 891 } TreeHeadDataV2; 893 "timestamp" is the current NTP Time [RFC5905], measured in 894 milliseconds since the epoch (January 1, 1970, 00:00), ignoring leap 895 seconds. 897 "tree_size" is the number of entries currently in the log's Merkle 898 Tree. 900 "root_hash" is the root of the Merkle Hash Tree. 902 "sth_extensions" matches the STH extensions of the corresponding STH. 904 5.8. Signed Tree Head (STH) 906 Periodically each log SHOULD sign its current tree head information 907 (see Section 5.7) to produce an STH. When a client requests a log's 908 latest STH (see Section 6.3), the log MUST return an STH that is no 909 older than the log's MMD. However, STHs could be used to mark 910 individual clients (by producing a new one for each query), so logs 911 MUST NOT produce them more frequently than is declared in their 912 metadata. In general, there is no need to produce a new STH unless 913 there are new entries in the log; however, in the unlikely event that 914 it receives no new submissions during an MMD period, the log SHALL 915 sign the same Merkle Tree Hash with a fresh timestamp. 917 An STH is a "TransItem" structure of type "signed_tree_head_v2", 918 which encapsulates a "SignedTreeHeadDataV2" structure: 920 enum { 921 reserved(65535) 922 } SthExtensionType; 924 struct { 925 SthExtensionType sth_extension_type; 926 opaque sth_extension_data<0..2^16-1>; 927 } SthExtension; 929 struct { 930 LogID log_id; 931 uint64 timestamp; 932 uint64 tree_size; 933 NodeHash root_hash; 934 SthExtension sth_extensions<0..2^16-1>; 935 digitally-signed struct { 936 TransItem merkle_tree_head; 937 } signature; 938 } SignedTreeHeadDataV2; 940 "log_id" is this log's unique ID, encoded in an opaque vector as 941 described in Section 5.3. 943 "timestamp" is equal to the timestamp from the "TreeHeadDataV2" 944 structure encapsulated in "merkle_tree_head". This timestamp MUST be 945 at least as recent as the most recent SCT timestamp in the tree. 946 Each subsequent timestamp MUST be more recent than the timestamp of 947 the previous update. 949 "tree_size" is equal to the tree size from the "TreeHeadDataV2" 950 structure encapsulated in "merkle_tree_head". 952 "root_hash" is equal to the root hash from the "TreeHeadDataV2" 953 structure encapsulated in "merkle_tree_head". 955 "sth_extension_type" identifies a single extension from the IANA 956 registry in Section 12.5. At the time of writing, no extensions are 957 specified. 959 The interpretation of the "sth_extension_data" field is determined 960 solely by the value of the "sth_extension_type" field. Each document 961 that registers a new "sth_extension_type" must describe how to 962 interpret the corresponding "sth_extension_data". 964 "sth_extensions" is a vector of 0 or more STH extensions. This 965 vector MUST NOT include more than one extension with the same 966 "sth_extension_type". The extensions in the vector MUST be ordered 967 by the value of the "sth_extension_type" field, smallest value first. 968 If an implementation sees an extension that it does not understand, 969 it SHOULD ignore that extension. Furthermore, an implementation MAY 970 choose to ignore any extension(s) that it does understand. 972 "merkle_tree_head" is a "TransItem" structure that MUST be of type 973 "tree_head_v2" (see Section 5.7). 975 5.9. Merkle Consistency Proofs 977 To prepare a Merkle Consistency Proof for distribution to clients, 978 the log produces a "TransItem" structure of type 979 "consistency_proof_v2", which encapsulates a "ConsistencyProofDataV2" 980 structure: 982 struct { 983 LogID log_id; 984 uint64 tree_size_1; 985 uint64 tree_size_2; 986 NodeHash consistency_path<1..2^8-1>; 987 } ConsistencyProofDataV2; 989 "log_id" is this log's unique ID, encoded in an opaque vector as 990 described in Section 5.3. 992 "tree_size_1" is the size of the older tree. 994 "tree_size_2" is the size of the newer tree. 996 "consistency_path" is a vector of Merkle Tree nodes proving the 997 consistency of two STHs. 999 5.10. Merkle Inclusion Proofs 1001 To prepare a Merkle Inclusion Proof for distribution to clients, the 1002 log produces a "TransItem" structure of type "inclusion_proof_v2", 1003 which encapsulates an "InclusionProofDataV2" structure: 1005 struct { 1006 LogID log_id; 1007 uint64 tree_size; 1008 uint64 leaf_index; 1009 NodeHash inclusion_path<1..2^8-1>; 1010 } InclusionProofDataV2; 1012 "log_id" is this log's unique ID, encoded in an opaque vector as 1013 described in Section 5.3. 1015 "tree_size" is the size of the tree on which this inclusion proof is 1016 based. 1018 "leaf_index" is the 0-based index of the log entry corresponding to 1019 this inclusion proof. 1021 "inclusion_path" is a vector of Merkle Tree nodes proving the 1022 inclusion of the chosen certificate or precertificate. 1024 5.11. Shutting down a log 1026 Log operators may decide to shut down a log for various reasons, such 1027 as deprecation of the signature algorithm. If there are entries in 1028 the log for certificates that have not yet expired, simply making TLS 1029 clients stop recognizing that log will have the effect of 1030 invalidating SCTs from that log. To avoid that, the following 1031 actions are suggested: 1033 o Make it known to clients and monitors that the log will be frozen. 1035 o Stop accepting new submissions (the error code "shutdown" should 1036 be returned for such requests). 1038 o Once MMD from the last accepted submission has passed and all 1039 pending submissions are incorporated, issue a final STH and 1040 publish it as a part of the log's metadata. Having an STH with a 1041 timestamp that is after the MMD has passed from the last SCT 1042 issuance allows clients to audit this log regularly without 1043 special handling for the final STH. At this point the log's 1044 private key is no longer needed and can be destroyed. 1046 o Keep the log running until the certificates in all of its entries 1047 have expired or exist in other logs (this can be determined by 1048 scanning other logs or connecting to domains mentioned in the 1049 certificates and inspecting the SCTs served). 1051 6. Log Client Messages 1053 Messages are sent as HTTPS GET or POST requests. Parameters for 1054 POSTs and all responses are encoded as JavaScript Object Notation 1055 (JSON) objects [RFC4627]. Parameters for GETs are encoded as order- 1056 independent key/value URL parameters, using the "application/x-www- 1057 form-urlencoded" format described in the "HTML 4.01 Specification" 1058 [HTML401]. Binary data is base64 encoded [RFC4648] as specified in 1059 the individual messages. 1061 Note that JSON objects and URL parameters may contain fields not 1062 specified here. These extra fields should be ignored. 1064 The prefix, which is part of the log's metadata, MAY 1065 include a path as well as a server name and a port. 1067 In practice, log servers may include multiple front-end machines. 1068 Since it is impractical to keep these machines in perfect sync, 1069 errors may occur that are caused by skew between the machines. Where 1070 such errors are possible, the front-end will return additional 1071 information (as specified below) making it possible for clients to 1072 make progress, if progress is possible. Front-ends MUST only serve 1073 data that is free of gaps (that is, for example, no front-end will 1074 respond with an STH unless it is also able to prove consistency from 1075 all log entries logged within that STH). 1077 For example, when a consistency proof between two STHs is requested, 1078 the front-end reached may not yet be aware of one or both STHs. In 1079 the case where it is unaware of both, it will return the latest STH 1080 it is aware of. Where it is aware of the first but not the second, 1081 it will return the latest STH it is aware of and a consistency proof 1082 from the first STH to the returned STH. The case where it knows the 1083 second but not the first should not arise (see the "no gaps" 1084 requirement above). 1086 If the log is unable to process a client's request, it MUST return an 1087 HTTP response code of 4xx/5xx (see [RFC2616]), and, in place of the 1088 responses outlined in the subsections below, the body SHOULD be a 1089 JSON structure containing at least the following field: 1091 error_message: A human-readable string describing the error which 1092 prevented the log from processing the request. 1094 In the case of a malformed request, the string SHOULD provide 1095 sufficient detail for the error to be rectified. 1097 error_code: An error code readable by the client. Some codes are 1098 generic and are detailed here. Others are detailed in the 1099 individual requests. Error codes are fixed text strings. 1101 not compliant The request is not compliant with this RFC. 1103 e.g. In response to a request of "/ct/v2/get- 1104 entries?start=100&end=99", the log would return a "400 Bad Request" 1105 response code with a body similar to the following: 1107 { 1108 "error_message": "'start' cannot be greater than 'end'", 1109 "error_code": "not compliant", 1110 } 1112 Clients SHOULD treat "500 Internal Server Error" and "503 Service 1113 Unavailable" responses as transient failures and MAY retry the same 1114 request without modification at a later date. Note that as per 1115 [RFC2616], in the case of a 503 response the log MAY include a 1116 "Retry-After:" header in order to request a minimum time for the 1117 client to wait before retrying the request. 1119 6.1. Add Chain to Log 1121 POST https:///ct/v2/add-chain 1123 Inputs: 1125 chain: An array of base64 encoded certificates. The first 1126 element is the certificate for which the submitter desires an 1127 SCT; the second certifies the first and so on to the last, 1128 which either is, or is certified by, an accepted trust anchor. 1130 Outputs: 1132 sct: A base64 encoded "TransItem" of type "x509_sct_v2", signed 1133 by this log, that corresponds to the submitted certificate. 1135 Error codes: 1137 unknown anchor The last certificate in the chain both is not, and 1138 is not certified by, an accepted trust anchor. 1140 bad chain The alleged chain is not actually a chain of 1141 certificates. 1143 bad certificate One or more certificates in the chain are not 1144 valid (e.g. not properly encoded). 1146 shutdown The log has ceased operation and is not accepting new 1147 submissions. 1149 If the version of "sct" is not v2, then a v2 client may be unable to 1150 verify the signature. It MUST NOT construe this as an error. This 1151 is to avoid forcing an upgrade of compliant v2 clients that do not 1152 use the returned SCTs. 1154 If a log detects bad encoding in a chain that otherwise verifies 1155 correctly then the log MUST either log the certificate or return the 1156 "bad certificate" error. If the certificate is logged, an SCT MUST 1157 be issued. Logging the certificate is useful, because monitors 1158 (Section 10.3) can then detect these encoding errors, which may be 1159 accepted by some TLS clients. 1161 6.2. Add PreCertChain to Log 1163 POST https:///ct/v2/add-pre-chain 1165 Inputs: 1167 precertificate: The base64 encoded precertificate. 1169 chain: An array of base64 encoded CA certificates. The first 1170 element is the signer of the precertificate; the second 1171 certifies the first and so on to the last, which either is, or 1172 is certified by, an accepted trust anchor. 1174 Outputs: 1176 sct: A base64 encoded "TransItem" of type "precert_sct_v2", 1177 signed by this log, that corresponds to the submitted 1178 precertificate. 1180 Errors are the same as in Section 6.1. 1182 6.3. Retrieve Latest Signed Tree Head 1184 GET https:///ct/v2/get-sth 1186 No inputs. 1188 Outputs: 1190 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1191 signed by this log, that is no older than the log's MMD. 1193 6.4. Retrieve Merkle Consistency Proof between Two Signed Tree Heads 1195 GET https:///ct/v2/get-sth-consistency 1197 Inputs: 1199 first: The tree_size of the older tree, in decimal. 1201 second: The tree_size of the newer tree, in decimal (optional). 1203 Both tree sizes must be from existing v2 STHs. However, because 1204 of skew, the receiving front-end may not know one or both of the 1205 existing STHs. If both are known, then only the "consistency" 1206 output is returned. If the first is known but the second is not 1207 (or has been omitted), then the latest known STH is returned, 1208 along with a consistency proof between the first STH and the 1209 latest. If neither are known, then the latest known STH is 1210 returned without a consistency proof. 1212 Outputs: 1214 consistency: A base64 encoded "TransItem" of type 1215 "consistency_proof_v2", whose "tree_size_1" MUST match the 1216 "first" input. If the "sth" output is omitted, then 1217 "tree_size_2" MUST match the "second" input. 1219 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1220 signed by this log. 1222 Note that no signature is required for the "consistency" output as 1223 it is used to verify the consistency between two STHs, which are 1224 signed. 1226 Error codes: 1228 first unknown "first" is before the latest known STH but is not 1229 from an existing STH. 1231 second unknown "second" is before the latest known STH but is not 1232 from an existing STH. 1234 See Section 10.4.2 for an outline of how to use the "consistency" 1235 output. 1237 6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash 1239 GET https:///ct/v2/get-proof-by-hash 1241 Inputs: 1243 hash: A base64 encoded v2 leaf hash. 1245 tree_size: The tree_size of the tree on which to base the proof, 1246 in decimal. 1248 The "hash" must be calculated as defined in Section 5.5. The 1249 "tree_size" must designate an existing v2 STH. Because of skew, 1250 the front-end may not know the requested STH. In that case, it 1251 will return the latest STH it knows, along with an inclusion proof 1252 to that STH. If the front-end knows the requested STH then only 1253 "inclusion" is returned. 1255 Outputs: 1257 inclusion: A base64 encoded "TransItem" of type 1258 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1259 Tree nodes proves the inclusion of the chosen certificate in 1260 the selected STH. 1262 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1263 signed by this log. 1265 Note that no signature is required for the "inclusion" output as 1266 it is used to verify inclusion in the selected STH, which is 1267 signed. 1269 Error codes: 1271 hash unknown "hash" is not the hash of a known leaf (may be 1272 caused by skew or by a known certificate not yet merged). 1274 tree_size unknown "hash" is before the latest known STH but is 1275 not from an existing STH. 1277 See Section 10.4.1 for an outline of how to use the "inclusion" 1278 output. 1280 6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and Consistency 1281 Proof by Leaf Hash 1283 GET https:///ct/v2/get-all-by-hash 1285 Inputs: 1287 hash: A base64 encoded v2 leaf hash. 1289 tree_size: The tree_size of the tree on which to base the proofs, 1290 in decimal. 1292 The "hash" must be calculated as defined in Section 5.5. The 1293 "tree_size" must designate an existing v2 STH. 1295 Because of skew, the front-end may not know the requested STH or 1296 the requested hash, which leads to a number of cases. 1298 latest STH < requested STH Return latest STH. 1300 latest STH > requested STH Return latest STH and a consistency 1301 proof between it and the requested STH (see Section 6.4). 1303 index of requested hash < latest STH Return "inclusion". 1305 Note that more than one case can be true, in which case the 1306 returned data is their concatenation. It is also possible for 1307 none to be true, in which case the front-end MUST return an empty 1308 response. 1310 Outputs: 1312 inclusion: A base64 encoded "TransItem" of type 1313 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1314 Tree nodes proves the inclusion of the chosen certificate in 1315 the returned STH. 1317 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1318 signed by this log. 1320 consistency: A base64 encoded "TransItem" of type 1321 "consistency_proof_v2" that proves the consistency of the 1322 requested STH and the returned STH. 1324 Note that no signature is required for the "inclusion" or 1325 "consistency" outputs as they are used to verify inclusion in and 1326 consistency of STHs, which are signed. 1328 Errors are the same as in Section 6.5. 1330 See Section 10.4.1 for an outline of how to use the "inclusion" 1331 output, and see Section 10.4.2 for an outline of how to use the 1332 "consistency" output. 1334 6.7. Retrieve Entries and STH from Log 1336 GET https:///ct/v2/get-entries 1338 Inputs: 1340 start: 0-based index of first entry to retrieve, in decimal. 1342 end: 0-based index of last entry to retrieve, in decimal. 1344 Outputs: 1346 entries: An array of objects, each consisting of 1348 leaf_input: The base64 encoded "TransItem" structure of type 1349 "x509_entry_v2" or "precert_entry_v2" (see Section 5.5). 1351 log_entry: The base64 encoded log entry (see Section 5.2). In 1352 the case of an "x509_entry_v2" entry, this is the whole 1353 "X509ChainEntry"; and in the case of a "precert_entry_v2", 1354 this is the whole "PrecertChainEntryV2". 1356 sct: The base64 encoded "TransItem" of type "x509_sct_v2" or 1357 "precert_sct_v2" corresponding to this log entry. 1359 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1360 signed by this log. 1362 Note that this message is not signed -- the "entries" data can be 1363 verified by constructing the Merkle Tree Hash corresponding to a 1364 retrieved STH. All leaves MUST be v2. However, a compliant v2 1365 client MUST NOT construe an unrecognized TransItem type as an error. 1366 This means it may be unable to parse some entries, but note that each 1367 client can inspect the entries it does recognize as well as verify 1368 the integrity of the data by treating unrecognized leaves as opaque 1369 input to the tree. 1371 The "start" and "end" parameters SHOULD be within the range 0 <= x < 1372 "tree_size" as returned by "get-sth" in Section 6.3. 1374 The "start" parameter MUST be less than or equal to the "end" 1375 parameter. 1377 Log servers MUST honor requests where 0 <= "start" < "tree_size" and 1378 "end" >= "tree_size" by returning a partial response covering only 1379 the valid entries in the specified range. "end" >= "tree_size" could 1380 be caused by skew. Note that the following restriction may also 1381 apply: 1383 Logs MAY restrict the number of entries that can be retrieved per 1384 "get-entries" request. If a client requests more than the permitted 1385 number of entries, the log SHALL return the maximum number of entries 1386 permissible. These entries SHALL be sequential beginning with the 1387 entry specified by "start". 1389 Because of skew, it is possible the log server will not have any 1390 entries between "start" and "end". In this case it MUST return an 1391 empty "entries" array. 1393 In any case, the log server MUST return the latest STH it knows 1394 about. 1396 See Section 10.4.3 for an outline of how to use a complete list of 1397 "leaf_input" entries to verify the "root_hash". 1399 6.8. Retrieve Accepted Trust Anchors 1401 GET https:///ct/v2/get-anchors 1403 No inputs. 1405 Outputs: 1407 certificates: An array of base64 encoded trust anchors that are 1408 acceptable to the log. 1410 max_chain: If the server has chosen to limit the length of chains 1411 it accepts, this is the maximum number of certificates in the 1412 chain, in decimal. If there is no limit, this is omitted. 1414 7. Optional Client Messages 1416 Logs MAY implement these messages. They are not required for correct 1417 operation of logs or their clients, but may be convenient in some 1418 circumstances. Note that mirrors can implement these even if the log 1419 they are mirroring does not. 1421 7.1. Get Entry Number for SCT 1423 GET https:///ct/v2/get-entry-for-sct 1425 Inputs: 1427 sct: A base64 encoded "TransItem" of type "x509_sct_v2" or 1428 "precert_sct_v2" signed by this log. 1430 Outputs: 1432 entry: 0-based index of the log entry corresponding to the 1433 supplied SCT. 1435 Error codes: 1437 bad signature "sct" is not signed by this log. 1439 not found "sct" does not correspond to an entry that is currently 1440 available. 1442 Note that any SCT signed by a log MUST have a corresponding entry in 1443 the log, but it may not be retrievable until the MMD has passed since 1444 the SCT was issued. 1446 7.2. Get Entry Numbers for Certificate 1448 GET https:///ct/v2/get-entry-for-certificate 1450 Inputs: 1452 hash: A base64 encoded HASH of a "TBSCertificate". Note that if 1453 the certificate has redacted labels then the "TBSCertificate" 1454 must be constructed as described above (Section 4.2). 1456 Outputs: 1458 entries: An array of 0-based indices of log entries corresponding 1459 to the supplied HASH. 1461 Error codes: 1463 bad hash "hash" is not the right size or format. 1465 not found "sct" does not correspond to an entry that is currently 1466 available. 1468 Note that it is possible for a certificate to be logged more than 1469 once. If that is the case, the log MAY return more than one entry 1470 index. If the certificate is present in the log, then the log MUST 1471 return at least one entry index. 1473 8. TLS Servers 1475 TLS servers MUST use at least one of the three mechanisms listed 1476 below to present one or more SCTs from one or more logs to each TLS 1477 client during full TLS handshakes, where each SCT corresponds to the 1478 server certificate or to a name-constrained intermediate the server 1479 certificate chains to. TLS servers SHOULD also present corresponding 1480 inclusion proofs and STHs (see Section 8.3). 1482 Three mechanisms are provided because they have different tradeoffs. 1484 o A TLS extension (Section 7.4.1.4 of [RFC5246]) with type 1485 "transparency_info" (see Section 8.5). This mechanism allows TLS 1486 servers to participate in CT without the cooperation of CAs, 1487 unlike the other two mechanisms. It also allows SCTs and 1488 inclusion proofs to be updated on the fly. 1490 o An Online Certificate Status Protocol (OCSP) [RFC6960] response 1491 extension (see Section 9.1.1), where the OCSP response is provided 1492 in the "CertificateStatus" message, provided that the TLS client 1493 included the "status_request" extension in the (extended) 1494 "ClientHello" (Section 8 of [RFC6066]). This mechanism, popularly 1495 known as OCSP stapling, is already widely (but not universally) 1496 implemented. It also allows SCTs and inclusion proofs to be 1497 updated on the fly. 1499 o An X509v3 certificate extension (see Section 9.1.2). This 1500 mechanism allows the use of unmodified TLS servers, but the SCTs 1501 and inclusion proofs cannot be updated on the fly. Since the logs 1502 from where the SCTs and inclusion proofs originated won't 1503 necessarily be accepted by TLS clients for the full lifetime of 1504 the certificate, there is a risk that TLS clients will 1505 subsequently consider the certificate to be non-compliant and in 1506 need of re-issuance. 1508 Additionally, a TLS server which supports presenting SCTs using an 1509 OCSP response MAY provide it when the TLS client included the 1510 "status_request_v2" extension ([RFC6961]) in the (extended) 1511 "ClientHello", but only in addition to at least one of the three 1512 mechanisms listed above. 1514 8.1. Multiple SCTs 1516 TLS servers SHOULD send SCTs from multiple logs in case one or more 1517 logs are not acceptable to the TLS client (for example, if a log has 1518 been struck off for misbehavior, has had a key compromise, or is not 1519 known to the TLS client). For example: 1521 o If a CA and a log collude, it is possible to temporarily hide 1522 misissuance from clients. Including SCTs from different logs 1523 makes it more difficult to mount this attack. 1525 o If a log misbehaves, a consequence may be that clients cease to 1526 trust it. Since the time an SCT may be in use can be considerable 1527 (several years is common in current practice when embedded in a 1528 certificate), servers may wish to reduce the probability of their 1529 certificates being rejected as a result by including SCTs from 1530 different logs. 1532 o TLS clients may have policies related to the above risks requiring 1533 servers to present multiple SCTs. For example, at the time of 1534 writing, Chromium [Chromium.Log.Policy] requires multiple SCTs to 1535 be presented with EV certificates in order for the EV indicator to 1536 be shown. 1538 To select the logs from which to obtain SCTs, a TLS server can, for 1539 example, examine the set of logs popular TLS clients accept and 1540 recognize. 1542 8.2. TransItemList Structure 1544 Multiple SCTs, inclusion proofs, and indeed "TransItem" structures of 1545 any type, are combined into a list as follows: 1547 opaque SerializedTransItem<1..2^16-1>; 1549 struct { 1550 SerializedTransItem trans_item_list<1..2^16-1>; 1551 } TransItemList; 1553 Here, "SerializedTransItem" is an opaque byte string that contains 1554 the serialized "TransItem" structure. This encoding ensures that TLS 1555 clients can decode each "TransItem" individually (so, for example, if 1556 there is a version upgrade, out-of-date clients can still parse old 1557 "TransItem" structures while skipping over new "TransItem" structures 1558 whose versions they don't understand). 1560 8.3. Presenting SCTs, inclusion proofs and STHs 1562 When constructing a "TransItemList" structure, a TLS server SHOULD 1563 construct and include "TransItem" structures of type 1564 "x509_sct_with_proof_v2" (for an SCT of type "x509_sct_v2") or 1565 "precert_sct_with_proof_v2" (for an SCT of type "precert_sct_v2"), 1566 both of which encapsulate a "SCTWithProofDataV2" structure: 1568 struct { 1569 SignedCertificateTimestampDataV2 sct; 1570 SignedTreeHeadDataV2 sth; 1571 InclusionProofDataV2 inclusion_proof; 1572 } SCTWithProofDataV2; 1574 "sct" is the encapsulated data structure from an SCT that corresponds 1575 to the server certificate or to a name-constrained intermediate the 1576 server certificate chains to. 1578 "sth" is the encapsulated data structure from an STH that was signed 1579 by the same log as "sct". 1581 "inclusion_proof" is the encapsulated data structure from an 1582 inclusion proof that corresponds to "sct" and can be used to compute 1583 the root in "sth". 1585 8.4. Presenting SCTs only 1587 Presenting inclusion proofs and STHs in the TLS handshake helps to 1588 protect the client's privacy (see Section 10.2.5) and reduces load on 1589 log servers. However, if a TLS server is unable to obtain an 1590 inclusion proof and STH that correspond to an SCT, then it MUST 1591 include "TransItem" structures of type "x509_sct_v2" or 1592 "precert_sct_v2" in the "TransItemList". 1594 8.5. transparency_info TLS Extension 1596 Provided that a TLS client includes the "transparency_info" extension 1597 type in the ClientHello, the TLS server SHOULD include the 1598 "transparency_info" extension in the ServerHello with 1599 "extension_data" set to a "TransItemList". The TLS server SHOULD 1600 ignore any "extension_data" sent by the TLS client. Additionally, 1601 the TLS server MUST NOT process or include this extension when a TLS 1602 session is resumed, since session resumption uses the original 1603 session information. 1605 9. Certification Authorities 1607 9.1. Transparency Information X.509v3 Extension 1609 The Transparency Information X.509v3 extension, which has OID 1610 1.3.101.75 and SHOULD be non-critical, contains one or more 1611 "TransItem" structures in a "TransItemList". This extension MAY be 1612 included in OCSP responses (see Section 9.1.1) and certificates (see 1613 Section 9.1.2). Since RFC5280 requires the "extnValue" field (an 1614 OCTET STRING) of each X.509v3 extension to include the DER encoding 1615 of an ASN.1 value, a "TransItemList" MUST NOT be included directly. 1616 Instead, it MUST be wrapped inside an additional OCTET STRING, which 1617 is then put into the "extnValue" field: 1619 TransparencyInformationSyntax ::= OCTET STRING 1621 "TransparencyInformationSyntax" contains a "TransItemList". 1623 9.1.1. OCSP Response Extension 1625 A certification authority MAY include a Transparency Information 1626 X.509v3 extension in the "singleExtensions" of a "SingleResponse" in 1627 an OCSP response. The included SCTs or inclusion proofs MUST be for 1628 the certificate identified by the "certID" of that "SingleResponse", 1629 or for a precertificate that corresponds to that certificate, or for 1630 a name-constrained intermediate to which that certificate chains. 1632 9.1.2. Certificate Extension 1634 A certification authority MAY include a Transparency Information 1635 X.509v3 extension in a certificate. Any included SCTs or inclusion 1636 proofs MUST be either for a precertificate that corresponds to this 1637 certificate, or for a name-constrained intermediate to which this 1638 certificate chains. 1640 9.2. TLS Feature Extension 1642 A certification authority MAY include the transparency_info 1643 (Section 8.5) TLS extension identifier in the TLS Feature [RFC7633] 1644 certificate extension in root, intermediate and end-entity 1645 certificates. When a certificate chain includes such a certificate, 1646 this indicates that CT compliance is required. 1648 10. Clients 1650 There are various different functions clients of logs might perform. 1651 We describe here some typical clients and how they should function. 1652 Any inconsistency may be used as evidence that a log has not behaved 1653 correctly, and the signatures on the data structures prevent the log 1654 from denying that misbehavior. 1656 All clients need various metadata in order to communicate with logs 1657 and verify their responses. This metadata is described below, but 1658 note that this document does not describe how the metadata is 1659 obtained, which is implementation dependent (see, for example, 1660 [Chromium.Policy]). 1662 Clients should somehow exchange STHs they see, or make them available 1663 for scrutiny, in order to ensure that they all have a consistent 1664 view. The exact mechanisms will be in separate documents, but it is 1665 expected there will be a variety. 1667 10.1. Metadata 1669 In order to communicate with and verify a log, clients need metadata 1670 about the log. 1672 Base URL: The URL to substitute for in Section 6. 1674 Hash Algorithm The hash algorithm used for the Merkle Tree (see 1675 Section 12.2). 1677 Signing Algorithm The signing algorithm used (see Section 2.1.4). 1679 Public Key The public key used to verify signatures generated by the 1680 log. A log MUST NOT use the same keypair as any other log. 1682 Log ID The OID that uniquely identifies the log. 1684 Maximum Merge Delay The MMD the log has committed to. 1686 Version The version of the protocol supported by the log (currently 1687 1 or 2). 1689 Maximum Chain Length The longest chain submission the log is willing 1690 to accept, if the log chose to limit it. 1692 STH Frequency Count The maximum number of STHs the log may produce 1693 in any period equal to the "Maximum Merge Delay" (see 1694 Section 5.8). 1696 Final STH If a log has been closed down (i.e. no longer accepts new 1697 entries), existing entries may still be valid. In this case, the 1698 client should know the final valid STH in the log to ensure no new 1699 entries can be added without detection. The final STH should be 1700 provided in the form of a TransItem of type signed_tree_head_v2. 1702 [JSON.Metadata] is an example of a metadata format which includes the 1703 above elements. 1705 10.2. TLS Client 1707 10.2.1. Receiving SCTs 1709 TLS clients receive SCTs alongside or in certificates. TLS clients 1710 MUST implement all of the three mechanisms by which TLS servers may 1711 present SCTs (see Section 8). TLS clients MAY also accept SCTs via 1712 the "status_request_v2" extension ([RFC6961]). TLS clients that 1713 support the "transparency_info" TLS extension SHOULD include it in 1714 ClientHello messages, with empty "extension_data". TLS clients may 1715 also receive inclusion proofs in addition to SCTs, which should be 1716 checked once the SCTs are validated. 1718 10.2.2. Reconstructing the TBSCertificate 1720 To reconstruct the TBSCertificate component of a precertificate from 1721 a certificate, TLS clients should: 1723 o Remove the Transparency Information extension described in 1724 Section 9.1. 1726 o If the redactedSubjectAltName extension (Section 4.2.2) is 1727 present: 1729 * TLS clients MUST verify it against the subjectAltName extension 1730 according to Section 10.2.3. 1732 * Once verified, remove the subjectAltName extension from the 1733 TBSCertificate. 1735 If the SCT checked is for a Precertificate (where the "type" of the 1736 "TransItem" is "precert_sct_v2"), then the client SHOULD also remove 1737 embedded v1 SCTs, identified by OID 1.3.6.1.4.1.11129.2.4.2 (See 1738 Section 3.3. of [RFC6962]), in the process of reconstructing the 1739 TBSCertificate. That is to allow embedded v1 and v2 SCTs to co-exist 1740 in a certificate (See Appendix A). 1742 10.2.3. Verifying the redactedSubjectAltName extension 1744 If the redactedSubjectAltName extension is present, TLS clients MUST 1745 check that the subjectAltName extension is present, that the 1746 subjectAltName extension contains the same number of identities as 1747 the redactedSubjectAltName extension, and that each identity in the 1748 subjectAltName extension has a matching identity at the same position 1749 in the redactedSubjectAltName extension. Two identities are matching 1750 if either: 1752 o The two identities are identical; or, 1754 o Both identities are DNS names, have the same number of labels, and 1755 each label in the subjectAltName identity has a matching label at 1756 the same position in the redactedSubjectAltName identity. Two DNS 1757 labels are matching if either: 1759 * The two labels are identical; or, 1761 * Neither label is "*" and the label from the 1762 redactedSubjectAltName identity is equal to REDACT(label from 1763 subjectAltName identity) (Section 4.2.1). 1765 If any of these checks fail, the certificate MUST NOT be considered 1766 compliant. 1768 10.2.4. Validating SCTs 1770 In addition to normal validation of the server certificate and its 1771 chain, TLS clients SHOULD validate each received SCT for which they 1772 have the corresponding log's metadata. To validate an SCT, a TLS 1773 client computes the signature input from the SCT data and the 1774 corresponding certificate, and then verifies the signature using the 1775 corresponding log's public key. TLS clients MUST NOT consider valid 1776 any SCT whose timestamp is in the future. 1778 Before considering any SCT to be invalid, the TLS client MUST attempt 1779 to validate it against the server certificate and against each of the 1780 zero or more suitable name-constrained intermediates (Section 4.3) in 1781 the chain. These certificates may be evaluated in the order they 1782 appear in the chain, or, indeed, in any order. 1784 10.2.5. Validating inclusion proofs 1786 After validating a received SCT, a TLS client MAY request a 1787 corresponding inclusion proof (if one is not already available) and 1788 then verify it. An inclusion proof can be requested directly from a 1789 log using "get-proof-by-hash" (Section 6.5) or "get-all-by-hash" 1790 (Section 6.6), but note that this will disclose to the log which TLS 1791 server the client has been communicating with. 1793 Alternatively, if the TLS client has received an inclusion proof (and 1794 an STH) alongside the SCT, it can proceed to verifying the inclusion 1795 proof to the provided STH. The client then has to verify consistency 1796 between the provided STH and an STH it knows about, which is less 1797 sensitive from a privacy perspective. 1799 TLS clients SHOULD also verify each received inclusion proof (see 1800 Section 10.4.1) for which they have the corresponding log's metadata, 1801 to audit the log and gain confidence that the certificate is logged. 1803 If the TLS client holds an STH that predates the SCT, it MAY, in the 1804 process of auditing, request a new STH from the log (Section 6.3), 1805 then verify it by requesting a consistency proof (Section 6.4). Note 1806 that if the TLS client uses "get-all-by-hash", then it will already 1807 have the new STH. 1809 10.2.6. Evaluating compliance 1811 To be considered compliant, a certificate MUST be accompanied by at 1812 least one valid SCT. A certificate not accompanied by any valid SCTs 1813 MUST NOT be considered compliant by TLS clients. 1815 10.2.7. TLS Feature Extension 1817 If any certificate in a chain includes the transparency_info 1818 (Section 8.5) TLS extension identifier in the TLS Feature [RFC7633] 1819 certificate extension, then CT compliance (using any of the 1820 mechanisms from Section 8) is required. 1822 10.2.8. Handling of Non-compliance 1824 If a TLS server presents a certificate chain that is non-compliant, 1825 and the use of a compliant certificate is mandated by an explicit 1826 security policy, application protocol specification, the TLS Feature 1827 extension or any other means, the TLS client MUST refuse the 1828 connection. 1830 10.3. Monitor 1832 Monitors watch logs to check that they behave correctly, for 1833 certificates of interest, or both. For example, a monitor may be 1834 configured to report on all certificates that apply to a specific 1835 domain name when fetching new entries for consistency validation. 1837 A monitor needs to, at least, inspect every new entry in each log it 1838 watches. It may also want to keep copies of entire logs. In order 1839 to do this, it should follow these steps for each log: 1841 1. Fetch the current STH (Section 6.3). 1843 2. Verify the STH signature. 1845 3. Fetch all the entries in the tree corresponding to the STH 1846 (Section 6.7). 1848 4. Confirm that the tree made from the fetched entries produces the 1849 same hash as that in the STH. 1851 5. Fetch the current STH (Section 6.3). Repeat until the STH 1852 changes. 1854 6. Verify the STH signature. 1856 7. Fetch all the new entries in the tree corresponding to the STH 1857 (Section 6.7). If they remain unavailable for an extended 1858 period, then this should be viewed as misbehavior on the part of 1859 the log. 1861 8. Either: 1863 1. Verify that the updated list of all entries generates a tree 1864 with the same hash as the new STH. 1866 Or, if it is not keeping all log entries: 1868 1. Fetch a consistency proof for the new STH with the previous 1869 STH (Section 6.4). 1871 2. Verify the consistency proof. 1873 3. Verify that the new entries generate the corresponding 1874 elements in the consistency proof. 1876 9. Go to Step 5. 1878 10.4. Auditing 1880 Auditing ensures that the current published state of a log is 1881 reachable from previously published states that are known to be good, 1882 and that the promises made by the log in the form of SCTs have been 1883 kept. Audits are performed by monitors or TLS clients. 1885 In particular, there are four log behaviour properties that should be 1886 checked: 1888 o The Maximum Merge Delay (MMD). 1890 o The STH Frequency Count. 1892 o The append-only property. 1894 o The consistency of the log view presented to all query sources. 1896 A benign, conformant log publishes a series of STHs over time, each 1897 derived from the previous STH and the submitted entries incorporated 1898 into the log since publication of the previous STH. This can be 1899 proven through auditing of STHs. SCTs returned to TLS clients can be 1900 audited by verifying against the accompanying certificate, and using 1901 Merkle Inclusion Proofs, against the log's Merkle tree. 1903 The action taken by the auditor if an audit fails is not specified, 1904 but note that in general if audit fails, the auditor is in possession 1905 of signed proof of the log's misbehavior. 1907 A monitor (Section 10.3) can audit by verifying the consistency of 1908 STHs it receives, ensure that each entry can be fetched and that the 1909 STH is indeed the result of making a tree from all fetched entries. 1911 A TLS client (Section 10.2) can audit by verifying an SCT against any 1912 STH dated after the SCT timestamp + the Maximum Merge Delay by 1913 requesting a Merkle inclusion proof (Section 6.5). It can also 1914 verify that the SCT corresponds to the certificate it arrived with 1915 (i.e. the log entry is that certificate, is a precertificate for that 1916 certificate or is an appropriate name-constrained intermediate [see 1917 Section 4.3]). 1919 Checking of the consistency of the log view presented to all entities 1920 is more difficult to perform because it requires a way to share log 1921 responses among a set of CT-aware entities, and is discussed in 1922 Section 13.4. 1924 The following algorithm outlines may be useful for clients that wish 1925 to perform various audit operations. 1927 10.4.1. Verifying an inclusion proof 1929 When a client has received a "TransItem" of type "inclusion_proof_v2" 1930 and wishes to verify inclusion of an input "hash" for an STH with a 1931 given "tree_size" and "root_hash", the following algorithm may be 1932 used to prove the "hash" was included in the "root_hash": 1934 1. Compare "leaf_index" against "tree_size". If "leaf_index" is 1935 greater than or equal to "tree_size" fail the proof verification. 1937 2. Set "fn" to "leaf_index" and "sn" to "tree_size - 1". 1939 3. Set "r" to "hash". 1941 4. For each value "p" in the "inclusion_path" array: 1943 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 1945 1. Set "r" to "HASH(0x01 || p || r)" 1947 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 1948 equally until either "LSB(fn)" is set or "fn" is "0". 1950 Otherwise: 1952 Set "r" to "HASH(0x01 || r || p)" 1954 Finally, right-shift both "fn" and "sn" one time. 1956 5. Compare "sn" to 0. Compare "r" against the "root_hash". If "sn" 1957 is equal to 0, and "r" and the "root_hash" are equal, then the 1958 log has proven the inclusion of "hash". Otherwise, fail the 1959 proof verification. 1961 10.4.2. Verifying consistency between two STHs 1963 When a client has an STH "first_hash" for tree size "first", an STH 1964 "second_hash" for tree size "second" where "0 < first < second", and 1965 has received a "TransItem" of type "consistency_proof_v2" that they 1966 wish to use to verify both hashes, the following algorithm may be 1967 used: 1969 1. If "first" is an exact power of 2, then prepend "first_hash" to 1970 the "consistency_path" array. 1972 2. Set "fn" to "first - 1" and "sn" to "second - 1". 1974 3. If "LSB(fn)" is set, then right-shift both "fn" and "sn" equally 1975 until "LSB(fn)" is not set. 1977 4. Set both "fr" and "sr" to the first value in the 1978 "consistency_path" array. 1980 5. For each subsequent value "c" in the "consistency_path" array: 1982 If "sn" is 0, stop the iteration and fail the proof verification. 1984 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 1986 1. Set "fr" to "HASH(0x01 || c || fr)" 1987 Set "sr" to "HASH(0x01 || c || sr)" 1989 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 1990 equally until either "LSB(fn)" is set or "fn" is "0". 1992 Otherwise: 1994 Set "sr" to "HASH(0x01 || sr || c)" 1996 Finally, right-shift both "fn" and "sn" one time. 1998 6. After completing iterating through the "consistency_path" array 1999 as described above, verify that the "fr" calculated is equal to 2000 the "first_hash" supplied, that the "sr" calculated is equal to 2001 the "second_hash" supplied and that "sn" is 0. 2003 10.4.3. Verifying root hash given entries 2005 When a client has a complete list of leaf input "entries" from "0" up 2006 to "tree_size - 1" and wishes to verify this list against an STH 2007 "root_hash" returned by the log for the same "tree_size", the 2008 following algorithm may be used: 2010 1. Set "stack" to an empty stack. 2012 2. For each "i" from "0" up to "tree_size - 1": 2014 1. Push "HASH(0x00 || entries[i])" to "stack". 2016 2. Set "merge_count" to the lowest value ("0" included) such 2017 that "LSB(i >> merge_count)" is not set. In other words, set 2018 "merge_count" to the number of consecutive "1"s found 2019 starting at the least significant bit of "i". 2021 3. Repeat "merge_count" times: 2023 1. Pop "right" from "stack". 2025 2. Pop "left" from "stack". 2027 3. Push "HASH(0x01 || left || right)" to "stack". 2029 3. If there is more than one element in the "stack", repeat the same 2030 merge procedure (Step 2.3 above) until only a single element 2031 remains. 2033 4. The remaining element in "stack" is the Merkle Tree hash for the 2034 given "tree_size" and should be compared by equality against the 2035 supplied "root_hash". 2037 11. Algorithm Agility 2039 It is not possible for a log to change any of its algorithms part way 2040 through its lifetime: 2042 Signature algorithm: SCT signatures must remain valid so signature 2043 algorithms can only be added, not removed. 2045 Hash algorithm: A log would have to support the old and new hash 2046 algorithms to allow backwards-compatibility with clients that are 2047 not aware of a hash algorithm change. 2049 Allowing multiple signature or hash algorithms for a log would 2050 require that all data structures support it and would significantly 2051 complicate client implementation, which is why it is not supported by 2052 this document. 2054 If it should become necessary to deprecate an algorithm used by a 2055 live log, then the log should be frozen as specified in Section 10.1 2056 and a new log should be started. Certificates in the frozen log that 2057 have not yet expired and require new SCTs SHOULD be submitted to the 2058 new log and the SCTs from that log used instead. 2060 12. IANA Considerations 2062 12.1. TLS Extension Type 2064 IANA is asked to allocate an RFC 5246 ExtensionType value for the 2065 "transparency_info" TLS extension. IANA should update this extension 2066 type to point at this document. 2068 12.2. Hash Algorithms 2070 IANA is asked to establish a registry of hash values, initially 2071 consisting of: 2073 +-------+----------------------+ 2074 | Index | Hash | 2075 +-------+----------------------+ 2076 | 0 | SHA-256 [FIPS.180-4] | 2077 +-------+----------------------+ 2079 12.3. Signature Algorithms 2081 IANA is asked to establish a registry of signature algorithm values, 2082 initially consisting of: 2084 +-------+-----------------------------------------------------------+ 2085 | Index | Signature Algorithm | 2086 +-------+-----------------------------------------------------------+ 2087 | 0 | deterministic ECDSA [RFC6979] using the NIST P-256 curve | 2088 | | (Section D.1.2.3 of the Digital Signature Standard [DSS]) | 2089 | | and HMAC-SHA256 | 2090 | 1 | RSA signatures (RSASSA-PKCS1-v1_5 with SHA-256, Section | 2091 | | 8.2 of [RFC3447]) using a key of at least 2048 bits. | 2092 +-------+-----------------------------------------------------------+ 2094 12.4. SCT Extensions 2096 IANA is asked to establish a registry of SCT extensions, initially 2097 consisting of: 2099 +-------+-----------+ 2100 | Type | Extension | 2101 +-------+-----------+ 2102 | 65535 | reserved | 2103 +-------+-----------+ 2105 TBD: policy for adding to the registry 2107 12.5. STH Extensions 2109 IANA is asked to establish a registry of STH extensions, initially 2110 consisting of: 2112 +-------+-----------+ 2113 | Type | Extension | 2114 +-------+-----------+ 2115 | 65535 | reserved | 2116 +-------+-----------+ 2118 TBD: policy for adding to the registry 2120 12.6. Object Identifiers 2122 This document uses object identifiers (OIDs) to identify Log IDs (see 2123 Section 5.3), the precertificate CMS "eContentType" (see 2124 Section 3.2), and X.509v3 extensions in certificates (see 2125 Section 4.2.2, Section 4.3 and Section 9.1.2) and OCSP responses (see 2126 Section 9.1.1). The OIDs are defined in an arc that was selected due 2127 to its short encoding. 2129 12.6.1. Log ID Registry 1 2131 All OIDs in the range from 1.3.101.8192 to 1.3.101.16383 have been 2132 reserved. This is a limited resource of 8,192 OIDs, each of which 2133 has an encoded length of 4 octets. 2135 IANA is requested to establish a registry that will allocate Log IDs 2136 from this range. 2138 TBD: policy for adding to the registry. Perhaps "Expert Review"? 2140 12.6.2. Log ID Registry 2 2142 The 1.3.101.80 arc has been delegated. This is an unlimited 2143 resource, but only the 128 OIDs from 1.3.101.80.0 to 1.3.101.80.127 2144 have an encoded length of only 4 octets. 2146 IANA is requested to establish a registry that will allocate Log IDs 2147 from this arc. 2149 TBD: policy for adding to the registry. Perhaps "Expert Review"? 2151 13. Security Considerations 2153 With CAs, logs, and servers performing the actions described here, 2154 TLS clients can use logs and signed timestamps to reduce the 2155 likelihood that they will accept misissued certificates. If a server 2156 presents a valid signed timestamp for a certificate, then the client 2157 knows that a log has committed to publishing the certificate. From 2158 this, the client knows that monitors acting for the subject of the 2159 certificate have had some time to notice the misissue and take some 2160 action, such as asking a CA to revoke a misissued certificate, or 2161 that the log has misbehaved, which will be discovered when the SCT is 2162 audited. A signed timestamp is not a guarantee that the certificate 2163 is not misissued, since appropriate monitors might not have checked 2164 the logs or the CA might have refused to revoke the certificate. 2166 In addition, if TLS clients will not accept unlogged certificates, 2167 then site owners will have a greater incentive to submit certificates 2168 to logs, possibly with the assistance of their CA, increasing the 2169 overall transparency of the system. 2171 [I-D.ietf-trans-threat-analysis] provides a more detailed threat 2172 analysis of the Certificate Transparency architecture. 2174 13.1. Misissued Certificates 2176 Misissued certificates that have not been publicly logged, and thus 2177 do not have a valid SCT, are not considered compliant. Misissued 2178 certificates that do have an SCT from a log will appear in that 2179 public log within the Maximum Merge Delay, assuming the log is 2180 operating correctly. Thus, the maximum period of time during which a 2181 misissued certificate can be used without being available for audit 2182 is the MMD. 2184 13.2. Detection of Misissue 2186 The logs do not themselves detect misissued certificates; they rely 2187 instead on interested parties, such as domain owners, to monitor them 2188 and take corrective action when a misissue is detected. 2190 13.3. Avoiding Overly Redacting Domain Name Labels 2192 Redaction of domain name labels carries the same risks as the use of 2193 wildcards (See Section 7.2 of [RFC6125], for example). If the 2194 entirety of the domain space below the unredacted part of a domain 2195 name is not registered by a single domain owner (e.g. 2196 "REDACT(label).com", "REDACT(label).co.uk" and other public suffixes 2197 [Public.Suffix.List]), then the domain name may be considered by 2198 clients to be overly redacted. 2200 CAs should take care to avoid overly redacting domain names in 2201 precertificates. It is expected that monitors will treat 2202 precertificates that contain overly redacted domain names as 2203 potentially misissued. TLS clients MAY consider a certificate to be 2204 non-compliant if the reconstructed TBSCertificate (Section 10.2.2) 2205 contains any overly redacted domain names. 2207 13.4. Misbehaving Logs 2209 A log can misbehave in several ways. Examples include failing to 2210 incorporate a certificate with an SCT in the Merkle Tree within the 2211 MMD, presenting different, conflicting views of the Merkle Tree at 2212 different times and/or to different parties and issuing STHs too 2213 frequently. Such misbehavior is detectable and the 2214 [I-D.ietf-trans-threat-analysis] provides more details on how this 2215 can be done. 2217 Violation of the MMD contract is detected by log clients requesting a 2218 Merkle inclusion proof (Section 6.5) for each observed SCT. These 2219 checks can be asynchronous and need only be done once per each 2220 certificate. In order to protect the clients' privacy, these checks 2221 need not reveal the exact certificate to the log. Instead, clients 2222 can request the proof from a trusted auditor (since anyone can 2223 compute the proofs from the log) or communicate with the log via 2224 proxies. 2226 Violation of the append-only property or the STH issuance rate limit 2227 can be detected by clients comparing their instances of the Signed 2228 Tree Heads. There are various ways this could be done, for example 2229 via gossip (see [I-D.ietf-trans-gossip]) or peer-to-peer 2230 communications or by sending STHs to monitors (who could then 2231 directly check against their own copy of the relevant log). A proof 2232 of misbehavior in such cases would be a series of STHs that were 2233 issued too closely together, proving violation of the STH issuance 2234 rate limit, or an STH with a root hash that does not match the one 2235 calculated from a copy of the log, proving violation of the append- 2236 only property. 2238 13.5. Deterministic Signatures 2240 Logs are required to use deterministic signatures for the following 2241 reasons: 2243 o Using non-deterministic ECDSA with a predictable source of 2244 randomness means that each signature can potentially expose the 2245 secret material of the signing key. 2247 o Clients that gossip STHs or report back SCTs can be tracked or 2248 traced if a log was to produce multiple STHs or SCTs with the same 2249 timestamp and data but different signatures. 2251 13.6. Multiple SCTs 2253 By offering multiple SCTs, each from a different log, TLS servers 2254 reduce the effectiveness of an attack where a CA and a log collude 2255 (see Section 8.1). 2257 14. Privacy Considerations 2259 14.1. Ensuring Effective Redaction 2261 Although the domain name redaction mechanism (Section 4.2) removes 2262 the need for private labels to appear in logs, it does not guarantee 2263 that this will never happen. Anyone who encounters a certificate 2264 could choose to submit it to one or more logs, thereby rendering the 2265 redaction futile. Therefore, domain owners are advised to take the 2266 following steps to minimize the likelihood that their private labels 2267 will become known outside their closed communities: 2269 o Avoid registering private labels in public DNS. 2271 o Avoid using private labels that are predictable (e.g. "www"). 2273 CAs are advised to carefully consider each request to redact a label. 2274 When a CA believes that redacting a particular label would be futile, 2275 we advise rejecting the redaction request. TLS clients may have 2276 policies that forbid redaction, so redaction should only be used when 2277 it's absolutely necessary and likely to be effective. 2279 15. Acknowledgements 2281 The authors would like to thank Erwann Abelea, Robin Alden, Andrew 2282 Ayer, Al Cutter, Francis Dupont, Adam Eijdenberg, Stephen Farrell, 2283 Daniel Kahn Gillmor, Paul Hadfield, Brad Hill, Jeff Hodges, Paul 2284 Hoffman, Jeffrey Hutzelman, Kat Joyce, Stephen Kent, SM, Alexey 2285 Melnikov, Linus Nordberg, Chris Palmer, Trevor Perrin, Pierre 2286 Phaneuf, Melinda Shore, Ryan Sleevi, Martin Smith, Carl Wallace and 2287 Paul Wouters for their valuable contributions. 2289 A big thank you to Symantec for kindly donating the OIDs from the 2290 1.3.101 arc that are used in this document. 2292 16. References 2294 16.1. Normative References 2296 [DSS] National Institute of Standards and Technology, "Digital 2297 Signature Standard (DSS)", FIPS 186-3, June 2009, 2298 . 2301 [FIPS.180-4] 2302 National Institute of Standards and Technology, "Secure 2303 Hash Standard", FIPS PUB 180-4, March 2012, 2304 . 2307 [HTML401] Raggett, D., Le Hors, A., and I. Jacobs, "HTML 4.01 2308 Specification", World Wide Web Consortium Recommendation 2309 REC-html401-19991224, December 1999, 2310 . 2312 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2313 Requirement Levels", BCP 14, RFC 2119, March 1997. 2315 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 2316 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 2317 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 2319 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 2320 Standards (PKCS) #1: RSA Cryptography Specifications 2321 Version 2.1", RFC 3447, February 2003. 2323 [RFC4627] Crockford, D., "The application/json Media Type for 2324 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 2326 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 2327 Encodings", RFC 4648, October 2006. 2329 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2330 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 2332 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 2333 Housley, R., and W. Polk, "Internet X.509 Public Key 2334 Infrastructure Certificate and Certificate Revocation List 2335 (CRL) Profile", RFC 5280, May 2008. 2337 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2338 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2339 . 2341 [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network 2342 Time Protocol Version 4: Protocol and Algorithms 2343 Specification", RFC 5905, June 2010. 2345 [RFC6066] Eastlake, D., "Transport Layer Security (TLS) Extensions: 2346 Extension Definitions", RFC 6066, January 2011. 2348 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 2349 Verification of Domain-Based Application Service Identity 2350 within Internet Public Key Infrastructure Using X.509 2351 (PKIX) Certificates in the Context of Transport Layer 2352 Security (TLS)", RFC 6125, March 2011. 2354 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 2355 Galperin, S., and C. Adams, "X.509 Internet Public Key 2356 Infrastructure Online Certificate Status Protocol - OCSP", 2357 RFC 6960, DOI 10.17487/RFC6960, June 2013, 2358 . 2360 [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) 2361 Multiple Certificate Status Request Extension", RFC 6961, 2362 DOI 10.17487/RFC6961, June 2013, 2363 . 2365 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 2366 Algorithm (DSA) and Elliptic Curve Digital Signature 2367 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2368 2013, . 2370 [RFC7633] Hallam-Baker, P., "X.509v3 Transport Layer Security (TLS) 2371 Feature Extension", RFC 7633, DOI 10.17487/RFC7633, 2372 October 2015, . 2374 16.2. Informative References 2376 [Chromium.Log.Policy] 2377 The Chromium Projects, "Chromium Certificate Transparency 2378 Log Policy", 2014, . 2381 [Chromium.Policy] 2382 The Chromium Projects, "Chromium Certificate 2383 Transparency", 2014, . 2386 [CrosbyWallach] 2387 Crosby, S. and D. Wallach, "Efficient Data Structures for 2388 Tamper-Evident Logging", Proceedings of the 18th USENIX 2389 Security Symposium, Montreal, August 2009, 2390 . 2393 [EVSSLGuidelines] 2394 CA/Browser Forum, "Guidelines For The Issuance And 2395 Management Of Extended Validation Certificates", 2007, 2396 . 2399 [I-D.ietf-trans-gossip] 2400 Nordberg, L., Gillmor, D., and T. Ritter, "Gossiping in 2401 CT", draft-ietf-trans-gossip-01 (work in progress), 2402 October 2015. 2404 [I-D.ietf-trans-threat-analysis] 2405 Kent, S., "Attack Model and Threat for Certificate 2406 Transparency", draft-ietf-trans-threat-analysis-03 (work 2407 in progress), October 2015. 2409 [JSON.Metadata] 2410 The Chromium Projects, "Chromium Log Metadata JSON 2411 Schema", 2014, . 2414 [Public.Suffix.List] 2415 Mozilla Foundation, "Public Suffix List", 2016, . 2418 [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate 2419 Transparency", RFC 6962, June 2013. 2421 Appendix A. Supporting v1 and v2 simultaneously 2423 Certificate Transparency logs have to be either v1 (conforming to 2424 [RFC6962]) or v2 (conforming to this document), as the data 2425 structures are incompatible and so a v2 log could not issue a valid 2426 v1 SCT. 2428 CT clients, however, can support v1 and v2 SCTs, for the same 2429 certificate, simultaneously, as v1 SCTs are delivered in different 2430 TLS, X.509 and OCSP extensions than v2 SCTs. 2432 v1 and v2 SCTs for X.509 certificates can be validated independently. 2433 For precertificates, v2 SCTs should be embedded in the TBSCertificate 2434 before submission of the TBSCertificate (inside a v1 precertificate, 2435 as described in Section 3.1. of [RFC6962]) to a v1 log so that TLS 2436 clients conforming to [RFC6962] but not this document are oblivious 2437 to the embedded v2 SCTs. An issuer can follow these steps to produce 2438 an X.509 certificate with embedded v1 and v2 SCTs: 2440 o Create a CMS precertificate as described in Section 3.2 and submit 2441 it to v2 logs. 2443 o Embed the obtained v2 SCTs in the TBSCertificate, as described in 2444 Section 9.1.2. 2446 o Use that TBSCertificate to create a v1 precertificate, as 2447 described in Section 3.1. of [RFC6962] and submit it to v1 logs. 2449 o Embed the v1 SCTs in the TBSCertificate, as described in 2450 Section 3.3. of [RFC6962]. 2452 o Sign that TBSCertificate (which now contains v1 and v2 SCTs) to 2453 issue the final X.509 certificate. 2455 Authors' Addresses 2457 Ben Laurie 2458 Google UK Ltd. 2460 EMail: benl@google.com 2462 Adam Langley 2463 Google Inc. 2465 EMail: agl@google.com 2466 Emilia Kasper 2467 Google Switzerland GmbH 2469 EMail: ekasper@google.com 2471 Eran Messeri 2472 Google UK Ltd. 2474 EMail: eranm@google.com 2476 Rob Stradling 2477 Comodo CA, Ltd. 2479 EMail: rob.stradling@comodo.com