draft-ietf-trans-rfc6962-bis-10.txt   draft-ietf-trans-rfc6962-bis-11.txt 
Public Notary Transparency Working Group B. Laurie Public Notary Transparency Working Group B. Laurie
Internet-Draft A. Langley Internet-Draft A. Langley
Intended status: Standards Track E. Kasper Intended status: Standards Track E. Kasper
Expires: April 21, 2016 E. Messeri Expires: May 23, 2016 E. Messeri
Google Google
R. Stradling R. Stradling
Comodo Comodo
October 19, 2015 November 20, 2015
Certificate Transparency Certificate Transparency
draft-ietf-trans-rfc6962-bis-10 draft-ietf-trans-rfc6962-bis-11
Abstract Abstract
This document describes a protocol for publicly logging the existence This document describes a protocol for publicly logging the existence
of Transport Layer Security (TLS) certificates as they are issued or of Transport Layer Security (TLS) certificates as they are issued or
observed, in a manner that allows anyone to audit certification observed, in a manner that allows anyone to audit certification
authority (CA) activity and notice the issuance of suspect authority (CA) activity and notice the issuance of suspect
certificates as well as to audit the certificate logs themselves. certificates as well as to audit the certificate logs themselves.
The intent is that eventually clients would refuse to honor The intent is that eventually clients would refuse to honor
certificates that do not appear in a log, effectively forcing CAs to certificates that do not appear in a log, effectively forcing CAs to
skipping to change at page 1, line 44 skipping to change at page 1, line 44
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 21, 2016. This Internet-Draft will expire on May 23, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 28 skipping to change at page 2, line 28
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5
1.2. Data Structures . . . . . . . . . . . . . . . . . . . . . 5 1.2. Data Structures . . . . . . . . . . . . . . . . . . . . . 5
2. Cryptographic Components . . . . . . . . . . . . . . . . . . 5 2. Cryptographic Components . . . . . . . . . . . . . . . . . . 5
2.1. Merkle Hash Trees . . . . . . . . . . . . . . . . . . . . 5 2.1. Merkle Hash Trees . . . . . . . . . . . . . . . . . . . . 5
2.1.1. Merkle Inclusion Proofs . . . . . . . . . . . . . . . 6 2.1.1. Merkle Inclusion Proofs . . . . . . . . . . . . . . . 6
2.1.2. Merkle Consistency Proofs . . . . . . . . . . . . . . 6 2.1.2. Merkle Consistency Proofs . . . . . . . . . . . . . . 7
2.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 7 2.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.4. Signatures . . . . . . . . . . . . . . . . . . . . . 9 2.1.4. Signatures . . . . . . . . . . . . . . . . . . . . . 9
3. Submitters . . . . . . . . . . . . . . . . . . . . . . . . . 10 3. Submitters . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1. Certificates . . . . . . . . . . . . . . . . . . . . . . 10 3.1. Certificates . . . . . . . . . . . . . . . . . . . . . . 10
3.2. Precertificates . . . . . . . . . . . . . . . . . . . . . 10 3.2. Precertificates . . . . . . . . . . . . . . . . . . . . . 10
4. Private Domain Name Labels . . . . . . . . . . . . . . . . . 11 4. Private Domain Name Labels . . . . . . . . . . . . . . . . . 11
4.1. Wildcard Certificates . . . . . . . . . . . . . . . . . . 11 4.1. Wildcard Certificates . . . . . . . . . . . . . . . . . . 11
4.2. Redacting Domain Name Labels in Precertificates . . . . . 11 4.2. Redacting Domain Name Labels in Precertificates . . . . . 11
4.3. Using a Name-Constrained Intermediate CA . . . . . . . . 12 4.3. Using a Name-Constrained Intermediate CA . . . . . . . . 12
5. Log Format and Operation . . . . . . . . . . . . . . . . . . 13 5. Log Format and Operation . . . . . . . . . . . . . . . . . . 13
5.1. Accepting Submissions . . . . . . . . . . . . . . . . . . 14 5.1. Accepting Submissions . . . . . . . . . . . . . . . . . . 14
5.2. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 14 5.2. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 14
5.3. Structure of the Signed Certificate Timestamp . . . . . . 16 5.3. Log ID . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.4. Merkle Tree . . . . . . . . . . . . . . . . . . . . . . . 18 5.4. The TransItem Structure . . . . . . . . . . . . . . . . . 16
5.5. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 19 5.5. Merkle Tree Leaves . . . . . . . . . . . . . . . . . . . 18
5.5.1. Structure of the STH . . . . . . . . . . . . . . . . 19 5.6. Signed Certificate Timestamp (SCT) . . . . . . . . . . . 19
6. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 20 5.7. Merkle Tree Head . . . . . . . . . . . . . . . . . . . . 20
6.1. Add Chain to Log . . . . . . . . . . . . . . . . . . . . 22 5.8. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 21
6.2. Add PreCertChain to Log . . . . . . . . . . . . . . . . . 23 5.9. Merkle Consistency Proofs . . . . . . . . . . . . . . . . 22
6.3. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 23 5.10. Merkle Inclusion Proofs . . . . . . . . . . . . . . . . . 23
6. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 23
6.1. Add Chain to Log . . . . . . . . . . . . . . . . . . . . 25
6.2. Add PreCertChain to Log . . . . . . . . . . . . . . . . . 26
6.3. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 26
6.4. Retrieve Merkle Consistency Proof between Two Signed Tree 6.4. Retrieve Merkle Consistency Proof between Two Signed Tree
Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 24 6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 27
6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and 6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and
Consistency Proof by Leaf Hash . . . . . . . . . . . . . 25 Consistency Proof by Leaf Hash . . . . . . . . . . . . . 28
6.7. Retrieve Entries and STH from Log . . . . . . . . . . . . 26 6.7. Retrieve Entries and STH from Log . . . . . . . . . . . . 29
6.8. Retrieve Accepted Root Certificates . . . . . . . . . . . 28 6.8. Retrieve Accepted Root Certificates . . . . . . . . . . . 31
7. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 28 7. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.1. TLS Extension . . . . . . . . . . . . . . . . . . . . . . 29 7.1. TLS Extension . . . . . . . . . . . . . . . . . . . . . . 32
8. Certification Authorities . . . . . . . . . . . . . . . . . . 29 8. Certification Authorities . . . . . . . . . . . . . . . . . . 32
8.1. X.509v3 Extension . . . . . . . . . . . . . . . . . . . . 29 8.1. Transparency Information X.509v3 Extension . . . . . . . 32
8.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 29 8.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 33
8.1.2. Certificate Extension . . . . . . . . . . . . . . . . 30 8.1.2. Certificate Extension . . . . . . . . . . . . . . . . 33
9. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 9. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
9.1. Metadata . . . . . . . . . . . . . . . . . . . . . . . . 31 9.1. Metadata . . . . . . . . . . . . . . . . . . . . . . . . 33
9.2. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 31 9.2. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 34
9.3. Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.3. Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 35
9.4. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 33 9.4. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 36
9.4.1. Verifying an inclusion proof . . . . . . . . . . . . 33 9.4.1. Verifying an inclusion proof . . . . . . . . . . . . 37
9.4.2. Verifying consistency between two STHs . . . . . . . 34 9.4.2. Verifying consistency between two STHs . . . . . . . 37
9.4.3. Verifying root hash given entries . . . . . . . . . . 35 9.4.3. Verifying root hash given entries . . . . . . . . . . 38
10. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 36 10. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 39
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 36 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 39
11.1. TLS Extension Type . . . . . . . . . . . . . . . . . . . 36 11.1. TLS Extension Type . . . . . . . . . . . . . . . . . . . 39
11.2. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 36 11.2. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 39
11.3. SCT Extensions . . . . . . . . . . . . . . . . . . . . . 36 11.3. TransItem Extensions . . . . . . . . . . . . . . . . . . 39
11.4. STH Extensions . . . . . . . . . . . . . . . . . . . . . 36 11.4. SCT Extensions . . . . . . . . . . . . . . . . . . . . . 40
12. Security Considerations . . . . . . . . . . . . . . . . . . . 37 11.5. STH Extensions . . . . . . . . . . . . . . . . . . . . . 40
12.1. Misissued Certificates . . . . . . . . . . . . . . . . . 37 12. Security Considerations . . . . . . . . . . . . . . . . . . . 40
12.2. Detection of Misissue . . . . . . . . . . . . . . . . . 37 12.1. Misissued Certificates . . . . . . . . . . . . . . . . . 41
12.3. Redaction of Public Domain Name Labels . . . . . . . . . 38 12.2. Detection of Misissue . . . . . . . . . . . . . . . . . 41
12.4. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 38 12.3. Redaction of Public Domain Name Labels . . . . . . . . . 41
12.5. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 38 12.4. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 41
13. Efficiency Considerations . . . . . . . . . . . . . . . . . . 39 12.5. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 42
14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 39 13. Efficiency Considerations . . . . . . . . . . . . . . . . . . 42
15. References . . . . . . . . . . . . . . . . . . . . . . . . . 39 14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 43
15.1. Normative References . . . . . . . . . . . . . . . . . . 39 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 43
15.2. Informative References . . . . . . . . . . . . . . . . . 41 15.1. Normative References . . . . . . . . . . . . . . . . . . 43
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 42 15.2. Informative References . . . . . . . . . . . . . . . . . 45
Appendix A. TransItemV1 . . . . . . . . . . . . . . . . . . . . 46
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 47
1. Introduction 1. Introduction
Certificate transparency aims to mitigate the problem of misissued Certificate transparency aims to mitigate the problem of misissued
certificates by providing publicly auditable, append-only, untrusted certificates by providing publicly auditable, append-only, untrusted
logs of all issued certificates. The logs are publicly auditable so logs of all issued certificates. The logs are publicly auditable so
that it is possible for anyone to verify the correctness of each log that it is possible for anyone to verify the correctness of each log
and to monitor when new certificates are added to it. The logs do and to monitor when new certificates are added to it. The logs do
not themselves prevent misissue, but they ensure that interested not themselves prevent misissue, but they ensure that interested
parties (particularly those named in certificates) can detect such parties (particularly those named in certificates) can detect such
skipping to change at page 10, line 15 skipping to change at page 10, line 15
3. Submitters 3. Submitters
Submitters submit certificates or precertificates to logs for public Submitters submit certificates or precertificates to logs for public
auditing, as described below. In order to enable attribution of each auditing, as described below. In order to enable attribution of each
logged certificate or precertificate to its issuer, each submission logged certificate or precertificate to its issuer, each submission
MUST be accompanied by all additional certificates required to verify MUST be accompanied by all additional certificates required to verify
the chain up to an accepted root certificate. The root certificate the chain up to an accepted root certificate. The root certificate
itself MAY be omitted from the submission. itself MAY be omitted from the submission.
If a log accepts a submission, it will return a Signed Certificate If a log accepts a submission, it will return a Signed Certificate
Timestamp (SCT). The submitter SHOULD validate the returned SCT as Timestamp (SCT) (see Section 5.6). The submitter SHOULD validate the
described in Section 9.2 if they understand its format and they returned SCT as described in Section 9.2 if they understand its
intend to use it directly in a TLS handshake or to construct a format and they intend to use it directly in a TLS handshake or to
certificate. construct a certificate.
3.1. Certificates 3.1. Certificates
Anyone can submit a certificate (Section 6.1) to a log. Since Anyone can submit a certificate (Section 6.1) to a log. Since
certificates may not be accepted by TLS clients unless logged, it is certificates may not be accepted by TLS clients unless logged, it is
expected that certificate owners or their CAs will usually submit expected that certificate owners or their CAs will usually submit
them. them.
3.2. Precertificates 3.2. Precertificates
skipping to change at page 13, line 39 skipping to change at page 13, line 39
} }
5. Log Format and Operation 5. Log Format and Operation
A log is a single, append-only Merkle Tree of submitted certificate A log is a single, append-only Merkle Tree of submitted certificate
and precertificate entries. and precertificate entries.
When it receives a valid submission, the log MUST return an SCT that When it receives a valid submission, the log MUST return an SCT that
corresponds to the submitted certificate or precertificate. If the corresponds to the submitted certificate or precertificate. If the
log has previously seen this valid submission, it MAY return the same log has previously seen this valid submission, it MAY return the same
SCT as it returned before (note that if a certificate was previously SCT as it returned before. (Note that if a certificate was
logged as a precertificate, then the precertificate's SCT would not previously logged as a precertificate, then the precertificate's SCT
be appropriate, instead a fresh SCT of type x509_entry should be of type "precert_sct" would not be appropriate; instead, a fresh SCT
generated). of type "x509_sct" should be generated).
An SCT is the log's promise to incorporate the submitted entry in its An SCT is the log's promise to incorporate the submitted entry in its
Merkle Tree no later than a fixed amount of time, known as the Merkle Tree no later than a fixed amount of time, known as the
Maximum Merge Delay (MMD), after the issuance of the SCT. Maximum Merge Delay (MMD), after the issuance of the SCT.
Periodically, the log MUST append all its new entries to its Merkle Periodically, the log MUST append all its new entries to its Merkle
Tree and sign the root of the tree. This provides auditable evidence Tree and sign the root of the tree. This provides auditable evidence
that the log kept all its promises. that the log kept all its promises.
Log operators MUST NOT impose any conditions on retrieving or sharing Log operators MUST NOT impose any conditions on retrieving or sharing
data from the log. data from the log.
skipping to change at page 14, line 36 skipping to change at page 14, line 36
union of root certificates trusted by major browser vendors. union of root certificates trusted by major browser vendors.
5.2. Log Entries 5.2. Log Entries
If a submission is accepted and an SCT issued, the accepting log MUST If a submission is accepted and an SCT issued, the accepting log MUST
store the entire chain used for verification. This chain MUST store the entire chain used for verification. This chain MUST
include the certificate or precertificate itself, the zero or more include the certificate or precertificate itself, the zero or more
intermediate CA certificates provided by the submitter, and the root intermediate CA certificates provided by the submitter, and the root
certificate used to verify the chain (even if it was omitted from the certificate used to verify the chain (even if it was omitted from the
submission). The log MUST present this chain for auditing upon submission). The log MUST present this chain for auditing upon
request. This chain is required to prevent a CA from avoiding blame request (see Section 6.7). This chain is required to prevent a CA
by logging a partial or empty chain. from avoiding blame by logging a partial or empty chain.
Each certificate entry in a log MUST include a "X509ChainEntry" Each certificate entry in a log MUST include a "X509ChainEntry"
structure, and each precertificate entry MUST include a structure, and each precertificate entry MUST include a
"PrecertChainEntryV2" structure: "PrecertChainEntryV2" structure:
enum {
x509_entry(0), precert_entry_V2(2), (65535)
} LogEntryType;
opaque ASN.1Cert<1..2^24-1>; opaque ASN.1Cert<1..2^24-1>;
struct { struct {
ASN.1Cert leaf_certificate; ASN.1Cert leaf_certificate;
ASN.1Cert certificate_chain<0..2^24-1>; ASN.1Cert certificate_chain<0..2^24-1>;
} X509ChainEntry; } X509ChainEntry;
opaque CMSPrecert<1..2^24-1>; opaque CMSPrecert<1..2^24-1>;
struct { struct {
CMSPrecert pre_certificate; CMSPrecert pre_certificate;
ASN.1Cert precertificate_chain<0..2^24-1>; ASN.1Cert precertificate_chain<1..2^24-1>;
} PrecertChainEntryV2; } PrecertChainEntryV2;
"entry_type" is the type of this entry. Future revisions of this
protocol may add new LogEntryType values. Section 6 explains how
clients should handle unknown entry types.
"leaf_certificate" is a submitted certificate that has been accepted "leaf_certificate" is a submitted certificate that has been accepted
by the log. by the log.
"certificate_chain" is a vector of 0 or more additional certificates "certificate_chain" is a vector of 0 or more additional certificates
required to verify "leaf_certificate". The first certificate MUST required to verify "leaf_certificate". The first certificate MUST
certify "leaf_certificate". Each following certificate MUST directly certify "leaf_certificate". Each following certificate MUST directly
certify the one preceding it. The final certificate MUST be a root certify the one preceding it. The final certificate MUST be a root
certificate accepted by the log. If "leaf_certificate" is a root certificate accepted by the log. If "leaf_certificate" is a root
certificate, then this vector is empty. certificate, then this vector is empty.
"pre_certificate" is a submitted precertificate that has been "pre_certificate" is a submitted precertificate that has been
accepted by the log. accepted by the log.
"precertificate_chain" is a vector of 1 or more additional "precertificate_chain" is a vector of 1 or more additional
certificates required to verify "pre_certificate". The first certificates required to verify "pre_certificate". The first
certificate MUST certify "pre_certificate". Each following certificate MUST certify "pre_certificate". Each following
certificate MUST directly certify the one preceding it. The final certificate MUST directly certify the one preceding it. The final
certificate MUST be a root certificate accepted by the log. certificate MUST be a root certificate accepted by the log.
5.3. Structure of the Signed Certificate Timestamp 5.3. Log ID
enum { Each log's operator allocates an OID for the purpose of uniquely
certificate_timestamp(0), tree_hash(1), (255) identifying that log. This OID is specified in the log's metadata.
} SignatureType; Various data structures include the DER encoding of this OID,
excluding the ASN.1 tag and length bytes, in an opaque vector:
opaque LogID<2..127>;
Note that the ASN.1 length and the opaque vector length are identical
in size (1 byte) and value, so the DER encoding of the OID can be
reproduced simply by prepending an OBJECT IDENTIFIER tag (0x06) to
the opaque vector length and contents.
5.4. The TransItem Structure
Various data structures produced by logs are encapsulated in the
"TransItem" structure to ensure that the type and version of each one
is identified in a common fashion:
enum { enum {
v2(1), (255) v1(0), v2(1), (255)
} Version; } Version;
enum {
x509_entry(0), precert_entry(1), x509_sct(2), precert_sct(3),
tree_head(4), signed_tree_head(5), consistency_proof(6),
inclusion_proof(7), (65535)
} TransType;
enum {
reserved(65535)
} ItemExtensionType;
struct { struct {
opaque key_id[HASH_SIZE]; ItemExtensionType item_extension_type;
} LogID; opaque item_extension_data<0..2^16-1>;
} ItemExtension;
struct {
TransType type;
select (type) {
case x509_entry: TimestampedCertificateEntryDataV2;
case precert_entry: TimestampedCertificateEntryDataV2;
case x509_sct: SignedCertificateTimestampDataV2;
case precert_sct: SignedCertificateTimestampDataV2;
case tree_head: TreeHeadDataV2;
case signed_tree_head: SignedTreeHeadDataV2;
case consistency_proof: ConsistencyProofDataV2;
case inclusion_proof: InclusionProofDataV2;
} data;
ItemExtension item_extensions<0..2^16-1>;
} TransItemV2;
struct {
Version version;
select (version) {
case v1: TransItemV1;
case v2: TransItemV2;
}
} TransItem;
"version" is the earliest version of this protocol to which the
encapsulated data structure conforms. This document is v2. Note
that v1 [RFC6962] did not define "TransItem", but this document
specifies a mechanism (see Appendix A) for v2 implementations to
encapsulate existing v1 objects in the "TransItem" structure. Note
also that, since each "TransItem" object is individually versioned,
future revisions to this protocol could conceivably update some
encapsulated data structures without having to update all of them.
"type" is the type of the encapsulated data structure. (Note that
"TransType" combines the v1 type enumerations "LogEntryType",
"SignatureType" and "MerkleLeafType"). Future revisions of this
protocol may add new "TransType" values.
"data" is the encapsulated data structure. The various structures
named with the "DataV2" suffix are defined in later sections of this
document.
"item_extension_type" identifies a single extension from the IANA
registry in Section 11.3.
The interpretation of the "item_extension_data" field is determined
solely by the value of the "item_extension_type" field. Each
document that registers a new "item_extension_type" must describe how
to interpret the corresponding "item_extension_data".
"item_extensions" is a vector of 0 or more item extensions. This
vector MUST NOT include more than one extension with the same
"item_extension_type". The extensions in the vector MUST be ordered
by the value of the "item_extension_type" field, smallest value
first.
5.5. Merkle Tree Leaves
The leaves of a log's Merkle Tree correspond to the log's entries
(see Section 5.2). Each leaf is the leaf hash (Section 2.1) of a
"TransItem" structure of type "x509_entry" or "precert_entry", which
in this version (v2) encapsulates a
"TimestampedCertificateEntryDataV2" structure. Note that leaf hashes
are calculated as HASH(0x00 || TransItem), where the hashing
algorithm is specified in the log's metadata.
opaque TBSCertificate<1..2^24-1>; opaque TBSCertificate<1..2^24-1>;
struct { struct {
uint64 timestamp;
opaque issuer_key_hash[HASH_SIZE]; opaque issuer_key_hash[HASH_SIZE];
TBSCertificate tbs_certificate; TBSCertificate tbs_certificate;
} CertInfo; SctExtension sct_extensions<0..2^16-1>;
} TimestampedCertificateEntryDataV2;
"timestamp" is the NTP Time [RFC5905] at which the certificate or
precertificate was accepted by the log, measured in milliseconds
since the epoch (January 1, 1970, 00:00), ignoring leap seconds.
"issuer_key_hash" is the HASH of the public key of the CA that issued
the certificate or precertificate, calculated over the DER encoding
of the key represented as SubjectPublicKeyInfo [RFC5280]. This is
needed to bind the CA to the certificate or precertificate, making it
impossible for the corresponding SCT to be valid for any other
certificate or precertificate whose TBSCertificate matches
"tbs_certificate".
"tbs_certificate" is the DER encoded TBSCertificate from either the
"leaf_certificate" (in the case of an "X509ChainEntry") or the
"pre_certificate" (in the case of a "PrecertChainEntryV2"). (Note
that a precertificate's TBSCertificate can be reconstructed from the
issued certificate's TBSCertificate by redacting the domain name
labels indicated by the redacted labels extension, and deleting the
SCT list extension and redacted labels extension).
"sct_extensions" matches the SCT extensions of the corresponding SCT.
5.6. Signed Certificate Timestamp (SCT)
An SCT is a "TransItem" structure of type "x509_sct" or
"precert_sct", which in this version (v2) encapsulates a
"SignedCertificateTimestampDataV2" structure:
enum { enum {
reserved(65535) reserved(65535)
} SctExtensionType; } SctExtensionType;
struct { struct {
SctExtensionType sct_extension_type; SctExtensionType sct_extension_type;
opaque sct_extension_data<0..2^16-1>; opaque sct_extension_data<0..2^16-1>;
} SctExtension; } SctExtension;
SctExtension SctExtensions<0..2^16-1>; struct {
LogID log_id;
"key_id" is the HASH of the log's public key, calculated over the DER uint64 timestamp;
encoding of the key represented as SubjectPublicKeyInfo. SctExtension sct_extensions<0..2^16-1>;
digitally-signed struct {
TransItem timestamped_entry;
} signature;
} SignedCertificateTimestampDataV2;
"issuer_key_hash" is the HASH of the certificate issuer's public key, "log_id" is this log's unique ID, encoded in an opaque vector as
calculated over the DER encoding of the key represented as described in Section 5.3.
SubjectPublicKeyInfo. This is needed to bind the issuer to the final
certificate, making it impossible for the SCT to be valid for any
other certificate.
"tbs_certificate" is the DER-encoded TBSCertificate component of the "timestamp" is equal to the timestamp from the
precertificate. Note that it is also possible to reconstruct this "TimestampedCertificateEntryDataV2" structure encapsulated in the
TBSCertificate from the issued certificate by extracting the "timestamped_entry".
TBSCertificate from it, redacting the domain name labels indicated by
the redacted labels extension, and deleting the SCT list extension
and redacted labels extension.
"sct_extension_type" identifies a single extension from the IANA "sct_extension_type" identifies a single extension from the IANA
registry in Section 11.3. registry in Section 11.4. At the time of writing, no extensions are
specified.
The interpretation of the "sct_extension_data" field is determined The interpretation of the "sct_extension_data" field is determined
solely by the value of the "sct_extension_type" field. Each document solely by the value of the "sct_extension_type" field. Each document
that registers a new "sct_extension_type" must describe how to that registers a new "sct_extension_type" must describe how to
interpret the corresponding "sct_extension_data". interpret the corresponding "sct_extension_data".
The "SctExtensions" type is a vector of 0 or more extensions. This "sct_extensions" is a vector of 0 or more SCT extensions. This
vector MUST NOT include more than one extension with the same vector MUST NOT include more than one extension with the same
"sct_extension_type". The extensions in the vector MUST be ordered "sct_extension_type". The extensions in the vector MUST be ordered
by the value of the "sct_extension_type" field, smallest value first. by the value of the "sct_extension_type" field, smallest value first.
If an implementation sees an extension that it does not understand,
struct { it SHOULD ignore that extension. Furthermore, an implementation MAY
Version sct_version; choose to ignore any extension(s) that it does understand.
LogID id;
uint64 timestamp;
SctExtensions extensions;
digitally-signed struct {
Version sct_version;
SignatureType signature_type = certificate_timestamp;
uint64 timestamp;
LogEntryType entry_type;
select(entry_type) {
case x509_entry: CertInfo;
case precert_entry_V2: CertInfo;
} signed_entry;
SctExtensions extensions;
};
} SignedCertificateTimestamp;
The encoding of the digitally-signed element is defined in [RFC5246]. The encoding of the digitally-signed element is defined in [RFC5246].
"sct_version" is the version of the protocol to which the SCT "timestamped_entry" is a "TransItem" structure that MUST be of type
conforms. This version is v2. Note that SignedCertificateTimestamp "x509_entry" or "precert_entry" (see Section 5.5) and MUST have an
v1 [RFC6962] had a different definition of "signed_entry". empty "item_extensions" vector.
"timestamp" is the current NTP Time [RFC5905], measured since the
epoch (January 1, 1970, 00:00), ignoring leap seconds, in
milliseconds.
"entry_type" may be implicit from the context in which the SCT is
presented.
"signed_entry" includes the TBSCertificate from either the
"leaf_certificate" (in the case of an X509ChainEntry) or the
"pre_certificate" (in the case of a PrecertChainEntryV2).
"extensions" are future extensions to SignedCertificateTimestamp v2.
Currently, no extensions are specified. If an implementation sees an
extension that it does not understand, it SHOULD ignore that
extension. Furthermore, an implementation MAY choose to ignore any
extension(s) that it does understand.
5.4. Merkle Tree
The hashing algorithm for the Merkle Tree Hash is specified in the 5.7. Merkle Tree Head
log's metadata.
Structure of the Merkle Tree input: The log stores information about its Merkle Tree in a "TransItem"
structure of type "tree_head", which in this version (v2)
encapsulates a "TreeHeadDataV2" structure:
enum { opaque NodeHash[HASH_SIZE];
v1(0), v2(1), (255)
} LeafVersion;
struct { struct {
uint64 timestamp; uint64 timestamp;
LogEntryType entry_type; uint64 tree_size;
select(entry_type) { NodeHash root_hash;
case x509_entry: CertInfo; SthExtension sth_extensions<0..2^16-1>;
case precert_entry_V2: CertInfo; } TreeHeadDataV2;
} signed_entry;
SctExtensions extensions;
} TimestampedEntry;
struct {
LeafVersion version;
TimestampedEntry timestamped_entry;
} MerkleTreeLeaf;
Here, "version" is the version of the MerkleTreeLeaf structure. This
version is v2. Note that MerkleTreeLeaf v1 [RFC6962] had another
layer of indirection which is removed in v2.
"timestamp" is the timestamp of the corresponding SCT issued for this
certificate.
"entry_type" is the type of entry stored in "signed_entry". New
"LogEntryType" values may be added to "signed_entry" without
increasing the "MerkleTreeLeaf" version. Section 6 explains how
clients should handle unknown entry types.
"signed_entry" is the "signed_entry" of the corresponding SCT.
"extensions" are the "extensions" of the corresponding SCT. "timestamp" is the current NTP Time [RFC5905], measured in
milliseconds since the epoch (January 1, 1970, 00:00), ignoring leap
seconds.
The leaves of the Merkle Tree are the leaf hashes of the "tree_size" is the number of entries currently in the log's Merkle
corresponding "MerkleTreeLeaf" structures. Note that leaf hashes Tree.
(Section 2.1) are calculated as HASH(0x00 || MerkleTreeLeaf).
5.5. Signed Tree Head (STH) "root_hash" is the root of the Merkle Hash Tree.
Periodically the log SHOULD sign the corresponding tree hash and tree "sth_extensions" matches the STH extensions of the corresponding STH.
information (see the corresponding Signed Tree Head client message in
Section 6.3).
Each log MUST produce on demand a Signed Tree Head that is no older 5.8. Signed Tree Head (STH)
than the Maximum Merge Delay. However, Signed Tree Heads could be
used to mark individual clients (by producing a new one for each
query), so logs MUST NOT produce them more frequently than is
declared in their metadata. In general, there is no need to produce
a new Signed Tree Head unless there are new entries in the log,
however, in the unlikely event that it receives no new submissions
during an MMD period, the log SHALL sign the same Merkle Tree Hash
with a fresh timestamp.
5.5.1. Structure of the STH Periodically each log SHOULD sign its current tree head information
(see Section 5.7) to produce an STH. When a client requests a log's
latest STH (see Section 6.3), the log MUST return an STH that is no
older than the log's MMD. However, STHs could be used to mark
individual clients (by producing a new one for each query), so logs
MUST NOT produce them more frequently than is declared in their
metadata. In general, there is no need to produce a new STH unless
there are new entries in the log; however, in the unlikely event that
it receives no new submissions during an MMD period, the log SHALL
sign the same Merkle Tree Hash with a fresh timestamp.
enum { An STH is a "TransItem" structure of type "signed_tree_head", which
v2(1), (255) in this version (v2) encapsulates a "SignedTreeHeadDataV2" structure:
} TreeHeadVersion;
enum { enum {
reserved(65535) reserved(65535)
} SthExtensionType; } SthExtensionType;
struct { struct {
SthExtensionType sth_extension_type; SthExtensionType sth_extension_type;
opaque sth_extension_data<0..2^16-1>; opaque sth_extension_data<0..2^16-1>;
} SthExtension; } SthExtension;
SthExtension SthExtensions<0..2^16-1>; struct {
LogID log_id;
uint64 timestamp;
uint64 tree_size;
NodeHash root_hash;
SthExtension sth_extensions<0..2^16-1>;
digitally-signed struct {
TransItem merkle_tree_head;
} signature;
} SignedTreeHeadDataV2;
"log_id" is this log's unique ID, encoded in an opaque vector as
described in Section 5.3.
"timestamp" is equal to the timestamp from the "TreeHeadDataV2"
structure encapsulated in "merkle_tree_head". This timestamp MUST be
at least as recent as the most recent SCT timestamp in the tree.
Each subsequent timestamp MUST be more recent than the timestamp of
the previous update.
"tree_size" is equal to the tree size from the "TreeHeadDataV2"
structure encapsulated in "merkle_tree_head".
"root_hash" is equal to the root hash from the "TreeHeadDataV2"
structure encapsulated in "merkle_tree_head".
"sth_extension_type" identifies a single extension from the IANA "sth_extension_type" identifies a single extension from the IANA
registry in Section 11.4. registry in Section 11.5. At the time of writing, no extensions are
specified.
The interpretation of the "sth_extension_data" field is determined The interpretation of the "sth_extension_data" field is determined
solely by the value of the "sth_extension_type" field. Each document solely by the value of the "sth_extension_type" field. Each document
that registers a new "sth_extension_type" must describe how to that registers a new "sth_extension_type" must describe how to
interpret the corresponding "sth_extension_data". interpret the corresponding "sth_extension_data".
The "SthExtensions" type is a vector of 0 or more extensions. This "sth_extensions" is a vector of 0 or more STH extensions. This
vector MUST NOT include more than one extension with the same vector MUST NOT include more than one extension with the same
"sth_extension_type". The extensions in the vector MUST be ordered "sth_extension_type". The extensions in the vector MUST be ordered
by the value of the "sth_extension_type" field, smallest value first. by the value of the "sth_extension_type" field, smallest value first.
If an implementation sees an extension that it does not understand,
it SHOULD ignore that extension. Furthermore, an implementation MAY
choose to ignore any extension(s) that it does understand.
"merkle_tree_head" is a "TransItem" structure that MUST be of type
"tree_head" (see Section 5.7) and MUST have an empty
"item_extensions" vector.
5.9. Merkle Consistency Proofs
To prepare a Merkle Consistency Proof for distribution to clients,
the log produces a "TransItem" structure of type "consistency_proof",
which in this version (v2) encapsulates a "ConsistencyProofDataV2"
structure:
struct { struct {
TreeHeadVersion version; LogID log_id;
LogID id; uint64 tree_size_1;
uint64 timestamp; uint64 tree_size_2;
uint64 tree_size; NodeHash consistency_path<1..2^8-1>;
opaque root_hash[HASH_SIZE]; } ConsistencyProofDataV2;
SthExtensions extensions;
digitally-signed struct {
TreeHeadVersion version;
SignatureType signature_type = tree_hash;
LogID id;
uint64 timestamp;
uint64 tree_size;
opaque root_hash[HASH_SIZE];
SthExtensions extensions;
};
} SignedTreeHead;
"version" is the version of the SignedTreeHead structure. This "log_id" is this log's unique ID, encoded in an opaque vector as
version is v2. Note that TreeHeadSignature v1 [RFC6962] only described in Section 5.3.
included the inner "digitally-signed struct" and did not include the
"id" or "extensions" fields.
"timestamp" is the current NTP Time [RFC5905], measured since the "tree_size_1" is the size of the older tree.
epoch (January 1, 1970, 00:00), ignoring leap seconds, in
milliseconds. The timestamp MUST be at least as recent as the most
recent SCT timestamp in the tree. Each subsequent timestamp MUST be
more recent than the timestamp of the previous update.
"tree_size" equals the number of entries in the new tree. "tree_size_2" is the size of the newer tree.
"root_hash" is the root of the Merkle Hash Tree. "consistency_path" is a vector of Merkle Tree nodes proving the
consistency of two STHs.
"extensions" are future extensions to SignedTreeHead v2. Currently, 5.10. Merkle Inclusion Proofs
no extensions are specified. If an implementation sees an extension
that it does not understand, it SHOULD ignore that extension. To prepare a Merkle Inclusion Proof for distribution to clients, the
Furthermore, an implementation MAY choose to ignore any extension(s) log produces a "TransItem" structure of type "inclusion_proof", which
that it does understand. in this version (v2) encapsulates an "InclusionProofDataV2"
structure:
struct {
LogID log_id;
uint64 tree_size;
uint64 leaf_index;
NodeHash inclusion_path<1..2^8-1>;
} InclusionProofDataV2;
"log_id" is this log's unique ID, encoded in an opaque vector as
described in Section 5.3.
"tree_size" is the size of the tree on which this inclusion proof is
based.
"leaf_index" is the 0-based index of the log entry corresponding to
this inclusion proof.
"inclusion_path" is a vector of Merkle Tree nodes proving the
inclusion of the chosen certificate or precertificate.
6. Log Client Messages 6. Log Client Messages
Messages are sent as HTTPS GET or POST requests. Parameters for Messages are sent as HTTPS GET or POST requests. Parameters for
POSTs and all responses are encoded as JavaScript Object Notation POSTs and all responses are encoded as JavaScript Object Notation
(JSON) objects [RFC4627]. Parameters for GETs are encoded as order- (JSON) objects [RFC4627]. Parameters for GETs are encoded as order-
independent key/value URL parameters, using the "application/x-www- independent key/value URL parameters, using the "application/x-www-
form-urlencoded" format described in the "HTML 4.01 Specification" form-urlencoded" format described in the "HTML 4.01 Specification"
[HTML401]. Binary data is base64 encoded [RFC4648] as specified in [HTML401]. Binary data is base64 encoded [RFC4648] as specified in
the individual messages. the individual messages.
Note that JSON objects and URL parameters may contain fields not Note that JSON objects and URL parameters may contain fields not
specified here. These extra fields should be ignored. specified here. These extra fields should be ignored.
The <log server> prefix MAY include a path as well as a server name The <log server> prefix, which is part of the log's metadata, MAY
and a port. include a path as well as a server name and a port.
In general, where needed, the "version" is v1 and the "id" is the log
id for the log server queried.
In practice, log servers may include multiple front-end machines. In practice, log servers may include multiple front-end machines.
Since it is impractical to keep these machines in perfect sync, Since it is impractical to keep these machines in perfect sync,
errors may occur that are caused by skew between the machines. Where errors may occur that are caused by skew between the machines. Where
such errors are possible, the front-end will return additional such errors are possible, the front-end will return additional
information (as specified below) making it possible for clients to information (as specified below) making it possible for clients to
make progress, if progress is possible. Front-ends MUST only serve make progress, if progress is possible. Front-ends MUST only serve
data that is free of gaps (that is, for example, no front-end will data that is free of gaps (that is, for example, no front-end will
respond with an STH unless it is also able to prove consistency from respond with an STH unless it is also able to prove consistency from
all log entries logged within that STH). all log entries logged within that STH).
skipping to change at page 22, line 28 skipping to change at page 25, line 12
"Retry-After:" header in order to request a minimum time for the "Retry-After:" header in order to request a minimum time for the
client to wait before retrying the request. client to wait before retrying the request.
6.1. Add Chain to Log 6.1. Add Chain to Log
POST https://<log server>/ct/v2/add-chain POST https://<log server>/ct/v2/add-chain
Inputs: Inputs:
chain: An array of base64 encoded certificates. The first chain: An array of base64 encoded certificates. The first
element is the end-entity certificate; the second chains to the element is the certificate for which the submitter desires an
first and so on to the last, which is either the root SCT; the second chains to the first and so on to the last,
certificate or a certificate that chains to a known root which is either an accepted root certificate or a certificate
certificate. that chains to an accepted root certificate.
Outputs: Outputs:
sct: The base64 encoded "SignedCertificateTimestamp" for the sct: A base64 encoded "TransItem" of type "x509_sct", signed by
submitted certificate. this log, that corresponds to the submitted certificate.
Error codes: Error codes:
unknown root The root of the chain is not one accepted by the unknown root The root of the chain is not one accepted by the
log. log.
bad chain The alleged chain is not actually a chain of bad chain The alleged chain is not actually a chain of
certificates. certificates.
bad certificate One or more certificates in the chain are not bad certificate One or more certificates in the chain are not
skipping to change at page 23, line 27 skipping to change at page 26, line 15
6.2. Add PreCertChain to Log 6.2. Add PreCertChain to Log
POST https://<log server>/ct/v2/add-pre-chain POST https://<log server>/ct/v2/add-pre-chain
Inputs: Inputs:
precertificate: The base64 encoded precertificate. precertificate: The base64 encoded precertificate.
chain: An array of base64 encoded CA certificates. The first chain: An array of base64 encoded CA certificates. The first
element is the signer of the precertificate; the second chains element is the signer of the precertificate; the second chains
to the first and so on to the last, which is either the root to the first and so on to the last, which is either an accepted
certificate or a certificate that chains to an accepted root root certificate or a certificate that chains to an accepted
certificate. root certificate.
Outputs and errors are the same as in Section 6.1. Outputs:
sct: A base64 encoded "TransItem" of type "precert_sct", signed
by this log, that corresponds to the submitted precertificate.
Errors are the same as in Section 6.1.
6.3. Retrieve Latest Signed Tree Head 6.3. Retrieve Latest Signed Tree Head
GET https://<log server>/ct/v2/get-sth GET https://<log server>/ct/v2/get-sth
No inputs. No inputs.
Outputs: Outputs:
sth: A base64 encoded SignedTreeHead. sth: A base64 encoded "TransItem" of type "signed_tree_head",
signed by this log, that is no older than the log's MMD.
6.4. Retrieve Merkle Consistency Proof between Two Signed Tree Heads 6.4. Retrieve Merkle Consistency Proof between Two Signed Tree Heads
GET https://<log server>/ct/v2/get-sth-consistency GET https://<log server>/ct/v2/get-sth-consistency
Inputs: Inputs:
first: The tree_size of the older tree, in decimal. first: The tree_size of the older tree, in decimal.
second: The tree_size of the newer tree, in decimal (optional). second: The tree_size of the newer tree, in decimal (optional).
Both tree sizes must be from existing v2 STHs (Signed Tree Heads). Both tree sizes must be from existing v2 STHs. However, because
However, because of skew, the receiving front-end may not know one of skew, the receiving front-end may not know one or both of the
or both of the existing STHs. If both are known, then only the existing STHs. If both are known, then only the "consistency"
"consistency" output is returned. If the first is known but the output is returned. If the first is known but the second is not
second is not (or has been omitted), then the latest known STH is (or has been omitted), then the latest known STH is returned,
returned, along with a consistency proof between the first STH and along with a consistency proof between the first STH and the
the latest. If neither are known, then the latest known STH is latest. If neither are known, then the latest known STH is
returned without a consistency proof. returned without a consistency proof.
Outputs: Outputs:
consistency: An array of base64 encoded Merkle Tree nodes. consistency: A base64 encoded "TransItem" of type
"consistency_proof", whose "tree_size_1" MUST match the "first"
input. If the "sth" output is omitted, then "tree_size_2" MUST
match the "second" input.
sth: A base64 encoded SignedTreeHead. sth: A base64 encoded "TransItem" of type "signed_tree_head",
signed by this log.
Note that no signature is required for the "consistency" output as Note that no signature is required for the "consistency" output as
it is used to verify "sth", which is signed. it is used to verify the consistency between two STHs, which are
signed.
Error codes: Error codes:
first unknown "first" is before the latest known STH but is not first unknown "first" is before the latest known STH but is not
from an existing STH. from an existing STH.
second unknown "second" is before the latest known STH but is not second unknown "second" is before the latest known STH but is not
from an existing STH. from an existing STH.
See Section 9.4.2 for an outline of how to use the "consistency" See Section 9.4.2 for an outline of how to use the "consistency"
array. output.
6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash 6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash
GET https://<log server>/ct/v2/get-proof-by-hash GET https://<log server>/ct/v2/get-proof-by-hash
Inputs: Inputs:
hash: A base64 encoded v1 leaf hash. hash: A base64 encoded v1 leaf hash.
tree_size: The tree_size of the tree on which to base the proof, tree_size: The tree_size of the tree on which to base the proof,
in decimal. in decimal.
The "hash" must be calculated as defined in Section 5.4. The The "hash" must be calculated as defined in Section 5.5. The
"tree_size" must designate an existing v2 STH. Because of skew, "tree_size" must designate an existing v2 STH. Because of skew,
the front-end may not know the requested STH. In that case, it the front-end may not know the requested STH. In that case, it
will return the latest STH it knows, along with an inclusion proof will return the latest STH it knows, along with an inclusion proof
to that STH. If the front-end knows the requested STH then only to that STH. If the front-end knows the requested STH then only
"leaf_index" and "audit_path" are returned. "inclusion" is returned.
Outputs: Outputs:
leaf_index: The 0-based index of the entry corresponding to the inclusion: A base64 encoded "TransItem" of type "inclusion_proof"
"hash" parameter. whose "inclusion_path" array of Merkle Tree nodes proves the
inclusion of the chosen certificate in the selected STH.
audit_path: An array of base64 encoded Merkle Tree nodes proving
the inclusion of the chosen certificate.
sth: A base64 encoded SignedTreeHead. sth: A base64 encoded "TransItem" of type "signed_tree_head",
signed by this log.
Note that no signature is required for the "leaf_index" or Note that no signature is required for the "inclusion" output as
"audit_path" outputs as they are used to verify inclusion in it is used to verify inclusion in the selected STH, which is
"sth", which is signed. signed.
Error codes: Error codes:
hash unknown "hash" is not the hash of a known leaf (may be hash unknown "hash" is not the hash of a known leaf (may be
caused by skew or by a known certificate not yet merged). caused by skew or by a known certificate not yet merged).
tree_size unknown "hash" is before the latest known STH but is tree_size unknown "hash" is before the latest known STH but is
not from an existing STH. not from an existing STH.
See Section 9.4.1 for an outline of how to use the "audit_path" See Section 9.4.1 for an outline of how to use the "inclusion"
array. output.
6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and Consistency 6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and Consistency
Proof by Leaf Hash Proof by Leaf Hash
GET https://<log server>/ct/v2/get-all-by-hash GET https://<log server>/ct/v2/get-all-by-hash
Inputs: Inputs:
hash: A base64 encoded v1 leaf hash. hash: A base64 encoded v1 leaf hash.
tree_size: The tree_size of the tree on which to base the proofs, tree_size: The tree_size of the tree on which to base the proofs,
in decimal. in decimal.
The "hash" must be calculated as defined in Section 5.4. The The "hash" must be calculated as defined in Section 5.5. The
"tree_size" must designate an existing v2 STH. "tree_size" must designate an existing v2 STH.
Because of skew, the front-end may not know the requested STH or Because of skew, the front-end may not know the requested STH or
the requested hash, which leads to a number of cases. the requested hash, which leads to a number of cases.
latest STH < requested STH Return latest STH. latest STH < requested STH Return latest STH.
latest STH > requested STH Return latest STH and a consistency latest STH > requested STH Return latest STH and a consistency
proof between it and the requested STH (see Section 6.4). proof between it and the requested STH (see Section 6.4).
index of requested hash < latest STH Return "leaf_index" and index of requested hash < latest STH Return "inclusion".
"audit_path".
Note that more than one case can be true, in which case the Note that more than one case can be true, in which case the
returned data is their concatenation. It is also possible for returned data is their concatenation. It is also possible for
none to be true, in which case the front-end MUST return an empty none to be true, in which case the front-end MUST return an empty
response. response.
Outputs: Outputs:
leaf_index: The 0-based index of the entry corresponding to the inclusion: A base64 encoded "TransItem" of type "inclusion_proof"
"hash" parameter. whose "inclusion_path" array of Merkle Tree nodes proves the
inclusion of the chosen certificate in the selected STH.
audit_path: An array of base64 encoded Merkle Tree nodes proving
the inclusion of the chosen certificate.
sth: A base64 encoded SignedTreeHead. sth: A base64 encoded "TransItem" of type "signed_tree_head",
signed by this log.
consistency: An array of base64 encoded Merkle Tree nodes proving consistency: A base64 encoded "TransItem" of type
the consistency of the requested STH and the returned STH. "consistency_proof" that proves the consistency of the
requested STH and the returned STH.
Note that no signature is required for the "leaf_index", Note that no signature is required for the "inclusion" or
"audit_path" or "consistency" outputs as they are used to verify "consistency" outputs as they are used to verify inclusion in and
inclusion in and consistency of "sth", which is signed. consistency of STHs, which are signed.
Errors are the same as in Section 6.5. Errors are the same as in Section 6.5.
See Section 9.4.1 for an outline of how to use the "audit_path" array See Section 9.4.1 for an outline of how to use the "inclusion"
and see Section 9.4.2 for an outline of how to use the "consistency" output, and see Section 9.4.2 for an outline of how to use the
array. "consistency" output.
6.7. Retrieve Entries and STH from Log 6.7. Retrieve Entries and STH from Log
GET https://<log server>/ct/v2/get-entries GET https://<log server>/ct/v2/get-entries
Inputs: Inputs:
start: 0-based index of first entry to retrieve, in decimal. start: 0-based index of first entry to retrieve, in decimal.
end: 0-based index of last entry to retrieve, in decimal. end: 0-based index of last entry to retrieve, in decimal.
Outputs: Outputs:
entries: An array of objects, each consisting of entries: An array of objects, each consisting of
leaf_input: The base64 encoded MerkleTreeLeaf structure. leaf_input: The base64 encoded "TransItem" structure of type
"x509_entry" or "precert_entry" (see Section 5.5).
extra_data: The base64 encoded unsigned data pertaining to the log_entry: The base64 encoded log entry (see Section 5.2). In
log entry. In the case of an X509ChainEntry, this is the the case of an "x509_entry" entry, this is the whole
whole "X509ChainEntry". In the case of a "X509ChainEntry"; and in the case of a "precert_entry", this
PrecertChainEntryV2, this is the whole is the whole "PrecertChainEntryV2".
"PrecertChainEntryV2".
sct: A base64 encoded "SignedCertificateTimestamp" for this sct: A base64 encoded "TransItem" of type "x509_sct" or
entry. Note that more than one SCT may have been returned "precert_sct" corresponding to this log entry. Note that
for the same entry - only one of those is returned in this more than one SCT may have been returned for the same entry
field. It may not be possible to retrieve others. - only one of those is returned in this field. It may not
be possible to retrieve others.
sth: A base64 encoded SignedTreeHead. sth: A base64 encoded "TransItem" of type "signed_tree_head",
signed by this log.
Note that this message is not signed -- the "entries" data can be Note that this message is not signed -- the "entries" data can be
verified by constructing the Merkle Tree Hash corresponding to a verified by constructing the Merkle Tree Hash corresponding to a
retrieved STH. All leaves MUST be v1 or v2. However, a compliant v1 retrieved STH. All leaves MUST be v1 or v2. However, a compliant v1
client MUST NOT construe an unrecognized LogEntryType value as an client MUST NOT construe an unrecognized LogEntryType value as an
error. This means it may be unable to parse some entries, but note error. This means it may be unable to parse some entries, but note
that each client can inspect the entries it does recognize as well as that each client can inspect the entries it does recognize as well as
verify the integrity of the data by treating unrecognized leaves as verify the integrity of the data by treating unrecognized leaves as
opaque input to the tree. opaque input to the tree.
skipping to change at page 28, line 10 skipping to change at page 31, line 7
empty "entries" array. empty "entries" array.
In any case, the log server MUST return the latest STH it knows In any case, the log server MUST return the latest STH it knows
about. about.
See Section 9.4.3 for an outline of how to use a complete list of See Section 9.4.3 for an outline of how to use a complete list of
"leaf_input" entries to verify the "root_hash". "leaf_input" entries to verify the "root_hash".
6.8. Retrieve Accepted Root Certificates 6.8. Retrieve Accepted Root Certificates
GET https://<log server>/ct/v1/get-roots GET https://<log server>/ct/v2/get-roots
No inputs. No inputs.
Outputs: Outputs:
certificates: An array of base64 encoded root certificates that certificates: An array of base64 encoded root certificates that
are acceptable to the log. are acceptable to the log.
max_chain: If the server has chosen to limit the length of chains max_chain: If the server has chosen to limit the length of chains
it accepts, this is the maximum number of certificates in the it accepts, this is the maximum number of certificates in the
chain, in decimal. If there is no limit, this is omitted. chain, in decimal. If there is no limit, this is omitted.
7. TLS Servers 7. TLS Servers
TLS servers MUST use at least one of the three mechanisms listed TLS servers MUST use at least one of the three mechanisms listed
below to present one or more SCTs from one or more logs to each TLS below to present one or more SCTs or inclusion proofs from one or
client during TLS handshakes, where each SCT corresponds to the more logs to each TLS client during TLS handshakes, where each SCT or
server certificate or to a name-constrained intermediate the server inclusion proof corresponds to the server certificate or to a name-
certificate chains to. Three mechanisms are provided because they constrained intermediate the server certificate chains to. Three
have different tradeoffs. mechanisms are provided because they have different tradeoffs.
o A TLS extension (Section 7.4.1.4 of [RFC5246]) with type o A TLS extension (Section 7.4.1.4 of [RFC5246]) with type
"signed_certificate_timestamp" (see Section 7.1). This mechanism "transparency_info" (see Section 7.1). This mechanism allows TLS
allows TLS servers to participate in CT without the cooperation of servers to participate in CT without the cooperation of CAs,
CAs, unlike the other two mechanisms. It also allows SCTs to be unlike the other two mechanisms. It also allows SCTs and
updated on the fly. inclusion proofs to be updated on the fly.
o An Online Certificate Status Protocol (OCSP) [RFC6960] response o An Online Certificate Status Protocol (OCSP) [RFC6960] response
extension (see Section 8.1.1), where the OCSP response is provided extension (see Section 8.1.1), where the OCSP response is provided
in the "certificate_status" TLS extension (Section 8 of in the "certificate_status" TLS extension (Section 8 of
[RFC6066]), also known as OCSP stapling. This mechanism is [RFC6066]), also known as OCSP stapling. This mechanism is
already widely (but not universally) implemented. It also allows already widely (but not universally) implemented. It also allows
SCTs to be updated on the fly. SCTs and inclusion proofs to be updated on the fly.
o An X509v3 certificate extension (see Section 8.1.2). This o An X509v3 certificate extension (see Section 8.1.2). This
mechanism allows the use of unmodified TLS servers, but the SCTs mechanism allows the use of unmodified TLS servers, but the SCTs
cannot be updated on the fly. Since the logs that signed the SCTs and inclusion proofs cannot be updated on the fly. Since the logs
won't necessarily be accepted by TLS clients for the full lifetime from where the SCTs and inclusion proofs originated won't
of the certificate, there is a risk that TLS clients will necessarily be accepted by TLS clients for the full lifetime of
the certificate, there is a risk that TLS clients will
subsequently consider the certificate to be non-compliant and in subsequently consider the certificate to be non-compliant and in
need of re-issuance. need of re-issuance.
TLS servers SHOULD send SCTs from multiple logs in case one or more TLS servers SHOULD send SCTs or inclusion proofs from multiple logs
logs are not acceptable to the TLS client (for example, if a log has in case one or more logs are not acceptable to the TLS client (for
been struck off for misbehavior, has had a key compromise or is not example, if a log has been struck off for misbehavior, has had a key
known to the TLS client). compromise, or is not known to the TLS client).
Multiple SCTs are combined into an SCT list as follows: Multiple SCTs, inclusion proofs, and indeed "TransItem" structures of
any type, are combined into a list as follows:
opaque SerializedSCT<1..2^16-1>; opaque SerializedTransItem<1..2^16-1>;
struct { struct {
SerializedSCT sct_list<1..2^16-1>; SerializedTransItem trans_item_list<1..2^16-1>;
} SignedCertificateTimestampList; } TransItemList;
Here, "SerializedSCT" is an opaque byte string that contains the Here, "SerializedTransItem" is an opaque byte string that contains
serialized SCT structure. This encoding ensures that TLS clients can the serialized "TransItem" structure. This encoding ensures that TLS
decode each SCT individually (i.e., if there is a version upgrade, clients can decode each "TransItem" individually (so, for example, if
out-of-date clients can still parse old SCTs while skipping over new there is a version upgrade, out-of-date clients can still parse old
SCTs whose versions they don't understand). "TransItem" structures while skipping over new "TransItem" structures
whose versions they don't understand).
TODO: We need to define at least one ItemExtensionType for
associating SCT and inclusion proof TransItems with the relevant
certificate.
7.1. TLS Extension 7.1. TLS Extension
If a TLS client includes the "signed_certificate_timestamp" extension If a TLS client includes the "transparency_info" extension type in
type in the ClientHello, the TLS server MAY include the the ClientHello, the TLS server MAY include the "transparency_info"
"signed_certificate_timestamp" extension in the ServerHello with extension in the ServerHello with "extension_data" set to a
"extension_data" set to a "SignedCertificateTimestampList". The TLS "TransItemList". The TLS server is not expected to process or
server is not expected to process or include this extension when a include this extension when a TLS session is resumed, since session
TLS session is resumed, since session resumption uses the original resumption uses the original session information.
session information.
8. Certification Authorities 8. Certification Authorities
8.1. X.509v3 Extension 8.1. Transparency Information X.509v3 Extension
One or more SCTs can be embedded in an X.509v3 extension that is
included in a certificate or an OCSP response. Since RFC5280
requires the "extnValue" field (an OCTET STRING) of each X.509v3
extension to include the DER encoding of an ASN.1 value, we cannot
embed a "SignedCertificateTimestampList" directly. Instead, we have
to wrap it inside an additional OCTET STRING (see below), which we
then put into the "extnValue" field.
8.1.1. OCSP Response Extension
A certification authority may embed one or more SCTs in OCSP
responses pertaining to the end-entity certificate, by including a
non-critical "singleExtensions" extension with OID
1.3.6.1.4.1.11129.2.4.5 whose "extnValue" contains:
CertificateSCTList ::= OCTET STRING One or more "TransItem" structures can be embedded in the
Transparency Information X.509v3 extension, which has OID <TBD> and
SHOULD be non-critical. This extension can be included in OCSP
responses and certificates. Since RFC5280 requires the "extnValue"
field (an OCTET STRING) of each X.509v3 extension to include the DER
encoding of an ASN.1 value, we cannot embed a "TransItemList"
directly. Instead, we have to wrap it inside an additional OCTET
STRING, which we then put into the "extnValue" field:
"CertificateSCTList" contains a "SignedCertificateTimestampList" TransparencyInformationSyntax ::= OCTET STRING
whose SCTs all have the "x509_entry" "LogEntryType".
8.1.2. Certificate Extension "TransparencyInformationSyntax" contains a "TransItemList".
A certification authority that has submitted a precertificate to one 8.1.1. OCSP Response Extension
or more logs may embed the obtained SCTs in the "TBSCertificate" that
will be signed to produce the certificate, by including a non-
critical X.509v3 extension with OID 1.3.6.1.4.1.11129.2.4.2 whose
"extnValue" contains:
PrecertificateSCTList ::= OCTET STRING A certification authority may include a Transparency Information
X.509v3 extension in the "singleExtensions" of a "SingleResponse" in
an OCSP response. The included SCTs or inclusion proofs MUST be for
the certificate identified by the "certID" of that "SingleResponse",
or for a precertificate that corresponds to that certificate, or for
a name-constrained intermediate to which that certificate chains.
"PrecertificateSCTList" contains a "SignedCertificateTimestampList" 8.1.2. Certificate Extension
whose SCTs all have the "precert_entry_V2" "LogEntryType".
Upon receiving the certificate, clients can reconstruct the original A certification authority may include a Transparency Information
"TBSCertificate" to verify the SCT signatures. X.509v3 extension in a certificate. Any included SCTs or inclusion
proofs MUST be either for a precertificate that corresponds to this
certificate, or for a name-constrained intermediate to which this
certificate chains.
9. Clients 9. Clients
There are various different functions clients of logs might perform. There are various different functions clients of logs might perform.
We describe here some typical clients and how they should function. We describe here some typical clients and how they should function.
Any inconsistency may be used as evidence that a log has not behaved Any inconsistency may be used as evidence that a log has not behaved
correctly, and the signatures on the data structures prevent the log correctly, and the signatures on the data structures prevent the log
from denying that misbehavior. from denying that misbehavior.
All clients need various metadata in order to communicate with logs All clients need various metadata in order to communicate with logs
skipping to change at page 31, line 17 skipping to change at page 34, line 5
In order to communicate with and verify a log, clients need metadata In order to communicate with and verify a log, clients need metadata
about the log. about the log.
Base URL: The URL to substitute for <log server> in Section 6. Base URL: The URL to substitute for <log server> in Section 6.
Hash Algorithm The hash algorithm used for the Merkle Tree (see Hash Algorithm The hash algorithm used for the Merkle Tree (see
Section 11.2). Section 11.2).
Signing Algorithm The signing algorithm used (see Section 2.1.4). Signing Algorithm The signing algorithm used (see Section 2.1.4).
Public Key The public key used for signing. Public Key The public key used to verify signatures generated by the
log. A log MUST NOT use the same keypair as any other log.
Log ID The OID that uniquely identifies the log.
Maximum Merge Delay The MMD the log has committed to. Maximum Merge Delay The MMD the log has committed to.
Version The version of the protocol supported by the log (currently Version The version of the protocol supported by the log (currently
1 or 2). 1 or 2).
Maximum Chain Length The longest chain submission the log is willing Maximum Chain Length The longest chain submission the log is willing
to accept, if the log chose to limit it. to accept, if the log chose to limit it.
STH Frequency Count The maximum number of STHs the log may produce STH Frequency Count The maximum number of STHs the log may produce
in any period equal to the "Maximum Merge Delay" (see in any period equal to the "Maximum Merge Delay" (see
Section 5.5). Section 5.8).
Final STH If a log has been closed down (i.e. no longer accepts new Final STH If a log has been closed down (i.e. no longer accepts new
entries), existing entries may still be valid. In this case, the entries), existing entries may still be valid. In this case, the
client should know the final valid STH in the log to ensure no new client should know the final valid STH in the log to ensure no new
entries can be added without detection. entries can be added without detection.
[JSON.Metadata] is an example of a metadata format which includes the [JSON.Metadata] is an example of a metadata format which includes the
above elements. above elements.
9.2. TLS Client 9.2. TLS Client
TLS clients receive SCTs alongside or in certificates, either for the TLS clients receive SCTs alongside or in certificates, either for the
server certificate itself or for a name-constrained intermediate the server certificate itself or for a name-constrained intermediate the
server certificate chains to. TLS clients MUST implement all of the server certificate chains to. TLS clients MUST implement all of the
three mechanisms by which TLS servers may present SCTs (see three mechanisms by which TLS servers may present SCTs (see
Section 7). TLS clients that support the Section 7). TLS clients that support the "transparency_info" TLS
"signed_certificate_timestamp" TLS extension SHOULD include it, with extension SHOULD include it in ClientHello messages, with
empty "extension_data", in ClientHello messages. "extension_data" set to <TBD>.
TODO: What should the TLS client communicate in the extension_data?
Version(s) of CT that it supports? Certain types of TransItem that
it can handle? Whether or not it wants to gossip?
In addition to normal validation of the certificate and its chain, In addition to normal validation of the certificate and its chain,
TLS clients SHOULD validate each SCT by computing the signature input TLS clients SHOULD validate each supplied SCT by computing the
from the SCT data as well as the certificate and verifying the signature input from the SCT data as well as the certificate and
signature, using the corresponding log's public key. TLS clients verifying the signature, using the corresponding log's public key.
MUST reject SCTs whose timestamp is in the future. TLS clients MUST reject SCTs whose timestamp is in the future.
By validating SCTs, TLS clients can thus determine whether TLS clients SHOULD also validate each supplied inclusion proof (see
certificates are compliant. A certificate not accompanied by a valid Section 9.4.1), in order to audit the log. If no inclusion proof was
SCT MUST NOT be considered compliant by TLS clients. However, supplied by the TLS server, the TLS client MAY request one directly
from the corresponding log using "get-proof-by-hash" (Section 6.5) or
"get-all-by-hash" (Section 6.6), and then validate it.
To be considered compliant, a certificate MUST be accompanied by at
least one valid SCT or at least one valid inclusion proof. A
certificate not accompanied by any valid SCTs or any valid inclusion
proofs MUST NOT be considered compliant by TLS clients. However,
specifying the TLS clients' behavior once compliance or non- specifying the TLS clients' behavior once compliance or non-
compliance has been determined (for example, whether a certificate compliance has been determined (for example, whether a certificate
should be rejected due to the lack of valid SCTs) is outside the should be rejected due to non-compliance) is outside the scope of
scope of this document. this document.
A TLS client MAY audit the corresponding log by requesting, and If the TLS client holds an STH that predates the SCT, it MAY, in the
verifying, a Merkle audit proof for said certificate. If the TLS process of auditing, request a new STH from the log (Section 6.3),
client holds an STH that predates the SCT, it MAY, in the process of then verify it by requesting a consistency proof (Section 6.4). Note
auditing, request a new STH from the log (Section 6.3), then verify that if the TLS client uses "get-all-by-hash", then it will already
it by requesting a consistency proof (Section 6.4). have the new STH.
9.3. Monitor 9.3. Monitor
Monitors watch logs and check that they behave correctly. Monitors Monitors watch logs and check that they behave correctly. Monitors
may additionally watch for certificates of interest. For example, a may additionally watch for certificates of interest. For example, a
monitor may be configured to report on all certificates that apply to monitor may be configured to report on all certificates that apply to
a specific domain name when fetching new entries for consistency a specific domain name when fetching new entries for consistency
validation. validation.
A monitor needs to, at least, inspect every new entry in each log it A monitor needs to, at least, inspect every new entry in each log it
skipping to change at page 33, line 48 skipping to change at page 37, line 7
verify that the SCT corresponds to the certificate it arrived with verify that the SCT corresponds to the certificate it arrived with
(i.e. the log entry is that certificate, is a precertificate for that (i.e. the log entry is that certificate, is a precertificate for that
certificate or is an appropriate name-constrained intermediate [see certificate or is an appropriate name-constrained intermediate [see
Section 4.3]). Section 4.3]).
The following algorithm outlines may be useful for clients that wish The following algorithm outlines may be useful for clients that wish
to perform various audit operations. to perform various audit operations.
9.4.1. Verifying an inclusion proof 9.4.1. Verifying an inclusion proof
When a client has received an "audit_path" and "leaf_index" and When a client has received a "TransItem" of type "inclusion_proof"
wishes to verify inclusion of an input "hash" for an STH with a given and wishes to verify inclusion of an input "hash" for an STH with a
"tree_size" and "root_hash", the following algorithm may be used to given "tree_size" and "root_hash", the following algorithm may be
prove the "hash" was included in the "root_hash": used to prove the "hash" was included in the "root_hash":
1. Set "fn" to "leaf_index" and "sn" to "tree_size - 1". 1. Set "fn" to "leaf_index" and "sn" to "tree_size - 1".
2. Set "r" to "hash". 2. Set "r" to "hash".
3. For each value "p" in the "audit_path" array: 3. For each value "p" in the "inclusion_path" array:
If "LSB(fn)" is set, or if "fn" is equal to "sn", then: If "LSB(fn)" is set, or if "fn" is equal to "sn", then:
1. Set "r" to "HASH(0x01 || p || r)" 1. Set "r" to "HASH(0x01 || p || r)"
2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn"
equally until either "LSB(fn)" is set or "fn" is "0". equally until either "LSB(fn)" is set or "fn" is "0".
Otherwise: Otherwise:
skipping to change at page 34, line 31 skipping to change at page 37, line 38
Finally, right-shift both "fn" and "sn" one time. Finally, right-shift both "fn" and "sn" one time.
4. Compare "r" against the "root_hash". If they are equal, then the 4. Compare "r" against the "root_hash". If they are equal, then the
log has proven the inclusion of "hash". log has proven the inclusion of "hash".
9.4.2. Verifying consistency between two STHs 9.4.2. Verifying consistency between two STHs
When a client has an STH "first_hash" for tree size "first", an STH When a client has an STH "first_hash" for tree size "first", an STH
"second_hash" for tree size "second" where "0 < first < second", and "second_hash" for tree size "second" where "0 < first < second", and
has received a "consistency" array that they wish to use to verify has received a "TransItem" of type "consistency_proof" that they wish
both hashes, the following algorithm may be used: to use to verify both hashes, the following algorithm may be used:
1. If "first" is an exact power of 2, then prepend "first_hash" to 1. If "first" is an exact power of 2, then prepend "first_hash" to
the "consistency" array. the "consistency_path" array.
2. Set "fn" to "first - 1" and "sn" to "second - 1". 2. Set "fn" to "first - 1" and "sn" to "second - 1".
3. If "LSB(fn)" is set, then right-shift both "fn" and "sn" equally 3. If "LSB(fn)" is set, then right-shift both "fn" and "sn" equally
until "LSB(fn)" is not set. until "LSB(fn)" is not set.
4. Set both "fr" and "sr" to the first value in the "consistency" 4. Set both "fr" and "sr" to the first value in the
array. "consistency_path" array.
5. For each subsequent value "c" in the "consistency" array: 5. For each subsequent value "c" in the "consistency_path" array:
If "LSB(fn)" is set, or if "fn" is equal to "sn", then: If "LSB(fn)" is set, or if "fn" is equal to "sn", then:
1. Set "fr" to "HASH(0x01 || c || fr)" 1. Set "fr" to "HASH(0x01 || c || fr)"
Set "sr" to "HASH(0x01 || c || sr)" Set "sr" to "HASH(0x01 || c || sr)"
2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn" 2. If "LSB(fn)" is not set, then right-shift both "fn" and "sn"
equally until either "LSB(fn)" is set or "fn" is "0". equally until either "LSB(fn)" is set or "fn" is "0".
Otherwise: Otherwise:
Set "sr" to "HASH(0x01 || sr || c)" Set "sr" to "HASH(0x01 || sr || c)"
Finally, right-shift both "fn" and "sn" one time. Finally, right-shift both "fn" and "sn" one time.
6. After completing iterating through the "consistency" array as 6. After completing iterating through the "consistency_path" array
described above, verify that the "fr" calculated is equal to the as described above, verify that the "fr" calculated is equal to
"first_hash" supplied and that the "sr" calculated is equal to the "first_hash" supplied and that the "sr" calculated is equal
the "second_hash" supplied. to the "second_hash" supplied.
9.4.3. Verifying root hash given entries 9.4.3. Verifying root hash given entries
When a client has a complete list of leaf input "entries" from "0" up When a client has a complete list of leaf input "entries" from "0" up
to "tree_size - 1" and wishes to verify this list against an STH to "tree_size - 1" and wishes to verify this list against an STH
"root_hash" returned by the log for the same "tree_size", the "root_hash" returned by the log for the same "tree_size", the
following algorithm may be used: following algorithm may be used:
1. Set "stack" to an empty stack. 1. Set "stack" to an empty stack.
skipping to change at page 36, line 18 skipping to change at page 39, line 22
through its lifetime. If it should become necessary to deprecate an through its lifetime. If it should become necessary to deprecate an
algorithm used by a live log, then the log should be frozen as algorithm used by a live log, then the log should be frozen as
specified in Section 9.1 and a new log should be started. If specified in Section 9.1 and a new log should be started. If
necessary, the new log can contain existing entries from the frozen necessary, the new log can contain existing entries from the frozen
log, which monitors can verify are an exact match. log, which monitors can verify are an exact match.
11. IANA Considerations 11. IANA Considerations
11.1. TLS Extension Type 11.1. TLS Extension Type
IANA has allocated an RFC 5246 ExtensionType value (18) for the SCT IANA is asked to allocate an RFC 5246 ExtensionType value for the
TLS extension. The extension name is "signed_certificate_timestamp". "transparency_info" TLS extension. IANA should update this extension
IANA should update this extension type to point at this document. type to point at this document.
11.2. Hash Algorithms 11.2. Hash Algorithms
IANA is asked to establish a registry of hash values, initially IANA is asked to establish a registry of hash values, initially
consisting of: consisting of:
+-------+----------------------+ +-------+----------------------+
| Index | Hash | | Index | Hash |
+-------+----------------------+ +-------+----------------------+
| 0 | SHA-256 [FIPS.180-4] | | 0 | SHA-256 [FIPS.180-4] |
+-------+----------------------+ +-------+----------------------+
11.3. SCT Extensions 11.3. TransItem Extensions
IANA is asked to establish a registry of TransItem extensions,
initially consisting of:
+-------+-----------+
| Type | Extension |
+-------+-----------+
| 65535 | reserved |
+-------+-----------+
TBD: policy for adding to the registry
11.4. SCT Extensions
IANA is asked to establish a registry of SCT extensions, initially IANA is asked to establish a registry of SCT extensions, initially
consisting of: consisting of:
+-------+-----------+ +-------+-----------+
| Type | Extension | | Type | Extension |
+-------+-----------+ +-------+-----------+
| 65535 | reserved | | 65535 | reserved |
+-------+-----------+ +-------+-----------+
TBD: policy for adding to the registry TBD: policy for adding to the registry
11.4. STH Extensions 11.5. STH Extensions
IANA is asked to establish a registry of STH extensions, initially IANA is asked to establish a registry of STH extensions, initially
consisting of: consisting of:
+-------+-----------+ +-------+-----------+
| Type | Extension | | Type | Extension |
+-------+-----------+ +-------+-----------+
| 65535 | reserved | | 65535 | reserved |
+-------+-----------+ +-------+-----------+
skipping to change at page 42, line 27 skipping to change at page 46, line 5
[JSON.Metadata] [JSON.Metadata]
The Chromium Projects, "Chromium Log Metadata JSON The Chromium Projects, "Chromium Log Metadata JSON
Schema", 2014, <http://www.certificate-transparency.org/ Schema", 2014, <http://www.certificate-transparency.org/
known-logs/log_list_schema.json>. known-logs/log_list_schema.json>.
[RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate
Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013, Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013,
<http://www.rfc-editor.org/info/rfc6962>. <http://www.rfc-editor.org/info/rfc6962>.
Appendix A. TransItemV1
TODO: Finish writing this section. Or should it be in a separate
document?
struct {
TransType type;
select (type) {
case x509_sct: SignedCertificateTimestampV1;
case precert_sct: SignedCertificateTimestampV1;
case signed_tree_head: SignedTreeHeadDataV1;
case consistency_proof: ConsistencyProofDataV1;
case inclusion_proof: InclusionProofDataV1;
} data;
} TransItemV1;
opaque SHA256Hash[32];
struct {
Version version = v1;
SHA256Hash log_id;
uint64 timestamp;
SctExtensions extensions;
digitally-signed struct {
Version version = v1;
uint8 signature_type = 0; /* "certificate_timestamp" */
uint64 timestamp;
TransType type; /* x509_entry(0) or precert_entry(1) */
select (type) {
case x509_entry: ASN.1Cert;
case precert_entry: PreCert;
} signed_entry;
SctExtensions extensions;
} signature;
} SignedCertificateTimestampV1;
struct {
SHA256Hash log_id;
uint64 timestamp;
uint64 tree_size;
SHA256Hash sha256_root_hash;
digitally-signed struct {
Version version = v1;
uint8 signature_type = 1; /* "tree_hash" */
uint64 timestamp;
uint64 tree_size;
SHA256Hash sha256_root_hash;
} signature;
} SignedTreeHeadDataV1;
struct {
SHA256Hash log_id;
uint64 tree_size_1;
uint64 tree_size_2;
SHA256Hash consistency_path<1..2^8-1>;
} ConsistencyProofDataV1;
struct {
SHA256Hash log_id;
uint64 tree_size;
uint64 leaf_index;
SHA256Hash inclusion_path<1..2^8-1>;
} InclusionProofDataV1;
Authors' Addresses Authors' Addresses
Ben Laurie Ben Laurie
Google UK Ltd. Google UK Ltd.
EMail: benl@google.com EMail: benl@google.com
Adam Langley Adam Langley
Google Inc. Google Inc.
 End of changes. 114 change blocks. 
393 lines changed or deleted 595 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/