idnits 2.17.1 draft-ietf-trans-rfc6962-bis-24.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 7 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. -- The draft header indicates that this document obsoletes RFC6962, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (December 29, 2016) is 2672 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 363 -- Looks like a reference, but probably isn't: '7' on line 498 -- Possible downref: Non-RFC (?) normative reference: ref. 'HTML401' ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6961 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 7159 (Obsoleted by RFC 8259) ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) ** Downref: Normative reference to an Informational RFC: RFC 8017 == Outdated reference: A later version (-05) exists of draft-ietf-trans-gossip-03 == Outdated reference: A later version (-16) exists of draft-ietf-trans-threat-analysis-10 -- Obsolete informational reference (is this intentional?): RFC 4634 (Obsoleted by RFC 6234) -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) -- Obsolete informational reference (is this intentional?): RFC 6962 (Obsoleted by RFC 9162) Summary: 5 errors (**), 0 flaws (~~), 4 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TRANS (Public Notary Transparency) B. Laurie 3 Internet-Draft A. Langley 4 Obsoletes: 6962 (if approved) E. Kasper 5 Intended status: Standards Track E. Messeri 6 Expires: July 2, 2017 Google 7 R. Stradling 8 Comodo 9 December 29, 2016 11 Certificate Transparency Version 2.0 12 draft-ietf-trans-rfc6962-bis-24 14 Abstract 16 This document describes version 2.0 of the Certificate Transparency 17 (CT) protocol for publicly logging the existence of Transport Layer 18 Security (TLS) server certificates as they are issued or observed, in 19 a manner that allows anyone to audit certification authority (CA) 20 activity and notice the issuance of suspect certificates as well as 21 to audit the certificate logs themselves. The intent is that 22 eventually clients would refuse to honor certificates that do not 23 appear in a log, effectively forcing CAs to add all issued 24 certificates to the logs. 26 Logs are network services that implement the protocol operations for 27 submissions and queries that are defined in this document. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at http://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on July 2, 2017. 46 Copyright Notice 48 Copyright (c) 2016 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 64 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5 65 1.2. Data Structures . . . . . . . . . . . . . . . . . . . . . 5 66 1.3. Major Differences from CT 1.0 . . . . . . . . . . . . . . 5 67 2. Cryptographic Components . . . . . . . . . . . . . . . . . . 7 68 2.1. Merkle Hash Trees . . . . . . . . . . . . . . . . . . . . 7 69 2.1.1. Merkle Inclusion Proofs . . . . . . . . . . . . . . . 8 70 2.1.2. Merkle Consistency Proofs . . . . . . . . . . . . . . 9 71 2.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 10 72 2.1.4. Signatures . . . . . . . . . . . . . . . . . . . . . 11 73 3. Submitters . . . . . . . . . . . . . . . . . . . . . . . . . 11 74 3.1. Certificates . . . . . . . . . . . . . . . . . . . . . . 12 75 3.2. Precertificates . . . . . . . . . . . . . . . . . . . . . 12 76 4. Log Format and Operation . . . . . . . . . . . . . . . . . . 13 77 4.1. Accepting Submissions . . . . . . . . . . . . . . . . . . 13 78 4.2. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 14 79 4.3. Log ID . . . . . . . . . . . . . . . . . . . . . . . . . 15 80 4.4. TransItem Structure . . . . . . . . . . . . . . . . . . . 15 81 4.5. Merkle Tree Leaves . . . . . . . . . . . . . . . . . . . 17 82 4.6. Signed Certificate Timestamp (SCT) . . . . . . . . . . . 17 83 4.7. Merkle Tree Head . . . . . . . . . . . . . . . . . . . . 19 84 4.8. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 20 85 4.9. Merkle Consistency Proofs . . . . . . . . . . . . . . . . 20 86 4.10. Merkle Inclusion Proofs . . . . . . . . . . . . . . . . . 21 87 4.11. Shutting down a log . . . . . . . . . . . . . . . . . . . 21 88 5. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 22 89 5.1. Add Chain to Log . . . . . . . . . . . . . . . . . . . . 24 90 5.2. Add PreCertChain to Log . . . . . . . . . . . . . . . . . 25 91 5.3. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 25 92 5.4. Retrieve Merkle Consistency Proof between Two Signed Tree 93 Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 25 95 5.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 26 96 5.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and 97 Consistency Proof by Leaf Hash . . . . . . . . . . . . . 27 98 5.7. Retrieve Entries and STH from Log . . . . . . . . . . . . 29 99 5.8. Retrieve Accepted Trust Anchors . . . . . . . . . . . . . 30 100 6. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 30 101 6.1. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . . 31 102 6.2. TransItemList Structure . . . . . . . . . . . . . . . . . 32 103 6.3. Presenting SCTs, inclusion proofs and STHs . . . . . . . 32 104 6.4. Presenting SCTs only . . . . . . . . . . . . . . . . . . 33 105 6.5. transparency_info TLS Extension . . . . . . . . . . . . . 33 106 6.6. cached_info TLS Extension . . . . . . . . . . . . . . . . 33 107 7. Certification Authorities . . . . . . . . . . . . . . . . . . 33 108 7.1. Transparency Information X.509v3 Extension . . . . . . . 34 109 7.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 34 110 7.1.2. Certificate Extension . . . . . . . . . . . . . . . . 34 111 7.2. TLS Feature Extension . . . . . . . . . . . . . . . . . . 34 112 8. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 113 8.1. Metadata . . . . . . . . . . . . . . . . . . . . . . . . 35 114 8.2. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 36 115 8.2.1. Receiving SCTs . . . . . . . . . . . . . . . . . . . 36 116 8.2.2. Reconstructing the TBSCertificate . . . . . . . . . . 36 117 8.2.3. Validating SCTs . . . . . . . . . . . . . . . . . . . 36 118 8.2.4. Validating inclusion proofs . . . . . . . . . . . . . 36 119 8.2.5. Evaluating compliance . . . . . . . . . . . . . . . . 37 120 8.2.6. TLS Feature Extension . . . . . . . . . . . . . . . . 37 121 8.2.7. cached_info TLS Extension . . . . . . . . . . . . . . 37 122 8.2.8. Handling of Non-compliance . . . . . . . . . . . . . 37 123 8.3. Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 38 124 8.4. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 39 125 8.4.1. Verifying an inclusion proof . . . . . . . . . . . . 40 126 8.4.2. Verifying consistency between two STHs . . . . . . . 40 127 8.4.3. Verifying root hash given entries . . . . . . . . . . 41 128 9. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 42 129 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 42 130 10.1. TLS Extension Type . . . . . . . . . . . . . . . . . . . 42 131 10.2. New Entry to the TLS CachedInformationType registry . . 43 132 10.3. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 43 133 10.3.1. Expert Review guidelines . . . . . . . . . . . . . . 43 134 10.4. Signature Algorithms . . . . . . . . . . . . . . . . . . 43 135 10.4.1. Expert Review guidelines . . . . . . . . . . . . . . 44 136 10.5. VersionedTransTypes . . . . . . . . . . . . . . . . . . 44 137 10.5.1. Expert Review guidelines . . . . . . . . . . . . . . 45 138 10.6. SCT Extensions . . . . . . . . . . . . . . . . . . . . . 46 139 10.6.1. Expert Review guidelines . . . . . . . . . . . . . . 46 140 10.7. STH Extensions . . . . . . . . . . . . . . . . . . . . . 46 141 10.7.1. Expert Review guidelines . . . . . . . . . . . . . . 46 142 10.8. Object Identifiers . . . . . . . . . . . . . . . . . . . 47 143 10.8.1. Log ID Registry . . . . . . . . . . . . . . . . . . 47 144 10.8.2. Expert Review guidelines . . . . . . . . . . . . . . 47 145 11. Security Considerations . . . . . . . . . . . . . . . . . . . 48 146 11.1. Misissued Certificates . . . . . . . . . . . . . . . . . 48 147 11.2. Detection of Misissue . . . . . . . . . . . . . . . . . 48 148 11.3. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 48 149 11.4. Deterministic Signatures . . . . . . . . . . . . . . . . 49 150 11.5. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 49 151 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 49 152 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 50 153 13.1. Normative References . . . . . . . . . . . . . . . . . . 50 154 13.2. Informative References . . . . . . . . . . . . . . . . . 51 155 Appendix A. Supporting v1 and v2 simultaneously . . . . . . . . 52 156 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 53 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 that could be 168 used for transparently logging any form of binary data, subject to 169 some kind of inclusion criteria. In this document, we only describe 170 its use for public TLS server certificates (i.e., where the inclusion 171 criteria is a valid certificate issued by a public certification 172 authority (CA)). 174 Each log contains certificate chains, which can be submitted by 175 anyone. It is expected that public CAs will contribute all their 176 newly issued certificates to one or more logs; however certificate 177 holders can also contribute their own certificate chains, as can 178 third parties. In order to avoid logs being rendered useless by the 179 submission of large numbers of spurious certificates, it is required 180 that each chain ends with a trust anchor that is accepted by the log. 181 When a chain is accepted by a log, a signed timestamp is returned, 182 which can later be used to provide evidence to TLS clients that the 183 chain has been submitted. TLS clients can thus require that all 184 certificates they accept as valid are accompanied by signed 185 timestamps. 187 Those who are concerned about misissuance can monitor the logs, 188 asking them regularly for all new entries, and can thus check whether 189 domains for which they are responsible have had certificates issued 190 that they did not expect. What they do with this information, 191 particularly when they find that a misissuance has happened, is 192 beyond the scope of this document. However, broadly speaking, they 193 can invoke existing business mechanisms for dealing with misissued 194 certificates, such as working with the CA to get the certificate 195 revoked, or with maintainers of trust anchor lists to get the CA 196 removed. Of course, anyone who wants can monitor the logs and, if 197 they believe a certificate is incorrectly issued, take action as they 198 see fit. 200 Similarly, those who have seen signed timestamps from a particular 201 log can later demand a proof of inclusion from that log. If the log 202 is unable to provide this (or, indeed, if the corresponding 203 certificate is absent from monitors' copies of that log), that is 204 evidence of the incorrect operation of the log. The checking 205 operation is asynchronous to allow clients to proceed without delay, 206 despite possible issues such as network connectivity and the vagaries 207 of firewalls. 209 The append-only property of each log is achieved using Merkle Trees, 210 which can be used to show that any particular instance of the log is 211 a superset of any particular previous instance. Likewise, Merkle 212 Trees avoid the need to blindly trust logs: if a log attempts to show 213 different things to different people, this can be efficiently 214 detected by comparing tree roots and consistency proofs. Similarly, 215 other misbehaviors of any log (e.g., issuing signed timestamps for 216 certificates they then don't log) can be efficiently detected and 217 proved to the world at large. 219 1.1. Requirements Language 221 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 222 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 223 document are to be interpreted as described in RFC 2119 [RFC2119]. 225 1.2. Data Structures 227 Data structures are defined according to the conventions laid out in 228 Section 4 of [RFC5246]. 230 1.3. Major Differences from CT 1.0 232 This document revises and obsoletes the experimental CT 1.0 [RFC6962] 233 protocol, drawing on insights gained from CT 1.0 deployments and on 234 feedback from the community. The major changes are: 236 o Hash and signature algorithm agility: permitted algorithms are now 237 specified in IANA registries. 239 o Precertificate format: precertificates are now CMS objects rather 240 than X.509 certificates, which avoids violating the certificate 241 serial number uniqueness requirement in Section 4.1.2.2 of 242 [RFC5280]. 244 o Removed precertificate signing certificates and the precertificate 245 poison extension: the change of precertificate format means that 246 these are no longer needed. 248 o Logs IDs: each log is now identified by an OID rather than by the 249 hash of its public key. OID allocations are managed by an IANA 250 registry. 252 o "TransItem" structure: this new data structure is used to 253 encapsulate most types of CT data. A "TransItemList", consisting 254 of one or more "TransItem" structures, can be used anywhere that 255 "SignedCertificateTimestampList" was used in [RFC6962]. 257 o Merkle tree leaves: the "MerkleTreeLeaf" structure has been 258 replaced by the "TransItem" structure, which eases extensibility 259 and simplifies the leaf structure by removing one layer of 260 abstraction. 262 o Unified leaf format: the structure for both certificate and 263 precertificate entries now includes only the TBSCertificate 264 (whereas certificate entries in [RFC6962] included the entire 265 certificate). 267 o SCT extensions: these are now typed and managed by an IANA 268 registry. 270 o STH extensions: STHs can now contain extensions, which are typed 271 and managed by an IANA registry. 273 o API outputs: complete "TransItem" structures are returned, rather 274 than the constituent parts of each structure. 276 o get-all-by-hash: new client API for obtaining an inclusion proof 277 and the corresponding consistency proof at the same time. 279 o Presenting SCTs with proofs: TLS servers may present SCTs together 280 with the corresponding inclusion proofs using any of the 281 mechanisms that [RFC6962] defined for presenting SCTs only. 282 (Presenting SCTs only is still supported). 284 o CT TLS extension: the "signed_certificate_timestamp" TLS extension 285 has been replaced by the "transparency_info" TLS extension. 287 o Other TLS extensions: "status_request_v2" may be used (in the same 288 manner as "status_request"); "cached_info" may be used to avoid 289 sending the same complete SCTs and inclusion proofs to the same 290 TLS clients multiple times. 292 o TLS Feature extension: this certificate extension may be used by a 293 CA to indicate that CT compliance is required. 295 o Verification algorithms: added detailed algorithms for verifying 296 inclusion proofs, for verifying consistency between two STHs, and 297 for verifying a root hash given a complete list of the relevant 298 leaf input entries. 300 o Extensive clarifications and editorial work. 302 2. Cryptographic Components 304 2.1. Merkle Hash Trees 306 Logs use a binary Merkle Hash Tree for efficient auditing. The 307 hashing algorithm used by each log is expected to be specified as 308 part of the metadata relating to that log (see Section 8.1). We have 309 established a registry of acceptable algorithms, see Section 10.3. 310 The hashing algorithm in use is referred to as HASH throughout this 311 document and the size of its output in bytes as HASH_SIZE. The input 312 to the Merkle Tree Hash is a list of data entries; these entries will 313 be hashed to form the leaves of the Merkle Hash Tree. The output is 314 a single HASH_SIZE Merkle Tree Hash. Given an ordered list of n 315 inputs, D[n] = {d(0), d(1), ..., d(n-1)}, the Merkle Tree Hash (MTH) 316 is thus defined as follows: 318 The hash of an empty list is the hash of an empty string: 320 MTH({}) = HASH(). 322 The hash of a list with one entry (also known as a leaf hash) is: 324 MTH({d(0)}) = HASH(0x00 || d(0)). 326 For n > 1, let k be the largest power of two smaller than n (i.e., k 327 < n <= 2k). The Merkle Tree Hash of an n-element list D[n] is then 328 defined recursively as 330 MTH(D[n]) = HASH(0x01 || MTH(D[0:k]) || MTH(D[k:n])), 332 where || is concatenation and D[k1:k2] denotes the list {d(k1), 333 d(k1+1), ..., d(k2-1)} of length (k2 - k1). (Note that the hash 334 calculations for leaves and nodes differ. This domain separation is 335 required to give second preimage resistance.) 337 Note that we do not require the length of the input list to be a 338 power of two. The resulting Merkle Tree may thus not be balanced; 339 however, its shape is uniquely determined by the number of leaves. 340 (Note: This Merkle Tree is essentially the same as the history tree 341 [CrosbyWallach] proposal, except our definition handles non-full 342 trees differently.) 344 2.1.1. Merkle Inclusion Proofs 346 A Merkle inclusion proof for a leaf in a Merkle Hash Tree is the 347 shortest list of additional nodes in the Merkle Tree required to 348 compute the Merkle Tree Hash for that tree. Each node in the tree is 349 either a leaf node or is computed from the two nodes immediately 350 below it (i.e., towards the leaves). At each step up the tree 351 (towards the root), a node from the inclusion proof is combined with 352 the node computed so far. In other words, the inclusion proof 353 consists of the list of missing nodes required to compute the nodes 354 leading from a leaf to the root of the tree. If the root computed 355 from the inclusion proof matches the true root, then the inclusion 356 proof proves that the leaf exists in the tree. 358 Given an ordered list of n inputs to the tree, D[n] = {d(0), ..., 359 d(n-1)}, the Merkle inclusion proof PATH(m, D[n]) for the (m+1)th 360 input d(m), 0 <= m < n, is defined as follows: 362 The proof for the single leaf in a tree with a one-element input list 363 D[1] = {d(0)} is empty: 365 PATH(0, {d(0)}) = {} 367 For n > 1, let k be the largest power of two smaller than n. The 368 proof for the (m+1)th element d(m) in a list of n > m elements is 369 then defined recursively as 371 PATH(m, D[n]) = PATH(m, D[0:k]) : MTH(D[k:n]) for m < k; and 373 PATH(m, D[n]) = PATH(m - k, D[k:n]) : MTH(D[0:k]) for m >= k, 375 where : is concatenation of lists and D[k1:k2] denotes the length (k2 376 - k1) list {d(k1), d(k1+1),..., d(k2-1)} as before. 378 2.1.2. Merkle Consistency Proofs 380 Merkle consistency proofs prove the append-only property of the tree. 381 A Merkle consistency proof for a Merkle Tree Hash MTH(D[n]) and a 382 previously advertised hash MTH(D[0:m]) of the first m leaves, m <= n, 383 is the list of nodes in the Merkle Tree required to verify that the 384 first m inputs D[0:m] are equal in both trees. Thus, a consistency 385 proof must contain a set of intermediate nodes (i.e., commitments to 386 inputs) sufficient to verify MTH(D[n]), such that (a subset of) the 387 same nodes can be used to verify MTH(D[0:m]). We define an algorithm 388 that outputs the (unique) minimal consistency proof. 390 Given an ordered list of n inputs to the tree, D[n] = {d(0), ..., 391 d(n-1)}, the Merkle consistency proof PROOF(m, D[n]) for a previous 392 Merkle Tree Hash MTH(D[0:m]), 0 < m < n, is defined as: 394 PROOF(m, D[n]) = SUBPROOF(m, D[n], true) 396 In SUBPROOF, the boolean value represents whether the subtree created 397 from D[0:m] is a complete subtree of the Merkle Tree created from 398 D[n], and, consequently, whether the subtree Merkle Tree Hash 399 MTH(D[0:m]) is known. The initial call to SUBPROOF sets this to be 400 true, and SUBPROOF is then defined as follows: 402 The subproof for m = n is empty if m is the value for which PROOF was 403 originally requested (meaning that the subtree created from D[0:m] is 404 a complete subtree of the Merkle Tree created from the original D[n] 405 for which PROOF was requested, and the subtree Merkle Tree Hash 406 MTH(D[0:m]) is known): 408 SUBPROOF(m, D[m], true) = {} 410 Otherwise, the subproof for m = n is the Merkle Tree Hash committing 411 inputs D[0:m]: 413 SUBPROOF(m, D[m], false) = {MTH(D[m])} 415 For m < n, let k be the largest power of two smaller than n. The 416 subproof is then defined recursively. 418 If m <= k, the right subtree entries D[k:n] only exist in the current 419 tree. We prove that the left subtree entries D[0:k] are consistent 420 and add a commitment to D[k:n]: 422 SUBPROOF(m, D[n], b) = SUBPROOF(m, D[0:k], b) : MTH(D[k:n]) 423 If m > k, the left subtree entries D[0:k] are identical in both 424 trees. We prove that the right subtree entries D[k:n] are consistent 425 and add a commitment to D[0:k]. 427 SUBPROOF(m, D[n], b) = SUBPROOF(m - k, D[k:n], false) : MTH(D[0:k]) 429 Here, : is a concatenation of lists, and D[k1:k2] denotes the length 430 (k2 - k1) list {d(k1), d(k1+1),..., d(k2-1)} as before. 432 The number of nodes in the resulting proof is bounded above by 433 ceil(log2(n)) + 1. 435 2.1.3. Example 437 The binary Merkle Tree with 7 leaves: 439 hash 440 / \ 441 / \ 442 / \ 443 / \ 444 / \ 445 k l 446 / \ / \ 447 / \ / \ 448 / \ / \ 449 g h i j 450 / \ / \ / \ | 451 a b c d e f d6 452 | | | | | | 453 d0 d1 d2 d3 d4 d5 455 The inclusion proof for d0 is [b, h, l]. 457 The inclusion proof for d3 is [c, g, l]. 459 The inclusion proof for d4 is [f, j, k]. 461 The inclusion proof for d6 is [i, k]. 463 The same tree, built incrementally in four steps: 465 hash0 hash1=k 466 / \ / \ 467 / \ / \ 468 / \ / \ 469 g c g h 470 / \ | / \ / \ 471 a b d2 a b c d 472 | | | | | | 473 d0 d1 d0 d1 d2 d3 475 hash2 hash 476 / \ / \ 477 / \ / \ 478 / \ / \ 479 / \ / \ 480 / \ / \ 481 k i k l 482 / \ / \ / \ / \ 483 / \ e f / \ / \ 484 / \ | | / \ / \ 485 g h d4 d5 g h i j 486 / \ / \ / \ / \ / \ | 487 a b c d a b c d e f d6 488 | | | | | | | | | | 489 d0 d1 d2 d3 d0 d1 d2 d3 d4 d5 491 The consistency proof between hash0 and hash is PROOF(3, D[7]) = [c, 492 d, g, l]. c, g are used to verify hash0, and d, l are additionally 493 used to show hash is consistent with hash0. 495 The consistency proof between hash1 and hash is PROOF(4, D[7]) = [l]. 496 hash can be verified using hash1=k and l. 498 The consistency proof between hash2 and hash is PROOF(6, D[7]) = [i, 499 j, k]. k, i are used to verify hash2, and j is additionally used to 500 show hash is consistent with hash2. 502 2.1.4. Signatures 504 Various data structures are signed. A log MUST use one of the 505 signature algorithms defined in Section 10.4. 507 3. Submitters 509 Submitters submit certificates or preannouncements of certificates 510 prior to issuance (precertificates) to logs for public auditing, as 511 described below. In order to enable attribution of each logged 512 certificate or precertificate to its issuer, each submission MUST be 513 accompanied by all additional certificates required to verify the 514 chain up to an accepted trust anchor. The trust anchor (a root or 515 intermediate CA certificate) MAY be omitted from the submission. 517 If a log accepts a submission, it will return a Signed Certificate 518 Timestamp (SCT) (see Section 4.6). The submitter SHOULD validate the 519 returned SCT as described in Section 8.2 if they understand its 520 format and they intend to use it directly in a TLS handshake or to 521 construct a certificate. If the submitter does not need the SCT (for 522 example, the certificate is being submitted simply to make it 523 available in the log), it MAY validate the SCT. 525 3.1. Certificates 527 Any entity can submit a certificate (Section 5.1) to a log. Since it 528 is anticipated that TLS clients will reject certificates that are not 529 logged, it is expected that certificate issuers and subjects will be 530 strongly motivated to submit them. 532 3.2. Precertificates 534 CAs may preannounce a certificate prior to issuance by submitting a 535 precertificate (Section 5.2) that the log can use to create an entry 536 that will be valid against the issued certificate. The CA MAY 537 incorporate the returned SCT in the issued certificate. One example 538 of where the returned SCT is not incorporated in the issued 539 certificate is when a CA sends the precertificate to multiple logs, 540 but only incorporates the SCTs that are returned first. 542 A precertificate is a CMS [RFC5652] "signed-data" object that 543 conforms to the following requirements: 545 o It MUST be DER encoded. 547 o "SignedData.encapContentInfo.eContentType" MUST be the OID 548 1.3.101.78. 550 o "SignedData.encapContentInfo.eContent" MUST contain a 551 TBSCertificate [RFC5280] that will be identical to the 552 TBSCertificate in the issued certificate, except that the 553 Transparency Information (Section 7.1) extension MUST be omitted. 555 o "SignedData.signerInfos" MUST contain a signature from the same 556 (root or intermediate) CA that will ultimately issue the 557 certificate. This signature indicates the CA's intent to issue 558 the certificate. This intent is considered binding (i.e., 559 misissuance of the precertificate is considered equivalent to 560 misissuance of the certificate). (Note that, because of the 561 structure of CMS, the signature on the CMS object will not be a 562 valid X.509v3 signature and so cannot be used to construct a 563 certificate from the precertificate). 565 o "SignedData.certificates" SHOULD be omitted. 567 4. Log Format and Operation 569 A log is a single, append-only Merkle Tree of submitted certificate 570 and precertificate entries. 572 When it receives and accepts a valid submission, the log MUST return 573 an SCT that corresponds to the submitted certificate or 574 precertificate. If the log has previously seen this valid 575 submission, it SHOULD return the same SCT as it returned before (to 576 reduce the ability to track clients as described in Section 11.4). 577 If different SCTs are produced for the same submission, multiple log 578 entries will have to be created, one for each SCT (as the timestamp 579 is a part of the leaf structure). Note that if a certificate was 580 previously logged as a precertificate, then the precertificate's SCT 581 of type "precert_sct_v2" would not be appropriate; instead, a fresh 582 SCT of type "x509_sct_v2" should be generated. 584 An SCT is the log's promise to incorporate the submitted entry in its 585 Merkle Tree no later than a fixed amount of time, known as the 586 Maximum Merge Delay (MMD), after the issuance of the SCT. 587 Periodically, the log MUST append all its new entries to its Merkle 588 Tree and sign the root of the tree. 590 Log operators MUST NOT impose any conditions on retrieving or sharing 591 data from the log. 593 4.1. Accepting Submissions 595 Before accepting a submitted certificate or precertificate, the log 596 MUST verify that it has a valid signature chain to an accepted trust 597 anchor, using the chain of intermediate CA certificates provided by 598 the submitter. Logs SHOULD accept certificates and precertificates 599 that are fully valid according to RFC 5280 [RFC5280] verification 600 rules and are submitted with such a chain (A log may decide, for 601 example, to temporarily reject valid submissions to protect itself 602 against denial-of-service attacks). 604 Logs MAY accept certificates and precertificates that have expired, 605 are not yet valid, have been revoked, or are otherwise not fully 606 valid according to RFC 5280 verification rules in order to 607 accommodate quirks of CA certificate-issuing software. However, logs 608 MUST reject submissions without a valid signature chain to an 609 accepted trust anchor. Logs MUST also reject precertificates that do 610 not conform to the requirements in Section 3.2. 612 Logs SHOULD limit the length of chain they will accept. The maximum 613 chain length is specified in the log's metadata. 615 The log SHALL allow retrieval of its list of accepted trust anchors 616 (see Section 5.8), each of which is a root or intermediate CA 617 certificate. This list might usefully be the union of root 618 certificates trusted by major browser vendors. 620 4.2. Log Entries 622 If a submission is accepted and an SCT issued, the accepting log MUST 623 store the entire chain used for verification. This chain MUST 624 include the certificate or precertificate itself, the zero or more 625 intermediate CA certificates provided by the submitter, and the trust 626 anchor used to verify the chain (even if it was omitted from the 627 submission). The log MUST present this chain for auditing upon 628 request (see Section 5.7). This chain is required to prevent a CA 629 from avoiding blame by logging a partial or empty chain. 631 Each certificate entry in a log MUST include a "X509ChainEntry" 632 structure, and each precertificate entry MUST include a 633 "PrecertChainEntryV2" structure: 635 opaque ASN.1Cert<1..2^24-1>; 637 struct { 638 ASN.1Cert leaf_certificate; 639 ASN.1Cert certificate_chain<0..2^24-1>; 640 } X509ChainEntry; 642 opaque CMSPrecert<1..2^24-1>; 644 struct { 645 CMSPrecert pre_certificate; 646 ASN.1Cert precertificate_chain<1..2^24-1>; 647 } PrecertChainEntryV2; 649 "leaf_certificate" is a submitted certificate that has been accepted 650 by the log. 652 "certificate_chain" is a vector of 0 or more additional certificates 653 required to verify "leaf_certificate". The first certificate MUST 654 certify "leaf_certificate". Each following certificate MUST directly 655 certify the one preceding it. The final certificate MUST be a trust 656 anchor accepted by the log. If "leaf_certificate" is an accepted 657 trust anchor, then this vector is empty. 659 "pre_certificate" is a submitted precertificate that has been 660 accepted by the log. 662 "precertificate_chain" is a vector of 1 or more additional 663 certificates required to verify "pre_certificate". The first 664 certificate MUST certify "pre_certificate". Each following 665 certificate MUST directly certify the one preceding it. The final 666 certificate MUST be a trust anchor accepted by the log. 668 4.3. Log ID 670 Each log is identified by an OID, which is specified in the log's 671 metadata and which MUST NOT be used to identify any other log. A 672 log's operator MUST either allocate the OID themselves or request an 673 OID from the Log ID Registry (see Section 10.8.1). Various data 674 structures include the DER encoding of this OID, excluding the ASN.1 675 tag and length bytes, in an opaque vector: 677 opaque LogID<2..127>; 679 Note that the ASN.1 length and the opaque vector length are identical 680 in size (1 byte) and value, so the DER encoding of the OID can be 681 reproduced simply by prepending an OBJECT IDENTIFIER tag (0x06) to 682 the opaque vector length and contents. 684 OIDs used to identify logs are limited such that the DER encoding of 685 their value is less than or equal to 127 octets. 687 4.4. TransItem Structure 689 Various data structures are encapsulated in the "TransItem" structure 690 to ensure that the type and version of each one is identified in a 691 common fashion: 693 enum { 694 reserved(0), 695 x509_entry_v2(1), precert_entry_v2(2), 696 x509_sct_v2(3), precert_sct_v2(4), 697 signed_tree_head_v2(5), consistency_proof_v2(6), 698 inclusion_proof_v2(7), x509_sct_with_proof_v2(8), 699 precert_sct_with_proof_v2(9), 700 (65535) 701 } VersionedTransType; 703 struct { 704 VersionedTransType versioned_type; 705 select (versioned_type) { 706 case x509_entry_v2: TimestampedCertificateEntryDataV2; 707 case precert_entry_v2: TimestampedCertificateEntryDataV2; 708 case x509_sct_v2: SignedCertificateTimestampDataV2; 709 case precert_sct_v2: SignedCertificateTimestampDataV2; 710 case signed_tree_head_v2: SignedTreeHeadDataV2; 711 case consistency_proof_v2: ConsistencyProofDataV2; 712 case inclusion_proof_v2: InclusionProofDataV2; 713 case x509_sct_with_proof_v2: SCTWithProofDataV2; 714 case precert_sct_with_proof_v2: SCTWithProofDataV2; 715 } data; 716 } TransItem; 718 "versioned_type" is a value from the IANA registry in Section 10.5 719 that identifies the type of the encapsulated data structure and the 720 earliest version of this protocol to which it conforms. This 721 document is v2. 723 "data" is the encapsulated data structure. The various structures 724 named with the "DataV2" suffix are defined in later sections of this 725 document. 727 Note that "VersionedTransType" combines the v1 [RFC6962] type 728 enumerations "Version", "LogEntryType", "SignatureType" and 729 "MerkleLeafType". Note also that v1 did not define "TransItem", but 730 this document provides guidelines (see Appendix A) on how v2 731 implementations can co-exist with v1 implementations. 733 Future versions of this protocol may reuse "VersionedTransType" 734 values defined in this document as long as the corresponding data 735 structures are not modified, and may add new "VersionedTransType" 736 values for new or modified data structures. 738 4.5. Merkle Tree Leaves 740 The leaves of a log's Merkle Tree correspond to the log's entries 741 (see Section 4.2). Each leaf is the leaf hash (Section 2.1) of a 742 "TransItem" structure of type "x509_entry_v2" or "precert_entry_v2", 743 which encapsulates a "TimestampedCertificateEntryDataV2" structure. 744 Note that leaf hashes are calculated as HASH(0x00 || TransItem), 745 where the hashing algorithm is specified in the log's metadata. 747 opaque TBSCertificate<1..2^24-1>; 749 struct { 750 uint64 timestamp; 751 opaque issuer_key_hash<32..2^8-1>; 752 TBSCertificate tbs_certificate; 753 SctExtension sct_extensions<0..2^16-1>; 754 } TimestampedCertificateEntryDataV2; 756 "timestamp" is the NTP Time [RFC5905] at which the certificate or 757 precertificate was accepted by the log, measured in milliseconds 758 since the epoch (January 1, 1970, 00:00 UTC), ignoring leap seconds. 759 Note that the leaves of a log's Merkle Tree are not required to be in 760 strict chronological order. 762 "issuer_key_hash" is the HASH of the public key of the CA that issued 763 the certificate or precertificate, calculated over the DER encoding 764 of the key represented as SubjectPublicKeyInfo [RFC5280]. This is 765 needed to bind the CA to the certificate or precertificate, making it 766 impossible for the corresponding SCT to be valid for any other 767 certificate or precertificate whose TBSCertificate matches 768 "tbs_certificate". The length of the "issuer_key_hash" MUST match 769 HASH_SIZE. 771 "tbs_certificate" is the DER encoded TBSCertificate from either the 772 "leaf_certificate" (in the case of an "X509ChainEntry") or the 773 "pre_certificate" (in the case of a "PrecertChainEntryV2"). (Note 774 that a precertificate's TBSCertificate can be reconstructed from the 775 corresponding certificate as described in Section 8.2.2). 777 "sct_extensions" matches the SCT extensions of the corresponding SCT. 779 4.6. Signed Certificate Timestamp (SCT) 781 An SCT is a "TransItem" structure of type "x509_sct_v2" or 782 "precert_sct_v2", which encapsulates a 783 "SignedCertificateTimestampDataV2" structure: 785 enum { 786 reserved(65535) 787 } SctExtensionType; 789 struct { 790 SctExtensionType sct_extension_type; 791 opaque sct_extension_data<0..2^16-1>; 792 } SctExtension; 794 struct { 795 LogID log_id; 796 uint64 timestamp; 797 SctExtension sct_extensions<0..2^16-1>; 798 digitally-signed struct { 799 TransItem timestamped_entry; 800 } signature; 801 } SignedCertificateTimestampDataV2; 803 "log_id" is this log's unique ID, encoded in an opaque vector as 804 described in Section 4.3. 806 "timestamp" is equal to the timestamp from the 807 "TimestampedCertificateEntryDataV2" structure encapsulated in the 808 "timestamped_entry". 810 "sct_extension_type" identifies a single extension from the IANA 811 registry in Section 10.6. At the time of writing, no extensions are 812 specified. 814 The interpretation of the "sct_extension_data" field is determined 815 solely by the value of the "sct_extension_type" field. Each document 816 that registers a new "sct_extension_type" must describe how to 817 interpret the corresponding "sct_extension_data". 819 "sct_extensions" is a vector of 0 or more SCT extensions. This 820 vector MUST NOT include more than one extension with the same 821 "sct_extension_type". The extensions in the vector MUST be ordered 822 by the value of the "sct_extension_type" field, smallest value first. 823 If an implementation sees an extension that it does not understand, 824 it SHOULD ignore that extension. Furthermore, an implementation MAY 825 choose to ignore any extension(s) that it does understand. 827 The encoding of the digitally-signed element is defined in [RFC5246]. 829 "timestamped_entry" is a "TransItem" structure that MUST be of type 830 "x509_entry_v2" or "precert_entry_v2" (see Section 4.5). 832 4.7. Merkle Tree Head 834 The log stores information about its Merkle Tree in a 835 "TreeHeadDataV2": 837 opaque NodeHash<32..2^8-1>; 839 enum { 840 reserved(65535) 841 } SthExtensionType; 843 struct { 844 SthExtensionType sth_extension_type; 845 opaque sth_extension_data<0..2^16-1>; 846 } SthExtension; 848 struct { 849 uint64 timestamp; 850 uint64 tree_size; 851 NodeHash root_hash; 852 SthExtension sth_extensions<0..2^16-1>; 853 } TreeHeadDataV2; 855 The length of NodeHash MUST match HASH_SIZE of the log. 857 "sth_extension_type" identifies a single extension from the IANA 858 registry in Section 10.7. At the time of writing, no extensions are 859 specified. 861 The interpretation of the "sth_extension_data" field is determined 862 solely by the value of the "sth_extension_type" field. Each document 863 that registers a new "sth_extension_type" must describe how to 864 interpret the corresponding "sth_extension_data". 866 "timestamp" is the current NTP Time [RFC5905], measured in 867 milliseconds since the epoch (January 1, 1970, 00:00 UTC), ignoring 868 leap seconds. 870 "tree_size" is the number of entries currently in the log's Merkle 871 Tree. 873 "root_hash" is the root of the Merkle Hash Tree. 875 "sth_extensions" is a vector of 0 or more STH extensions. This 876 vector MUST NOT include more than one extension with the same 877 "sth_extension_type". The extensions in the vector MUST be ordered 878 by the value of the "sth_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 4.8. Signed Tree Head (STH) 885 Periodically each log SHOULD sign its current tree head information 886 (see Section 4.7) to produce an STH. When a client requests a log's 887 latest STH (see Section 5.3), the log MUST return an STH that is no 888 older than the log's MMD. However, STHs could be used to mark 889 individual clients (by producing a new one for each query), so logs 890 MUST NOT produce them more frequently than is declared in their 891 metadata. In general, there is no need to produce a new STH unless 892 there are new entries in the log; however, in the unlikely event that 893 it receives no new submissions during an MMD period, the log SHALL 894 sign the same Merkle Tree Hash with a fresh timestamp. 896 An STH is a "TransItem" structure of type "signed_tree_head_v2", 897 which encapsulates a "SignedTreeHeadDataV2" structure: 899 struct { 900 LogID log_id; 901 TreeHeadDataV2 tree_head; 902 digitally-signed struct { 903 TreeHeadDataV2 tree_head; 904 } signature; 905 } SignedTreeHeadDataV2; 907 "log_id" is this log's unique ID, encoded in an opaque vector as 908 described in Section 4.3. 910 The "timestamp" in "tree_head" MUST be at least as recent as the most 911 recent SCT timestamp in the tree. Each subsequent timestamp MUST be 912 more recent than the timestamp of the previous update. 914 "tree_head" contains the latest tree head information (see 915 Section 4.7). 917 "signature" is a signature over the encoded "tree_head" field. 919 4.9. Merkle Consistency Proofs 921 To prepare a Merkle Consistency Proof for distribution to clients, 922 the log produces a "TransItem" structure of type 923 "consistency_proof_v2", which encapsulates a "ConsistencyProofDataV2" 924 structure: 926 struct { 927 LogID log_id; 928 uint64 tree_size_1; 929 uint64 tree_size_2; 930 NodeHash consistency_path<1..2^16-1>; 931 } ConsistencyProofDataV2; 933 "log_id" is this log's unique ID, encoded in an opaque vector as 934 described in Section 4.3. 936 "tree_size_1" is the size of the older tree. 938 "tree_size_2" is the size of the newer tree. 940 "consistency_path" is a vector of Merkle Tree nodes proving the 941 consistency of two STHs. 943 4.10. Merkle Inclusion Proofs 945 To prepare a Merkle Inclusion Proof for distribution to clients, the 946 log produces a "TransItem" structure of type "inclusion_proof_v2", 947 which encapsulates an "InclusionProofDataV2" structure: 949 struct { 950 LogID log_id; 951 uint64 tree_size; 952 uint64 leaf_index; 953 NodeHash inclusion_path<1..2^16-1>; 954 } InclusionProofDataV2; 956 "log_id" is this log's unique ID, encoded in an opaque vector as 957 described in Section 4.3. 959 "tree_size" is the size of the tree on which this inclusion proof is 960 based. 962 "leaf_index" is the 0-based index of the log entry corresponding to 963 this inclusion proof. 965 "inclusion_path" is a vector of Merkle Tree nodes proving the 966 inclusion of the chosen certificate or precertificate. 968 4.11. Shutting down a log 970 Log operators may decide to shut down a log for various reasons, such 971 as deprecation of the signature algorithm. If there are entries in 972 the log for certificates that have not yet expired, simply making TLS 973 clients stop recognizing that log will have the effect of 974 invalidating SCTs from that log. To avoid that, the following 975 actions are suggested: 977 o Make it known to clients and monitors that the log will be frozen. 979 o Stop accepting new submissions (the error code "shutdown" should 980 be returned for such requests). 982 o Once MMD from the last accepted submission has passed and all 983 pending submissions are incorporated, issue a final STH and 984 publish it as a part of the log's metadata. Having an STH with a 985 timestamp that is after the MMD has passed from the last SCT 986 issuance allows clients to audit this log regularly without 987 special handling for the final STH. At this point the log's 988 private key is no longer needed and can be destroyed. 990 o Keep the log running until the certificates in all of its entries 991 have expired or exist in other logs (this can be determined by 992 scanning other logs or connecting to domains mentioned in the 993 certificates and inspecting the SCTs served). 995 5. Log Client Messages 997 Messages are sent as HTTPS GET or POST requests. Parameters for 998 POSTs and all responses are encoded as JavaScript Object Notation 999 (JSON) objects [RFC7159]. Parameters for GETs are encoded as order- 1000 independent key/value URL parameters, using the "application/x-www- 1001 form-urlencoded" format described in the "HTML 4.01 Specification" 1002 [HTML401]. Binary data is base64 encoded [RFC4648] as specified in 1003 the individual messages. 1005 Note that JSON objects and URL parameters may contain fields not 1006 specified here. These extra fields should be ignored. 1008 The prefix, which is part of the log's metadata, MAY 1009 include a path as well as a server name and a port. 1011 In practice, log servers may include multiple front-end machines. 1012 Since it is impractical to keep these machines in perfect sync, 1013 errors may occur that are caused by skew between the machines. Where 1014 such errors are possible, the front-end will return additional 1015 information (as specified below) making it possible for clients to 1016 make progress, if progress is possible. Front-ends MUST only serve 1017 data that is free of gaps (that is, for example, no front-end will 1018 respond with an STH unless it is also able to prove consistency from 1019 all log entries logged within that STH). 1021 For example, when a consistency proof between two STHs is requested, 1022 the front-end reached may not yet be aware of one or both STHs. In 1023 the case where it is unaware of both, it will return the latest STH 1024 it is aware of. Where it is aware of the first but not the second, 1025 it will return the latest STH it is aware of and a consistency proof 1026 from the first STH to the returned STH. The case where it knows the 1027 second but not the first should not arise (see the "no gaps" 1028 requirement above). 1030 If the log is unable to process a client's request, it MUST return an 1031 HTTP response code of 4xx/5xx (see [RFC7231]), and, in place of the 1032 responses outlined in the subsections below, the body SHOULD be a 1033 JSON structure containing at least the following field: 1035 error_message: A human-readable string describing the error which 1036 prevented the log from processing the request. 1038 In the case of a malformed request, the string SHOULD provide 1039 sufficient detail for the error to be rectified. 1041 error_code: An error code readable by the client. Some codes are 1042 generic and are detailed here. Others are detailed in the 1043 individual requests. Error codes are fixed text strings. 1045 +---------------+---------------------------------------------+ 1046 | Error Code | Meaning | 1047 +---------------+---------------------------------------------+ 1048 | not compliant | The request is not compliant with this RFC. | 1049 +---------------+---------------------------------------------+ 1051 e.g., In response to a request of "/ct/v2/get- 1052 entries?start=100&end=99", the log would return a "400 Bad Request" 1053 response code with a body similar to the following: 1055 { 1056 "error_message": "'start' cannot be greater than 'end'", 1057 "error_code": "not compliant", 1058 } 1060 Clients SHOULD treat "500 Internal Server Error" and "503 Service 1061 Unavailable" responses as transient failures and MAY retry the same 1062 request without modification at a later date. Note that as per 1063 [RFC7231], in the case of a 503 response the log MAY include a 1064 "Retry-After:" header in order to request a minimum time for the 1065 client to wait before retrying the request. 1067 5.1. Add Chain to Log 1069 POST https:///ct/v2/add-chain 1071 Inputs: 1073 chain: An array of base64 encoded certificates. The first 1074 element is the certificate for which the submitter desires an 1075 SCT; the second certifies the first and so on to the last, 1076 which either is, or is certified by, an accepted trust anchor. 1078 Outputs: 1080 sct: A base64 encoded "TransItem" of type "x509_sct_v2", signed 1081 by this log, that corresponds to the submitted certificate. 1083 Error codes: 1085 +-------------+-----------------------------------------------------+ 1086 | Error Code | Meaning | 1087 +-------------+-----------------------------------------------------+ 1088 | unknown | The last certificate in the chain both is not, and | 1089 | anchor | is not certified by, an accepted trust anchor. | 1090 | | | 1091 | bad chain | The alleged chain is not actually a chain of | 1092 | | certificates. | 1093 | | | 1094 | bad | One or more certificates in the chain are not valid | 1095 | certificate | (e.g., not properly encoded). | 1096 | | | 1097 | shutdown | The log has ceased operation and is not accepting | 1098 | | new submissions. | 1099 +-------------+-----------------------------------------------------+ 1101 If the version of "sct" is not v2, then a v2 client may be unable to 1102 verify the signature. It MUST NOT construe this as an error. This 1103 is to avoid forcing an upgrade of compliant v2 clients that do not 1104 use the returned SCTs. 1106 If a log detects bad encoding in a chain that otherwise verifies 1107 correctly then the log MUST either log the certificate or return the 1108 "bad certificate" error. If the certificate is logged, an SCT MUST 1109 be issued. Logging the certificate is useful, because monitors 1110 (Section 8.3) can then detect these encoding errors, which may be 1111 accepted by some TLS clients. 1113 5.2. Add PreCertChain to Log 1115 POST https:///ct/v2/add-pre-chain 1117 Inputs: 1119 precertificate: The base64 encoded precertificate. 1121 chain: An array of base64 encoded CA certificates. The first 1122 element is the signer of the precertificate; the second 1123 certifies the first and so on to the last, which either is, or 1124 is certified by, an accepted trust anchor. 1126 Outputs: 1128 sct: A base64 encoded "TransItem" of type "precert_sct_v2", 1129 signed by this log, that corresponds to the submitted 1130 precertificate. 1132 Errors are the same as in Section 5.1. 1134 5.3. Retrieve Latest Signed Tree Head 1136 GET https:///ct/v2/get-sth 1138 No inputs. 1140 Outputs: 1142 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1143 signed by this log, that is no older than the log's MMD. 1145 5.4. Retrieve Merkle Consistency Proof between Two Signed Tree Heads 1147 GET https:///ct/v2/get-sth-consistency 1149 Inputs: 1151 first: The tree_size of the older tree, in decimal. 1153 second: The tree_size of the newer tree, in decimal (optional). 1155 Both tree sizes must be from existing v2 STHs. However, because 1156 of skew, the receiving front-end may not know one or both of the 1157 existing STHs. If both are known, then only the "consistency" 1158 output is returned. If the first is known but the second is not 1159 (or has been omitted), then the latest known STH is returned, 1160 along with a consistency proof between the first STH and the 1161 latest. If neither are known, then the latest known STH is 1162 returned without a consistency proof. 1164 Outputs: 1166 consistency: A base64 encoded "TransItem" of type 1167 "consistency_proof_v2", whose "tree_size_1" MUST match the 1168 "first" input. If the "sth" output is omitted, then 1169 "tree_size_2" MUST match the "second" input. 1171 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1172 signed by this log. 1174 Note that no signature is required for the "consistency" output as 1175 it is used to verify the consistency between two STHs, which are 1176 signed. 1178 Error codes: 1180 +-------------+-----------------------------------------------------+ 1181 | Error Code | Meaning | 1182 +-------------+-----------------------------------------------------+ 1183 | first | "first" is before the latest known STH but is not | 1184 | unknown | from an existing STH. | 1185 | | | 1186 | second | "second" is before the latest known STH but is not | 1187 | unknown | from an existing STH. | 1188 +-------------+-----------------------------------------------------+ 1190 See Section 8.4.2 for an outline of how to use the "consistency" 1191 output. 1193 5.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash 1195 GET https:///ct/v2/get-proof-by-hash 1197 Inputs: 1199 hash: A base64 encoded v2 leaf hash. 1201 tree_size: The tree_size of the tree on which to base the proof, 1202 in decimal. 1204 The "hash" must be calculated as defined in Section 4.5. The 1205 "tree_size" must designate an existing v2 STH. Because of skew, 1206 the front-end may not know the requested STH. In that case, it 1207 will return the latest STH it knows, along with an inclusion proof 1208 to that STH. If the front-end knows the requested STH then only 1209 "inclusion" is returned. 1211 Outputs: 1213 inclusion: A base64 encoded "TransItem" of type 1214 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1215 Tree nodes proves the inclusion of the chosen certificate in 1216 the selected STH. 1218 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1219 signed by this log. 1221 Note that no signature is required for the "inclusion" output as 1222 it is used to verify inclusion in the selected STH, which is 1223 signed. 1225 Error codes: 1227 +-----------+-------------------------------------------------------+ 1228 | Error | Meaning | 1229 | Code | | 1230 +-----------+-------------------------------------------------------+ 1231 | hash | "hash" is not the hash of a known leaf (may be caused | 1232 | unknown | by skew or by a known certificate not yet merged). | 1233 | | | 1234 | tree_size | "hash" is before the latest known STH but is not from | 1235 | unknown | an existing STH. | 1236 +-----------+-------------------------------------------------------+ 1238 See Section 8.4.1 for an outline of how to use the "inclusion" 1239 output. 1241 5.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and Consistency 1242 Proof by Leaf Hash 1244 GET https:///ct/v2/get-all-by-hash 1246 Inputs: 1248 hash: A base64 encoded v2 leaf hash. 1250 tree_size: The tree_size of the tree on which to base the proofs, 1251 in decimal. 1253 The "hash" must be calculated as defined in Section 4.5. The 1254 "tree_size" must designate an existing v2 STH. 1256 Because of skew, the front-end may not know the requested STH or 1257 the requested hash, which leads to a number of cases. 1259 latest STH < requested STH Return latest STH. 1261 latest STH > requested STH Return latest STH and a consistency 1262 proof between it and the requested STH (see Section 5.4). 1264 index of requested hash < latest STH Return "inclusion". 1266 Note that more than one case can be true, in which case the 1267 returned data is their concatenation. It is also possible for 1268 none to be true, in which case the front-end MUST return an empty 1269 response. 1271 Outputs: 1273 inclusion: A base64 encoded "TransItem" of type 1274 "inclusion_proof_v2" whose "inclusion_path" array of Merkle 1275 Tree nodes proves the inclusion of the chosen certificate in 1276 the returned STH. 1278 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1279 signed by this log. 1281 consistency: A base64 encoded "TransItem" of type 1282 "consistency_proof_v2" that proves the consistency of the 1283 requested STH and the returned STH. 1285 Note that no signature is required for the "inclusion" or 1286 "consistency" outputs as they are used to verify inclusion in and 1287 consistency of STHs, which are signed. 1289 Errors are the same as in Section 5.5. 1291 See Section 8.4.1 for an outline of how to use the "inclusion" 1292 output, and see Section 8.4.2 for an outline of how to use the 1293 "consistency" output. 1295 5.7. Retrieve Entries and STH from Log 1297 GET https:///ct/v2/get-entries 1299 Inputs: 1301 start: 0-based index of first entry to retrieve, in decimal. 1303 end: 0-based index of last entry to retrieve, in decimal. 1305 Outputs: 1307 entries: An array of objects, each consisting of 1309 leaf_input: The base64 encoded "TransItem" structure of type 1310 "x509_entry_v2" or "precert_entry_v2" (see Section 4.5). 1312 log_entry: The base64 encoded log entry (see Section 4.2). In 1313 the case of an "x509_entry_v2" entry, this is the whole 1314 "X509ChainEntry"; and in the case of a "precert_entry_v2", 1315 this is the whole "PrecertChainEntryV2". 1317 sct: The base64 encoded "TransItem" of type "x509_sct_v2" or 1318 "precert_sct_v2" corresponding to this log entry. 1320 sth: A base64 encoded "TransItem" of type "signed_tree_head_v2", 1321 signed by this log. 1323 Note that this message is not signed -- the "entries" data can be 1324 verified by constructing the Merkle Tree Hash corresponding to a 1325 retrieved STH. All leaves MUST be v2. However, a compliant v2 1326 client MUST NOT construe an unrecognized TransItem type as an error. 1327 This means it may be unable to parse some entries, but note that each 1328 client can inspect the entries it does recognize as well as verify 1329 the integrity of the data by treating unrecognized leaves as opaque 1330 input to the tree. 1332 The "start" and "end" parameters SHOULD be within the range 0 <= x < 1333 "tree_size" as returned by "get-sth" in Section 5.3. 1335 The "start" parameter MUST be less than or equal to the "end" 1336 parameter. 1338 Log servers MUST honor requests where 0 <= "start" < "tree_size" and 1339 "end" >= "tree_size" by returning a partial response covering only 1340 the valid entries in the specified range. "end" >= "tree_size" could 1341 be caused by skew. Note that the following restriction may also 1342 apply: 1344 Logs MAY restrict the number of entries that can be retrieved per 1345 "get-entries" request. If a client requests more than the permitted 1346 number of entries, the log SHALL return the maximum number of entries 1347 permissible. These entries SHALL be sequential beginning with the 1348 entry specified by "start". 1350 Because of skew, it is possible the log server will not have any 1351 entries between "start" and "end". In this case it MUST return an 1352 empty "entries" array. 1354 In any case, the log server MUST return the latest STH it knows 1355 about. 1357 See Section 8.4.3 for an outline of how to use a complete list of 1358 "leaf_input" entries to verify the "root_hash". 1360 5.8. Retrieve Accepted Trust Anchors 1362 GET https:///ct/v2/get-anchors 1364 No inputs. 1366 Outputs: 1368 certificates: An array of base64 encoded trust anchors that are 1369 acceptable to the log. 1371 max_chain: If the server has chosen to limit the length of chains 1372 it accepts, this is the maximum number of certificates in the 1373 chain, in decimal. If there is no limit, this is omitted. 1375 6. TLS Servers 1377 TLS servers MUST use at least one of the three mechanisms listed 1378 below to present one or more SCTs from one or more logs to each TLS 1379 client during full TLS handshakes, where each SCT corresponds to the 1380 server certificate. TLS servers SHOULD also present corresponding 1381 inclusion proofs and STHs (see Section 6.3). 1383 Three mechanisms are provided because they have different tradeoffs. 1385 o A TLS extension (Section 7.4.1.4 of [RFC5246]) with type 1386 "transparency_info" (see Section 6.5). This mechanism allows TLS 1387 servers to participate in CT without the cooperation of CAs, 1388 unlike the other two mechanisms. It also allows SCTs and 1389 inclusion proofs to be updated on the fly. 1391 o An Online Certificate Status Protocol (OCSP) [RFC6960] response 1392 extension (see Section 7.1.1), where the OCSP response is provided 1393 in the "CertificateStatus" message, provided that the TLS client 1394 included the "status_request" extension in the (extended) 1395 "ClientHello" (Section 8 of [RFC6066]). This mechanism, popularly 1396 known as OCSP stapling, is already widely (but not universally) 1397 implemented. It also allows SCTs and inclusion proofs to be 1398 updated on the fly. 1400 o An X509v3 certificate extension (see Section 7.1.2). This 1401 mechanism allows the use of unmodified TLS servers, but the SCTs 1402 and inclusion proofs cannot be updated on the fly. Since the logs 1403 from which the SCTs and inclusion proofs originated won't 1404 necessarily be accepted by TLS clients for the full lifetime of 1405 the certificate, there is a risk that TLS clients will 1406 subsequently consider the certificate to be non-compliant and in 1407 need of re-issuance. 1409 Additionally, a TLS server which supports presenting SCTs using an 1410 OCSP response MAY provide it when the TLS client included the 1411 "status_request_v2" extension ([RFC6961]) in the (extended) 1412 "ClientHello", but only in addition to at least one of the three 1413 mechanisms listed above. 1415 6.1. Multiple SCTs 1417 TLS servers SHOULD send SCTs from multiple logs in case one or more 1418 logs are not acceptable to the TLS client (for example, if a log has 1419 been struck off for misbehavior, has had a key compromise, or is not 1420 known to the TLS client). For example: 1422 o If a CA and a log collude, it is possible to temporarily hide 1423 misissuance from clients. Including SCTs from different logs 1424 makes it more difficult to mount this attack. 1426 o If a log misbehaves, a consequence may be that clients cease to 1427 trust it. Since the time an SCT may be in use can be considerable 1428 (several years is common in current practice when embedded in a 1429 certificate), servers may wish to reduce the probability of their 1430 certificates being rejected as a result by including SCTs from 1431 different logs. 1433 o TLS clients may have policies related to the above risks requiring 1434 servers to present multiple SCTs. For example, at the time of 1435 writing, Chromium [Chromium.Log.Policy] requires multiple SCTs to 1436 be presented with EV certificates in order for the EV indicator to 1437 be shown. 1439 To select the logs from which to obtain SCTs, a TLS server can, for 1440 example, examine the set of logs popular TLS clients accept and 1441 recognize. 1443 6.2. TransItemList Structure 1445 Multiple SCTs, inclusion proofs, and indeed "TransItem" structures of 1446 any type, are combined into a list as follows: 1448 opaque SerializedTransItem<1..2^16-1>; 1450 struct { 1451 SerializedTransItem trans_item_list<1..2^16-1>; 1452 } TransItemList; 1454 Here, "SerializedTransItem" is an opaque byte string that contains 1455 the serialized "TransItem" structure. This encoding ensures that TLS 1456 clients can decode each "TransItem" individually (so, for example, if 1457 there is a version upgrade, out-of-date clients can still parse old 1458 "TransItem" structures while skipping over new "TransItem" structures 1459 whose versions they don't understand). 1461 6.3. Presenting SCTs, inclusion proofs and STHs 1463 When constructing a "TransItemList" structure, a TLS server SHOULD 1464 construct and include "TransItem" structures of type 1465 "x509_sct_with_proof_v2" (for an SCT of type "x509_sct_v2") or 1466 "precert_sct_with_proof_v2" (for an SCT of type "precert_sct_v2"), 1467 both of which encapsulate a "SCTWithProofDataV2" structure: 1469 struct { 1470 SignedCertificateTimestampDataV2 sct; 1471 SignedTreeHeadDataV2 sth; 1472 InclusionProofDataV2 inclusion_proof; 1473 } SCTWithProofDataV2; 1475 "sct" is the encapsulated data structure from an SCT that corresponds 1476 to the server certificate. 1478 "sth" is the encapsulated data structure from an STH that was signed 1479 by the same log as "sct". 1481 "inclusion_proof" is the encapsulated data structure from an 1482 inclusion proof that corresponds to "sct" and can be used to compute 1483 the root in "sth". 1485 6.4. Presenting SCTs only 1487 Presenting inclusion proofs and STHs in the TLS handshake helps to 1488 protect the client's privacy (see Section 8.2.4) and reduces load on 1489 log servers. However, if a TLS server is unable to obtain an 1490 inclusion proof and STH that correspond to an SCT, then it MUST 1491 include "TransItem" structures of type "x509_sct_v2" or 1492 "precert_sct_v2" in the "TransItemList". 1494 6.5. transparency_info TLS Extension 1496 Provided that a TLS client includes the "transparency_info" extension 1497 type in the ClientHello, the TLS server SHOULD include the 1498 "transparency_info" extension in the ServerHello with 1499 "extension_data" set to a "TransItemList". The TLS server SHOULD 1500 ignore any "extension_data" sent by the TLS client. Additionally, 1501 the TLS server MUST NOT process or include this extension when a TLS 1502 session is resumed, since session resumption uses the original 1503 session information. 1505 6.6. cached_info TLS Extension 1507 When a TLS server includes the "transparency_info" extension in the 1508 ServerHello, it SHOULD NOT include any "TransItem" structures of type 1509 "x509_sct_with_proof_v2", "x509_sct_v2", "precert_sct_with_proof_v2" 1510 or "precert_sct_v2" in the "TransItemList" if all of the following 1511 conditions are met: 1513 o The TLS client includes the "transparency_info" extension type in 1514 the ClientHello. 1516 o The TLS client includes the "cached_info" ([RFC7924]) extension 1517 type in the ClientHello, with a "CachedObject" of type 1518 "ct_compliant" (see Section 8.2.7) and at least one "CachedObject" 1519 of type "cert". 1521 o The TLS server sends a modified Certificate message (as described 1522 in section 4.1 of [RFC7924]). 1524 TLS servers SHOULD ignore the "hash_value" fields of each 1525 "CachedObject" of type "ct_compliant" sent by TLS clients. 1527 7. Certification Authorities 1528 7.1. Transparency Information X.509v3 Extension 1530 The Transparency Information X.509v3 extension, which has OID 1531 1.3.101.75 and SHOULD be non-critical, contains one or more 1532 "TransItem" structures in a "TransItemList". This extension MAY be 1533 included in OCSP responses (see Section 7.1.1) and certificates (see 1534 Section 7.1.2). Since RFC5280 requires the "extnValue" field (an 1535 OCTET STRING) of each X.509v3 extension to include the DER encoding 1536 of an ASN.1 value, a "TransItemList" MUST NOT be included directly. 1537 Instead, it MUST be wrapped inside an additional OCTET STRING, which 1538 is then put into the "extnValue" field: 1540 TransparencyInformationSyntax ::= OCTET STRING 1542 "TransparencyInformationSyntax" contains a "TransItemList". 1544 7.1.1. OCSP Response Extension 1546 A certification authority MAY include a Transparency Information 1547 X.509v3 extension in the "singleExtensions" of a "SingleResponse" in 1548 an OCSP response. The included SCTs or inclusion proofs MUST be for 1549 the certificate identified by the "certID" of that "SingleResponse", 1550 or for a precertificate that corresponds to that certificate. 1552 7.1.2. Certificate Extension 1554 A certification authority MAY include a Transparency Information 1555 X.509v3 extension in a certificate. Any included SCTs or inclusion 1556 proofs MUST be for a precertificate that corresponds to this 1557 certificate. 1559 7.2. TLS Feature Extension 1561 A certification authority MAY include the transparency_info 1562 (Section 6.5) TLS extension identifier in the TLS Feature [RFC7633] 1563 certificate extension in root, intermediate and end-entity 1564 certificates. When a certificate chain includes such a certificate, 1565 this indicates that CT compliance is required. 1567 8. Clients 1569 There are various different functions clients of logs might perform. 1570 We describe here some typical clients and how they should function. 1571 Any inconsistency may be used as evidence that a log has not behaved 1572 correctly, and the signatures on the data structures prevent the log 1573 from denying that misbehavior. 1575 All clients need various metadata in order to communicate with logs 1576 and verify their responses. This metadata is described below, but 1577 note that this document does not describe how the metadata is 1578 obtained, which is implementation dependent (see, for example, 1579 [Chromium.Policy]). 1581 Clients should somehow exchange STHs they see, or make them available 1582 for scrutiny, in order to ensure that they all have a consistent 1583 view. The exact mechanisms will be in separate documents, but it is 1584 expected there will be a variety. 1586 8.1. Metadata 1588 In order to communicate with and verify a log, clients need metadata 1589 about the log. 1591 Base URL: The URL to substitute for in Section 5. 1593 Hash Algorithm: The hash algorithm used for the Merkle Tree (see 1594 Section 10.3). 1596 Signing Algorithm: The signing algorithm used (see Section 2.1.4). 1598 Public Key: The public key used to verify signatures generated by 1599 the log. A log MUST NOT use the same keypair as any other log. 1601 Log ID: The OID that uniquely identifies the log. 1603 Maximum Merge Delay: The MMD the log has committed to. 1605 Version: The version of the protocol supported by the log (currently 1606 1 or 2). 1608 Maximum Chain Length: The longest chain submission the log is 1609 willing to accept, if the log chose to limit it. 1611 STH Frequency Count: The maximum number of STHs the log may produce 1612 in any period equal to the "Maximum Merge Delay" (see 1613 Section 4.8). 1615 Final STH: If a log has been closed down (i.e., no longer accepts 1616 new entries), existing entries may still be valid. In this case, 1617 the client should know the final valid STH in the log to ensure no 1618 new entries can be added without detection. The final STH should 1619 be provided in the form of a TransItem of type 1620 "signed_tree_head_v2". 1622 [JSON.Metadata] is an example of a metadata format which includes the 1623 above elements. 1625 8.2. TLS Client 1627 8.2.1. Receiving SCTs 1629 TLS clients receive SCTs alongside or in certificates. TLS clients 1630 MUST implement all of the three mechanisms by which TLS servers may 1631 present SCTs (see Section 6). TLS clients MAY also accept SCTs via 1632 the "status_request_v2" extension ([RFC6961]). TLS clients that 1633 support the "transparency_info" TLS extension SHOULD include it in 1634 ClientHello messages, with empty "extension_data". TLS clients may 1635 also receive inclusion proofs in addition to SCTs, which should be 1636 checked once the SCTs are validated. 1638 8.2.2. Reconstructing the TBSCertificate 1640 To reconstruct the TBSCertificate component of a precertificate from 1641 a certificate, TLS clients should remove the Transparency Information 1642 extension described in Section 7.1. 1644 If the SCT checked is for a Precertificate (where the "type" of the 1645 "TransItem" is "precert_sct_v2"), then the client SHOULD also remove 1646 embedded v1 SCTs, identified by OID 1.3.6.1.4.1.11129.2.4.2 (See 1647 Section 3.3. of [RFC6962]), in the process of reconstructing the 1648 TBSCertificate. That is to allow embedded v1 and v2 SCTs to co-exist 1649 in a certificate (See Appendix A). 1651 8.2.3. Validating SCTs 1653 In addition to normal validation of the server certificate and its 1654 chain, TLS clients SHOULD validate each received SCT for which they 1655 have the corresponding log's metadata. To validate an SCT, a TLS 1656 client computes the signature input from the SCT data and the server 1657 certificate, and then verifies the signature using the corresponding 1658 log's public key. TLS clients MUST NOT consider valid any SCT whose 1659 timestamp is in the future. 1661 8.2.4. Validating inclusion proofs 1663 After validating a received SCT, a TLS client MAY request a 1664 corresponding inclusion proof (if one is not already available) and 1665 then verify it. An inclusion proof can be requested directly from a 1666 log using "get-proof-by-hash" (Section 5.5) or "get-all-by-hash" 1667 (Section 5.6), but note that this will disclose to the log which TLS 1668 server the client has been communicating with. 1670 Alternatively, if the TLS client has received an inclusion proof (and 1671 an STH) alongside the SCT, it can proceed to verifying the inclusion 1672 proof to the provided STH. The client then has to verify consistency 1673 between the provided STH and an STH it knows about, which is less 1674 sensitive from a privacy perspective. 1676 TLS clients SHOULD also verify each received inclusion proof (see 1677 Section 8.4.1) for which they have the corresponding log's metadata, 1678 to audit the log and gain confidence that the certificate is logged. 1680 If the TLS client holds an STH that predates the SCT, it MAY, in the 1681 process of auditing, request a new STH from the log (Section 5.3), 1682 then verify it by requesting a consistency proof (Section 5.4). Note 1683 that if the TLS client uses "get-all-by-hash", then it will already 1684 have the new STH. 1686 8.2.5. Evaluating compliance 1688 To be considered compliant, a certificate MUST be accompanied by at 1689 least one valid SCT. A certificate not accompanied by any valid SCTs 1690 MUST NOT be considered compliant by TLS clients. 1692 A TLS client MUST NOT evaluate compliance if it did not send both the 1693 "transparency_info" and "status_request" TLS extensions in the 1694 ClientHello. 1696 8.2.6. TLS Feature Extension 1698 If any certificate in a chain includes the transparency_info 1699 (Section 6.5) TLS extension identifier in the TLS Feature [RFC7633] 1700 certificate extension, then CT compliance (using any of the 1701 mechanisms from Section 6) is required. 1703 8.2.7. cached_info TLS Extension 1705 If a TLS client uses the "cached_info" TLS extension ([RFC7924]) to 1706 indicate 1 or more cached certificates, all of which it already 1707 considers to be CT compliant, the TLS client MAY also include a 1708 "CachedObject" of type "ct_compliant" in the "cached_info" extension. 1709 The "hash_value" field MUST be 1 byte long with the value 0. 1711 8.2.8. Handling of Non-compliance 1713 If a TLS server presents a certificate chain that is non-compliant, 1714 and the use of a compliant certificate is mandated by an explicit 1715 security policy, application protocol specification, the TLS Feature 1716 extension or any other means, the TLS client MUST refuse the 1717 connection. 1719 8.3. Monitor 1721 Monitors watch logs to check that they behave correctly, for 1722 certificates of interest, or both. For example, a monitor may be 1723 configured to report on all certificates that apply to a specific 1724 domain name when fetching new entries for consistency validation. 1726 A monitor needs to, at least, inspect every new entry in each log it 1727 watches. It may also want to keep copies of entire logs. In order 1728 to do this, it should follow these steps for each log: 1730 1. Fetch the current STH (Section 5.3). 1732 2. Verify the STH signature. 1734 3. Fetch all the entries in the tree corresponding to the STH 1735 (Section 5.7). 1737 4. Confirm that the tree made from the fetched entries produces the 1738 same hash as that in the STH. 1740 5. Fetch the current STH (Section 5.3). Repeat until the STH 1741 changes. 1743 6. Verify the STH signature. 1745 7. Fetch all the new entries in the tree corresponding to the STH 1746 (Section 5.7). If they remain unavailable for an extended 1747 period, then this should be viewed as misbehavior on the part of 1748 the log. 1750 8. Either: 1752 1. Verify that the updated list of all entries generates a tree 1753 with the same hash as the new STH. 1755 Or, if it is not keeping all log entries: 1757 1. Fetch a consistency proof for the new STH with the previous 1758 STH (Section 5.4). 1760 2. Verify the consistency proof. 1762 3. Verify that the new entries generate the corresponding 1763 elements in the consistency proof. 1765 9. Go to Step 5. 1767 8.4. Auditing 1769 Auditing ensures that the current published state of a log is 1770 reachable from previously published states that are known to be good, 1771 and that the promises made by the log in the form of SCTs have been 1772 kept. Audits are performed by monitors or TLS clients. 1774 In particular, there are four log behaviour properties that should be 1775 checked: 1777 o The Maximum Merge Delay (MMD). 1779 o The STH Frequency Count. 1781 o The append-only property. 1783 o The consistency of the log view presented to all query sources. 1785 A benign, conformant log publishes a series of STHs over time, each 1786 derived from the previous STH and the submitted entries incorporated 1787 into the log since publication of the previous STH. This can be 1788 proven through auditing of STHs. SCTs returned to TLS clients can be 1789 audited by verifying against the accompanying certificate, and using 1790 Merkle Inclusion Proofs, against the log's Merkle tree. 1792 The action taken by the auditor if an audit fails is not specified, 1793 but note that in general if audit fails, the auditor is in possession 1794 of signed proof of the log's misbehavior. 1796 A monitor (Section 8.3) can audit by verifying the consistency of 1797 STHs it receives, ensure that each entry can be fetched and that the 1798 STH is indeed the result of making a tree from all fetched entries. 1800 A TLS client (Section 8.2) can audit by verifying an SCT against any 1801 STH dated after the SCT timestamp + the Maximum Merge Delay by 1802 requesting a Merkle inclusion proof (Section 5.5). It can also 1803 verify that the SCT corresponds to the server certificate it arrived 1804 with (i.e., the log entry is that certificate, or is a precertificate 1805 corresponding to that certificate). 1807 Checking of the consistency of the log view presented to all entities 1808 is more difficult to perform because it requires a way to share log 1809 responses among a set of CT-aware entities, and is discussed in 1810 Section 11.3. 1812 The following algorithm outlines may be useful for clients that wish 1813 to perform various audit operations. 1815 8.4.1. Verifying an inclusion proof 1817 When a client has received a "TransItem" of type "inclusion_proof_v2" 1818 and wishes to verify inclusion of an input "hash" for an STH with a 1819 given "tree_size" and "root_hash", the following algorithm may be 1820 used to prove the "hash" was included in the "root_hash": 1822 1. Compare "leaf_index" against "tree_size". If "leaf_index" is 1823 greater than or equal to "tree_size" fail the proof verification. 1825 2. Set "fn" to "leaf_index" and "sn" to "tree_size - 1". 1827 3. Set "r" to "hash". 1829 4. For each value "p" in the "inclusion_path" array: 1831 If "sn" is 0, stop the iteration and fail the proof verification. 1833 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 1835 1. Set "r" to "HASH(0x01 || p || r)" 1837 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 1838 equally until either "LSB(fn)" is set or "fn" is "0". 1840 Otherwise: 1842 1. Set "r" to "HASH(0x01 || r || p)" 1844 Finally, right-shift both "fn" and "sn" one time. 1846 5. Compare "sn" to 0. Compare "r" against the "root_hash". If "sn" 1847 is equal to 0, and "r" and the "root_hash" are equal, then the 1848 log has proven the inclusion of "hash". Otherwise, fail the 1849 proof verification. 1851 8.4.2. Verifying consistency between two STHs 1853 When a client has an STH "first_hash" for tree size "first", an STH 1854 "second_hash" for tree size "second" where "0 < first < second", and 1855 has received a "TransItem" of type "consistency_proof_v2" that they 1856 wish to use to verify both hashes, the following algorithm may be 1857 used: 1859 1. If "first" is an exact power of 2, then prepend "first_hash" to 1860 the "consistency_path" array. 1862 2. Set "fn" to "first - 1" and "sn" to "second - 1". 1864 3. If "LSB(fn)" is set, then right-shift both "fn" and "sn" equally 1865 until "LSB(fn)" is not set. 1867 4. Set both "fr" and "sr" to the first value in the 1868 "consistency_path" array. 1870 5. For each subsequent value "c" in the "consistency_path" array: 1872 If "sn" is 0, stop the iteration and fail the proof verification. 1874 If "LSB(fn)" is set, or if "fn" is equal to "sn", then: 1876 1. Set "fr" to "HASH(0x01 || c || fr)" 1877 Set "sr" to "HASH(0x01 || c || sr)" 1879 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 1880 equally until either "LSB(fn)" is set or "fn" is "0". 1882 Otherwise: 1884 1. Set "sr" to "HASH(0x01 || sr || c)" 1886 Finally, right-shift both "fn" and "sn" one time. 1888 6. After completing iterating through the "consistency_path" array 1889 as described above, verify that the "fr" calculated is equal to 1890 the "first_hash" supplied, that the "sr" calculated is equal to 1891 the "second_hash" supplied and that "sn" is 0. 1893 8.4.3. Verifying root hash given entries 1895 When a client has a complete list of leaf input "entries" from "0" up 1896 to "tree_size - 1" and wishes to verify this list against an STH 1897 "root_hash" returned by the log for the same "tree_size", the 1898 following algorithm may be used: 1900 1. Set "stack" to an empty stack. 1902 2. For each "i" from "0" up to "tree_size - 1": 1904 1. Push "HASH(0x00 || entries[i])" to "stack". 1906 2. Set "merge_count" to the lowest value ("0" included) such 1907 that "LSB(i >> merge_count)" is not set. In other words, set 1908 "merge_count" to the number of consecutive "1"s found 1909 starting at the least significant bit of "i". 1911 3. Repeat "merge_count" times: 1913 1. Pop "right" from "stack". 1915 2. Pop "left" from "stack". 1917 3. Push "HASH(0x01 || left || right)" to "stack". 1919 3. If there is more than one element in the "stack", repeat the same 1920 merge procedure (Step 2.3 above) until only a single element 1921 remains. 1923 4. The remaining element in "stack" is the Merkle Tree hash for the 1924 given "tree_size" and should be compared by equality against the 1925 supplied "root_hash". 1927 9. Algorithm Agility 1929 It is not possible for a log to change any of its algorithms part way 1930 through its lifetime: 1932 Signature algorithm: SCT signatures must remain valid so signature 1933 algorithms can only be added, not removed. 1935 Hash algorithm: A log would have to support the old and new hash 1936 algorithms to allow backwards-compatibility with clients that are 1937 not aware of a hash algorithm change. 1939 Allowing multiple signature or hash algorithms for a log would 1940 require that all data structures support it and would significantly 1941 complicate client implementation, which is why it is not supported by 1942 this document. 1944 If it should become necessary to deprecate an algorithm used by a 1945 live log, then the log should be frozen as specified in Section 8.1 1946 and a new log should be started. Certificates in the frozen log that 1947 have not yet expired and require new SCTs SHOULD be submitted to the 1948 new log and the SCTs from that log used instead. 1950 10. IANA Considerations 1952 The assignment policy criteria mentioned in this section refer to the 1953 policies outlined in [RFC5226]. 1955 10.1. TLS Extension Type 1957 IANA is asked to allocate an RFC 5246 ExtensionType value for the 1958 "transparency_info" TLS extension. IANA should update this extension 1959 type to point at this document. 1961 10.2. New Entry to the TLS CachedInformationType registry 1963 IANA is asked to add an entry for "ct_compliant(TBD)" to the "TLS 1964 CachedInformationType Values" registry that was defined in [RFC7924]. 1966 10.3. Hash Algorithms 1968 IANA is asked to establish a registry of hash algorithm values, named 1969 "CT Hash Algorithms", that initially consists of: 1971 +------------+---------------+--------------------------------------+ 1972 | Value | Hash | Reference / Assignment Policy | 1973 | | Algorithm | | 1974 +------------+---------------+--------------------------------------+ 1975 | 0x00 | SHA-256 | [RFC4634] | 1976 | | | | 1977 | 0x01 - | Unassigned | Specification Required and Expert | 1978 | 0xDF | | Review | 1979 | | | | 1980 | 0xE0 - | Reserved | Experimental Use | 1981 | 0xEF | | | 1982 | | | | 1983 | 0xF0 - | Reserved | Private Use | 1984 | 0xFF | | | 1985 +------------+---------------+--------------------------------------+ 1987 10.3.1. Expert Review guidelines 1989 The appointed Expert should ensure that the proposed algorithm has a 1990 public specification and is suitable for use as a cryptographic hash 1991 algorithm with no known preimage or collision attacks. These attacks 1992 can damage the integrity of the log. 1994 10.4. Signature Algorithms 1996 IANA is asked to establish a registry of signature algorithm values, 1997 named "CT Signature Algorithms", that initially consists of: 1999 +---------+-------------------------------+-------------------------+ 2000 | Value | Signature Algorithm | Reference / Assignment | 2001 | | | Policy | 2002 +---------+-------------------------------+-------------------------+ 2003 | 0x00 | Deterministic ECDSA (NIST | [RFC6979] | 2004 | | P-256) with HMAC-SHA256 | | 2005 | | | | 2006 | 0x01 | RSA (RSASSA-PKCS1-v1_5, key | [RFC8017] | 2007 | | >= 2048 bits) with SHA-256 | | 2008 | | | | 2009 | 0x02 - | Unassigned | Specification Required | 2010 | 0xDF | | and Expert Review | 2011 | | | | 2012 | 0xE0 - | Reserved | Experimental Use | 2013 | 0xEF | | | 2014 | | | | 2015 | 0xF0 - | Reserved | Private Use | 2016 | 0xFF | | | 2017 +---------+-------------------------------+-------------------------+ 2019 10.4.1. Expert Review guidelines 2021 The appointed Expert should ensure that the proposed algorithm has a 2022 public specification and is suitable for use as a cryptographic 2023 signature algorithm that always generates signatures 2024 deterministically (for the reasons listed in Section 11.4). 2026 10.5. VersionedTransTypes 2028 IANA is asked to establish a registry of "VersionedTransType" values, 2029 named "CT VersionedTransTypes", that initially consists of: 2031 +------------+---------------------------+--------------------------+ 2032 | Value | Type and Version | Reference / Assignment | 2033 | | | Policy | 2034 +------------+---------------------------+--------------------------+ 2035 | 0x0000 | Reserved | [RFC6962] (*) | 2036 | | | | 2037 | 0x0001 | x509_entry_v2 | RFCXXXX | 2038 | | | | 2039 | 0x0002 | precert_entry_v2 | RFCXXXX | 2040 | | | | 2041 | 0x0003 | x509_sct_v2 | RFCXXXX | 2042 | | | | 2043 | 0x0004 | precert_sct_v2 | RFCXXXX | 2044 | | | | 2045 | 0x0005 | signed_tree_head_v2 | RFCXXXX | 2046 | | | | 2047 | 0x0006 | consistency_proof_v2 | RFCXXXX | 2048 | | | | 2049 | 0x0007 | inclusion_proof_v2 | RFCXXXX | 2050 | | | | 2051 | 0x0008 | x509_sct_with_proof_v2 | RFCXXXX | 2052 | | | | 2053 | 0x0009 | precert_sct_with_proof_v2 | RFCXXXX | 2054 | | | | 2055 | 0x0010 - | Unassigned | Specification Required | 2056 | 0xDFFF | | and Expert Review | 2057 | | | | 2058 | 0xE000 - | Reserved | Experimental Use | 2059 | 0xEFFF | | | 2060 | | | | 2061 | 0xF000 - | Reserved | Private Use | 2062 | 0xFFFF | | | 2063 +------------+---------------------------+--------------------------+ 2065 (*) The 0x0000 value is reserved so that v1 SCTs are distinguishable 2066 from v2 SCTs and other "TransItem" structures. 2068 [RFC Editor: please update 'RFCXXXX' to refer to this document, once 2069 its RFC number is known.] 2071 10.5.1. Expert Review guidelines 2073 The appointed Expert should review the public specification to ensure 2074 that it is detailed enough to ensure implementation interoperability. 2076 10.6. SCT Extensions 2078 IANA is asked to establish a registry of SCT extensions, named "CT 2079 Extension Types for SCT", that initially consists of: 2081 +----------------+------------+-------------------------------------+ 2082 | Value | Extension | Reference / Assignment Policy | 2083 +----------------+------------+-------------------------------------+ 2084 | 0x0000 - | Unassigned | Specification Required and Expert | 2085 | 0xDFFF | | Review | 2086 | | | | 2087 | 0xE000 - | Reserved | Experimental Use | 2088 | 0xEFFF | | | 2089 | | | | 2090 | 0xF000 - | Reserved | Private Use | 2091 | 0xFFFF | | | 2092 +----------------+------------+-------------------------------------+ 2094 10.6.1. Expert Review guidelines 2096 The appointed Expert should review the public specification to ensure 2097 that it is detailed enough to ensure implementation interoperability. 2099 10.7. STH Extensions 2101 IANA is asked to establish a registry of STH extensions, named "CT 2102 Extension Types for STH", that initially consists of: 2104 +----------------+------------+-------------------------------------+ 2105 | Value | Extension | Reference / Assignment Policy | 2106 +----------------+------------+-------------------------------------+ 2107 | 0x0000 - | Unassigned | Specification Required and Expert | 2108 | 0xDFFF | | Review | 2109 | | | | 2110 | 0xE000 - | Reserved | Experimental Use | 2111 | 0xEFFF | | | 2112 | | | | 2113 | 0xF000 - | Reserved | Private Use | 2114 | 0xFFFF | | | 2115 +----------------+------------+-------------------------------------+ 2117 10.7.1. Expert Review guidelines 2119 The appointed Expert should review the public specification to ensure 2120 that it is detailed enough to ensure implementation interoperability. 2122 10.8. Object Identifiers 2124 This document uses object identifiers (OIDs) to identify Log IDs (see 2125 Section 4.3), the precertificate CMS "eContentType" (see 2126 Section 3.2), and X.509v3 extensions in certificates (see 2127 Section 7.1.2) and OCSP responses (see Section 7.1.1). The OIDs are 2128 defined in an arc that was selected due to its short encoding. 2130 10.8.1. Log ID Registry 2132 IANA is asked to establish a registry of Log IDs, named "CT Log ID 2133 Registry", that initially consists of: 2135 +-------------------------+------------+----------------------------+ 2136 | Value | Log | Reference / Assignment | 2137 | | | Policy | 2138 +-------------------------+------------+----------------------------+ 2139 | 1.3.101.8192 - | Unassigned | Metadata Required and | 2140 | 1.3.101.16383 | | Expert Review | 2141 | | | | 2142 | 1.3.101.80.0 - | Unassigned | Metadata Required and | 2143 | 1.3.101.80.127 | | Expert Review | 2144 | | | | 2145 | 1.3.101.80.128 - | Unassigned | First Come First Served | 2146 | 1.3.101.80.* | | | 2147 +-------------------------+------------+----------------------------+ 2149 All OIDs in the range from 1.3.101.8192 to 1.3.101.16383 have been 2150 reserved. This is a limited resource of 8,192 OIDs, each of which 2151 has an encoded length of 4 octets. 2153 The 1.3.101.80 arc has been delegated. This is an unlimited 2154 resource, but only the 128 OIDs from 1.3.101.80.0 to 1.3.101.80.127 2155 have an encoded length of only 4 octets. 2157 Each application for the allocation of a Log ID should be accompanied 2158 by all of the required metadata (except for the Log ID) listed in 2159 Section 8.1. 2161 10.8.2. Expert Review guidelines 2163 Since the Log IDs with the shortest encodings are a limited resource, 2164 the appointed Expert should review the submitted metadata and judge 2165 whether or not the applicant is requesting a Log ID in good faith 2166 (with the intention of actually running a CT log that will be 2167 identified by the allocated Log ID). 2169 11. Security Considerations 2171 With CAs, logs, and servers performing the actions described here, 2172 TLS clients can use logs and signed timestamps to reduce the 2173 likelihood that they will accept misissued certificates. If a server 2174 presents a valid signed timestamp for a certificate, then the client 2175 knows that a log has committed to publishing the certificate. From 2176 this, the client knows that monitors acting for the subject of the 2177 certificate have had some time to notice the misissue and take some 2178 action, such as asking a CA to revoke a misissued certificate, or 2179 that the log has misbehaved, which will be discovered when the SCT is 2180 audited. A signed timestamp is not a guarantee that the certificate 2181 is not misissued, since appropriate monitors might not have checked 2182 the logs or the CA might have refused to revoke the certificate. 2184 In addition, if TLS clients will not accept unlogged certificates, 2185 then site owners will have a greater incentive to submit certificates 2186 to logs, possibly with the assistance of their CA, increasing the 2187 overall transparency of the system. 2189 [I-D.ietf-trans-threat-analysis] provides a more detailed threat 2190 analysis of the Certificate Transparency architecture. 2192 11.1. Misissued Certificates 2194 Misissued certificates that have not been publicly logged, and thus 2195 do not have a valid SCT, are not considered compliant. Misissued 2196 certificates that do have an SCT from a log will appear in that 2197 public log within the Maximum Merge Delay, assuming the log is 2198 operating correctly. Thus, the maximum period of time during which a 2199 misissued certificate can be used without being available for audit 2200 is the MMD. 2202 11.2. Detection of Misissue 2204 The logs do not themselves detect misissued certificates; they rely 2205 instead on interested parties, such as domain owners, to monitor them 2206 and take corrective action when a misissue is detected. 2208 11.3. Misbehaving Logs 2210 A log can misbehave in several ways. Examples include failing to 2211 incorporate a certificate with an SCT in the Merkle Tree within the 2212 MMD, presenting different, conflicting views of the Merkle Tree at 2213 different times and/or to different parties and issuing STHs too 2214 frequently. Such misbehavior is detectable and the 2215 [I-D.ietf-trans-threat-analysis] provides more details on how this 2216 can be done. 2218 Violation of the MMD contract is detected by log clients requesting a 2219 Merkle inclusion proof (Section 5.5) for each observed SCT. These 2220 checks can be asynchronous and need only be done once per each 2221 certificate. In order to protect the clients' privacy, these checks 2222 need not reveal the exact certificate to the log. Instead, clients 2223 can request the proof from a trusted auditor (since anyone can 2224 compute the proofs from the log) or communicate with the log via 2225 proxies. 2227 Violation of the append-only property or the STH issuance rate limit 2228 can be detected by clients comparing their instances of the Signed 2229 Tree Heads. There are various ways this could be done, for example 2230 via gossip (see [I-D.ietf-trans-gossip]) or peer-to-peer 2231 communications or by sending STHs to monitors (who could then 2232 directly check against their own copy of the relevant log). A proof 2233 of misbehavior in such cases would be a series of STHs that were 2234 issued too closely together, proving violation of the STH issuance 2235 rate limit, or an STH with a root hash that does not match the one 2236 calculated from a copy of the log, proving violation of the append- 2237 only property. 2239 11.4. Deterministic Signatures 2241 Logs are required to use deterministic signatures for the following 2242 reasons: 2244 o Using non-deterministic ECDSA with a predictable source of 2245 randomness means that each signature can potentially expose the 2246 secret material of the signing key. 2248 o Clients that gossip STHs or report back SCTs can be tracked or 2249 traced if a log was to produce multiple STHs or SCTs with the same 2250 timestamp and data but different signatures. 2252 11.5. Multiple SCTs 2254 By offering multiple SCTs, each from a different log, TLS servers 2255 reduce the effectiveness of an attack where a CA and a log collude 2256 (see Section 6.1). 2258 12. Acknowledgements 2260 The authors would like to thank Erwann Abelea, Robin Alden, Andrew 2261 Ayer, Al Cutter, David Drysdale, Francis Dupont, Adam Eijdenberg, 2262 Stephen Farrell, Daniel Kahn Gillmor, Paul Hadfield, Brad Hill, Jeff 2263 Hodges, Paul Hoffman, Jeffrey Hutzelman, Kat Joyce, Stephen Kent, SM, 2264 Alexey Melnikov, Linus Nordberg, Chris Palmer, Trevor Perrin, Pierre 2265 Phaneuf, Melinda Shore, Ryan Sleevi, Martin Smith, Carl Wallace and 2266 Paul Wouters for their valuable contributions. 2268 A big thank you to Symantec for kindly donating the OIDs from the 2269 1.3.101 arc that are used in this document. 2271 13. References 2273 13.1. Normative References 2275 [HTML401] Raggett, D., Le Hors, A., and I. Jacobs, "HTML 4.01 2276 Specification", World Wide Web Consortium Recommendation 2277 REC-html401-19991224, December 1999, 2278 . 2280 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2281 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 2282 RFC2119, March 1997, 2283 . 2285 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 2286 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 2287 . 2289 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2290 (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/ 2291 RFC5246, August 2008, 2292 . 2294 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 2295 Housley, R., and W. Polk, "Internet X.509 Public Key 2296 Infrastructure Certificate and Certificate Revocation List 2297 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 2298 . 2300 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2301 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2302 . 2304 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 2305 "Network Time Protocol Version 4: Protocol and Algorithms 2306 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 2307 . 2309 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 2310 Extensions: Extension Definitions", RFC 6066, DOI 10.17487 2311 /RFC6066, January 2011, 2312 . 2314 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 2315 Galperin, S., and C. Adams, "X.509 Internet Public Key 2316 Infrastructure Online Certificate Status Protocol - OCSP", 2317 RFC 6960, DOI 10.17487/RFC6960, June 2013, 2318 . 2320 [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) 2321 Multiple Certificate Status Request Extension", RFC 6961, 2322 DOI 10.17487/RFC6961, June 2013, 2323 . 2325 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2326 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 2327 2014, . 2329 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2330 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, DOI 2331 10.17487/RFC7231, June 2014, 2332 . 2334 [RFC7633] Hallam-Baker, P., "X.509v3 Transport Layer Security (TLS) 2335 Feature Extension", RFC 7633, DOI 10.17487/RFC7633, 2336 October 2015, . 2338 [RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security 2339 (TLS) Cached Information Extension", RFC 7924, DOI 2340 10.17487/RFC7924, July 2016, 2341 . 2343 [RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, 2344 "PKCS #1: RSA Cryptography Specifications Version 2.2", 2345 RFC 8017, DOI 10.17487/RFC8017, November 2016, 2346 . 2348 13.2. Informative References 2350 [Chromium.Log.Policy] 2351 The Chromium Projects, "Chromium Certificate Transparency 2352 Log Policy", 2014, . 2355 [Chromium.Policy] 2356 The Chromium Projects, "Chromium Certificate 2357 Transparency", 2014, . 2360 [CrosbyWallach] 2361 Crosby, S. and D. Wallach, "Efficient Data Structures for 2362 Tamper-Evident Logging", Proceedings of the 18th USENIX 2363 Security Symposium, Montreal, August 2009, 2364 . 2367 [I-D.ietf-trans-gossip] 2368 Nordberg, L., Gillmor, D., and T. Ritter, "Gossiping in 2369 CT", draft-ietf-trans-gossip-03 (work in progress), July 2370 2016. 2372 [I-D.ietf-trans-threat-analysis] 2373 Kent, S., "Attack and Threat Model for Certificate 2374 Transparency", draft-ietf-trans-threat-analysis-10 (work 2375 in progress), October 2016. 2377 [JSON.Metadata] 2378 The Chromium Projects, "Chromium Log Metadata JSON 2379 Schema", 2014, . 2382 [RFC4634] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 2383 (SHA and HMAC-SHA)", RFC 4634, DOI 10.17487/RFC4634, July 2384 2006, . 2386 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 2387 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 2388 DOI 10.17487/RFC5226, May 2008, 2389 . 2391 [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate 2392 Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013, 2393 . 2395 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 2396 Algorithm (DSA) and Elliptic Curve Digital Signature 2397 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2398 2013, . 2400 Appendix A. Supporting v1 and v2 simultaneously 2402 Certificate Transparency logs have to be either v1 (conforming to 2403 [RFC6962]) or v2 (conforming to this document), as the data 2404 structures are incompatible and so a v2 log could not issue a valid 2405 v1 SCT. 2407 CT clients, however, can support v1 and v2 SCTs, for the same 2408 certificate, simultaneously, as v1 SCTs are delivered in different 2409 TLS, X.509 and OCSP extensions than v2 SCTs. 2411 v1 and v2 SCTs for X.509 certificates can be validated independently. 2412 For precertificates, v2 SCTs should be embedded in the TBSCertificate 2413 before submission of the TBSCertificate (inside a v1 precertificate, 2414 as described in Section 3.1. of [RFC6962]) to a v1 log so that TLS 2415 clients conforming to [RFC6962] but not this document are oblivious 2416 to the embedded v2 SCTs. An issuer can follow these steps to produce 2417 an X.509 certificate with embedded v1 and v2 SCTs: 2419 o Create a CMS precertificate as described in Section 3.2 and submit 2420 it to v2 logs. 2422 o Embed the obtained v2 SCTs in the TBSCertificate, as described in 2423 Section 7.1.2. 2425 o Use that TBSCertificate to create a v1 precertificate, as 2426 described in Section 3.1. of [RFC6962] and submit it to v1 logs. 2428 o Embed the v1 SCTs in the TBSCertificate, as described in 2429 Section 3.3. of [RFC6962]. 2431 o Sign that TBSCertificate (which now contains v1 and v2 SCTs) to 2432 issue the final X.509 certificate. 2434 Authors' Addresses 2436 Ben Laurie 2437 Google UK Ltd. 2439 Email: benl@google.com 2441 Adam Langley 2442 Google Inc. 2444 Email: agl@google.com 2446 Emilia Kasper 2447 Google Switzerland GmbH 2449 Email: ekasper@google.com 2450 Eran Messeri 2451 Google UK Ltd. 2453 Email: eranm@google.com 2455 Rob Stradling 2456 Comodo CA, Ltd. 2458 Email: rob.stradling@comodo.com