draft-ietf-trans-rfc6962-bis-09.txt   draft-ietf-trans-rfc6962-bis-10.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 15, 2016 E. Messeri Expires: April 21, 2016 E. Messeri
Google Google
R. Stradling R. Stradling
Comodo Comodo
October 13, 2015 October 19, 2015
Certificate Transparency Certificate Transparency
draft-ietf-trans-rfc6962-bis-09 draft-ietf-trans-rfc6962-bis-10
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 15, 2016. This Internet-Draft will expire on April 21, 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
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 . . . . . . . . . . . . . . . . . . 4 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 . . . . . . . . . . . . . . 6
2.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 7 2.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.4. Signatures . . . . . . . . . . . . . . . . . . . . . 9 2.1.4. Signatures . . . . . . . . . . . . . . . . . . . . . 9
3. Log Format and Operation . . . . . . . . . . . . . . . . . . 10 3. Submitters . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 10 3.1. Certificates . . . . . . . . . . . . . . . . . . . . . . 10
3.2. Private Domain Name Labels . . . . . . . . . . . . . . . 13 3.2. Precertificates . . . . . . . . . . . . . . . . . . . . . 10
3.2.1. Wildcard Certificates . . . . . . . . . . . . . . . . 13 4. Private Domain Name Labels . . . . . . . . . . . . . . . . . 11
3.2.2. Redacting Domain Name Labels in Precertificates . . . 13 4.1. Wildcard Certificates . . . . . . . . . . . . . . . . . . 11
3.2.3. Using a Name-Constrained Intermediate CA . . . . . . 14 4.2. Redacting Domain Name Labels in Precertificates . . . . . 11
3.3. Structure of the Signed Certificate Timestamp . . . . . . 15 4.3. Using a Name-Constrained Intermediate CA . . . . . . . . 12
3.4. Including the Signed Certificate Timestamp in the TLS 5. Log Format and Operation . . . . . . . . . . . . . . . . . . 13
Handshake . . . . . . . . . . . . . . . . . . . . . . . . 18 5.1. Accepting Submissions . . . . . . . . . . . . . . . . . . 14
3.4.1. TLS Extension . . . . . . . . . . . . . . . . . . . . 19 5.2. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 14
3.4.2. X.509v3 Extension . . . . . . . . . . . . . . . . . . 19 5.3. Structure of the Signed Certificate Timestamp . . . . . . 16
3.5. Merkle Tree . . . . . . . . . . . . . . . . . . . . . . . 20 5.4. Merkle Tree . . . . . . . . . . . . . . . . . . . . . . . 18
3.6. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 21 5.5. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 19
3.6.1. Structure of the STH . . . . . . . . . . . . . . . . 21 5.5.1. Structure of the STH . . . . . . . . . . . . . . . . 19
4. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 23 6. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 20
4.1. Add Chain to Log . . . . . . . . . . . . . . . . . . . . 24 6.1. Add Chain to Log . . . . . . . . . . . . . . . . . . . . 22
4.2. Add PreCertChain to Log . . . . . . . . . . . . . . . . . 25 6.2. Add PreCertChain to Log . . . . . . . . . . . . . . . . . 23
4.3. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 25 6.3. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 23
4.4. Retrieve Merkle Consistency Proof between Two Signed Tree 6.4. Retrieve Merkle Consistency Proof between Two Signed Tree
Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 26 6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 24
4.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and 6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and
Consistency Proof by Leaf Hash . . . . . . . . . . . . . 27 Consistency Proof by Leaf Hash . . . . . . . . . . . . . 25
4.7. Retrieve Entries and STH from Log . . . . . . . . . . . . 29 6.7. Retrieve Entries and STH from Log . . . . . . . . . . . . 26
4.8. Retrieve Accepted Root Certificates . . . . . . . . . . . 30 6.8. Retrieve Accepted Root Certificates . . . . . . . . . . . 28
5. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 7. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.1. Metadata . . . . . . . . . . . . . . . . . . . . . . . . 31 7.1. TLS Extension . . . . . . . . . . . . . . . . . . . . . . 29
5.2. Submitters . . . . . . . . . . . . . . . . . . . . . . . 31 8. Certification Authorities . . . . . . . . . . . . . . . . . . 29
5.3. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 32 8.1. X.509v3 Extension . . . . . . . . . . . . . . . . . . . . 29
5.4. Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 32 8.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 29
5.5. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 33 8.1.2. Certificate Extension . . . . . . . . . . . . . . . . 30
5.5.1. Verifying an inclusion proof . . . . . . . . . . . . 34 9. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.5.2. Verifying consistency between two STHs . . . . . . . 34 9.1. Metadata . . . . . . . . . . . . . . . . . . . . . . . . 31
5.5.3. Verifying root hash given entries . . . . . . . . . . 35 9.2. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 31
6. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 36 9.3. Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 32
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 36 9.4. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 33
7.1. TLS Extension Type . . . . . . . . . . . . . . . . . . . 36 9.4.1. Verifying an inclusion proof . . . . . . . . . . . . 33
7.2. Hash Algorithms . . . . . . . . . . . . . . . . . . . . . 36 9.4.2. Verifying consistency between two STHs . . . . . . . 34
7.3. SCT Extensions . . . . . . . . . . . . . . . . . . . . . 36 9.4.3. Verifying root hash given entries . . . . . . . . . . 35
7.4. STH Extensions . . . . . . . . . . . . . . . . . . . . . 37 10. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 36
8. Security Considerations . . . . . . . . . . . . . . . . . . . 37 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 36
8.1. Misissued Certificates . . . . . . . . . . . . . . . . . 37 11.1. TLS Extension Type . . . . . . . . . . . . . . . . . . . 36
8.2. Detection of Misissue . . . . . . . . . . . . . . . . . . 38 11.2. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 36
8.3. Redaction of Public Domain Name Labels . . . . . . . . . 38 11.3. SCT Extensions . . . . . . . . . . . . . . . . . . . . . 36
8.4. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 38 11.4. STH Extensions . . . . . . . . . . . . . . . . . . . . . 36
8.5. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . . 39 12. Security Considerations . . . . . . . . . . . . . . . . . . . 37
9. Efficiency Considerations . . . . . . . . . . . . . . . . . . 39 12.1. Misissued Certificates . . . . . . . . . . . . . . . . . 37
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 39 12.2. Detection of Misissue . . . . . . . . . . . . . . . . . 37
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 40 12.3. Redaction of Public Domain Name Labels . . . . . . . . . 38
11.1. Normative References . . . . . . . . . . . . . . . . . . 40 12.4. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 38
11.2. Informative References . . . . . . . . . . . . . . . . . 41 12.5. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 38
13. Efficiency Considerations . . . . . . . . . . . . . . . . . . 39
14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 39
15. References . . . . . . . . . . . . . . . . . . . . . . . . . 39
15.1. Normative References . . . . . . . . . . . . . . . . . . 39
15.2. Informative References . . . . . . . . . . . . . . . . . 41
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 42 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 42
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
skipping to change at page 5, line 17 skipping to change at page 5, line 23
Data structures are defined according to the conventions laid out in Data structures are defined according to the conventions laid out in
Section 4 of [RFC5246]. Section 4 of [RFC5246].
2. Cryptographic Components 2. Cryptographic Components
2.1. Merkle Hash Trees 2.1. Merkle Hash Trees
Logs use a binary Merkle Hash Tree for efficient auditing. The Logs use a binary Merkle Hash Tree for efficient auditing. The
hashing algorithm used by each log is expected to be specified as hashing algorithm used by each log is expected to be specified as
part of the metadata relating to that log. We have established a part of the metadata relating to that log. We have established a
registry of acceptable algorithms, see Section 7.2. The hashing registry of acceptable algorithms, see Section 11.2. The hashing
algorithm in use is referred to as HASH throughout this document and algorithm in use is referred to as HASH throughout this document and
the size of its output in bytes as HASH_SIZE. The input to the the size of its output in bytes as HASH_SIZE. The input to the
Merkle Tree Hash is a list of data entries; these entries will be Merkle Tree Hash is a list of data entries; these entries will be
hashed to form the leaves of the Merkle Hash Tree. The output is a hashed to form the leaves of the Merkle Hash Tree. The output is a
single HASH_SIZE Merkle Tree Hash. Given an ordered list of n single HASH_SIZE Merkle Tree Hash. Given an ordered list of n
inputs, D[n] = {d(0), d(1), ..., d(n-1)}, the Merkle Tree Hash (MTH) inputs, D[n] = {d(0), d(1), ..., d(n-1)}, the Merkle Tree Hash (MTH)
is thus defined as follows: is thus defined as follows:
The hash of an empty list is the hash of an empty string: The hash of an empty list is the hash of an empty string:
skipping to change at page 10, line 5 skipping to change at page 10, line 5
show hash is consistent with hash2. show hash is consistent with hash2.
2.1.4. Signatures 2.1.4. Signatures
Various data structures are signed. A log MUST use either Various data structures are signed. A log MUST use either
deterministic ECDSA [RFC6979] using the NIST P-256 curve deterministic ECDSA [RFC6979] using the NIST P-256 curve
(Section D.1.2.3 of the Digital Signature Standard [DSS]) and HMAC- (Section D.1.2.3 of the Digital Signature Standard [DSS]) and HMAC-
SHA256 or RSA signatures (RSASSA-PKCS1-v1_5 with SHA-256, Section 8.2 SHA256 or RSA signatures (RSASSA-PKCS1-v1_5 with SHA-256, Section 8.2
of [RFC3447]) using a key of at least 2048 bits. of [RFC3447]) using a key of at least 2048 bits.
3. Log Format and Operation 3. Submitters
Anyone can submit certificates to certificate logs for public
auditing; however, since certificates will not be accepted by TLS
clients unless logged, it is expected that certificate owners or
their CAs will usually submit them. A log is a single, append-only
Merkle Tree of such certificates.
When a valid certificate is submitted to a log, the log MUST return a
Signed Certificate Timestamp (SCT). The SCT is the log's promise to
incorporate the certificate in the Merkle Tree within a fixed amount
of time known as the Maximum Merge Delay (MMD). If the log has
previously seen the certificate, it MAY return the same SCT as it
returned before (note that if a certificate was previously logged as
a precertificate, then the precertificate's SCT would not be
appropriate, instead a fresh SCT of type x509_entry should be
generated). TLS servers MUST present an SCT from one or more logs to
the TLS client together with the certificate. A certificate not
accompanied by an SCT (either for the end-entity certificate or for a
name-constrained intermediate the end-entity certificate chains to)
MUST NOT be considered compliant by TLS clients.
Periodically, each log appends all its new entries to the Merkle Tree
and signs the root of the tree. The log MUST incorporate a
certificate in its Merkle Tree within the Maximum Merge Delay period
after the issuance of the SCT. When encountering an SCT, an Auditor
can verify that the certificate was added to the Merkle Tree within
that timeframe.
Log operators MUST NOT impose any conditions on retrieving or sharing
data from the log.
3.1. Log Entries
In order to enable attribution of each logged certificate to its
issuer, each submitted certificate MUST be accompanied by all
additional certificates required to verify the certificate chain up
to an accepted root certificate. The root certificate itself MAY be
omitted from the chain submitted to the log server. The log SHALL
allow retrieval of a list of accepted root certificates (this list
might usefully be the union of root certificates trusted by major
browser vendors).
Alternatively, (root as well as intermediate) certification
authorities may preannounce a certificate to logs prior to issuance
in order to incorporate the SCT in the issued certificate. To do
this, the CA submits a precertificate that the log can use to create
an entry that will be valid against the issued certificate. A
precertificate is a CMS [RFC5652] "signed-data" object that contains
a TBSCertificate [RFC5280] in its
"SignedData.encapContentInfo.eContent" field, identified by the OID
<TBD> in the "SignedData.encapContentInfo.eContentType" field. This
TBSCertificate MAY redact certain domain name labels that will be
present in the issued certificate (see Section 3.2.2) and MUST NOT
contain any SCTs, but it will be otherwise identical to the
TBSCertificate in the issued certificate. "SignedData.signerInfos"
MUST contain a signature from the same (root or intermediate) CA that
will ultimately issue the certificate. This signature indicates the
certification authority's intent to issue the certificate. This
intent is considered binding (i.e., misissuance of the precertificate
is considered equivalent to misissuance of the certificate). As
above, the precertificate submission MUST be accompanied by all the
additional certificates required to verify the chain up to an
accepted root certificate. This does not involve using the
"SignedData.certificates" field, so that field SHOULD be omitted.
The CMS object MUST be DER encoded. Note that, because of the
structure of CMS, the signature on the CMS object will not be a valid
X.509v3 signature and so cannot be used to construct a certificate
from the precertificate.
Logs MUST verify that the submitted certificate or precertificate has
a valid signature chain to an accepted root certificate, using the
chain of intermediate CA certificates provided by the submitter.
Logs MUST accept certificates that are fully valid according to RFC
5280 [RFC5280] verification rules and are submitted with such a
chain. Logs MAY accept certificates and precertificates that have
expired, are not yet valid, have been revoked, or are otherwise not
fully valid according to RFC 5280 verification rules in order to
accommodate quirks of CA certificate-issuing software. However, logs
MUST reject certificates without a valid signature chain to an
accepted root certificate. Logs MUST also reject precertificates
that are not valid DER encoded CMS "signed-data" objects.
If a certificate is accepted and an SCT issued, the accepting log Submitters submit certificates or precertificates to logs for public
MUST store the entire chain used for verification. This chain MUST auditing, as described below. In order to enable attribution of each
include the certificate or precertificate itself, the zero or more logged certificate or precertificate to its issuer, each submission
intermediate CA certificates provided by the submitter, and the root MUST be accompanied by all additional certificates required to verify
certificate used to verify the chain (even if it was omitted from the the chain up to an accepted root certificate. The root certificate
submission). The log MUST present this chain for auditing upon itself MAY be omitted from the submission.
request. This chain is required to prevent a CA from avoiding blame
by logging a partial or empty chain.
Each certificate or precertificate entry in a log MUST include the If a log accepts a submission, it will return a Signed Certificate
following components: Timestamp (SCT). The submitter SHOULD validate the returned SCT as
described in Section 9.2 if they understand its format and they
intend to use it directly in a TLS handshake or to construct a
certificate.
enum { 3.1. Certificates
x509_entry(0), precert_entry_V2(2), (65535)
} LogEntryType;
opaque ASN.1Cert<1..2^24-1>; Anyone can submit a certificate (Section 6.1) to a log. Since
certificates may not be accepted by TLS clients unless logged, it is
expected that certificate owners or their CAs will usually submit
them.
struct { 3.2. Precertificates
ASN.1Cert leaf_certificate;
ASN.1Cert certificate_chain<0..2^24-1>;
} X509ChainEntry;
opaque CMSPrecert<1..2^24-1>; Alternatively, (root as well as intermediate) CAs may preannounce a
certificate prior to issuance by submitting a precertificate
(Section 6.2) that the log can use to create an entry that will be
valid against the issued certificate. The CA MAY incorporate the
returned SCT in the issued certificate.
struct { A precertificate is a CMS [RFC5652] "signed-data" object that
CMSPrecert pre_certificate; conforms to the following requirements:
ASN.1Cert precertificate_chain<0..2^24-1>;
} PrecertChainEntryV2;
Logs SHOULD limit the length of chain they will accept. The maximum o It MUST be DER encoded.
chain length is specified in the log's metadata.
"entry_type" is the type of this entry. Future revisions of this o "SignedData.encapContentInfo.eContentType" MUST be the OID <TBD>.
protocol may add new LogEntryType values. Section 4 explains how
clients should handle unknown entry types.
"leaf_certificate" is the end-entity certificate submitted for o "SignedData.encapContentInfo.eContent" MUST contain a
auditing. TBSCertificate [RFC5280], which MAY redact certain domain name
labels that will be present in the issued certificate (see
Section 4.2) and MUST NOT contain any SCTs, but which will be
otherwise identical to the TBSCertificate in the issued
certificate.
"certificate_chain" is an array of additional certificates required o "SignedData.signerInfos" MUST contain a signature from the same
to verify the end-entity certificate. The first certificate MUST (root or intermediate) CA that will ultimately issue the
certify the end-entity certificate. Each following certificate MUST certificate. This signature indicates the CA's intent to issue
directly certify the one preceding it. The final certificate MUST the certificate. This intent is considered binding (i.e.
either be, or be issued by, a root certificate accepted by the log.
If the end-entity certificate is a root certificate, then this array
is empty.
"pre_certificate" is the precertificate submitted for auditing. misissuance of the precertificate is considered equivalent to
misissuance of the certificate). (Note that, because of the
structure of CMS, the signature on the CMS object will not be a
valid X.509v3 signature and so cannot be used to construct a
certificate from the precertificate).
"precertificate_chain" is a chain of additional certificates required o "SignedData.certificates" SHOULD be omitted.
to verify the precertificate submission. The first certificate MUST
certify the precertificate. Each following certificate MUST directly
certify the one preceding it. The final certificate MUST be a root
certificate accepted by the log.
3.2. Private Domain Name Labels 4. Private Domain Name Labels
Some regard some DNS domain name labels within their registered Some regard some DNS domain name labels within their registered
domain space as private and security sensitive. Even though these domain space as private and security sensitive. Even though these
domains are often only accessible within the domain owner's private domains are often only accessible within the domain owner's private
network, it's common for them to be secured using publicly trusted network, it's common for them to be secured using publicly trusted
TLS server certificates. We define a mechanism to allow these TLS server certificates. We define a mechanism to allow these
private labels to not appear in public logs. private labels to not appear in public logs.
3.2.1. Wildcard Certificates 4.1. Wildcard Certificates
A certificate containing a DNS-ID [RFC6125] of "*.example.com" could A certificate containing a DNS-ID [RFC6125] of "*.example.com" could
be used to secure the domain "topsecret.example.com", without be used to secure the domain "topsecret.example.com", without
revealing the string "topsecret" publicly. revealing the string "topsecret" publicly.
Since TLS clients only match the wildcard character to the complete Since TLS clients only match the wildcard character to the complete
leftmost label of the DNS domain name (see Section 6.4.3 of leftmost label of the DNS domain name (see Section 6.4.3 of
[RFC6125]), this approach would not work for a DNS-ID such as [RFC6125]), this approach would not work for a DNS-ID such as
"top.secret.example.com". Also, wildcard certificates are prohibited "top.secret.example.com". Also, wildcard certificates are prohibited
in some cases, such as Extended Validation Certificates in some cases, such as Extended Validation Certificates
[EVSSLGuidelines]. [EVSSLGuidelines].
3.2.2. Redacting Domain Name Labels in Precertificates 4.2. Redacting Domain Name Labels in Precertificates
When creating a precertificate, the CA MAY substitute one or more When creating a precertificate, the CA MAY substitute one or more
labels in each DNS-ID with a corresponding number of "?" labels. labels in each DNS-ID with a corresponding number of "?" labels.
Every label to the left of a "?" label MUST also be redacted. For Every label to the left of a "?" label MUST also be redacted. For
example, if a certificate contains a DNS-ID of example, if a certificate contains a DNS-ID of
"top.secret.example.com", then the corresponding precertificate could "top.secret.example.com", then the corresponding precertificate could
contain "?.?.example.com" instead, but not "top.?.example.com" contain "?.?.example.com" instead, but not "top.?.example.com"
instead. instead.
Wildcard "*" labels MUST NOT be redacted. However, if the complete Wildcard "*" labels MUST NOT be redacted. However, if the complete
skipping to change at page 14, line 16 skipping to change at page 12, line 25
The purpose of this extension is to enable TLS clients to accurately The purpose of this extension is to enable TLS clients to accurately
reconstruct the TBSCertificate component of the precertificate from reconstruct the TBSCertificate component of the precertificate from
the certificate without having to perform any guesswork. the certificate without having to perform any guesswork.
When a precertificate contains that extension and contains a CN-ID When a precertificate contains that extension and contains a CN-ID
[RFC6125], the CN-ID MUST match the first DNS-ID and have the same [RFC6125], the CN-ID MUST match the first DNS-ID and have the same
labels redacted. TLS clients will use the first entry in the labels redacted. TLS clients will use the first entry in the
SEQUENCE OF INTEGERs to reconstruct both the first DNS-ID and the CN- SEQUENCE OF INTEGERs to reconstruct both the first DNS-ID and the CN-
ID. ID.
3.2.3. Using a Name-Constrained Intermediate CA 4.3. Using a Name-Constrained Intermediate CA
An intermediate CA certificate or intermediate CA precertificate that An intermediate CA certificate or intermediate CA precertificate that
contains the critical or non-critical Name Constraints [RFC5280] contains the critical or non-critical Name Constraints [RFC5280]
extension MAY be logged in place of end-entity certificates issued by extension MAY be logged in place of end-entity certificates issued by
that intermediate CA, as long as all of the following conditions are that intermediate CA, as long as all of the following conditions are
met: met:
o there MUST be a non-critical extension (OID o there MUST be a non-critical extension (OID
1.3.6.1.4.1.11129.2.4.7, whose extnValue OCTET STRING contains 1.3.6.1.4.1.11129.2.4.7, whose extnValue OCTET STRING contains
ASN.1 NULL data (0x05 0x00)). This extension is an explicit ASN.1 NULL data (0x05 0x00)). This extension is an explicit
skipping to change at page 15, line 31 skipping to change at page 13, line 31
SEQUENCE { SEQUENCE {
[7] [7]
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
} }
} }
} }
} }
} }
3.3. Structure of the Signed Certificate Timestamp 5. Log Format and Operation
A log is a single, append-only Merkle Tree of submitted certificate
and precertificate entries.
When it receives a valid submission, the log MUST return an SCT that
corresponds to the submitted certificate or precertificate. If the
log has previously seen this valid submission, it MAY return the same
SCT as it returned before (note that if a certificate was previously
logged as a precertificate, then the precertificate's SCT would not
be appropriate, instead a fresh SCT of type x509_entry should be
generated).
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
Maximum Merge Delay (MMD), after the issuance of the SCT.
Periodically, the log MUST append all its new entries to its Merkle
Tree and sign the root of the tree. This provides auditable evidence
that the log kept all its promises.
Log operators MUST NOT impose any conditions on retrieving or sharing
data from the log.
5.1. Accepting Submissions
Logs MUST verify that each submitted certificate or precertificate
has a valid signature chain to an accepted root certificate, using
the chain of intermediate CA certificates provided by the submitter.
Logs MUST accept certificates and precertificates that are fully
valid according to RFC 5280 [RFC5280] verification rules and are
submitted with such a chain. Logs MAY accept certificates and
precertificates that have expired, are not yet valid, have been
revoked, or are otherwise not fully valid according to RFC 5280
verification rules in order to accommodate quirks of CA certificate-
issuing software. However, logs MUST reject submissions without a
valid signature chain to an accepted root certificate. Logs MUST
also reject precertificates that do not conform to the requirements
in Section 3.2.
Logs SHOULD limit the length of chain they will accept. The maximum
chain length is specified in the log's metadata.
The log SHALL allow retrieval of its list of accepted root
certificates (see Section 6.8). This list might usefully be the
union of root certificates trusted by major browser vendors.
5.2. Log Entries
If a submission is accepted and an SCT issued, the accepting log MUST
store the entire chain used for verification. This chain MUST
include the certificate or precertificate itself, the zero or more
intermediate CA certificates provided by the submitter, and the root
certificate used to verify the chain (even if it was omitted from the
submission). The log MUST present this chain for auditing upon
request. This chain is required to prevent a CA from avoiding blame
by logging a partial or empty chain.
Each certificate entry in a log MUST include a "X509ChainEntry"
structure, and each precertificate entry MUST include a
"PrecertChainEntryV2" structure:
enum {
x509_entry(0), precert_entry_V2(2), (65535)
} LogEntryType;
opaque ASN.1Cert<1..2^24-1>;
struct {
ASN.1Cert leaf_certificate;
ASN.1Cert certificate_chain<0..2^24-1>;
} X509ChainEntry;
opaque CMSPrecert<1..2^24-1>;
struct {
CMSPrecert pre_certificate;
ASN.1Cert precertificate_chain<0..2^24-1>;
} 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
by the log.
"certificate_chain" is a vector of 0 or more additional certificates
required to verify "leaf_certificate". The first certificate MUST
certify "leaf_certificate". Each following certificate MUST directly
certify the one preceding it. The final certificate MUST be a root
certificate accepted by the log. If "leaf_certificate" is a root
certificate, then this vector is empty.
"pre_certificate" is a submitted precertificate that has been
accepted by the log.
"precertificate_chain" is a vector of 1 or more additional
certificates required to verify "pre_certificate". The first
certificate MUST certify "pre_certificate". Each following
certificate MUST directly certify the one preceding it. The final
certificate MUST be a root certificate accepted by the log.
5.3. Structure of the Signed Certificate Timestamp
enum { enum {
certificate_timestamp(0), tree_hash(1), (255) certificate_timestamp(0), tree_hash(1), (255)
} SignatureType; } SignatureType;
enum { enum {
v2(1), (255) v2(1), (255)
} Version; } Version;
struct { struct {
opaque key_id[HASH_SIZE]; opaque key_id[HASH_SIZE];
skipping to change at page 16, line 51 skipping to change at page 17, line 6
other certificate. other certificate.
"tbs_certificate" is the DER-encoded TBSCertificate component of the "tbs_certificate" is the DER-encoded TBSCertificate component of the
precertificate. Note that it is also possible to reconstruct this precertificate. Note that it is also possible to reconstruct this
TBSCertificate from the issued certificate by extracting the TBSCertificate from the issued certificate by extracting the
TBSCertificate from it, redacting the domain name labels indicated by TBSCertificate from it, redacting the domain name labels indicated by
the redacted labels extension, and deleting the SCT list extension the redacted labels extension, and deleting the SCT list extension
and redacted labels 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 7.3. registry in Section 11.3.
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 The "SctExtensions" type is a vector of 0 or more 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.
skipping to change at page 18, line 7 skipping to change at page 18, line 11
"signed_entry" includes the TBSCertificate from either the "signed_entry" includes the TBSCertificate from either the
"leaf_certificate" (in the case of an X509ChainEntry) or the "leaf_certificate" (in the case of an X509ChainEntry) or the
"pre_certificate" (in the case of a PrecertChainEntryV2). "pre_certificate" (in the case of a PrecertChainEntryV2).
"extensions" are future extensions to SignedCertificateTimestamp v2. "extensions" are future extensions to SignedCertificateTimestamp v2.
Currently, no extensions are specified. If an implementation sees an Currently, no extensions are specified. If an implementation sees an
extension that it does not understand, it SHOULD ignore that extension that it does not understand, it SHOULD ignore that
extension. Furthermore, an implementation MAY choose to ignore any extension. Furthermore, an implementation MAY choose to ignore any
extension(s) that it does understand. extension(s) that it does understand.
3.4. Including the Signed Certificate Timestamp in the TLS Handshake 5.4. Merkle Tree
The SCT data corresponding to at least one certificate in the chain
from at least one log must be included in the TLS handshake by using
one or more of the mechanisms listed below. Three mechanisms are
provided because they have different tradeoffs. TLS clients MUST
implement all three mechanisms. TLS servers MUST present SCTs using
at least one of the three mechanisms.
o A TLS extension (Section 7.4.1.4 of [RFC5246]) with type
"signed_certificate_timestamp" (see Section 3.4.1). This
mechanism allows TLS servers to participate in CT without the
cooperation of CAs, unlike the other two mechanisms. It also
allows SCTs to be updated on the fly.
o An Online Certificate Status Protocol (OCSP) [RFC6960] response
extension (see Section 3.4.2.1), where the OCSP response is
provided in the "certificate_status" TLS extension (Section 8 of
[RFC6066]), also known as OCSP stapling. This mechanism is
already widely (but not universally) implemented. It also allows
SCTs to be updated on the fly.
o An X509v3 certificate extension (see Section 3.4.2.2). This
mechanism allows the use of unmodified TLS servers, but the SCTs
cannot be updated on the fly. Since the logs that signed the SCTs
won't 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
need of re-issuance.
TLS servers SHOULD send SCTs from multiple logs in case one or more
logs are not acceptable to the TLS client (for example, if a log has
been struck off for misbehavior, has had a key compromise or is not
known to the TLS client).
Multiple SCTs are combined into an SCT list as follows:
opaque SerializedSCT<1..2^16-1>;
struct {
SerializedSCT sct_list<1..2^16-1>;
} SignedCertificateTimestampList;
Here, "SerializedSCT" is an opaque byte string that contains the
serialized SCT structure. This encoding ensures that TLS clients can
decode each SCT individually (i.e., if there is a version upgrade,
out-of-date clients can still parse old SCTs while skipping over new
SCTs whose versions they don't understand).
3.4.1. TLS Extension
One or more SCTs can be sent during the TLS handshake using a TLS
extension with type "signed_certificate_timestamp".
TLS clients that support the extension SHOULD send a ClientHello
extension with the appropriate type and empty "extension_data".
TLS servers MUST only send SCTs in this TLS extension to TLS clients
that have indicated support for the extension in the ClientHello, in
which case the SCTs are sent by setting the "extension_data" to a
"SignedCertificateTimestampList".
Session resumption uses the original session information: TLS clients
SHOULD include the extension type in the ClientHello, but if the
session is resumed, the TLS server is not expected to process it or
include the extension in the ServerHello.
3.4.2. 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.
3.4.2.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
"CertificateSCTList" contains a "SignedCertificateTimestampList"
whose SCTs all have the "x509_entry" "LogEntryType".
3.4.2.2. Certificate Extension
A certification authority that has submitted a precertificate to one
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
"PrecertificateSCTList" contains a "SignedCertificateTimestampList"
whose SCTs all have the "precert_entry_V2" "LogEntryType".
Upon receiving the certificate, clients can reconstruct the original
"TBSCertificate" to verify the SCT signatures.
3.5. Merkle Tree
The hashing algorithm for the Merkle Tree Hash is specified in the The hashing algorithm for the Merkle Tree Hash is specified in the
log's metadata. log's metadata.
Structure of the Merkle Tree input: Structure of the Merkle Tree input:
enum { enum {
v1(0), v2(1), (255) v1(0), v2(1), (255)
} LeafVersion; } LeafVersion;
skipping to change at page 21, line 7 skipping to change at page 18, line 46
Here, "version" is the version of the MerkleTreeLeaf structure. This Here, "version" is the version of the MerkleTreeLeaf structure. This
version is v2. Note that MerkleTreeLeaf v1 [RFC6962] had another version is v2. Note that MerkleTreeLeaf v1 [RFC6962] had another
layer of indirection which is removed in v2. layer of indirection which is removed in v2.
"timestamp" is the timestamp of the corresponding SCT issued for this "timestamp" is the timestamp of the corresponding SCT issued for this
certificate. certificate.
"entry_type" is the type of entry stored in "signed_entry". New "entry_type" is the type of entry stored in "signed_entry". New
"LogEntryType" values may be added to "signed_entry" without "LogEntryType" values may be added to "signed_entry" without
increasing the "MerkleTreeLeaf" version. Section 4 explains how increasing the "MerkleTreeLeaf" version. Section 6 explains how
clients should handle unknown entry types. clients should handle unknown entry types.
"signed_entry" is the "signed_entry" of the corresponding SCT. "signed_entry" is the "signed_entry" of the corresponding SCT.
"extensions" are the "extensions" of the corresponding SCT. "extensions" are the "extensions" of the corresponding SCT.
The leaves of the Merkle Tree are the leaf hashes of the The leaves of the Merkle Tree are the leaf hashes of the
corresponding "MerkleTreeLeaf" structures. Note that leaf hashes corresponding "MerkleTreeLeaf" structures. Note that leaf hashes
(Section 2.1) are calculated as HASH(0x00 || MerkleTreeLeaf). (Section 2.1) are calculated as HASH(0x00 || MerkleTreeLeaf).
3.6. Signed Tree Head (STH) 5.5. Signed Tree Head (STH)
Periodically the log SHOULD sign the corresponding tree hash and tree Periodically the log SHOULD sign the corresponding tree hash and tree
information (see the corresponding Signed Tree Head client message in information (see the corresponding Signed Tree Head client message in
Section 4.3). Section 6.3).
Each log MUST produce on demand a Signed Tree Head that is no older Each log MUST produce on demand a Signed Tree Head that is no older
than the Maximum Merge Delay. However, Signed Tree Heads could be than the Maximum Merge Delay. However, Signed Tree Heads could be
used to mark individual clients (by producing a new one for each used to mark individual clients (by producing a new one for each
query), so logs MUST NOT produce them more frequently than is query), so logs MUST NOT produce them more frequently than is
declared in their metadata. In general, there is no need to produce 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, a new Signed Tree Head unless there are new entries in the log,
however, in the unlikely event that it receives no new submissions however, in the unlikely event that it receives no new submissions
during an MMD period, the log SHALL sign the same Merkle Tree Hash during an MMD period, the log SHALL sign the same Merkle Tree Hash
with a fresh timestamp. with a fresh timestamp.
3.6.1. Structure of the STH 5.5.1. Structure of the STH
enum { enum {
v2(1), (255) v2(1), (255)
} TreeHeadVersion; } 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>; SthExtension SthExtensions<0..2^16-1>;
"sth_extension_type" identifies a single extension from the IANA "sth_extension_type" identifies a single extension from the IANA
registry in Section 7.4. registry in Section 11.4.
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 The "SthExtensions" type is a vector of 0 or more 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.
skipping to change at page 23, line 5 skipping to change at page 20, line 46
"tree_size" equals the number of entries in the new tree. "tree_size" equals the number of entries in the new tree.
"root_hash" is the root of the Merkle Hash Tree. "root_hash" is the root of the Merkle Hash Tree.
"extensions" are future extensions to SignedTreeHead v2. Currently, "extensions" are future extensions to SignedTreeHead v2. Currently,
no extensions are specified. If an implementation sees an extension no extensions are specified. If an implementation sees an extension
that it does not understand, it SHOULD ignore that extension. that it does not understand, it SHOULD ignore that extension.
Furthermore, an implementation MAY choose to ignore any extension(s) Furthermore, an implementation MAY choose to ignore any extension(s)
that it does understand. that it does understand.
4. 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
skipping to change at page 24, line 27 skipping to change at page 22, line 21
"error_code": "not compliant", "error_code": "not compliant",
} }
Clients SHOULD treat "500 Internal Server Error" and "503 Service Clients SHOULD treat "500 Internal Server Error" and "503 Service
Unavailable" responses as transient failures and MAY retry the same Unavailable" responses as transient failures and MAY retry the same
request without modification at a later date. Note that as per request without modification at a later date. Note that as per
[RFC2616], in the case of a 503 response the log MAY include a [RFC2616], in the case of a 503 response the log MAY include a
"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.
4.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 end-entity certificate; the second chains to the
first and so on to the last, which is either the root first and so on to the last, which is either the root
certificate or a certificate that chains to a known root certificate or a certificate that chains to a known root
certificate. certificate.
skipping to change at page 25, line 16 skipping to change at page 23, line 8
valid (e.g. not properly encoded). valid (e.g. not properly encoded).
If the version of "sct" is not v2, then a v2 client may be unable to If the version of "sct" is not v2, then a v2 client may be unable to
verify the signature. It MUST NOT construe this as an error. This verify the signature. It MUST NOT construe this as an error. This
is to avoid forcing an upgrade of compliant v2 clients that do not is to avoid forcing an upgrade of compliant v2 clients that do not
use the returned SCTs. use the returned SCTs.
If a log detects bad encoding in a chain that otherwise verifies If a log detects bad encoding in a chain that otherwise verifies
correctly then the log MAY still log the certificate but SHOULD NOT correctly then the log MAY still log the certificate but SHOULD NOT
return an SCT. It should instead return the "bad certificate" error. return an SCT. It should instead return the "bad certificate" error.
Logging the certificate is useful, because monitors (Section 5.4) can Logging the certificate is useful, because monitors (Section 9.3) can
then detect these encoding errors, which may be accepted by some TLS then detect these encoding errors, which may be accepted by some TLS
clients. clients.
Note that not all certificate handling software is capable of Note that not all certificate handling software is capable of
detecting all encoding errors (e.g. some software will accept BER detecting all encoding errors (e.g. some software will accept BER
instead of DER encodings in certificates, or incorrect character instead of DER encodings in certificates, or incorrect character
encodings, even though these are technically incorrect) . encodings, even though these are technically incorrect) .
4.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 the root
certificate or a certificate that chains to an accepted root certificate or a certificate that chains to an accepted root
certificate. certificate.
Outputs and errors are the same as in Section 4.1. Outputs and errors are the same as in Section 6.1.
4.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 SignedTreeHead.
4.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 (Signed Tree Heads).
skipping to change at page 26, line 41 skipping to change at page 24, line 31
it is used to verify "sth", which is signed. it is used to verify "sth", which is 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 5.5.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. array.
4.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 3.5. The The "hash" must be calculated as defined in Section 5.4. 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. "leaf_index" and "audit_path" are returned.
Outputs: Outputs:
leaf_index: The 0-based index of the entry corresponding to the leaf_index: The 0-based index of the entry corresponding to the
"hash" parameter. "hash" parameter.
skipping to change at page 27, line 37 skipping to change at page 25, line 25
"sth", which is signed. "sth", which is 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 5.5.1 for an outline of how to use the "audit_path" See Section 9.4.1 for an outline of how to use the "audit_path"
array. array.
4.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 3.5. The The "hash" must be calculated as defined in Section 5.4. 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 4.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 "leaf_index" and
"audit_path". "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:
skipping to change at page 28, line 41 skipping to change at page 26, line 30
sth: A base64 encoded SignedTreeHead. sth: A base64 encoded SignedTreeHead.
consistency: An array of base64 encoded Merkle Tree nodes proving consistency: An array of base64 encoded Merkle Tree nodes proving
the consistency of the requested STH and the returned STH. 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 "leaf_index",
"audit_path" or "consistency" outputs as they are used to verify "audit_path" or "consistency" outputs as they are used to verify
inclusion in and consistency of "sth", which is signed. inclusion in and consistency of "sth", which is signed.
Errors are the same as in Section 4.5. Errors are the same as in Section 6.5.
See Section 5.5.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 "audit_path" array
and see Section 5.5.2 for an outline of how to use the "consistency" and see Section 9.4.2 for an outline of how to use the "consistency"
array. array.
4.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:
skipping to change at page 29, line 44 skipping to change at page 27, line 28
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.
The "start" and "end" parameters SHOULD be within the range 0 <= x < The "start" and "end" parameters SHOULD be within the range 0 <= x <
"tree_size" as returned by "get-sth" in Section 4.3. "tree_size" as returned by "get-sth" in Section 6.3.
The "start" parameter MUST be less than or equal to the "end" The "start" parameter MUST be less than or equal to the "end"
parameter. parameter.
Log servers MUST honor requests where 0 <= "start" < "tree_size" and Log servers MUST honor requests where 0 <= "start" < "tree_size" and
"end" >= "tree_size" by returning a partial response covering only "end" >= "tree_size" by returning a partial response covering only
the valid entries in the specified range. "end" >= "tree_size" could the valid entries in the specified range. "end" >= "tree_size" could
be caused by skew. Note that the following restriction may also be caused by skew. Note that the following restriction may also
apply: apply:
skipping to change at page 30, line 20 skipping to change at page 28, line 5
permissible. These entries SHALL be sequential beginning with the permissible. These entries SHALL be sequential beginning with the
entry specified by "start". entry specified by "start".
Because of skew, it is possible the log server will not have any Because of skew, it is possible the log server will not have any
entries between "start" and "end". In this case it MUST return an entries between "start" and "end". In this case it MUST return an
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 5.5.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".
4.8. Retrieve Accepted Root Certificates 6.8. Retrieve Accepted Root Certificates
GET https://<log server>/ct/v1/get-roots GET https://<log server>/ct/v1/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.
5. Clients 7. TLS Servers
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
client during TLS handshakes, where each SCT corresponds to the
server certificate or to a name-constrained intermediate the server
certificate chains to. Three mechanisms are provided because they
have different tradeoffs.
o A TLS extension (Section 7.4.1.4 of [RFC5246]) with type
"signed_certificate_timestamp" (see Section 7.1). This mechanism
allows TLS servers to participate in CT without the cooperation of
CAs, unlike the other two mechanisms. It also allows SCTs to be
updated on the fly.
o An Online Certificate Status Protocol (OCSP) [RFC6960] response
extension (see Section 8.1.1), where the OCSP response is provided
in the "certificate_status" TLS extension (Section 8 of
[RFC6066]), also known as OCSP stapling. This mechanism is
already widely (but not universally) implemented. It also allows
SCTs to be updated on the fly.
o An X509v3 certificate extension (see Section 8.1.2). This
mechanism allows the use of unmodified TLS servers, but the SCTs
cannot be updated on the fly. Since the logs that signed the SCTs
won't 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
need of re-issuance.
TLS servers SHOULD send SCTs from multiple logs in case one or more
logs are not acceptable to the TLS client (for example, if a log has
been struck off for misbehavior, has had a key compromise or is not
known to the TLS client).
Multiple SCTs are combined into an SCT list as follows:
opaque SerializedSCT<1..2^16-1>;
struct {
SerializedSCT sct_list<1..2^16-1>;
} SignedCertificateTimestampList;
Here, "SerializedSCT" is an opaque byte string that contains the
serialized SCT structure. This encoding ensures that TLS clients can
decode each SCT individually (i.e., if there is a version upgrade,
out-of-date clients can still parse old SCTs while skipping over new
SCTs whose versions they don't understand).
7.1. TLS Extension
If a TLS client includes the "signed_certificate_timestamp" extension
type in the ClientHello, the TLS server MAY include the
"signed_certificate_timestamp" extension in the ServerHello with
"extension_data" set to a "SignedCertificateTimestampList". The TLS
server is not expected to process or include this extension when a
TLS session is resumed, since session resumption uses the original
session information.
8. Certification Authorities
8.1. 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
"CertificateSCTList" contains a "SignedCertificateTimestampList"
whose SCTs all have the "x509_entry" "LogEntryType".
8.1.2. Certificate Extension
A certification authority that has submitted a precertificate to one
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
"PrecertificateSCTList" contains a "SignedCertificateTimestampList"
whose SCTs all have the "precert_entry_V2" "LogEntryType".
Upon receiving the certificate, clients can reconstruct the original
"TBSCertificate" to verify the SCT signatures.
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
and verify their responses. This metadata is described below, but and verify their responses. This metadata is described below, but
note that this document does not describe how the metadata is note that this document does not describe how the metadata is
obtained, which is implementation dependent (see, for example, obtained, which is implementation dependent (see, for example,
[Chromium.Policy]). [Chromium.Policy]).
Clients should somehow exchange STHs they see, or make them available Clients should somehow exchange STHs they see, or make them available
for scrutiny, in order to ensure that they all have a consistent for scrutiny, in order to ensure that they all have a consistent
view. The exact mechanisms will be in separate documents, but it is view. The exact mechanisms will be in separate documents, but it is
expected there will be a variety. expected there will be a variety.
5.1. Metadata 9.1. Metadata
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 4. 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 7.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 for signing.
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 3.6). Section 5.5).
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.
5.2. Submitters 9.2. TLS Client
Submitters submit certificates or precertificates to the log as TLS clients receive SCTs alongside or in certificates, either for the
described above. When a Submitter intends to use the returned SCT server certificate itself or for a name-constrained intermediate the
directly in a TLS handshake or to construct a certificate, they server certificate chains to. TLS clients MUST implement all of the
SHOULD validate the SCT as described in Section 5.3 if they three mechanisms by which TLS servers may present SCTs (see
understand its format. Section 7). TLS clients that support the
"signed_certificate_timestamp" TLS extension SHOULD include it, with
empty "extension_data", in ClientHello messages.
5.3. TLS Client In addition to normal validation of the certificate and its chain,
TLS clients SHOULD validate each SCT by computing the signature input
from the SCT data as well as the certificate and verifying the
signature, using the corresponding log's public key. TLS clients
MUST reject SCTs whose timestamp is in the future.
TLS clients receive SCTs alongside or in certificates, either for the By validating SCTs, TLS clients can thus determine whether
server certificate itself or for intermediate CA precertificates. In certificates are compliant. A certificate not accompanied by a valid
addition to normal validation of the certificate and its chain, TLS SCT MUST NOT be considered compliant by TLS clients. However,
clients SHOULD validate the SCT by computing the signature input from specifying the TLS clients' behavior once compliance or non-
the SCT data as well as the certificate and verifying the signature, compliance has been determined (for example, whether a certificate
using the corresponding log's public key. By validating SCTs, TLS should be rejected due to the lack of valid SCTs) is outside the
clients can thus determine whether certificates are compliant. scope of this document.
However, specifying the TLS clients' behaviour once compliance or
non-compliance has been determined (for example, whether a
certificate should be rejected due to the lack of valid SCTs) is
outside the scope of this document.
A TLS client MAY audit the corresponding log by requesting, and A TLS client MAY audit the corresponding log by requesting, and
verifying, a Merkle audit proof for said certificate. If the TLS verifying, a Merkle audit proof for said certificate. If the TLS
client holds an STH that predates the SCT, it MAY, in the process of client holds an STH that predates the SCT, it MAY, in the process of
auditing, request a new STH from the log (Section 4.3), then verify auditing, request a new STH from the log (Section 6.3), then verify
it by requesting a consistency proof (Section 4.4). it by requesting a consistency proof (Section 6.4).
TLS clients MUST reject SCTs whose timestamp is in the future.
5.4. 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
watches. It may also want to keep copies of entire logs. In order watches. It may also want to keep copies of entire logs. In order
to do this, it should follow these steps for each log: to do this, it should follow these steps for each log:
1. Fetch the current STH (Section 4.3). 1. Fetch the current STH (Section 6.3).
2. Verify the STH signature. 2. Verify the STH signature.
3. Fetch all the entries in the tree corresponding to the STH 3. Fetch all the entries in the tree corresponding to the STH
(Section 4.7). (Section 6.7).
4. Confirm that the tree made from the fetched entries produces the 4. Confirm that the tree made from the fetched entries produces the
same hash as that in the STH. same hash as that in the STH.
5. Fetch the current STH (Section 4.3). Repeat until the STH 5. Fetch the current STH (Section 6.3). Repeat until the STH
changes. changes.
6. Verify the STH signature. 6. Verify the STH signature.
7. Fetch all the new entries in the tree corresponding to the STH 7. Fetch all the new entries in the tree corresponding to the STH
(Section 4.7). If they remain unavailable for an extended (Section 6.7). If they remain unavailable for an extended
period, then this should be viewed as misbehavior on the part of period, then this should be viewed as misbehavior on the part of
the log. the log.
8. Either: 8. Either:
1. Verify that the updated list of all entries generates a tree 1. Verify that the updated list of all entries generates a tree
with the same hash as the new STH. with the same hash as the new STH.
Or, if it is not keeping all log entries: Or, if it is not keeping all log entries:
1. Fetch a consistency proof for the new STH with the previous 1. Fetch a consistency proof for the new STH with the previous
STH (Section 4.4). STH (Section 6.4).
2. Verify the consistency proof. 2. Verify the consistency proof.
3. Verify that the new entries generate the corresponding 3. Verify that the new entries generate the corresponding
elements in the consistency proof. elements in the consistency proof.
9. Go to Step 5. 9. Go to Step 5.
5.5. Auditing 9.4. Auditing
Auditing is taking partial information about a log as input and Auditing is taking partial information about a log as input and
verifying that this information is consistent with other partial verifying that this information is consistent with other partial
information held. All clients described above may perform auditing information held. All clients described above may perform auditing
as an additional function. The action taken by the client if audit as an additional function. The action taken by the client if audit
fails is not specified, but note that in general if audit fails, the fails is not specified, but note that in general if audit fails, the
client is in possession of signed proof of the log's misbehavior. client is in possession of signed proof of the log's misbehavior.
A monitor (Section 5.4) can audit by verifying the consistency of A monitor (Section 9.3) can audit by verifying the consistency of
STHs it receives, ensure that each entry can be fetched and that the STHs it receives, ensure that each entry can be fetched and that the
STH is indeed the result of making a tree from all fetched entries. STH is indeed the result of making a tree from all fetched entries.
A TLS client (Section 5.3) can audit by verifying an SCT against any A TLS client (Section 9.2) can audit by verifying an SCT against any
STH dated after the SCT timestamp + the Maximum Merge Delay by STH dated after the SCT timestamp + the Maximum Merge Delay by
requesting a Merkle inclusion proof (Section 4.5). It can also requesting a Merkle inclusion proof (Section 6.5). It can also
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 3.2.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.
5.5.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 an "audit_path" and "leaf_index" and
wishes to verify inclusion of an input "hash" for an STH with a given wishes to verify inclusion of an input "hash" for an STH with a given
"tree_size" and "root_hash", the following algorithm may be used to "tree_size" and "root_hash", the following algorithm may be used to
prove the "hash" was included in the "root_hash": 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".
skipping to change at page 34, line 34 skipping to change at page 34, line 27
Otherwise: Otherwise:
Set "r" to "HASH(0x01 || r || p)" Set "r" to "HASH(0x01 || r || p)"
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".
5.5.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 "consistency" array that they wish to use to verify
both hashes, the following algorithm may be used: 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" array.
2. Set "fn" to "first - 1" and "sn" to "second - 1". 2. Set "fn" to "first - 1" and "sn" to "second - 1".
skipping to change at page 35, line 24 skipping to change at page 35, line 19
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" array as
described above, verify that the "fr" calculated is equal to the described above, verify that the "fr" calculated is equal to the
"first_hash" supplied and that the "sr" calculated is equal to "first_hash" supplied and that the "sr" calculated is equal to
the "second_hash" supplied. the "second_hash" supplied.
5.5.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.
2. For each "i" from "0" up to "tree_size - 1": 2. For each "i" from "0" up to "tree_size - 1":
skipping to change at page 36, line 9 skipping to change at page 36, line 5
3. Push "HASH(0x01 || left || right)" to "stack". 3. Push "HASH(0x01 || left || right)" to "stack".
3. If there is more than one element in the "stack", repeat the same 3. If there is more than one element in the "stack", repeat the same
merge procedure (Step 2.3 above) until only a single element merge procedure (Step 2.3 above) until only a single element
remains. remains.
4. The remaining element in "stack" is the Merkle Tree hash for the 4. The remaining element in "stack" is the Merkle Tree hash for the
given "tree_size" and should be compared by equality against the given "tree_size" and should be compared by equality against the
supplied "root_hash". supplied "root_hash".
6. Algorithm Agility 10. Algorithm Agility
It is not possible for a log to change any of its algorithms part way It is not possible for a log to change any of its algorithms part way
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 5.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.
7. IANA Considerations 11. IANA Considerations
7.1. TLS Extension Type 11.1. TLS Extension Type
IANA has allocated an RFC 5246 ExtensionType value (18) for the SCT IANA has allocated an RFC 5246 ExtensionType value (18) for the SCT
TLS extension. The extension name is "signed_certificate_timestamp". TLS extension. The extension name is "signed_certificate_timestamp".
IANA should update this extension type to point at this document. IANA should update this extension type to point at this document.
7.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] |
+-------+----------------------+ +-------+----------------------+
7.3. SCT Extensions 11.3. 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
7.4. STH Extensions 11.4. 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 |
+-------+-----------+ +-------+-----------+
TBD: policy for adding to the registry TBD: policy for adding to the registry
8. Security Considerations 12. Security Considerations
With CAs, logs, and servers performing the actions described here, With CAs, logs, and servers performing the actions described here,
TLS clients can use logs and signed timestamps to reduce the TLS clients can use logs and signed timestamps to reduce the
likelihood that they will accept misissued certificates. If a server likelihood that they will accept misissued certificates. If a server
presents a valid signed timestamp for a certificate, then the client presents a valid signed timestamp for a certificate, then the client
knows that a log has committed to publishing the certificate. From knows that a log has committed to publishing the certificate. From
this, the client knows that the subject of the certificate has had this, the client knows that the subject of the certificate has had
some time to notice the misissue and take some action, such as asking some time to notice the misissue and take some action, such as asking
a CA to revoke a misissued certificate, or that the log has a CA to revoke a misissued certificate, or that the log has
misbehaved, which will be discovered when the SCT is audited. A misbehaved, which will be discovered when the SCT is audited. A
signed timestamp is not a guarantee that the certificate is not signed timestamp is not a guarantee that the certificate is not
misissued, since the subject of the certificate might not have misissued, since the subject of the certificate might not have
checked the logs or the CA might have refused to revoke the checked the logs or the CA might have refused to revoke the
certificate. certificate.
In addition, if TLS clients will not accept unlogged certificates, In addition, if TLS clients will not accept unlogged certificates,
then site owners will have a greater incentive to submit certificates then site owners will have a greater incentive to submit certificates
to logs, possibly with the assistance of their CA, increasing the to logs, possibly with the assistance of their CA, increasing the
overall transparency of the system. overall transparency of the system.
8.1. Misissued Certificates 12.1. Misissued Certificates
Misissued certificates that have not been publicly logged, and thus Misissued certificates that have not been publicly logged, and thus
do not have a valid SCT, are not considered compliant (so TLS clients do not have a valid SCT, are not considered compliant (so TLS clients
may decide, for example, to reject them). Misissued certificates may decide, for example, to reject them). Misissued certificates
that do have an SCT from a log will appear in that public log within that do have an SCT from a log will appear in that public log within
the Maximum Merge Delay, assuming the log is operating correctly. the Maximum Merge Delay, assuming the log is operating correctly.
Thus, the maximum period of time during which a misissued certificate Thus, the maximum period of time during which a misissued certificate
can be used without being available for audit is the MMD. can be used without being available for audit is the MMD.
8.2. Detection of Misissue 12.2. Detection of Misissue
The logs do not themselves detect misissued certificates; they rely The logs do not themselves detect misissued certificates; they rely
instead on interested parties, such as domain owners, to monitor them instead on interested parties, such as domain owners, to monitor them
and take corrective action when a misissue is detected. and take corrective action when a misissue is detected.
8.3. Redaction of Public Domain Name Labels 12.3. Redaction of Public Domain Name Labels
CAs SHOULD NOT redact domain name labels in precertificates such that CAs SHOULD NOT redact domain name labels in precertificates such that
the entirety of the domain space below the unredacted part of the the entirety of the domain space below the unredacted part of the
domain name is not owned or controlled by a single entity (e.g. domain name is not owned or controlled by a single entity (e.g.
"?.com" and "?.co.uk" would both be problematic). Logs MUST NOT "?.com" and "?.co.uk" would both be problematic). Logs MUST NOT
reject any precertificate that is overly redacted but which is reject any precertificate that is overly redacted but which is
otherwise considered compliant. It is expected that monitors will otherwise considered compliant. It is expected that monitors will
treat overly redacted precertificates as potentially misissued. TLS treat overly redacted precertificates as potentially misissued. TLS
clients MAY reject a certificate whose corresponding precertificate clients MAY reject a certificate whose corresponding precertificate
would be overly redacted, perhaps using the same mechanism for would be overly redacted, perhaps using the same mechanism for
determining whether a wildcard in a domain name of a certificate is determining whether a wildcard in a domain name of a certificate is
too broad. too broad.
8.4. Misbehaving Logs 12.4. Misbehaving Logs
A log can misbehave in two ways: (1) by failing to incorporate a A log can misbehave in two ways: (1) by failing to incorporate a
certificate with an SCT in the Merkle Tree within the MMD and (2) by certificate with an SCT in the Merkle Tree within the MMD and (2) by
violating its append-only property by presenting two different, violating its append-only property by presenting two different,
conflicting views of the Merkle Tree at different times and/or to conflicting views of the Merkle Tree at different times and/or to
different parties. Both forms of violation will be promptly and different parties. Both forms of violation will be promptly and
publicly detectable. publicly detectable.
Violation of the MMD contract is detected by log clients requesting a Violation of the MMD contract is detected by log clients requesting a
Merkle audit proof for each observed SCT. These checks can be Merkle audit proof for each observed SCT. These checks can be
skipping to change at page 39, line 5 skipping to change at page 38, line 46
Violation of the append-only property can be detected by clients Violation of the append-only property can be detected by clients
comparing their instances of the Signed Tree Heads. As soon as two comparing their instances of the Signed Tree Heads. As soon as two
conflicting Signed Tree Heads for the same log are detected, this is conflicting Signed Tree Heads for the same log are detected, this is
cryptographic proof of that log's misbehavior. There are various cryptographic proof of that log's misbehavior. There are various
ways this could be done, for example via gossip (see ways this could be done, for example via gossip (see
http://trac.tools.ietf.org/id/draft-linus-trans-gossip-00.txt) or http://trac.tools.ietf.org/id/draft-linus-trans-gossip-00.txt) or
peer-to-peer communications or by sending STHs to monitors (who could peer-to-peer communications or by sending STHs to monitors (who could
then directly check against their own copy of the relevant log). then directly check against their own copy of the relevant log).
8.5. Multiple SCTs 12.5. Multiple SCTs
TLS servers may wish to offer multiple SCTs, each from a different TLS servers may wish to offer multiple SCTs, each from a different
log. log.
o If a CA and a log collude, it is possible to temporarily hide o If a CA and a log collude, it is possible to temporarily hide
misissuance from clients. Including SCTs from different logs misissuance from clients. Including SCTs from different logs
makes it more difficult to mount this attack. makes it more difficult to mount this attack.
o If a log misbehaves, a consequence may be that clients cease to o If a log misbehaves, a consequence may be that clients cease to
trust it. Since the time an SCT may be in use can be considerable trust it. Since the time an SCT may be in use can be considerable
skipping to change at page 39, line 27 skipping to change at page 39, line 22
embedded in a certificate), servers may wish to reduce the embedded in a certificate), servers may wish to reduce the
probability of their certificates being rejected as a result by probability of their certificates being rejected as a result by
including SCTs from different logs. including SCTs from different logs.
o TLS clients may have policies related to the above risks requiring o TLS clients may have policies related to the above risks requiring
servers to present multiple SCTs. For example Chromium servers to present multiple SCTs. For example Chromium
[Chromium.Log.Policy] currently requires multiple SCTs to be [Chromium.Log.Policy] currently requires multiple SCTs to be
presented with EV certificates in order for the EV indicator to be presented with EV certificates in order for the EV indicator to be
shown. shown.
9. Efficiency Considerations 13. Efficiency Considerations
The Merkle Tree design serves the purpose of keeping communication The Merkle Tree design serves the purpose of keeping communication
overhead low. overhead low.
Auditing logs for integrity does not require third parties to Auditing logs for integrity does not require third parties to
maintain a copy of each entire log. The Signed Tree Heads can be maintain a copy of each entire log. The Signed Tree Heads can be
updated as new entries become available, without recomputing entire updated as new entries become available, without recomputing entire
trees. Third-party auditors need only fetch the Merkle consistency trees. Third-party auditors need only fetch the Merkle consistency
proofs against a log's existing STH to efficiently verify the append- proofs against a log's existing STH to efficiently verify the append-
only property of updates to their Merkle Trees, without auditing the only property of updates to their Merkle Trees, without auditing the
entire tree. entire tree.
10. Acknowledgements 14. Acknowledgements
The authors would like to thank Erwann Abelea, Robin Alden, Al The authors would like to thank Erwann Abelea, Robin Alden, Al
Cutter, Francis Dupont, Adam Eijdenberg, Stephen Farrell, Daniel Kahn Cutter, Francis Dupont, Adam Eijdenberg, Stephen Farrell, Daniel Kahn
Gillmor, Brad Hill, Jeff Hodges, Paul Hoffman, Jeffrey Hutzelman, Gillmor, Brad Hill, Jeff Hodges, Paul Hoffman, Jeffrey Hutzelman,
Stephen Kent, SM, Alexey Melnikov, Linus Nordberg, Chris Palmer, Stephen Kent, SM, Alexey Melnikov, Linus Nordberg, Chris Palmer,
Trevor Perrin, Pierre Phaneuf, Melinda Shore, Ryan Sleevi, Carl Trevor Perrin, Pierre Phaneuf, Melinda Shore, Ryan Sleevi, Carl
Wallace and Paul Wouters for their valuable contributions. Wallace and Paul Wouters for their valuable contributions.
11. References 15. References
11.1. Normative References 15.1. Normative References
[DSS] National Institute of Standards and Technology, "Digital [DSS] National Institute of Standards and Technology, "Digital
Signature Standard (DSS)", FIPS 186-3, June 2009, Signature Standard (DSS)", FIPS 186-3, June 2009,
<http://csrc.nist.gov/publications/fips/fips186-3/ <http://csrc.nist.gov/publications/fips/fips186-3/
fips_186-3.pdf>. fips_186-3.pdf>.
[FIPS.180-4] [FIPS.180-4]
National Institute of Standards and Technology, "Secure National Institute of Standards and Technology, "Secure
Hash Standard", FIPS PUB 180-4, March 2012, Hash Standard", FIPS PUB 180-4, March 2012,
<http://csrc.nist.gov/publications/fips/fips180-4/ <http://csrc.nist.gov/publications/fips/fips180-4/
skipping to change at page 41, line 48 skipping to change at page 41, line 37
Galperin, S., and C. Adams, "X.509 Internet Public Key Galperin, S., and C. Adams, "X.509 Internet Public Key
Infrastructure Online Certificate Status Protocol - OCSP", Infrastructure Online Certificate Status Protocol - OCSP",
RFC 6960, DOI 10.17487/RFC6960, June 2013, RFC 6960, DOI 10.17487/RFC6960, June 2013,
<http://www.rfc-editor.org/info/rfc6960>. <http://www.rfc-editor.org/info/rfc6960>.
[RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature
Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature
Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August
2013, <http://www.rfc-editor.org/info/rfc6979>. 2013, <http://www.rfc-editor.org/info/rfc6979>.
11.2. Informative References 15.2. Informative References
[Chromium.Log.Policy] [Chromium.Log.Policy]
The Chromium Projects, "Chromium Certificate Transparency The Chromium Projects, "Chromium Certificate Transparency
Log Policy", 2014, <http://www.chromium.org/Home/chromium- Log Policy", 2014, <http://www.chromium.org/Home/chromium-
security/certificate-transparency/log-policy>. security/certificate-transparency/log-policy>.
[Chromium.Policy] [Chromium.Policy]
The Chromium Projects, "Chromium Certificate The Chromium Projects, "Chromium Certificate
Transparency", 2014, <http://www.chromium.org/Home/ Transparency", 2014, <http://www.chromium.org/Home/
chromium-security/certificate-transparency>. chromium-security/certificate-transparency>.
 End of changes. 95 change blocks. 
380 lines changed or deleted 398 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/