idnits 2.17.1 draft-ietf-trans-rfc6962-bis-18.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 27, 2016) is 2824 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 615 -- Looks like a reference, but probably isn't: '7' on line 620 -- Looks like a reference, but probably isn't: '0' on line 610 -- Looks like a reference, but probably isn't: '2' on line 612 -- 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 28, 2017 E. Messeri 6 Google 7 R. Stradling 8 Comodo 9 July 27, 2016 11 Certificate Transparency 12 draft-ietf-trans-rfc6962-bis-18 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 28, 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 . . . . . . . . . . . . . . . . . . 16 82 5.2. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 16 83 5.3. Log ID . . . . . . . . . . . . . . . . . . . . . . . . . 17 84 5.4. TransItem Structure . . . . . . . . . . . . . . . . . . . 18 85 5.5. Merkle Tree Leaves . . . . . . . . . . . . . . . . . . . 19 86 5.6. Signed Certificate Timestamp (SCT) . . . . . . . . . . . 20 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 redactedSubjectAltName (Section 4.2.2) extension is present. 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, even if it intends to include the extension in the final 531 certificate. If omitting the subjectAltName extension, the CA MUST 532 include a redactedSubjectAltName (Section 4.2.2) extension that 533 contains, in a redacted form, the same entries that will be included 534 in the certificate's subjectAltName extension. 536 Wildcard "*" labels MUST NOT be redacted, but one or more non- 537 wildcard labels in each DNS-ID [RFC6125] can each be replaced with a 538 redacted label as follows: 540 REDACT(label) = prefix || BASE32(index || _label_hash) 541 _label_hash = LABELHASH(keyid_len || keyid || label_len || label) 543 "label" is the case-sensitive label to be redacted. 545 "prefix" is the "?" character (ASCII value 63). 547 "index" is the 1 byte index of a hash function in Section 12.2. The 548 value 255 is reserved. 550 "keyid_len" is the 1 byte length of the "keyid". 552 "keyid" is the keyIdentifier from the Subject Key Identifier 553 extension (section 4.2.1.2 of [RFC5280]), excluding the ASN.1 OCTET 554 STRING tag and length bytes. 556 "label_len" is the 1 byte length of the "label". 558 "||" denotes concatenation. 560 "BASE32" is the Base 32 Encoding function (section 6 of [RFC4648]). 561 Pad characters MUST NOT be appended to the encoded data. 563 "LABELHASH" is the hash function identified by "index". 565 4.2.2. redactedSubjectAltName Certificate Extension 567 The redactedSubjectAltName extension is a non-critical extension (OID 568 1.3.101.77) that is identical in structure to the subjectAltName 569 extension, except that DNS-IDs MAY contain redacted labels (see 570 Section 4.2.1). 572 When used, the redactedSubjectAltName extension MUST be present in 573 both the precertificate and the corresponding certificate. 575 This extension informs TLS clients of the DNS-ID labels that were 576 redacted and the degree of redaction, while minimizing the complexity 577 of TBSCertificate reconstruction (as described in Section 10.2.2). 578 Hashing the redacted labels allows the legitimate domain owner to 579 identify whether or not each redacted label correlates to a label 580 they know of. 582 Only DNS-ID labels can be redacted using this mechanism. However, 583 CAs can use Name Constraints (Section 4.3) to allow DNS domain name 584 labels in other subjectAltName entries to not appear in logs. 586 4.3. Using a Name-Constrained Intermediate CA 588 An intermediate CA certificate or intermediate CA precertificate that 589 contains the Name Constraints [RFC5280] extension MAY be logged in 590 place of end-entity certificates issued by that intermediate CA, as 591 long as all of the following conditions are met: 593 o there MUST be a non-critical extension (OID 1.3.101.76, whose 594 extnValue OCTET STRING contains ASN.1 NULL data (0x05 0x00)). 595 This extension is an explicit indication that it is acceptable to 596 not log certificates issued by this intermediate CA. 598 o permittedSubtrees MUST specify one or more dNSNames. 600 o excludedSubtrees MUST specify the entire IPv4 and IPv6 address 601 ranges. 603 Below is an example Name Constraints extension that meets these 604 conditions: 606 SEQUENCE { 607 OBJECT IDENTIFIER '2 5 29 30' 608 OCTET STRING, encapsulates { 609 SEQUENCE { 610 [0] { 611 SEQUENCE { 612 [2] 'example.com' 613 } 614 } 615 [1] { 616 SEQUENCE { 617 [7] 00 00 00 00 00 00 00 00 618 } 619 SEQUENCE { 620 [7] 621 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 622 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 623 } 624 } 625 } 626 } 627 } 629 5. Log Format and Operation 631 A log is a single, append-only Merkle Tree of submitted certificate 632 and precertificate entries. 634 When it receives a valid submission, the log MUST return an SCT that 635 corresponds to the submitted certificate or precertificate. If the 636 log has previously seen this valid submission, it SHOULD return the 637 same SCT as it returned before (to reduce the ability to track 638 clients as described in Section 13.5). If different SCTs are 639 produced for the same submission, multiple log entries will have to 640 be created, one for each SCT (as the timestamp is a part of the leaf 641 structure). Note that if a certificate was previously logged as a 642 precertificate, then the precertificate's SCT of type 643 "precert_sct_v2" would not be appropriate; instead, a fresh SCT of 644 type "x509_sct_v2" should be generated. 646 An SCT is the log's promise to incorporate the submitted entry in its 647 Merkle Tree no later than a fixed amount of time, known as the 648 Maximum Merge Delay (MMD), after the issuance of the SCT. 649 Periodically, the log MUST append all its new entries to its Merkle 650 Tree and sign the root of the tree. 652 Log operators MUST NOT impose any conditions on retrieving or sharing 653 data from the log. 655 5.1. Accepting Submissions 657 Logs MUST verify that each submitted certificate or precertificate 658 has a valid signature chain to an accepted trust anchor, using the 659 chain of intermediate CA certificates provided by the submitter. 660 Logs MUST accept certificates and precertificates that are fully 661 valid according to RFC 5280 [RFC5280] verification rules and are 662 submitted with such a chain. Logs MAY accept certificates and 663 precertificates that have expired, are not yet valid, have been 664 revoked, or are otherwise not fully valid according to RFC 5280 665 verification rules in order to accommodate quirks of CA certificate- 666 issuing software. However, logs MUST reject submissions without a 667 valid signature chain to an accepted trust anchor. Logs MUST also 668 reject precertificates that do not conform to the requirements in 669 Section 3.2. 671 Logs SHOULD limit the length of chain they will accept. The maximum 672 chain length is specified in the log's metadata. 674 The log SHALL allow retrieval of its list of accepted trust anchors 675 (see Section 6.8), each of which is a root or intermediate CA 676 certificate. This list might usefully be the union of root 677 certificates trusted by major browser vendors. 679 5.2. Log Entries 681 If a submission is accepted and an SCT issued, the accepting log MUST 682 store the entire chain used for verification. This chain MUST 683 include the certificate or precertificate itself, the zero or more 684 intermediate CA certificates provided by the submitter, and the trust 685 anchor used to verify the chain (even if it was omitted from the 686 submission). The log MUST present this chain for auditing upon 687 request (see Section 6.7). This chain is required to prevent a CA 688 from avoiding blame by logging a partial or empty chain. 690 Each certificate entry in a log MUST include a "X509ChainEntry" 691 structure, and each precertificate entry MUST include a 692 "PrecertChainEntryV2" structure: 694 opaque ASN.1Cert<1..2^24-1>; 696 struct { 697 ASN.1Cert leaf_certificate; 698 ASN.1Cert certificate_chain<0..2^24-1>; 699 } X509ChainEntry; 701 opaque CMSPrecert<1..2^24-1>; 703 struct { 704 CMSPrecert pre_certificate; 705 ASN.1Cert precertificate_chain<1..2^24-1>; 706 } PrecertChainEntryV2; 708 "leaf_certificate" is a submitted certificate that has been accepted 709 by the log. 711 "certificate_chain" is a vector of 0 or more additional certificates 712 required to verify "leaf_certificate". The first certificate MUST 713 certify "leaf_certificate". Each following certificate MUST directly 714 certify the one preceding it. The final certificate MUST be a trust 715 anchor accepted by the log. If "leaf_certificate" is an accepted 716 trust anchor, then this vector is empty. 718 "pre_certificate" is a submitted precertificate that has been 719 accepted by the log. 721 "precertificate_chain" is a vector of 1 or more additional 722 certificates required to verify "pre_certificate". The first 723 certificate MUST certify "pre_certificate". Each following 724 certificate MUST directly certify the one preceding it. The final 725 certificate MUST be a trust anchor accepted by the log. 727 5.3. Log ID 729 Each log is identified by an OID, which is specified in the log's 730 metadata and which MUST NOT be used to identify any other log. A 731 log's operator MUST either allocate the OID themselves or request an 732 OID from one of the two Log ID Registries (see Section 12.6.1 and 733 Section 12.6.2). Various data structures include the DER encoding of 734 this OID, excluding the ASN.1 tag and length bytes, in an opaque 735 vector: 737 opaque LogID<2..127>; 739 Note that the ASN.1 length and the opaque vector length are identical 740 in size (1 byte) and value, so the DER encoding of the OID can be 741 reproduced simply by prepending an OBJECT IDENTIFIER tag (0x06) to 742 the opaque vector length and contents. 744 5.4. TransItem Structure 746 Various data structures are encapsulated in the "TransItem" structure 747 to ensure that the type and version of each one is identified in a 748 common fashion: 750 enum { 751 reserved(0), 752 x509_entry_v2(1), precert_entry_v2(2), 753 x509_sct_v2(3), precert_sct_v2(4), 754 tree_head_v2(5), signed_tree_head_v2(6), 755 consistency_proof_v2(7), inclusion_proof_v2(8), 756 x509_sct_with_proof_v2(9), precert_sct_with_proof_v2(10), 757 (65535) 758 } VersionedTransType; 760 struct { 761 VersionedTransType versioned_type; 762 select (versioned_type) { 763 case x509_entry_v2: TimestampedCertificateEntryDataV2; 764 case precert_entry_v2: TimestampedCertificateEntryDataV2; 765 case x509_sct_v2: SignedCertificateTimestampDataV2; 766 case precert_sct_v2: SignedCertificateTimestampDataV2; 767 case tree_head_v2: TreeHeadDataV2; 768 case signed_tree_head_v2: SignedTreeHeadDataV2; 769 case consistency_proof_v2: ConsistencyProofDataV2; 770 case inclusion_proof_v2: InclusionProofDataV2; 771 case x509_sct_with_proof_v2: SCTWithProofDataV2; 772 case precert_sct_with_proof_v2: SCTWithProofDataV2; 773 } data; 774 } TransItem; 776 "versioned_type" is the type of the encapsulated data structure and 777 the earliest version of this protocol to which it conforms. This 778 document is v2. 780 "data" is the encapsulated data structure. The various structures 781 named with the "DataV2" suffix are defined in later sections of this 782 document. 784 Note that "VersionedTransType" combines the v1 [RFC6962] type 785 enumerations "Version", "LogEntryType", "SignatureType" and 786 "MerkleLeafType". Note also that v1 did not define "TransItem", but 787 this document provides guidelines (see Appendix A) on how v2 788 implementations can co-exist with v1 implementations. 790 Future versions of this protocol may reuse "VersionedTransType" 791 values defined in this document as long as the corresponding data 792 structures are not modified, and may add new "VersionedTransType" 793 values for new or modified data structures. 795 5.5. Merkle Tree Leaves 797 The leaves of a log's Merkle Tree correspond to the log's entries 798 (see Section 5.2). Each leaf is the leaf hash (Section 2.1) of a 799 "TransItem" structure of type "x509_entry_v2" or "precert_entry_v2", 800 which encapsulates a "TimestampedCertificateEntryDataV2" structure. 801 Note that leaf hashes are calculated as HASH(0x00 || TransItem), 802 where the hashing algorithm is specified in the log's metadata. 804 opaque TBSCertificate<1..2^24-1>; 806 struct { 807 uint64 timestamp; 808 opaque issuer_key_hash[HASH_SIZE]; 809 TBSCertificate tbs_certificate; 810 SctExtension sct_extensions<0..2^16-1>; 811 } TimestampedCertificateEntryDataV2; 813 "timestamp" is the NTP Time [RFC5905] at which the certificate or 814 precertificate was accepted by the log, measured in milliseconds 815 since the epoch (January 1, 1970, 00:00), ignoring leap seconds. 816 Note that the leaves of a log's Merkle Tree are not required to be in 817 strict chronological order. 819 "issuer_key_hash" is the HASH of the public key of the CA that issued 820 the certificate or precertificate, calculated over the DER encoding 821 of the key represented as SubjectPublicKeyInfo [RFC5280]. This is 822 needed to bind the CA to the certificate or precertificate, making it 823 impossible for the corresponding SCT to be valid for any other 824 certificate or precertificate whose TBSCertificate matches 825 "tbs_certificate". 827 "tbs_certificate" is the DER encoded TBSCertificate from either the 828 "leaf_certificate" (in the case of an "X509ChainEntry") or the 829 "pre_certificate" (in the case of a "PrecertChainEntryV2"). (Note 830 that a precertificate's TBSCertificate can be reconstructed from the 831 corresponding certificate as described in Section 10.2.2). 833 "sct_extensions" matches the SCT extensions of the corresponding SCT. 835 5.6. Signed Certificate Timestamp (SCT) 837 An SCT is a "TransItem" structure of type "x509_sct_v2" or 838 "precert_sct_v2", which encapsulates a 839 "SignedCertificateTimestampDataV2" structure: 841 enum { 842 reserved(65535) 843 } SctExtensionType; 845 struct { 846 SctExtensionType sct_extension_type; 847 opaque sct_extension_data<0..2^16-1>; 848 } SctExtension; 850 struct { 851 LogID log_id; 852 uint64 timestamp; 853 SctExtension sct_extensions<0..2^16-1>; 854 digitally-signed struct { 855 TransItem timestamped_entry; 856 } signature; 857 } SignedCertificateTimestampDataV2; 859 "log_id" is this log's unique ID, encoded in an opaque vector as 860 described in Section 5.3. 862 "timestamp" is equal to the timestamp from the 863 "TimestampedCertificateEntryDataV2" structure encapsulated in the 864 "timestamped_entry". 866 "sct_extension_type" identifies a single extension from the IANA 867 registry in Section 12.4. At the time of writing, no extensions are 868 specified. 870 The interpretation of the "sct_extension_data" field is determined 871 solely by the value of the "sct_extension_type" field. Each document 872 that registers a new "sct_extension_type" must describe how to 873 interpret the corresponding "sct_extension_data". 875 "sct_extensions" is a vector of 0 or more SCT extensions. This 876 vector MUST NOT include more than one extension with the same 877 "sct_extension_type". The extensions in the vector MUST be ordered 878 by the value of the "sct_extension_type" field, smallest value first. 879 If an implementation sees an extension that it does not understand, 880 it SHOULD ignore that extension. Furthermore, an implementation MAY 881 choose to ignore any extension(s) that it does understand. 883 The encoding of the digitally-signed element is defined in [RFC5246]. 885 "timestamped_entry" is a "TransItem" structure that MUST be of type 886 "x509_entry_v2" or "precert_entry_v2" (see Section 5.5). 888 5.7. Merkle Tree Head 890 The log stores information about its Merkle Tree in a "TransItem" 891 structure of type "tree_head_v2", which encapsulates a 892 "TreeHeadDataV2" structure: 894 opaque NodeHash[HASH_SIZE]; 896 struct { 897 uint64 timestamp; 898 uint64 tree_size; 899 NodeHash root_hash; 900 SthExtension sth_extensions<0..2^16-1>; 901 } TreeHeadDataV2; 903 "timestamp" is the current NTP Time [RFC5905], measured in 904 milliseconds since the epoch (January 1, 1970, 00:00), ignoring leap 905 seconds. 907 "tree_size" is the number of entries currently in the log's Merkle 908 Tree. 910 "root_hash" is the root of the Merkle Hash Tree. 912 "sth_extensions" matches the STH extensions of the corresponding STH. 914 5.8. Signed Tree Head (STH) 916 Periodically each log SHOULD sign its current tree head information 917 (see Section 5.7) to produce an STH. When a client requests a log's 918 latest STH (see Section 6.3), the log MUST return an STH that is no 919 older than the log's MMD. However, STHs could be used to mark 920 individual clients (by producing a new one for each query), so logs 921 MUST NOT produce them more frequently than is declared in their 922 metadata. In general, there is no need to produce a new STH unless 923 there are new entries in the log; however, in the unlikely event that 924 it receives no new submissions during an MMD period, the log SHALL 925 sign the same Merkle Tree Hash with a fresh timestamp. 927 An STH is a "TransItem" structure of type "signed_tree_head_v2", 928 which encapsulates a "SignedTreeHeadDataV2" structure: 930 enum { 931 reserved(65535) 932 } SthExtensionType; 934 struct { 935 SthExtensionType sth_extension_type; 936 opaque sth_extension_data<0..2^16-1>; 937 } SthExtension; 939 struct { 940 LogID log_id; 941 uint64 timestamp; 942 uint64 tree_size; 943 NodeHash root_hash; 944 SthExtension sth_extensions<0..2^16-1>; 945 digitally-signed struct { 946 TransItem merkle_tree_head; 947 } signature; 948 } SignedTreeHeadDataV2; 950 "log_id" is this log's unique ID, encoded in an opaque vector as 951 described in Section 5.3. 953 "timestamp" is equal to the timestamp from the "TreeHeadDataV2" 954 structure encapsulated in "merkle_tree_head". This timestamp MUST be 955 at least as recent as the most recent SCT timestamp in the tree. 956 Each subsequent timestamp MUST be more recent than the timestamp of 957 the previous update. 959 "tree_size" is equal to the tree size from the "TreeHeadDataV2" 960 structure encapsulated in "merkle_tree_head". 962 "root_hash" is equal to the root hash from the "TreeHeadDataV2" 963 structure encapsulated in "merkle_tree_head". 965 "sth_extension_type" identifies a single extension from the IANA 966 registry in Section 12.5. At the time of writing, no extensions are 967 specified. 969 The interpretation of the "sth_extension_data" field is determined 970 solely by the value of the "sth_extension_type" field. Each document 971 that registers a new "sth_extension_type" must describe how to 972 interpret the corresponding "sth_extension_data". 974 "sth_extensions" is a vector of 0 or more STH extensions. This 975 vector MUST NOT include more than one extension with the same 976 "sth_extension_type". The extensions in the vector MUST be ordered 977 by the value of the "sth_extension_type" field, smallest value first. 978 If an implementation sees an extension that it does not understand, 979 it SHOULD ignore that extension. Furthermore, an implementation MAY 980 choose to ignore any extension(s) that it does understand. 982 "merkle_tree_head" is a "TransItem" structure that MUST be of type 983 "tree_head_v2" (see Section 5.7). 985 5.9. Merkle Consistency Proofs 987 To prepare a Merkle Consistency Proof for distribution to clients, 988 the log produces a "TransItem" structure of type 989 "consistency_proof_v2", which encapsulates a "ConsistencyProofDataV2" 990 structure: 992 struct { 993 LogID log_id; 994 uint64 tree_size_1; 995 uint64 tree_size_2; 996 NodeHash consistency_path<1..2^8-1>; 997 } ConsistencyProofDataV2; 999 "log_id" is this log's unique ID, encoded in an opaque vector as 1000 described in Section 5.3. 1002 "tree_size_1" is the size of the older tree. 1004 "tree_size_2" is the size of the newer tree. 1006 "consistency_path" is a vector of Merkle Tree nodes proving the 1007 consistency of two STHs. 1009 5.10. Merkle Inclusion Proofs 1011 To prepare a Merkle Inclusion Proof for distribution to clients, the 1012 log produces a "TransItem" structure of type "inclusion_proof_v2", 1013 which encapsulates an "InclusionProofDataV2" structure: 1015 struct { 1016 LogID log_id; 1017 uint64 tree_size; 1018 uint64 leaf_index; 1019 NodeHash inclusion_path<1..2^8-1>; 1020 } InclusionProofDataV2; 1022 "log_id" is this log's unique ID, encoded in an opaque vector as 1023 described in Section 5.3. 1025 "tree_size" is the size of the tree on which this inclusion proof is 1026 based. 1028 "leaf_index" is the 0-based index of the log entry corresponding to 1029 this inclusion proof. 1031 "inclusion_path" is a vector of Merkle Tree nodes proving the 1032 inclusion of the chosen certificate or precertificate. 1034 5.11. Shutting down a log 1036 Log operators may decide to shut down a log for various reasons, such 1037 as deprecation of the signature algorithm. If there are entries in 1038 the log for certificates that have not yet expired, simply making TLS 1039 clients stop recognizing that log will have the effect of 1040 invalidating SCTs from that log. To avoid that, the following 1041 actions are suggested: 1043 o Make it known to clients and monitors that the log will be frozen. 1045 o Stop accepting new submissions (the error code "shutdown" should 1046 be returned for such requests). 1048 o Once MMD from the last accepted submission has passed and all 1049 pending submissions are incorporated, issue a final STH and 1050 publish it as a part of the log's metadata. Having an STH with a 1051 timestamp that is after the MMD has passed from the last SCT 1052 issuance allows clients to audit this log regularly without 1053 special handling for the final STH. At this point the log's 1054 private key is no longer needed and can be destroyed. 1056 o Keep the log running until the certificates in all of its entries 1057 have expired or exist in other logs (this can be determined by 1058 scanning other logs or connecting to domains mentioned in the 1059 certificates and inspecting the SCTs served). 1061 6. Log Client Messages 1063 Messages are sent as HTTPS GET or POST requests. Parameters for 1064 POSTs and all responses are encoded as JavaScript Object Notation 1065 (JSON) objects [RFC4627]. Parameters for GETs are encoded as order- 1066 independent key/value URL parameters, using the "application/x-www- 1067 form-urlencoded" format described in the "HTML 4.01 Specification" 1068 [HTML401]. Binary data is base64 encoded [RFC4648] as specified in 1069 the individual messages. 1071 Note that JSON objects and URL parameters may contain fields not 1072 specified here. These extra fields should be ignored. 1074 The prefix, which is part of the log's metadata, MAY 1075 include a path as well as a server name and a port. 1077 In practice, log servers may include multiple front-end machines. 1078 Since it is impractical to keep these machines in perfect sync, 1079 errors may occur that are caused by skew between the machines. Where 1080 such errors are possible, the front-end will return additional 1081 information (as specified below) making it possible for clients to 1082 make progress, if progress is possible. Front-ends MUST only serve 1083 data that is free of gaps (that is, for example, no front-end will 1084 respond with an STH unless it is also able to prove consistency from 1085 all log entries logged within that STH). 1087 For example, when a consistency proof between two STHs is requested, 1088 the front-end reached may not yet be aware of one or both STHs. In 1089 the case where it is unaware of both, it will return the latest STH 1090 it is aware of. Where it is aware of the first but not the second, 1091 it will return the latest STH it is aware of and a consistency proof 1092 from the first STH to the returned STH. The case where it knows the 1093 second but not the first should not arise (see the "no gaps" 1094 requirement above). 1096 If the log is unable to process a client's request, it MUST return an 1097 HTTP response code of 4xx/5xx (see [RFC2616]), and, in place of the 1098 responses outlined in the subsections below, the body SHOULD be a 1099 JSON structure containing at least the following field: 1101 error_message: A human-readable string describing the error which 1102 prevented the log from processing the request. 1104 In the case of a malformed request, the string SHOULD provide 1105 sufficient detail for the error to be rectified. 1107 error_code: An error code readable by the client. Some codes are 1108 generic and are detailed here. Others are detailed in the 1109 individual requests. Error codes are fixed text strings. 1111 not compliant The request is not compliant with this RFC. 1113 e.g. In response to a request of "/ct/v2/get- 1114 entries?start=100&end=99", the log would return a "400 Bad Request" 1115 response code with a body similar to the following: 1117 { 1118 "error_message": "'start' cannot be greater than 'end'", 1119 "error_code": "not compliant", 1120 } 1122 Clients SHOULD treat "500 Internal Server Error" and "503 Service 1123 Unavailable" responses as transient failures and MAY retry the same 1124 request without modification at a later date. Note that as per 1125 [RFC2616], in the case of a 503 response the log MAY include a 1126 "Retry-After:" header in order to request a minimum time for the 1127 client to wait before retrying the request. 1129 6.1. Add Chain to Log 1131 POST https:///ct/v2/add-chain 1133 Inputs: 1135 chain: An array of base64 encoded certificates. The first 1136 element is the certificate for which the submitter desires an 1137 SCT; the second certifies the first and so on to the last, 1138 which either is, or is certified by, an accepted trust anchor. 1140 Outputs: 1142 sct: A base64 encoded "TransItem" of type "x509_sct_v2", signed 1143 by this log, that corresponds to the submitted certificate. 1145 Error codes: 1147 unknown anchor The last certificate in the chain both is not, and 1148 is not certified by, an accepted trust anchor. 1150 bad chain The alleged chain is not actually a chain of 1151 certificates. 1153 bad certificate One or more certificates in the chain are not 1154 valid (e.g. not properly encoded). 1156 shutdown The log has ceased operation and is not accepting new 1157 submissions. 1159 If the version of "sct" is not v2, then a v2 client may be unable to 1160 verify the signature. It MUST NOT construe this as an error. This 1161 is to avoid forcing an upgrade of compliant v2 clients that do not 1162 use the returned SCTs. 1164 If a log detects bad encoding in a chain that otherwise verifies 1165 correctly then the log MUST either log the certificate or return the 1166 "bad certificate" error. If the certificate is logged, an SCT MUST 1167 be issued. Logging the certificate is useful, because monitors 1168 (Section 10.3) can then detect these encoding errors, which may be 1169 accepted by some TLS clients. 1171 6.2. Add PreCertChain to Log 1173 POST https:///ct/v2/add-pre-chain 1175 Inputs: 1177 precertificate: The base64 encoded precertificate. 1179 chain: An array of base64 encoded CA certificates. The first 1180 element is the signer of the precertificate; the second 1181 certifies the first and so on to the last, which either is, or 1182 is certified by, an accepted trust anchor. 1184 Outputs: 1186 sct: A base64 encoded "TransItem" of type "precert_sct_v2", 1187 signed by this log, that corresponds to the submitted 1188 precertificate. 1190 Errors are the same as in Section 6.1. 1192 6.3. Retrieve Latest Signed Tree Head 1194 GET https:///ct/v2/get-sth 1196 No inputs. 1198 Outputs: 1200 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1201 signed by this log, that is no older than the log's MMD. 1203 6.4. Retrieve Merkle Consistency Proof between Two Signed Tree Heads 1205 GET https:///ct/v2/get-sth-consistency 1207 Inputs: 1209 first: The tree_size of the older tree, in decimal. 1211 second: The tree_size of the newer tree, in decimal (optional). 1213 Both tree sizes must be from existing v2 STHs. However, because 1214 of skew, the receiving front-end may not know one or both of the 1215 existing STHs. If both are known, then only the "consistency" 1216 output is returned. If the first is known but the second is not 1217 (or has been omitted), then the latest known STH is returned, 1218 along with a consistency proof between the first STH and the 1219 latest. If neither are known, then the latest known STH is 1220 returned without a consistency proof. 1222 Outputs: 1224 consistency: A base64 encoded "TransItem" of type 1225 "consistency_proof_v2", whose "tree_size_1" MUST match the 1226 "first" input. If the "sth" output is omitted, then 1227 "tree_size_2" MUST match the "second" input. 1229 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1230 signed by this log. 1232 Note that no signature is required for the "consistency" output as 1233 it is used to verify the consistency between two STHs, which are 1234 signed. 1236 Error codes: 1238 first unknown "first" is before the latest known STH but is not 1239 from an existing STH. 1241 second unknown "second" is before the latest known STH but is not 1242 from an existing STH. 1244 See Section 10.4.2 for an outline of how to use the "consistency" 1245 output. 1247 6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash 1249 GET https:///ct/v2/get-proof-by-hash 1251 Inputs: 1253 hash: A base64 encoded v2 leaf hash. 1255 tree_size: The tree_size of the tree on which to base the proof, 1256 in decimal. 1258 The "hash" must be calculated as defined in Section 5.5. The 1259 "tree_size" must designate an existing v2 STH. Because of skew, 1260 the front-end may not know the requested STH. In that case, it 1261 will return the latest STH it knows, along with an inclusion proof 1262 to that STH. If the front-end knows the requested STH then only 1263 "inclusion" is returned. 1265 Outputs: 1267 inclusion: A base64 encoded "TransItem" of type 1268 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1269 Tree nodes proves the inclusion of the chosen certificate in 1270 the selected STH. 1272 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1273 signed by this log. 1275 Note that no signature is required for the "inclusion" output as 1276 it is used to verify inclusion in the selected STH, which is 1277 signed. 1279 Error codes: 1281 hash unknown "hash" is not the hash of a known leaf (may be 1282 caused by skew or by a known certificate not yet merged). 1284 tree_size unknown "hash" is before the latest known STH but is 1285 not from an existing STH. 1287 See Section 10.4.1 for an outline of how to use the "inclusion" 1288 output. 1290 6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and Consistency 1291 Proof by Leaf Hash 1293 GET https:///ct/v2/get-all-by-hash 1295 Inputs: 1297 hash: A base64 encoded v2 leaf hash. 1299 tree_size: The tree_size of the tree on which to base the proofs, 1300 in decimal. 1302 The "hash" must be calculated as defined in Section 5.5. The 1303 "tree_size" must designate an existing v2 STH. 1305 Because of skew, the front-end may not know the requested STH or 1306 the requested hash, which leads to a number of cases. 1308 latest STH < requested STH Return latest STH. 1310 latest STH > requested STH Return latest STH and a consistency 1311 proof between it and the requested STH (see Section 6.4). 1313 index of requested hash < latest STH Return "inclusion". 1315 Note that more than one case can be true, in which case the 1316 returned data is their concatenation. It is also possible for 1317 none to be true, in which case the front-end MUST return an empty 1318 response. 1320 Outputs: 1322 inclusion: A base64 encoded "TransItem" of type 1323 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1324 Tree nodes proves the inclusion of the chosen certificate in 1325 the returned STH. 1327 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1328 signed by this log. 1330 consistency: A base64 encoded "TransItem" of type 1331 "consistency_proof_v2" that proves the consistency of the 1332 requested STH and the returned STH. 1334 Note that no signature is required for the "inclusion" or 1335 "consistency" outputs as they are used to verify inclusion in and 1336 consistency of STHs, which are signed. 1338 Errors are the same as in Section 6.5. 1340 See Section 10.4.1 for an outline of how to use the "inclusion" 1341 output, and see Section 10.4.2 for an outline of how to use the 1342 "consistency" output. 1344 6.7. Retrieve Entries and STH from Log 1346 GET https:///ct/v2/get-entries 1348 Inputs: 1350 start: 0-based index of first entry to retrieve, in decimal. 1352 end: 0-based index of last entry to retrieve, in decimal. 1354 Outputs: 1356 entries: An array of objects, each consisting of 1358 leaf_input: The base64 encoded "TransItem" structure of type 1359 "x509_entry_v2" or "precert_entry_v2" (see Section 5.5). 1361 log_entry: The base64 encoded log entry (see Section 5.2). In 1362 the case of an "x509_entry_v2" entry, this is the whole 1363 "X509ChainEntry"; and in the case of a "precert_entry_v2", 1364 this is the whole "PrecertChainEntryV2". 1366 sct: The base64 encoded "TransItem" of type "x509_sct_v2" or 1367 "precert_sct_v2" corresponding to this log entry. 1369 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1370 signed by this log. 1372 Note that this message is not signed -- the "entries" data can be 1373 verified by constructing the Merkle Tree Hash corresponding to a 1374 retrieved STH. All leaves MUST be v2. However, a compliant v2 1375 client MUST NOT construe an unrecognized TransItem type as an error. 1376 This means it may be unable to parse some entries, but note that each 1377 client can inspect the entries it does recognize as well as verify 1378 the integrity of the data by treating unrecognized leaves as opaque 1379 input to the tree. 1381 The "start" and "end" parameters SHOULD be within the range 0 <= x < 1382 "tree_size" as returned by "get-sth" in Section 6.3. 1384 The "start" parameter MUST be less than or equal to the "end" 1385 parameter. 1387 Log servers MUST honor requests where 0 <= "start" < "tree_size" and 1388 "end" >= "tree_size" by returning a partial response covering only 1389 the valid entries in the specified range. "end" >= "tree_size" could 1390 be caused by skew. Note that the following restriction may also 1391 apply: 1393 Logs MAY restrict the number of entries that can be retrieved per 1394 "get-entries" request. If a client requests more than the permitted 1395 number of entries, the log SHALL return the maximum number of entries 1396 permissible. These entries SHALL be sequential beginning with the 1397 entry specified by "start". 1399 Because of skew, it is possible the log server will not have any 1400 entries between "start" and "end". In this case it MUST return an 1401 empty "entries" array. 1403 In any case, the log server MUST return the latest STH it knows 1404 about. 1406 See Section 10.4.3 for an outline of how to use a complete list of 1407 "leaf_input" entries to verify the "root_hash". 1409 6.8. Retrieve Accepted Trust Anchors 1411 GET https:///ct/v2/get-anchors 1413 No inputs. 1415 Outputs: 1417 certificates: An array of base64 encoded trust anchors that are 1418 acceptable to the log. 1420 max_chain: If the server has chosen to limit the length of chains 1421 it accepts, this is the maximum number of certificates in the 1422 chain, in decimal. If there is no limit, this is omitted. 1424 7. Optional Client Messages 1426 Logs MAY implement these messages. They are not required for correct 1427 operation of logs or their clients, but may be convenient in some 1428 circumstances. Note that mirrors can implement these even if the log 1429 they are mirroring does not. 1431 7.1. Get Entry Number for SCT 1433 GET https:///ct/v2/get-entry-for-sct 1435 Inputs: 1437 sct: A base64 encoded "TransItem" of type "x509_sct_v2" or 1438 "precert_sct_v2" signed by this log. 1440 Outputs: 1442 entry: 0-based index of the log entry corresponding to the 1443 supplied SCT. 1445 Error codes: 1447 bad signature "sct" is not signed by this log. 1449 not found "sct" does not correspond to an entry that is currently 1450 available. 1452 Note that any SCT signed by a log MUST have a corresponding entry in 1453 the log, but it may not be retrievable until the MMD has passed since 1454 the SCT was issued. 1456 7.2. Get Entry Numbers for Certificate 1458 GET https:///ct/v2/get-entry-for-certificate 1460 Inputs: 1462 hash: A base64 encoded HASH of a "TBSCertificate". Note that if 1463 the certificate has redacted labels then the "TBSCertificate" 1464 must be constructed as described above (Section 4.2). 1466 Outputs: 1468 entries: An array of 0-based indices of log entries corresponding 1469 to the supplied HASH. 1471 Error codes: 1473 bad hash "hash" is not the right size or format. 1475 not found "sct" does not correspond to an entry that is currently 1476 available. 1478 Note that it is possible for a certificate to be logged more than 1479 once. If that is the case, the log MAY return more than one entry 1480 index. If the certificate is present in the log, then the log MUST 1481 return at least one entry index. 1483 8. TLS Servers 1485 TLS servers MUST use at least one of the three mechanisms listed 1486 below to present one or more SCTs from one or more logs to each TLS 1487 client during full TLS handshakes, where each SCT corresponds to the 1488 server certificate or to a name-constrained intermediate the server 1489 certificate chains to. TLS servers SHOULD also present corresponding 1490 inclusion proofs and STHs (see Section 8.3). 1492 Three mechanisms are provided because they have different tradeoffs. 1494 o A TLS extension (Section 7.4.1.4 of [RFC5246]) with type 1495 "transparency_info" (see Section 8.5). This mechanism allows TLS 1496 servers to participate in CT without the cooperation of CAs, 1497 unlike the other two mechanisms. It also allows SCTs and 1498 inclusion proofs to be updated on the fly. 1500 o An Online Certificate Status Protocol (OCSP) [RFC6960] response 1501 extension (see Section 9.1.1), where the OCSP response is provided 1502 in the "CertificateStatus" message, provided that the TLS client 1503 included the "status_request" extension in the (extended) 1504 "ClientHello" (Section 8 of [RFC6066]). This mechanism, popularly 1505 known as OCSP stapling, is already widely (but not universally) 1506 implemented. It also allows SCTs and inclusion proofs to be 1507 updated on the fly. 1509 o An X509v3 certificate extension (see Section 9.1.2). This 1510 mechanism allows the use of unmodified TLS servers, but the SCTs 1511 and inclusion proofs cannot be updated on the fly. Since the logs 1512 from where the SCTs and inclusion proofs originated won't 1513 necessarily be accepted by TLS clients for the full lifetime of 1514 the certificate, there is a risk that TLS clients will 1515 subsequently consider the certificate to be non-compliant and in 1516 need of re-issuance. 1518 Additionally, a TLS server which supports presenting SCTs using an 1519 OCSP response MAY provide it when the TLS client included the 1520 "status_request_v2" extension ([RFC6961]) in the (extended) 1521 "ClientHello", but only in addition to at least one of the three 1522 mechanisms listed above. 1524 8.1. Multiple SCTs 1526 TLS servers SHOULD send SCTs from multiple logs in case one or more 1527 logs are not acceptable to the TLS client (for example, if a log has 1528 been struck off for misbehavior, has had a key compromise, or is not 1529 known to the TLS client). For example: 1531 o If a CA and a log collude, it is possible to temporarily hide 1532 misissuance from clients. Including SCTs from different logs 1533 makes it more difficult to mount this attack. 1535 o If a log misbehaves, a consequence may be that clients cease to 1536 trust it. Since the time an SCT may be in use can be considerable 1537 (several years is common in current practice when embedded in a 1538 certificate), servers may wish to reduce the probability of their 1539 certificates being rejected as a result by including SCTs from 1540 different logs. 1542 o TLS clients may have policies related to the above risks requiring 1543 servers to present multiple SCTs. For example, at the time of 1544 writing, Chromium [Chromium.Log.Policy] requires multiple SCTs to 1545 be presented with EV certificates in order for the EV indicator to 1546 be shown. 1548 To select the logs from which to obtain SCTs, a TLS server can, for 1549 example, examine the set of logs popular TLS clients accept and 1550 recognize. 1552 8.2. TransItemList Structure 1554 Multiple SCTs, inclusion proofs, and indeed "TransItem" structures of 1555 any type, are combined into a list as follows: 1557 opaque SerializedTransItem<1..2^16-1>; 1559 struct { 1560 SerializedTransItem trans_item_list<1..2^16-1>; 1561 } TransItemList; 1563 Here, "SerializedTransItem" is an opaque byte string that contains 1564 the serialized "TransItem" structure. This encoding ensures that TLS 1565 clients can decode each "TransItem" individually (so, for example, if 1566 there is a version upgrade, out-of-date clients can still parse old 1567 "TransItem" structures while skipping over new "TransItem" structures 1568 whose versions they don't understand). 1570 8.3. Presenting SCTs, inclusion proofs and STHs 1572 When constructing a "TransItemList" structure, a TLS server SHOULD 1573 construct and include "TransItem" structures of type 1574 "x509_sct_with_proof_v2" (for an SCT of type "x509_sct_v2") or 1575 "precert_sct_with_proof_v2" (for an SCT of type "precert_sct_v2"), 1576 both of which encapsulate a "SCTWithProofDataV2" structure: 1578 struct { 1579 SignedCertificateTimestampDataV2 sct; 1580 SignedTreeHeadDataV2 sth; 1581 InclusionProofDataV2 inclusion_proof; 1582 } SCTWithProofDataV2; 1584 "sct" is the encapsulated data structure from an SCT that corresponds 1585 to the server certificate or to a name-constrained intermediate the 1586 server certificate chains to. 1588 "sth" is the encapsulated data structure from an STH that was signed 1589 by the same log as "sct". 1591 "inclusion_proof" is the encapsulated data structure from an 1592 inclusion proof that corresponds to "sct" and can be used to compute 1593 the root in "sth". 1595 8.4. Presenting SCTs only 1597 Presenting inclusion proofs and STHs in the TLS handshake helps to 1598 protect the client's privacy (see Section 10.2.5) and reduces load on 1599 log servers. However, if a TLS server is unable to obtain an 1600 inclusion proof and STH that correspond to an SCT, then it MUST 1601 include "TransItem" structures of type "x509_sct_v2" or 1602 "precert_sct_v2" in the "TransItemList". 1604 8.5. transparency_info TLS Extension 1606 Provided that a TLS client includes the "transparency_info" extension 1607 type in the ClientHello, the TLS server SHOULD include the 1608 "transparency_info" extension in the ServerHello with 1609 "extension_data" set to a "TransItemList". The TLS server SHOULD 1610 ignore any "extension_data" sent by the TLS client. Additionally, 1611 the TLS server MUST NOT process or include this extension when a TLS 1612 session is resumed, since session resumption uses the original 1613 session information. 1615 9. Certification Authorities 1617 9.1. Transparency Information X.509v3 Extension 1619 The Transparency Information X.509v3 extension, which has OID 1620 1.3.101.75 and SHOULD be non-critical, contains one or more 1621 "TransItem" structures in a "TransItemList". This extension MAY be 1622 included in OCSP responses (see Section 9.1.1) and certificates (see 1623 Section 9.1.2). Since RFC5280 requires the "extnValue" field (an 1624 OCTET STRING) of each X.509v3 extension to include the DER encoding 1625 of an ASN.1 value, a "TransItemList" MUST NOT be included directly. 1626 Instead, it MUST be wrapped inside an additional OCTET STRING, which 1627 is then put into the "extnValue" field: 1629 TransparencyInformationSyntax ::= OCTET STRING 1631 "TransparencyInformationSyntax" contains a "TransItemList". 1633 9.1.1. OCSP Response Extension 1635 A certification authority MAY include a Transparency Information 1636 X.509v3 extension in the "singleExtensions" of a "SingleResponse" in 1637 an OCSP response. The included SCTs or inclusion proofs MUST be for 1638 the certificate identified by the "certID" of that "SingleResponse", 1639 or for a precertificate that corresponds to that certificate, or for 1640 a name-constrained intermediate to which that certificate chains. 1642 9.1.2. Certificate Extension 1644 A certification authority MAY include a Transparency Information 1645 X.509v3 extension in a certificate. Any included SCTs or inclusion 1646 proofs MUST be either for a precertificate that corresponds to this 1647 certificate, or for a name-constrained intermediate to which this 1648 certificate chains. 1650 9.2. TLS Feature Extension 1652 A certification authority MAY include the transparency_info 1653 (Section 8.5) TLS extension identifier in the TLS Feature [RFC7633] 1654 certificate extension in root, intermediate and end-entity 1655 certificates. When a certificate chain includes such a certificate, 1656 this indicates that CT compliance is required. 1658 10. Clients 1660 There are various different functions clients of logs might perform. 1661 We describe here some typical clients and how they should function. 1662 Any inconsistency may be used as evidence that a log has not behaved 1663 correctly, and the signatures on the data structures prevent the log 1664 from denying that misbehavior. 1666 All clients need various metadata in order to communicate with logs 1667 and verify their responses. This metadata is described below, but 1668 note that this document does not describe how the metadata is 1669 obtained, which is implementation dependent (see, for example, 1670 [Chromium.Policy]). 1672 Clients should somehow exchange STHs they see, or make them available 1673 for scrutiny, in order to ensure that they all have a consistent 1674 view. The exact mechanisms will be in separate documents, but it is 1675 expected there will be a variety. 1677 10.1. Metadata 1679 In order to communicate with and verify a log, clients need metadata 1680 about the log. 1682 Base URL: The URL to substitute for in Section 6. 1684 Hash Algorithm The hash algorithm used for the Merkle Tree (see 1685 Section 12.2). 1687 Signing Algorithm The signing algorithm used (see Section 2.1.4). 1689 Public Key The public key used to verify signatures generated by the 1690 log. A log MUST NOT use the same keypair as any other log. 1692 Log ID The OID that uniquely identifies the log. 1694 Maximum Merge Delay The MMD the log has committed to. 1696 Version The version of the protocol supported by the log (currently 1697 1 or 2). 1699 Maximum Chain Length The longest chain submission the log is willing 1700 to accept, if the log chose to limit it. 1702 STH Frequency Count The maximum number of STHs the log may produce 1703 in any period equal to the "Maximum Merge Delay" (see 1704 Section 5.8). 1706 Final STH If a log has been closed down (i.e. no longer accepts new 1707 entries), existing entries may still be valid. In this case, the 1708 client should know the final valid STH in the log to ensure no new 1709 entries can be added without detection. The final STH should be 1710 provided in the form of a TransItem of type signed_tree_head_v2. 1712 [JSON.Metadata] is an example of a metadata format which includes the 1713 above elements. 1715 10.2. TLS Client 1717 10.2.1. Receiving SCTs 1719 TLS clients receive SCTs alongside or in certificates. TLS clients 1720 MUST implement all of the three mechanisms by which TLS servers may 1721 present SCTs (see Section 8). TLS clients MAY also accept SCTs via 1722 the "status_request_v2" extension ([RFC6961]). TLS clients that 1723 support the "transparency_info" TLS extension SHOULD include it in 1724 ClientHello messages, with empty "extension_data". TLS clients may 1725 also receive inclusion proofs in addition to SCTs, which should be 1726 checked once the SCTs are validated. 1728 10.2.2. Reconstructing the TBSCertificate 1730 To reconstruct the TBSCertificate component of a precertificate from 1731 a certificate, TLS clients should: 1733 o Remove the Transparency Information extension described in 1734 Section 9.1. 1736 o If the redactedSubjectAltName extension (Section 4.2.2) is 1737 present: 1739 * TLS clients MUST verify it against the subjectAltName extension 1740 according to Section 10.2.3. 1742 * Once verified, remove the subjectAltName extension from the 1743 TBSCertificate. 1745 If the SCT checked is for a Precertificate (where the "type" of the 1746 "TransItem" is "precert_sct_v2"), then the client SHOULD also remove 1747 embedded v1 SCTs, identified by OID 1.3.6.1.4.1.11129.2.4.2 (See 1748 Section 3.3. of [RFC6962]), in the process of reconstructing the 1749 TBSCertificate. That is to allow embedded v1 and v2 SCTs to co-exist 1750 in a certificate (See Appendix A). 1752 10.2.3. Verifying the redactedSubjectAltName extension 1754 If the redactedSubjectAltName extension is present, TLS clients MUST 1755 check that the subjectAltName extension is present, that the 1756 subjectAltName extension contains the same number of entries as the 1757 redactedSubjectAltName extension, and that each entry in the 1758 subjectAltName extension has a matching entry at the same position in 1759 the redactedSubjectAltName extension. Two entries are matching if 1760 either: 1762 o The two entries are identical; or, 1764 o Both entries are DNS-IDs, have the same number of labels, and each 1765 label in the subjectAltName entry has a matching label at the same 1766 position in the redactedSubjectAltName entry. Two labels are 1767 matching if either: 1769 * The two labels are identical; or, 1771 * Neither label is "*" and the label from the 1772 redactedSubjectAltName entry is equal to REDACT(label from 1773 subjectAltName entry) (Section 4.2.1). 1775 If any of these checks fail, the certificate MUST NOT be considered 1776 compliant. 1778 10.2.4. Validating SCTs 1780 In addition to normal validation of the server certificate and its 1781 chain, TLS clients SHOULD validate each received SCT for which they 1782 have the corresponding log's metadata. To validate an SCT, a TLS 1783 client computes the signature input from the SCT data and the 1784 corresponding certificate, and then verifies the signature using the 1785 corresponding log's public key. TLS clients MUST NOT consider valid 1786 any SCT whose timestamp is in the future. 1788 Before considering any SCT to be invalid, the TLS client MUST attempt 1789 to validate it against the server certificate and against each of the 1790 zero or more suitable name-constrained intermediates (Section 4.3) in 1791 the chain. These certificates may be evaluated in the order they 1792 appear in the chain, or, indeed, in any order. 1794 10.2.5. Validating inclusion proofs 1796 After validating a received SCT, a TLS client MAY request a 1797 corresponding inclusion proof (if one is not already available) and 1798 then verify it. An inclusion proof can be requested directly from a 1799 log using "get-proof-by-hash" (Section 6.5) or "get-all-by-hash" 1800 (Section 6.6), but note that this will disclose to the log which TLS 1801 server the client has been communicating with. 1803 Alternatively, if the TLS client has received an inclusion proof (and 1804 an STH) alongside the SCT, it can proceed to verifying the inclusion 1805 proof to the provided STH. The client then has to verify consistency 1806 between the provided STH and an STH it knows about, which is less 1807 sensitive from a privacy perspective. 1809 TLS clients SHOULD also verify each received inclusion proof (see 1810 Section 10.4.1) for which they have the corresponding log's metadata, 1811 to audit the log and gain confidence that the certificate is logged. 1813 If the TLS client holds an STH that predates the SCT, it MAY, in the 1814 process of auditing, request a new STH from the log (Section 6.3), 1815 then verify it by requesting a consistency proof (Section 6.4). Note 1816 that if the TLS client uses "get-all-by-hash", then it will already 1817 have the new STH. 1819 10.2.6. Evaluating compliance 1821 To be considered compliant, a certificate MUST be accompanied by at 1822 least one valid SCT. A certificate not accompanied by any valid SCTs 1823 MUST NOT be considered compliant by TLS clients. 1825 10.2.7. TLS Feature Extension 1827 If any certificate in a chain includes the transparency_info 1828 (Section 8.5) TLS extension identifier in the TLS Feature [RFC7633] 1829 certificate extension, then CT compliance (using any of the 1830 mechanisms from Section 8) is required. 1832 10.2.8. Handling of Non-compliance 1834 If a TLS server presents a certificate chain that is non-compliant, 1835 and the use of a compliant certificate is mandated by an explicit 1836 security policy, application protocol specification, the TLS Feature 1837 extension or any other means, the TLS client MUST refuse the 1838 connection. 1840 10.3. Monitor 1842 Monitors watch logs to check that they behave correctly, for 1843 certificates of interest, or both. For example, a monitor may be 1844 configured to report on all certificates that apply to a specific 1845 domain name when fetching new entries for consistency validation. 1847 A monitor needs to, at least, inspect every new entry in each log it 1848 watches. It may also want to keep copies of entire logs. In order 1849 to do this, it should follow these steps for each log: 1851 1. Fetch the current STH (Section 6.3). 1853 2. Verify the STH signature. 1855 3. Fetch all the entries in the tree corresponding to the STH 1856 (Section 6.7). 1858 4. Confirm that the tree made from the fetched entries produces the 1859 same hash as that in the STH. 1861 5. Fetch the current STH (Section 6.3). Repeat until the STH 1862 changes. 1864 6. Verify the STH signature. 1866 7. Fetch all the new entries in the tree corresponding to the STH 1867 (Section 6.7). If they remain unavailable for an extended 1868 period, then this should be viewed as misbehavior on the part of 1869 the log. 1871 8. Either: 1873 1. Verify that the updated list of all entries generates a tree 1874 with the same hash as the new STH. 1876 Or, if it is not keeping all log entries: 1878 1. Fetch a consistency proof for the new STH with the previous 1879 STH (Section 6.4). 1881 2. Verify the consistency proof. 1883 3. Verify that the new entries generate the corresponding 1884 elements in the consistency proof. 1886 9. Go to Step 5. 1888 10.4. Auditing 1890 Auditing ensures that the current published state of a log is 1891 reachable from previously published states that are known to be good, 1892 and that the promises made by the log in the form of SCTs have been 1893 kept. Audits are performed by monitors or TLS clients. 1895 In particular, there are four log behaviour properties that should be 1896 checked: 1898 o The Maximum Merge Delay (MMD). 1900 o The STH Frequency Count. 1902 o The append-only property. 1904 o The consistency of the log view presented to all query sources. 1906 A benign, conformant log publishes a series of STHs over time, each 1907 derived from the previous STH and the submitted entries incorporated 1908 into the log since publication of the previous STH. This can be 1909 proven through auditing of STHs. SCTs returned to TLS clients can be 1910 audited by verifying against the accompanying certificate, and using 1911 Merkle Inclusion Proofs, against the log's Merkle tree. 1913 The action taken by the auditor if an audit fails is not specified, 1914 but note that in general if audit fails, the auditor is in possession 1915 of signed proof of the log's misbehavior. 1917 A monitor (Section 10.3) can audit by verifying the consistency of 1918 STHs it receives, ensure that each entry can be fetched and that the 1919 STH is indeed the result of making a tree from all fetched entries. 1921 A TLS client (Section 10.2) can audit by verifying an SCT against any 1922 STH dated after the SCT timestamp + the Maximum Merge Delay by 1923 requesting a Merkle inclusion proof (Section 6.5). It can also 1924 verify that the SCT corresponds to the certificate it arrived with 1925 (i.e. the log entry is that certificate, is a precertificate for that 1926 certificate or is an appropriate name-constrained intermediate [see 1927 Section 4.3]). 1929 Checking of the consistency of the log view presented to all entities 1930 is more difficult to perform because it requires a way to share log 1931 responses among a set of CT-aware entities, and is discussed in 1932 Section 13.4. 1934 The following algorithm outlines may be useful for clients that wish 1935 to perform various audit operations. 1937 10.4.1. Verifying an inclusion proof 1939 When a client has received a "TransItem" of type "inclusion_proof_v2" 1940 and wishes to verify inclusion of an input "hash" for an STH with a 1941 given "tree_size" and "root_hash", the following algorithm may be 1942 used to prove the "hash" was included in the "root_hash": 1944 1. Compare "leaf_index" against "tree_size". If "leaf_index" is 1945 greater than or equal to "tree_size" fail the proof verification. 1947 2. Set "fn" to "leaf_index" and "sn" to "tree_size - 1". 1949 3. Set "r" to "hash". 1951 4. For each value "p" in the "inclusion_path" array: 1953 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 1955 1. Set "r" to "HASH(0x01 || p || r)" 1957 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 1958 equally until either "LSB(fn)" is set or "fn" is "0". 1960 Otherwise: 1962 Set "r" to "HASH(0x01 || r || p)" 1964 Finally, right-shift both "fn" and "sn" one time. 1966 5. Compare "sn" to 0. Compare "r" against the "root_hash". If "sn" 1967 is equal to 0, and "r" and the "root_hash" are equal, then the 1968 log has proven the inclusion of "hash". Otherwise, fail the 1969 proof verification. 1971 10.4.2. Verifying consistency between two STHs 1973 When a client has an STH "first_hash" for tree size "first", an STH 1974 "second_hash" for tree size "second" where "0 < first < second", and 1975 has received a "TransItem" of type "consistency_proof_v2" that they 1976 wish to use to verify both hashes, the following algorithm may be 1977 used: 1979 1. If "first" is an exact power of 2, then prepend "first_hash" to 1980 the "consistency_path" array. 1982 2. Set "fn" to "first - 1" and "sn" to "second - 1". 1984 3. If "LSB(fn)" is set, then right-shift both "fn" and "sn" equally 1985 until "LSB(fn)" is not set. 1987 4. Set both "fr" and "sr" to the first value in the 1988 "consistency_path" array. 1990 5. For each subsequent value "c" in the "consistency_path" array: 1992 If "sn" is 0, stop the iteration and fail the proof verification. 1994 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 1996 1. Set "fr" to "HASH(0x01 || c || fr)" 1997 Set "sr" to "HASH(0x01 || c || sr)" 1999 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 2000 equally until either "LSB(fn)" is set or "fn" is "0". 2002 Otherwise: 2004 Set "sr" to "HASH(0x01 || sr || c)" 2006 Finally, right-shift both "fn" and "sn" one time. 2008 6. After completing iterating through the "consistency_path" array 2009 as described above, verify that the "fr" calculated is equal to 2010 the "first_hash" supplied, that the "sr" calculated is equal to 2011 the "second_hash" supplied and that "sn" is 0. 2013 10.4.3. Verifying root hash given entries 2015 When a client has a complete list of leaf input "entries" from "0" up 2016 to "tree_size - 1" and wishes to verify this list against an STH 2017 "root_hash" returned by the log for the same "tree_size", the 2018 following algorithm may be used: 2020 1. Set "stack" to an empty stack. 2022 2. For each "i" from "0" up to "tree_size - 1": 2024 1. Push "HASH(0x00 || entries[i])" to "stack". 2026 2. Set "merge_count" to the lowest value ("0" included) such 2027 that "LSB(i >> merge_count)" is not set. In other words, set 2028 "merge_count" to the number of consecutive "1"s found 2029 starting at the least significant bit of "i". 2031 3. Repeat "merge_count" times: 2033 1. Pop "right" from "stack". 2035 2. Pop "left" from "stack". 2037 3. Push "HASH(0x01 || left || right)" to "stack". 2039 3. If there is more than one element in the "stack", repeat the same 2040 merge procedure (Step 2.3 above) until only a single element 2041 remains. 2043 4. The remaining element in "stack" is the Merkle Tree hash for the 2044 given "tree_size" and should be compared by equality against the 2045 supplied "root_hash". 2047 11. Algorithm Agility 2049 It is not possible for a log to change any of its algorithms part way 2050 through its lifetime: 2052 Signature algorithm: SCT signatures must remain valid so signature 2053 algorithms can only be added, not removed. 2055 Hash algorithm: A log would have to support the old and new hash 2056 algorithms to allow backwards-compatibility with clients that are 2057 not aware of a hash algorithm change. 2059 Allowing multiple signature or hash algorithms for a log would 2060 require that all data structures support it and would significantly 2061 complicate client implementation, which is why it is not supported by 2062 this document. 2064 If it should become necessary to deprecate an algorithm used by a 2065 live log, then the log should be frozen as specified in Section 10.1 2066 and a new log should be started. Certificates in the frozen log that 2067 have not yet expired and require new SCTs SHOULD be submitted to the 2068 new log and the SCTs from that log used instead. 2070 12. IANA Considerations 2072 12.1. TLS Extension Type 2074 IANA is asked to allocate an RFC 5246 ExtensionType value for the 2075 "transparency_info" TLS extension. IANA should update this extension 2076 type to point at this document. 2078 12.2. Hash Algorithms 2080 IANA is asked to establish a registry of hash values, initially 2081 consisting of: 2083 +-------+----------------------+ 2084 | Index | Hash | 2085 +-------+----------------------+ 2086 | 0 | SHA-256 [FIPS.180-4] | 2087 +-------+----------------------+ 2089 12.3. Signature Algorithms 2091 IANA is asked to establish a registry of signature algorithm values, 2092 initially consisting of: 2094 +-------+-----------------------------------------------------------+ 2095 | Index | Signature Algorithm | 2096 +-------+-----------------------------------------------------------+ 2097 | 0 | deterministic ECDSA [RFC6979] using the NIST P-256 curve | 2098 | | (Section D.1.2.3 of the Digital Signature Standard [DSS]) | 2099 | | and HMAC-SHA256 | 2100 | 1 | RSA signatures (RSASSA-PKCS1-v1_5 with SHA-256, Section | 2101 | | 8.2 of [RFC3447]) using a key of at least 2048 bits. | 2102 +-------+-----------------------------------------------------------+ 2104 12.4. SCT Extensions 2106 IANA is asked to establish a registry of SCT extensions, initially 2107 consisting of: 2109 +-------+-----------+ 2110 | Type | Extension | 2111 +-------+-----------+ 2112 | 65535 | reserved | 2113 +-------+-----------+ 2115 TBD: policy for adding to the registry 2117 12.5. STH Extensions 2119 IANA is asked to establish a registry of STH extensions, initially 2120 consisting of: 2122 +-------+-----------+ 2123 | Type | Extension | 2124 +-------+-----------+ 2125 | 65535 | reserved | 2126 +-------+-----------+ 2128 TBD: policy for adding to the registry 2130 12.6. Object Identifiers 2132 This document uses object identifiers (OIDs) to identify Log IDs (see 2133 Section 5.3), the precertificate CMS "eContentType" (see 2134 Section 3.2), and X.509v3 extensions in certificates (see 2135 Section 4.2.2, Section 4.3 and Section 9.1.2) and OCSP responses (see 2136 Section 9.1.1). The OIDs are defined in an arc that was selected due 2137 to its short encoding. 2139 12.6.1. Log ID Registry 1 2141 All OIDs in the range from 1.3.101.8192 to 1.3.101.16383 have been 2142 reserved. This is a limited resource of 8,192 OIDs, each of which 2143 has an encoded length of 4 octets. 2145 IANA is requested to establish a registry that will allocate Log IDs 2146 from this range. 2148 TBD: policy for adding to the registry. Perhaps "Expert Review"? 2150 12.6.2. Log ID Registry 2 2152 The 1.3.101.80 arc has been delegated. This is an unlimited 2153 resource, but only the 128 OIDs from 1.3.101.80.0 to 1.3.101.80.127 2154 have an encoded length of only 4 octets. 2156 IANA is requested to establish a registry that will allocate Log IDs 2157 from this arc. 2159 TBD: policy for adding to the registry. Perhaps "Expert Review"? 2161 13. Security Considerations 2163 With CAs, logs, and servers performing the actions described here, 2164 TLS clients can use logs and signed timestamps to reduce the 2165 likelihood that they will accept misissued certificates. If a server 2166 presents a valid signed timestamp for a certificate, then the client 2167 knows that a log has committed to publishing the certificate. From 2168 this, the client knows that monitors acting for the subject of the 2169 certificate have had some time to notice the misissue and take some 2170 action, such as asking a CA to revoke a misissued certificate, or 2171 that the log has misbehaved, which will be discovered when the SCT is 2172 audited. A signed timestamp is not a guarantee that the certificate 2173 is not misissued, since appropriate monitors might not have checked 2174 the logs or the CA might have refused to revoke the certificate. 2176 In addition, if TLS clients will not accept unlogged certificates, 2177 then site owners will have a greater incentive to submit certificates 2178 to logs, possibly with the assistance of their CA, increasing the 2179 overall transparency of the system. 2181 [I-D.ietf-trans-threat-analysis] provides a more detailed threat 2182 analysis of the Certificate Transparency architecture. 2184 13.1. Misissued Certificates 2186 Misissued certificates that have not been publicly logged, and thus 2187 do not have a valid SCT, are not considered compliant. Misissued 2188 certificates that do have an SCT from a log will appear in that 2189 public log within the Maximum Merge Delay, assuming the log is 2190 operating correctly. Thus, the maximum period of time during which a 2191 misissued certificate can be used without being available for audit 2192 is the MMD. 2194 13.2. Detection of Misissue 2196 The logs do not themselves detect misissued certificates; they rely 2197 instead on interested parties, such as domain owners, to monitor them 2198 and take corrective action when a misissue is detected. 2200 13.3. Avoiding Overly Redacting Domain Name Labels 2202 Redaction of domain name labels carries the same risks as the use of 2203 wildcards (See Section 7.2 of [RFC6125], for example). If the 2204 entirety of the domain space below the unredacted part of a domain 2205 name is not registered by a single domain owner (e.g. 2206 "REDACT(label).com", "REDACT(label).co.uk" and other public suffixes 2207 [Public.Suffix.List]), then the domain name may be considered by 2208 clients to be overly redacted. 2210 CAs should take care to avoid overly redacting domain names in 2211 precertificates. It is expected that monitors will treat 2212 precertificates that contain overly redacted domain names as 2213 potentially misissued. TLS clients MAY consider a certificate to be 2214 non-compliant if the reconstructed TBSCertificate (Section 10.2.2) 2215 contains any overly redacted domain names. 2217 13.4. Misbehaving Logs 2219 A log can misbehave in several ways. Examples include failing to 2220 incorporate a certificate with an SCT in the Merkle Tree within the 2221 MMD, presenting different, conflicting views of the Merkle Tree at 2222 different times and/or to different parties and issuing STHs too 2223 frequently. Such misbehavior is detectable and the 2224 [I-D.ietf-trans-threat-analysis] provides more details on how this 2225 can be done. 2227 Violation of the MMD contract is detected by log clients requesting a 2228 Merkle inclusion proof (Section 6.5) for each observed SCT. These 2229 checks can be asynchronous and need only be done once per each 2230 certificate. In order to protect the clients' privacy, these checks 2231 need not reveal the exact certificate to the log. Instead, clients 2232 can request the proof from a trusted auditor (since anyone can 2233 compute the proofs from the log) or communicate with the log via 2234 proxies. 2236 Violation of the append-only property or the STH issuance rate limit 2237 can be detected by clients comparing their instances of the Signed 2238 Tree Heads. There are various ways this could be done, for example 2239 via gossip (see [I-D.ietf-trans-gossip]) or peer-to-peer 2240 communications or by sending STHs to monitors (who could then 2241 directly check against their own copy of the relevant log). A proof 2242 of misbehavior in such cases would be a series of STHs that were 2243 issued too closely together, proving violation of the STH issuance 2244 rate limit, or an STH with a root hash that does not match the one 2245 calculated from a copy of the log, proving violation of the append- 2246 only property. 2248 13.5. Deterministic Signatures 2250 Logs are required to use deterministic signatures for the following 2251 reasons: 2253 o Using non-deterministic ECDSA with a predictable source of 2254 randomness means that each signature can potentially expose the 2255 secret material of the signing key. 2257 o Clients that gossip STHs or report back SCTs can be tracked or 2258 traced if a log was to produce multiple STHs or SCTs with the same 2259 timestamp and data but different signatures. 2261 13.6. Multiple SCTs 2263 By offering multiple SCTs, each from a different log, TLS servers 2264 reduce the effectiveness of an attack where a CA and a log collude 2265 (see Section 8.1). 2267 14. Privacy Considerations 2269 14.1. Ensuring Effective Redaction 2271 Although the domain name redaction mechanism (Section 4.2) removes 2272 the need for private labels to appear in logs, it does not guarantee 2273 that this will never happen. Anyone who encounters a certificate 2274 could choose to submit it to one or more logs, thereby rendering the 2275 redaction futile. Therefore, domain owners are advised to take the 2276 following steps to minimize the likelihood that their private labels 2277 will become known outside their closed communities: 2279 o Avoid registering private labels in public DNS. 2281 o Avoid using private labels that are predictable (e.g. "www"). 2283 CAs are advised to carefully consider each request to redact a label. 2284 When a CA believes that redacting a particular label would be futile, 2285 we advise rejecting the redaction request. TLS clients may have 2286 policies that forbid redaction, so redaction should only be used when 2287 it's absolutely necessary and likely to be effective. 2289 15. Acknowledgements 2291 The authors would like to thank Erwann Abelea, Robin Alden, Andrew 2292 Ayer, Al Cutter, Francis Dupont, Adam Eijdenberg, Stephen Farrell, 2293 Daniel Kahn Gillmor, Paul Hadfield, Brad Hill, Jeff Hodges, Paul 2294 Hoffman, Jeffrey Hutzelman, Kat Joyce, Stephen Kent, SM, Alexey 2295 Melnikov, Linus Nordberg, Chris Palmer, Trevor Perrin, Pierre 2296 Phaneuf, Melinda Shore, Ryan Sleevi, Martin Smith, Carl Wallace and 2297 Paul Wouters for their valuable contributions. 2299 A big thank you to Symantec for kindly donating the OIDs from the 2300 1.3.101 arc that are used in this document. 2302 16. References 2304 16.1. Normative References 2306 [DSS] National Institute of Standards and Technology, "Digital 2307 Signature Standard (DSS)", FIPS 186-3, June 2009, 2308 . 2311 [FIPS.180-4] 2312 National Institute of Standards and Technology, "Secure 2313 Hash Standard", FIPS PUB 180-4, March 2012, 2314 . 2317 [HTML401] Raggett, D., Le Hors, A., and I. Jacobs, "HTML 4.01 2318 Specification", World Wide Web Consortium Recommendation 2319 REC-html401-19991224, December 1999, 2320 . 2322 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2323 Requirement Levels", BCP 14, RFC 2119, March 1997. 2325 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 2326 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 2327 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 2329 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 2330 Standards (PKCS) #1: RSA Cryptography Specifications 2331 Version 2.1", RFC 3447, February 2003. 2333 [RFC4627] Crockford, D., "The application/json Media Type for 2334 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 2336 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 2337 Encodings", RFC 4648, October 2006. 2339 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2340 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 2342 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 2343 Housley, R., and W. Polk, "Internet X.509 Public Key 2344 Infrastructure Certificate and Certificate Revocation List 2345 (CRL) Profile", RFC 5280, May 2008. 2347 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2348 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2349 . 2351 [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network 2352 Time Protocol Version 4: Protocol and Algorithms 2353 Specification", RFC 5905, June 2010. 2355 [RFC6066] Eastlake, D., "Transport Layer Security (TLS) Extensions: 2356 Extension Definitions", RFC 6066, January 2011. 2358 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 2359 Verification of Domain-Based Application Service Identity 2360 within Internet Public Key Infrastructure Using X.509 2361 (PKIX) Certificates in the Context of Transport Layer 2362 Security (TLS)", RFC 6125, March 2011. 2364 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 2365 Galperin, S., and C. Adams, "X.509 Internet Public Key 2366 Infrastructure Online Certificate Status Protocol - OCSP", 2367 RFC 6960, DOI 10.17487/RFC6960, June 2013, 2368 . 2370 [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) 2371 Multiple Certificate Status Request Extension", RFC 6961, 2372 DOI 10.17487/RFC6961, June 2013, 2373 . 2375 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 2376 Algorithm (DSA) and Elliptic Curve Digital Signature 2377 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2378 2013, . 2380 [RFC7633] Hallam-Baker, P., "X.509v3 Transport Layer Security (TLS) 2381 Feature Extension", RFC 7633, DOI 10.17487/RFC7633, 2382 October 2015, . 2384 16.2. Informative References 2386 [Chromium.Log.Policy] 2387 The Chromium Projects, "Chromium Certificate Transparency 2388 Log Policy", 2014, . 2391 [Chromium.Policy] 2392 The Chromium Projects, "Chromium Certificate 2393 Transparency", 2014, . 2396 [CrosbyWallach] 2397 Crosby, S. and D. Wallach, "Efficient Data Structures for 2398 Tamper-Evident Logging", Proceedings of the 18th USENIX 2399 Security Symposium, Montreal, August 2009, 2400 . 2403 [EVSSLGuidelines] 2404 CA/Browser Forum, "Guidelines For The Issuance And 2405 Management Of Extended Validation Certificates", 2007, 2406 . 2409 [I-D.ietf-trans-gossip] 2410 Nordberg, L., Gillmor, D., and T. Ritter, "Gossiping in 2411 CT", draft-ietf-trans-gossip-01 (work in progress), 2412 October 2015. 2414 [I-D.ietf-trans-threat-analysis] 2415 Kent, S., "Attack Model and Threat for Certificate 2416 Transparency", draft-ietf-trans-threat-analysis-03 (work 2417 in progress), October 2015. 2419 [JSON.Metadata] 2420 The Chromium Projects, "Chromium Log Metadata JSON 2421 Schema", 2014, . 2424 [Public.Suffix.List] 2425 Mozilla Foundation, "Public Suffix List", 2016, . 2428 [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate 2429 Transparency", RFC 6962, June 2013. 2431 Appendix A. Supporting v1 and v2 simultaneously 2433 Certificate Transparency logs have to be either v1 (conforming to 2434 [RFC6962]) or v2 (conforming to this document), as the data 2435 structures are incompatible and so a v2 log could not issue a valid 2436 v1 SCT. 2438 CT clients, however, can support v1 and v2 SCTs, for the same 2439 certificate, simultaneously, as v1 SCTs are delivered in different 2440 TLS, X.509 and OCSP extensions than v2 SCTs. 2442 v1 and v2 SCTs for X.509 certificates can be validated independently. 2443 For precertificates, v2 SCTs should be embedded in the TBSCertificate 2444 before submission of the TBSCertificate (inside a v1 precertificate, 2445 as described in Section 3.1. of [RFC6962]) to a v1 log so that TLS 2446 clients conforming to [RFC6962] but not this document are oblivious 2447 to the embedded v2 SCTs. An issuer can follow these steps to produce 2448 an X.509 certificate with embedded v1 and v2 SCTs: 2450 o Create a CMS precertificate as described in Section 3.2 and submit 2451 it to v2 logs. 2453 o Embed the obtained v2 SCTs in the TBSCertificate, as described in 2454 Section 9.1.2. 2456 o Use that TBSCertificate to create a v1 precertificate, as 2457 described in Section 3.1. of [RFC6962] and submit it to v1 logs. 2459 o Embed the v1 SCTs in the TBSCertificate, as described in 2460 Section 3.3. of [RFC6962]. 2462 o Sign that TBSCertificate (which now contains v1 and v2 SCTs) to 2463 issue the final X.509 certificate. 2465 Authors' Addresses 2467 Ben Laurie 2468 Google UK Ltd. 2470 EMail: benl@google.com 2472 Adam Langley 2473 Google Inc. 2475 EMail: agl@google.com 2476 Emilia Kasper 2477 Google Switzerland GmbH 2479 EMail: ekasper@google.com 2481 Eran Messeri 2482 Google UK Ltd. 2484 EMail: eranm@google.com 2486 Rob Stradling 2487 Comodo CA, Ltd. 2489 EMail: rob.stradling@comodo.com