forked from google/certificate-transparency-rfcs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
draft-ietf-trans-rfc6962-bis-12.txt
2632 lines (1717 loc) · 94.8 KB
/
draft-ietf-trans-rfc6962-bis-12.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Public Notary Transparency Working Group B. Laurie
Internet-Draft A. Langley
Intended status: Standards Track E. Kasper
Expires: July 31, 2016 E. Messeri
Google
R. Stradling
Comodo
January 28, 2016
Certificate Transparency
draft-ietf-trans-rfc6962-bis-12
Abstract
This document describes a protocol for publicly logging the existence
of Transport Layer Security (TLS) certificates as they are issued or
observed, in a manner that allows anyone to audit certification
authority (CA) activity and notice the issuance of suspect
certificates as well as to audit the certificate logs themselves.
The intent is that eventually clients would refuse to honor
certificates that do not appear in a log, effectively forcing CAs to
add all issued certificates to the logs.
Logs are network services that implement the protocol operations for
submissions and queries that are defined in this document.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 31, 2016.
Laurie, et al. Expires July 31, 2016 [Page 1]
Internet-Draft Certificate Transparency January 2016
Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5
1.2. Data Structures . . . . . . . . . . . . . . . . . . . . . 5
2. Cryptographic Components . . . . . . . . . . . . . . . . . . 5
2.1. Merkle Hash Trees . . . . . . . . . . . . . . . . . . . . 5
2.1.1. Merkle Inclusion Proofs . . . . . . . . . . . . . . . 6
2.1.2. Merkle Consistency Proofs . . . . . . . . . . . . . . 7
2.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.4. Signatures . . . . . . . . . . . . . . . . . . . . . 9
3. Submitters . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1. Certificates . . . . . . . . . . . . . . . . . . . . . . 10
3.2. Precertificates . . . . . . . . . . . . . . . . . . . . . 10
4. Private Domain Name Labels . . . . . . . . . . . . . . . . . 11
4.1. Wildcard Certificates . . . . . . . . . . . . . . . . . . 11
4.2. Redacting Domain Name Labels in Precertificates . . . . . 11
4.3. Using a Name-Constrained Intermediate CA . . . . . . . . 12
5. Log Format and Operation . . . . . . . . . . . . . . . . . . 13
5.1. Accepting Submissions . . . . . . . . . . . . . . . . . . 14
5.2. Log Entries . . . . . . . . . . . . . . . . . . . . . . . 14
5.3. Log ID . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.4. The TransItem Structure . . . . . . . . . . . . . . . . . 16
5.5. Merkle Tree Leaves . . . . . . . . . . . . . . . . . . . 18
5.6. Signed Certificate Timestamp (SCT) . . . . . . . . . . . 19
5.7. Merkle Tree Head . . . . . . . . . . . . . . . . . . . . 20
5.8. Signed Tree Head (STH) . . . . . . . . . . . . . . . . . 21
5.9. Merkle Consistency Proofs . . . . . . . . . . . . . . . . 22
5.10. Merkle Inclusion Proofs . . . . . . . . . . . . . . . . . 23
6. Log Client Messages . . . . . . . . . . . . . . . . . . . . . 23
6.1. Add Chain to Log . . . . . . . . . . . . . . . . . . . . 25
6.2. Add PreCertChain to Log . . . . . . . . . . . . . . . . . 26
6.3. Retrieve Latest Signed Tree Head . . . . . . . . . . . . 26
Laurie, et al. Expires July 31, 2016 [Page 2]
Internet-Draft Certificate Transparency January 2016
6.4. Retrieve Merkle Consistency Proof between Two Signed Tree
Heads . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.5. Retrieve Merkle Inclusion Proof from Log by Leaf Hash . . 27
6.6. Retrieve Merkle Inclusion Proof, Signed Tree Head and
Consistency Proof by Leaf Hash . . . . . . . . . . . . . 28
6.7. Retrieve Entries and STH from Log . . . . . . . . . . . . 29
6.8. Retrieve Accepted Trust Anchors . . . . . . . . . . . . . 31
7. TLS Servers . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.1. TLS Extension . . . . . . . . . . . . . . . . . . . . . . 32
8. Certification Authorities . . . . . . . . . . . . . . . . . . 32
8.1. Transparency Information X.509v3 Extension . . . . . . . 32
8.1.1. OCSP Response Extension . . . . . . . . . . . . . . . 33
8.1.2. Certificate Extension . . . . . . . . . . . . . . . . 33
9. Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
9.1. Metadata . . . . . . . . . . . . . . . . . . . . . . . . 33
9.2. TLS Client . . . . . . . . . . . . . . . . . . . . . . . 34
9.3. Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 35
9.4. Auditing . . . . . . . . . . . . . . . . . . . . . . . . 36
9.4.1. Verifying an inclusion proof . . . . . . . . . . . . 37
9.4.2. Verifying consistency between two STHs . . . . . . . 37
9.4.3. Verifying root hash given entries . . . . . . . . . . 38
10. Algorithm Agility . . . . . . . . . . . . . . . . . . . . . . 39
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 39
11.1. TLS Extension Type . . . . . . . . . . . . . . . . . . . 39
11.2. Hash Algorithms . . . . . . . . . . . . . . . . . . . . 39
11.3. TransItem Extensions . . . . . . . . . . . . . . . . . . 39
11.4. Signature Algorithms . . . . . . . . . . . . . . . . . . 40
11.5. SCT Extensions . . . . . . . . . . . . . . . . . . . . . 40
11.6. STH Extensions . . . . . . . . . . . . . . . . . . . . . 40
12. Security Considerations . . . . . . . . . . . . . . . . . . . 40
12.1. Misissued Certificates . . . . . . . . . . . . . . . . . 41
12.2. Detection of Misissue . . . . . . . . . . . . . . . . . 41
12.3. Redaction of Public Domain Name Labels . . . . . . . . . 41
12.4. Misbehaving Logs . . . . . . . . . . . . . . . . . . . . 41
12.5. Deterministic Signatures . . . . . . . . . . . . . . . . 42
12.6. Multiple SCTs . . . . . . . . . . . . . . . . . . . . . 42
13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 43
14. References . . . . . . . . . . . . . . . . . . . . . . . . . 43
14.1. Normative References . . . . . . . . . . . . . . . . . . 43
14.2. Informative References . . . . . . . . . . . . . . . . . 44
Appendix A. TransItemV1 . . . . . . . . . . . . . . . . . . . . 46
1. Introduction
Certificate transparency aims to mitigate the problem of misissued
certificates by providing append-only logs of issued certificates.
The logs do not need to be trusted because they are publicly
auditable. Anyone may verify the correctness of each log and monitor
Laurie, et al. Expires July 31, 2016 [Page 3]
Internet-Draft Certificate Transparency January 2016
when new certificates are added to it. The logs do not themselves
prevent misissue, but they ensure that interested parties
(particularly those named in certificates) can detect such
misissuance. Note that this is a general mechanism, but in this
document, we only describe its use for public TLS server certificates
issued by public certification authorities (CAs).
Each log consists of certificate chains, which can be submitted by
anyone. It is expected that public CAs will contribute all their
newly issued certificates to one or more logs, however certificate
holders can also contribute their own certificate chains, as can
third parties. In order to avoid logs being rendered useless by the
submission of large numbers of spurious certificates, it is required
that each chain ends with a trust anchor that is accepted by the log.
When a chain is accepted by a log, a signed timestamp is returned,
which can later be used to provide evidence to TLS clients that the
chain has been submitted. TLS clients can thus require that all
certificates they accept as valid are accompanied by signed
timestamps.
Those who are concerned about misissue can monitor the logs, asking
them regularly for all new entries, and can thus check whether
domains they are responsible for have had certificates issued that
they did not expect. What they do with this information,
particularly when they find that a misissuance has happened, is
beyond the scope of this document, but broadly speaking, they can
invoke existing business mechanisms for dealing with misissued
certificates, such as working with the CA to get the certificate
revoked, or with maintainers of trust anchor lists to get the CA
removed. Of course, anyone who wants can monitor the logs and, if
they believe a certificate is incorrectly issued, take action as they
see fit.
Similarly, those who have seen signed timestamps from a particular
log can later demand a proof of inclusion from that log. If the log
is unable to provide this (or, indeed, if the corresponding
certificate is absent from monitors' copies of that log), that is
evidence of the incorrect operation of the log. The checking
operation is asynchronous to allow TLS connections to proceed without
delay, despite network connectivity issues and the vagaries of
firewalls.
The append-only property of each log is technically achieved using
Merkle Trees, which can be used to show that any particular instance
of the log is a superset of any particular previous instance.
Likewise, Merkle Trees avoid the need to blindly trust logs: if a log
attempts to show different things to different people, this can be
efficiently detected by comparing tree roots and consistency proofs.
Laurie, et al. Expires July 31, 2016 [Page 4]
Internet-Draft Certificate Transparency January 2016
Similarly, other misbehaviors of any log (e.g., issuing signed
timestamps for certificates they then don't log) can be efficiently
detected and proved to the world at large.
1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
1.2. Data Structures
Data structures are defined according to the conventions laid out in
Section 4 of [RFC5246].
2. Cryptographic Components
2.1. Merkle Hash Trees
Logs use a binary Merkle Hash Tree for efficient auditing. The
hashing algorithm used by each log is expected to be specified as
part of the metadata relating to that log. We have established a
registry of acceptable algorithms, see Section 11.2. The hashing
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
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
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)
is thus defined as follows:
The hash of an empty list is the hash of an empty string:
MTH({}) = HASH().
The hash of a list with one entry (also known as a leaf hash) is:
MTH({d(0)}) = HASH(0x00 || d(0)).
For n > 1, let k be the largest power of two smaller than n (i.e., k
< n <= 2k). The Merkle Tree Hash of an n-element list D[n] is then
defined recursively as
MTH(D[n]) = HASH(0x01 || MTH(D[0:k]) || MTH(D[k:n])),
where || is concatenation and D[k1:k2] denotes the list {d(k1),
d(k1+1),..., d(k2-1)} of length (k2 - k1). (Note that the hash
Laurie, et al. Expires July 31, 2016 [Page 5]
Internet-Draft Certificate Transparency January 2016
calculations for leaves and nodes differ. This domain separation is
required to give second preimage resistance.)
Note that we do not require the length of the input list to be a
power of two. The resulting Merkle Tree may thus not be balanced;
however, its shape is uniquely determined by the number of leaves.
(Note: This Merkle Tree is essentially the same as the history tree
[CrosbyWallach] proposal, except our definition handles non-full
trees differently.)
2.1.1. Merkle Inclusion Proofs
A Merkle inclusion proof for a leaf in a Merkle Hash Tree is the
shortest list of additional nodes in the Merkle Tree required to
compute the Merkle Tree Hash for that tree. Each node in the tree is
either a leaf node or is computed from the two nodes immediately
below it (i.e., towards the leaves). At each step up the tree
(towards the root), a node from the inclusion proof is combined with
the node computed so far. In other words, the inclusion proof
consists of the list of missing nodes required to compute the nodes
leading from a leaf to the root of the tree. If the root computed
from the inclusion proof matches the true root, then the inclusion
proof proves that the leaf exists in the tree.
Given an ordered list of n inputs to the tree, D[n] = {d(0), ...,
d(n-1)}, the Merkle inclusion proof PATH(m, D[n]) for the (m+1)th
input d(m), 0 <= m < n, is defined as follows:
The proof for the single leaf in a tree with a one-element input list
D[1] = {d(0)} is empty:
PATH(0, {d(0)}) = {}
For n > 1, let k be the largest power of two smaller than n. The
proof for the (m+1)th element d(m) in a list of n > m elements is
then defined recursively as
PATH(m, D[n]) = PATH(m, D[0:k]) : MTH(D[k:n]) for m < k; and
PATH(m, D[n]) = PATH(m - k, D[k:n]) : MTH(D[0:k]) for m >= k,
where : is concatenation of lists and D[k1:k2] denotes the length (k2
- k1) list {d(k1), d(k1+1),..., d(k2-1)} as before.
Laurie, et al. Expires July 31, 2016 [Page 6]
Internet-Draft Certificate Transparency January 2016
2.1.2. Merkle Consistency Proofs
Merkle consistency proofs prove the append-only property of the tree.
A Merkle consistency proof for a Merkle Tree Hash MTH(D[n]) and a
previously advertised hash MTH(D[0:m]) of the first m leaves, m <= n,
is the list of nodes in the Merkle Tree required to verify that the
first m inputs D[0:m] are equal in both trees. Thus, a consistency
proof must contain a set of intermediate nodes (i.e., commitments to
inputs) sufficient to verify MTH(D[n]), such that (a subset of) the
same nodes can be used to verify MTH(D[0:m]). We define an algorithm
that outputs the (unique) minimal consistency proof.
Given an ordered list of n inputs to the tree, D[n] = {d(0), ...,
d(n-1)}, the Merkle consistency proof PROOF(m, D[n]) for a previous
Merkle Tree Hash MTH(D[0:m]), 0 < m < n, is defined as:
PROOF(m, D[n]) = SUBPROOF(m, D[n], true)
The subproof for m = n is empty if m is the value for which PROOF was
originally requested (meaning that the subtree Merkle Tree Hash
MTH(D[0:m]) is known):
SUBPROOF(m, D[m], true) = {}
The subproof for m = n is the Merkle Tree Hash committing inputs
D[0:m]; otherwise:
SUBPROOF(m, D[m], false) = {MTH(D[m])}
For m < n, let k be the largest power of two smaller than n. The
subproof is then defined recursively.
If m <= k, the right subtree entries D[k:n] only exist in the current
tree. We prove that the left subtree entries D[0:k] are consistent
and add a commitment to D[k:n]:
SUBPROOF(m, D[n], b) = SUBPROOF(m, D[0:k], b) : MTH(D[k:n])
If m > k, the left subtree entries D[0:k] are identical in both
trees. We prove that the right subtree entries D[k:n] are consistent
and add a commitment to D[0:k].
SUBPROOF(m, D[n], b) = SUBPROOF(m - k, D[k:n], false) : MTH(D[0:k])
Here, : is a concatenation of lists, and D[k1:k2] denotes the length
(k2 - k1) list {d(k1), d(k1+1),..., d(k2-1)} as before.
Laurie, et al. Expires July 31, 2016 [Page 7]
Internet-Draft Certificate Transparency January 2016
The number of nodes in the resulting proof is bounded above by
ceil(log2(n)) + 1.
2.1.3. Example
The binary Merkle Tree with 7 leaves:
hash
/ \
/ \
/ \
/ \
/ \
k l
/ \ / \
/ \ / \
/ \ / \
g h i j
/ \ / \ / \ |
a b c d e f d6
| | | | | |
d0 d1 d2 d3 d4 d5
The inclusion proof for d0 is [b, h, l].
The inclusion proof for d3 is [c, g, l].
The inclusion proof for d4 is [f, j, k].
The inclusion proof for d6 is [i, k].
Laurie, et al. Expires July 31, 2016 [Page 8]
Internet-Draft Certificate Transparency January 2016
The same tree, built incrementally in four steps:
hash0 hash1=k
/ \ / \
/ \ / \
/ \ / \
g c g h
/ \ | / \ / \
a b d2 a b c d
| | | | | |
d0 d1 d0 d1 d2 d3
hash2 hash
/ \ / \
/ \ / \
/ \ / \
/ \ / \
/ \ / \
k i k l
/ \ / \ / \ / \
/ \ e f / \ / \
/ \ | | / \ / \
g h d4 d5 g h i j
/ \ / \ / \ / \ / \ |
a b c d a b c d e f d6
| | | | | | | | | |
d0 d1 d2 d3 d0 d1 d2 d3 d4 d5
The consistency proof between hash0 and hash is PROOF(3, D[7]) = [c,
d, g, l]. c, g are used to verify hash0, and d, l are additionally
used to show hash is consistent with hash0.
The consistency proof between hash1 and hash is PROOF(4, D[7]) = [l].
hash can be verified using hash1=k and l.
The consistency proof between hash2 and hash is PROOF(6, D[7]) = [i,
j, k]. k, i are used to verify hash2, and j is additionally used to
show hash is consistent with hash2.
2.1.4. Signatures
Various data structures are signed. A log MUST use one of the
signature algorithms defined in the Section 11.4 section.
Laurie, et al. Expires July 31, 2016 [Page 9]
Internet-Draft Certificate Transparency January 2016
3. Submitters
Submitters submit certificates or precertificates to logs for public
auditing, as described below. In order to enable attribution of each
logged certificate or precertificate to its issuer, each submission
MUST be accompanied by all additional certificates required to verify
the chain up to an accepted trust anchor. The trust anchor (a root
or intermediate CA certificate) MAY be omitted from the submission.
If a log accepts a submission, it will return a Signed Certificate
Timestamp (SCT) (see Section 5.6). 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.
3.1. Certificates
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.
3.2. Precertificates
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.
A precertificate is a CMS [RFC5652] "signed-data" object that
conforms to the following requirements:
o It MUST be DER encoded.
o "SignedData.encapContentInfo.eContentType" MUST be the OID <TBD>.
o "SignedData.encapContentInfo.eContent" MUST contain a
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.
o "SignedData.signerInfos" MUST contain a signature from the same
(root or intermediate) CA that will ultimately issue the
certificate. This signature indicates the CA's intent to issue
the certificate. This intent is considered binding (i.e.
Laurie, et al. Expires July 31, 2016 [Page 10]
Internet-Draft Certificate Transparency January 2016
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).
o "SignedData.certificates" SHOULD be omitted.
4. Private Domain Name Labels
Some regard some DNS domain name labels within their registered
domain space as private and security sensitive. Even though these
domains are often only accessible within the domain owner's private
network, it's common for them to be secured using publicly trusted
TLS server certificates. We define a mechanism to allow these
private labels to not appear in public logs.
4.1. Wildcard Certificates
A certificate containing a DNS-ID [RFC6125] of "*.example.com" could
be used to secure the domain "topsecret.example.com", without
revealing the string "topsecret" publicly.
Since TLS clients only match the wildcard character to the complete
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
"top.secret.example.com". Also, wildcard certificates are prohibited
in some cases, such as Extended Validation Certificates
[EVSSLGuidelines].
4.2. Redacting Domain Name Labels in Precertificates
When creating a precertificate, the CA MAY substitute one or more
labels in each DNS-ID with a corresponding number of "?" labels.
Every label to the left of a "?" label MUST also be redacted. For
example, if a certificate contains a DNS-ID of
"top.secret.example.com", then the corresponding precertificate could
contain "?.?.example.com" instead, but not "top.?.example.com"
instead.
Wildcard "*" labels MUST NOT be redacted. However, if the complete
leftmost label of a DNS-ID is "*", it is considered redacted for the
purposes of determining if the label to the right may be redacted.
For example, if a certificate contains a DNS-ID of
"*.top.secret.example.com", then the corresponding precertificate
could contain "*.?.?.example.com" instead, but not
"?.?.?.example.com" instead.
Laurie, et al. Expires July 31, 2016 [Page 11]
Internet-Draft Certificate Transparency January 2016
When a precertificate contains one or more redacted labels, a non-
critical extension (OID 1.3.6.1.4.1.11129.2.4.6, whose extnValue
OCTET STRING contains an ASN.1 SEQUENCE OF INTEGERs) MUST be added to
the corresponding certificate: the first INTEGER indicates the total
number of redacted labels and wildcard "*" labels in the
precertificate's first DNS-ID; the second INTEGER does the same for
the precertificate's second DNS-ID; etc. There MUST NOT be more
INTEGERs than there are DNS-IDs. If there are fewer INTEGERs than
there are DNS-IDs, the shortfall is made up by implicitly repeating
the last INTEGER. Each INTEGER MUST have a value of zero or more.
The purpose of this extension is to enable TLS clients to accurately
reconstruct the TBSCertificate component of the precertificate from
the certificate without having to perform any guesswork.
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
labels redacted. TLS clients will use the first entry in the
SEQUENCE OF INTEGERs to reconstruct both the first DNS-ID and the CN-
ID.
4.3. Using a Name-Constrained Intermediate CA
An intermediate CA certificate or intermediate CA precertificate that
contains the critical or non-critical Name Constraints [RFC5280]
extension MAY be logged in place of end-entity certificates issued by
that intermediate CA, as long as all of the following conditions are
met:
o there MUST be a non-critical extension (OID
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
indication that it is acceptable to not log certificates issued by
this intermediate CA.
o permittedSubtrees MUST specify one or more dNSNames.
o excludedSubtrees MUST specify the entire IPv4 and IPv6 address
ranges.
Laurie, et al. Expires July 31, 2016 [Page 12]
Internet-Draft Certificate Transparency January 2016
Below is an example Name Constraints extension that meets these
conditions:
SEQUENCE {
OBJECT IDENTIFIER '2 5 29 30'
OCTET STRING, encapsulates {
SEQUENCE {
[0] {
SEQUENCE {
[2] 'example.com'
}
}
[1] {
SEQUENCE {
[7] 00 00 00 00 00 00 00 00
}
SEQUENCE {
[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
}
}
}
}
}
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
of type "precert_sct" would not be appropriate; instead, a fresh SCT
of type "x509_sct" 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.
Log operators MUST NOT impose any conditions on retrieving or sharing
data from the log.
Laurie, et al. Expires July 31, 2016 [Page 13]
Internet-Draft Certificate Transparency January 2016
5.1. Accepting Submissions
Logs MUST verify that each submitted certificate or precertificate
has a valid signature chain to an accepted trust anchor, 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 trust anchor. 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 trust anchors
(see Section 6.8), each of which is a root or intermediate CA
certificate. 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 trust
anchor used to verify the chain (even if it was omitted from the
submission). The log MUST present this chain for auditing upon
request (see Section 6.7). This chain is required to prevent a CA
from avoiding blame by logging a partial or empty chain.
Laurie, et al. Expires July 31, 2016 [Page 14]
Internet-Draft Certificate Transparency January 2016
Each certificate entry in a log MUST include a "X509ChainEntry"
structure, and each precertificate entry MUST include a
"PrecertChainEntryV2" structure:
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<1..2^24-1>;
} PrecertChainEntryV2;
"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 trust
anchor accepted by the log. If "leaf_certificate" is an accepted
trust anchor, 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 trust anchor accepted by the log.
5.3. Log ID
Each log's operator allocates an OID for the purpose of uniquely
identifying that log. This OID is specified in the log's metadata.
Various data structures include the DER encoding of this OID,
excluding the ASN.1 tag and length bytes, in an opaque vector:
opaque LogID<2..127>;
Note that the ASN.1 length and the opaque vector length are identical
in size (1 byte) and value, so the DER encoding of the OID can be
Laurie, et al. Expires July 31, 2016 [Page 15]
Internet-Draft Certificate Transparency January 2016
reproduced simply by prepending an OBJECT IDENTIFIER tag (0x06) to
the opaque vector length and contents.
5.4. The TransItem Structure
Laurie, et al. Expires July 31, 2016 [Page 16]
Internet-Draft Certificate Transparency January 2016
Various data structures produced by logs are encapsulated in the
"TransItem" structure to ensure that the type and version of each one
is identified in a common fashion:
enum {
v1(0), v2(1), (255)
} Version;
enum {
x509_entry(0), precert_entry(1), x509_sct(2), precert_sct(3),
tree_head(4), signed_tree_head(5), consistency_proof(6),
inclusion_proof(7), (65535)
} TransType;
enum {
reserved(65535)
} ItemExtensionType;
struct {
ItemExtensionType item_extension_type;
opaque item_extension_data<0..2^16-1>;
} ItemExtension;
struct {
TransType type;
select (type) {
case x509_entry: TimestampedCertificateEntryDataV2;
case precert_entry: TimestampedCertificateEntryDataV2;
case x509_sct: SignedCertificateTimestampDataV2;
case precert_sct: SignedCertificateTimestampDataV2;
case tree_head: TreeHeadDataV2;
case signed_tree_head: SignedTreeHeadDataV2;
case consistency_proof: ConsistencyProofDataV2;
case inclusion_proof: InclusionProofDataV2;
} data;
ItemExtension item_extensions<0..2^16-1>;
} TransItemV2;
struct {
Version version;
select (version) {
case v1: TransItemV1;
case v2: TransItemV2;
}
} TransItem;
"version" is the earliest version of this protocol to which the
encapsulated data structure conforms. This document is v2. Note
Laurie, et al. Expires July 31, 2016 [Page 17]
Internet-Draft Certificate Transparency January 2016
that v1 [RFC6962] did not define "TransItem", but this document
specifies a mechanism (see Appendix A) for v2 implementations to
encapsulate existing v1 objects in the "TransItem" structure. Note
also that, since each "TransItem" object is individually versioned,
future revisions to this protocol could conceivably update some
encapsulated data structures without having to update all of them.
"type" is the type of the encapsulated data structure. (Note that
"TransType" combines the v1 type enumerations "LogEntryType",
"SignatureType" and "MerkleLeafType"). Future revisions of this
protocol may add new "TransType" values.
"data" is the encapsulated data structure. The various structures
named with the "DataV2" suffix are defined in later sections of this
document.
"item_extension_type" identifies a single extension from the IANA
registry in Section 11.3.
The interpretation of the "item_extension_data" field is determined
solely by the value of the "item_extension_type" field. Each
document that registers a new "item_extension_type" must describe how
to interpret the corresponding "item_extension_data".
"item_extensions" is a vector of 0 or more item extensions. This
vector MUST NOT include more than one extension with the same
"item_extension_type". The extensions in the vector MUST be ordered
by the value of the "item_extension_type" field, smallest value
first.
5.5. Merkle Tree Leaves
The leaves of a log's Merkle Tree correspond to the log's entries
(see Section 5.2). Each leaf is the leaf hash (Section 2.1) of a
"TransItem" structure of type "x509_entry" or "precert_entry", which
in this version (v2) encapsulates a
"TimestampedCertificateEntryDataV2" structure. Note that leaf hashes
are calculated as HASH(0x00 || TransItem), where the hashing
algorithm is specified in the log's metadata.
opaque TBSCertificate<1..2^24-1>;
struct {
uint64 timestamp;