-
Notifications
You must be signed in to change notification settings - Fork 2
/
nsec5.xml
2221 lines (1831 loc) · 90.9 KB
/
nsec5.xml
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
<?xml version="1.0" encoding="us-ascii"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.9 -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC1034 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.1034.xml">
<!ENTITY RFC1035 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.1035.xml">
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2136 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2136.xml">
<!ENTITY RFC2181 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2181.xml">
<!ENTITY RFC2308 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2308.xml">
<!ENTITY RFC4033 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4033.xml">
<!ENTITY RFC4034 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4034.xml">
<!ENTITY RFC4035 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4035.xml">
<!ENTITY RFC4648 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4648.xml">
<!ENTITY RFC5114 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5114.xml">
<!ENTITY RFC5155 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5155.xml">
<!ENTITY RFC6234 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6234.xml">
<!ENTITY RFC6605 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6605.xml">
<!ENTITY RFC7748 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7748.xml">
<!ENTITY RFC8080 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8080.xml">
<!ENTITY I-D.irtf-cfrg-vrf SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.irtf-cfrg-vrf.xml">
<!ENTITY RFC6781 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6781.xml">
<!ENTITY RFC7129 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7129.xml">
<!ENTITY RFC7719 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7719.xml">
<!ENTITY I-D.gieben-nsec4 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.gieben-nsec4.xml">
]>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<rfc ipr="trust200902" docName="draft-vcelak-nsec5-07" category="std">
<front>
<title abbrev="NSEC5">NSEC5, DNSSEC Authenticated Denial of Existence</title>
<author initials="J." surname="Vcelak" fullname="Jan Vcelak">
<organization>CZ.NIC</organization>
<address>
<postal>
<street>Milesovska 1136/5</street>
<city>Praha</city>
<code>130 00</code>
<country>CZ</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author initials="S." surname="Goldberg" fullname="Sharon Goldberg">
<organization>Boston University</organization>
<address>
<postal>
<street>111 Cummington St, MCS135</street>
<city>Boston</city>
<region>MA</region>
<code>02215</code>
<country>USA</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author initials="D." surname="Papadopoulos" fullname="Dimitrios Papadopoulos">
<organization>HKUST</organization>
<address>
<postal>
<street>Clearwater Bay</street>
<country>Hong Kong</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author initials="S." surname="Huque" fullname="Shumon Huque">
<organization>Salesforce</organization>
<address>
<postal>
<street>2550 Wasser Terr</street>
<city>Herndon</city>
<region>VA</region>
<code>20171</code>
<country>USA</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author initials="D.C." surname="Lawrence" fullname="David C Lawrence">
<organization>Akamai Technologies</organization>
<address>
<postal>
<street>150 Broadway</street>
<city>Boston</city>
<region>MA</region>
<code>02142-1054</code>
<country>USA</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<date year="2019"/>
<area>Internet</area>
<workgroup>Network Working Group</workgroup>
<keyword>Internet-Draft</keyword>
<abstract>
<t>The Domain Name System Security Extensions (DNSSEC) introduced two
resource records (RR) for authenticated denial of existence: the
NSEC RR and the NSEC3 RR. This
document introduces NSEC5 as an alternative mechanism for DNSSEC
authenticated denial of existence. NSEC5 uses verifiable random
functions (VRFs) to prevent offline enumeration of zone
contents. NSEC5 also protects the integrity of the zone contents even
if an adversary compromises one of the authoritative servers for the
zone. Integrity is preserved because NSEC5 does not require private
zone-signing keys to be present on all authoritative servers for the
zone, in contrast to DNSSEC online signing schemes like NSEC3 White
Lies.</t>
</abstract>
<note title="Ed note">
<t>Text inside square brackets ([]) is additional background
information, answers to frequently asked questions, general musings,
etc. They will be removed before publication. This document is being
collaborated on in GitHub at
<https://github.com/fcelda/nsec5-draft>. The most recent version of
the document, open issues, etc should all be available there. The
authors gratefully accept pull requests.</t>
</note>
</front>
<middle>
<section anchor="introduction" title="Introduction">
<section anchor="rationale" title="Rationale">
<t>NSEC5 provides an alternative mechanism for authenticated denial of
existence for the DNS Security Extensions (DNSSEC). NSEC5 has two key
security properties. First, NSEC5 protects the integrity of the zone
contents even if an adversary compromises one of the authoritative
servers for the zone. Second, NSEC5 prevents offline zone
enumeration, where an adversary makes a small number of online DNS
queries and then processes them offline in order to learn all of the
names in a zone. Zone enumeration can be used to identify routers,
servers or other "things" that could then be targeted in more complex
attacks. An enumerated zone can also be a source of probable email
addresses for spam, or as a "key for multiple WHOIS queries to reveal
registrant data that many registries may have legal obligations to
protect" <xref target="RFC5155"/>.</t>
<t>All other DNSSEC mechanisms for authenticated denial of existence
either fail to preserve integrity against a compromised server, or
fail to prevent offline zone enumeration.</t>
<t>When offline signing with NSEC is used <xref target="RFC4034"/>, an NSEC chain of
all existing domain names in the zone is constructed and signed
offline. The chain is made of resource records (RRs), where each RR
represents two consecutive domain names in canonical order present in
the zone. The authoritative server proves the non-existence of a name
by presenting a signed NSEC RR which covers the name. Because the
authoritative server does not need not to know the private
zone-signing key, the integrity of the zone is protected even if the
server is compromised. However, the NSEC chain allows for easy zone
enumeration: N queries to the server suffice to learn all N names in
the zone (see e.g., <xref target="nmap-nsec-enum"/>, <xref target="nsec3map"/>, and
<xref target="ldns-walk"/>).</t>
<t>When offline signing with NSEC3 is used <xref target="RFC5155"/>, the original
names in the NSEC chain are replaced by their cryptographic
hashes. Offline signing ensures that NSEC3 preserves integrity even if
an authoritative server is compromised. However, offline zone
enumeration is still possible with NSEC3 (see e.g., <xref target="nsec3walker"/>,
<xref target="nsec3gpu"/>), and is part of standard network reconnaissance tools
(e.g., <xref target="nmap-nsec3-enum"/>, <xref target="nsec3map"/>).</t>
<t>When online signing is used, the authoritative server holds the
private zone-signing key and uses this key to synthesize NSEC or NSEC3
responses on the fly (e.g. NSEC3 White Lies (NSEC3-WL) or
Minimally-Covering NSEC, both described in <xref target="RFC7129"/>). Because the
synthesized response only contains information about the queried name
(but not about any other name in the zone), offline zone enumeration
is not possible. However, because the authoritative server holds the
private zone-signing key, integrity is lost if the authoritative
server is compromised.</t>
<texttable>
<ttcol align='left'>Scheme</ttcol>
<ttcol align='right'>Integrity vs network attacks?</ttcol>
<ttcol align='right'>Integrity vs compromised auth. server?</ttcol>
<ttcol align='right'>Prevents offline zone enumeration?</ttcol>
<ttcol align='right'>Online crypto?</ttcol>
<c>Unsigned</c>
<c>NO</c>
<c>NO</c>
<c>YES</c>
<c>NO</c>
<c>NSEC</c>
<c>YES</c>
<c>YES</c>
<c>NO</c>
<c>NO</c>
<c>NSEC3</c>
<c>YES</c>
<c>YES</c>
<c>NO</c>
<c>NO</c>
<c>NSEC3-WL</c>
<c>YES</c>
<c>NO</c>
<c>YES</c>
<c>YES</c>
<c>NSEC5</c>
<c>YES</c>
<c>YES</c>
<c>YES</c>
<c>YES</c>
</texttable>
<t>NSEC5 prevents offline zone enumeration and also protects integrity
even if a zone's authoritative server is compromised. To do this,
NSEC5 replaces the unkeyed cryptographic hash function used in NSEC3
with a verifiable random function (VRF) <xref target="I-D.irtf-cfrg-vrf"/> <xref target="MRV99"/>. A VRF is the
public-key version of a keyed cryptographic hash. Only the holder of
the private VRF key can compute the hash, but anyone with public VRF
key can verify the correctness of the hash.</t>
<t>The public VRF key is distributed in an NSEC5KEY RR, similar to a
DNSKEY RR, and is used to verify NSEC5 hash values. The private VRF
key is present on all authoritative servers for the zone, and is used
to compute hash values. For every query that elicits a negative
response, the authoritative server hashes the query on the fly using
the private VRF key, and also returns the corresponding precomputed
NSEC5 record(s). In contrast to the online signing approach
<xref target="RFC7129"/>, the private key that is present on all authoritative
servers for NSEC5 cannot be used to modify the zone contents.</t>
<t>Like online signing approaches, NSEC5 requires the authoritative
server to perform online public key cryptographic operations for every
query eliciting a denying response. This is necessary; <xref target="nsec5"/>
proved that online cryptography is required to prevent offline zone
enumeration while still protecting the integrity of zone contents
against network attacks.</t>
<t>NSEC5 is not intended to replace NSEC or NSEC3. It is an alternative
mechanism for authenticated denial of existence. This document
specifies NSEC5 based on the VRFs in <xref target="I-D.irtf-cfrg-vrf"/> over the
FIPS 186-3 P-256 elliptic curve and over the
the Ed25519 elliptic curve. A formal cryptographic proof of security
for NSEC5 is in <xref target="nsec5ecc"/>.</t>
</section>
<section anchor="requirements" title="Requirements">
<t>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 <xref target="RFC2119"/>.</t>
</section>
<section anchor="terminology" title="Terminology">
<t>The reader is assumed to be familiar with the basic DNS and DNSSEC
concepts described in <xref target="RFC1034"/>, <xref target="RFC1035"/>, <xref target="RFC4033"/>,
<xref target="RFC4034"/>, and <xref target="RFC4035"/>; subsequent RFCs that update them in
<xref target="RFC2136"/>, <xref target="RFC2181"/>, <xref target="RFC2308"/>, <xref target="RFC5155"/>, and <xref target="RFC7129"/>;
and DNS terms in <xref target="RFC7719"/>.</t>
<t>The reader should also be familiar with verifiable random functions (VRFs)
as defined in <xref target="I-D.irtf-cfrg-vrf"/>.</t>
<t>The following terminology is used through this document:</t>
<t><list style="hanging">
<t hangText='Base32hex:'>
The "Base 32 Encoding with Extended Hex Alphabet" as specified
in <xref target="RFC4648"/>. The padding characters ("=") are not
used in the NSEC5 specification.</t>
<t hangText='Base64:'>
The "Base 64 Encoding" as specified in <xref target="RFC4648"/>.</t>
<t hangText='QNAME:'>
The domain name being queried (query name).</t>
<t hangText='Private NSEC5 key:'>
The private key for the verifiable random function (VRF).</t>
<t hangText='Public NSEC5 key:'>
The public key for the VRF.</t>
<t hangText='NSEC5 proof:'>
A VRF proof. The holder of
the private NSEC5 key (e.g., authoritative server) can
compute the NSEC5 proof for an input domain name.
Anyone who knows the public VRF key can verify
that the NSEC5 proof corresponds to the input domain name.</t>
<t hangText='NSEC5 hash:'>
A cryptographic digest of an NSEC5 proof. If the NSEC5
proof is known, anyone can compute its corresponding NSEC5 hash.</t>
<t hangText='NSEC5 algorithm:'>
A triple of VRF algorithms that
compute an NSEC5 proof (VRF_prove),
verify an NSEC5 proof (VRF_verify),
and process an NSEC5 proof to obtain its NSEC5 hash (VRF_proof_to_hash).</t>
</list></t>
</section>
</section>
<section anchor="backward-compatibility" title="Backward Compatibility">
<t>The specification describes a protocol change that is not backward
compatible with <xref target="RFC4035"/> and <xref target="RFC5155"/>. An NSEC5-unaware resolver
will fail to validate responses introduced by this document.</t>
<t>To prevent NSEC5-unaware resolvers from attempting to validate the
responses, new DNSSEC algorithms identifiers are introduced in
<xref target="iana_considerations"/> which alias existing algorithm numbers. The
zones signed according to this specification MUST use only these
algorithm identifiers, thus NSEC5-unaware resolvers will treat the
zone as insecure.</t>
</section>
<section anchor="how-nsec5-works" title="How NSEC5 Works">
<t>With NSEC5, the original domain name is hashed using a VRF <xref target="I-D.irtf-cfrg-vrf"/>
using the following steps:</t>
<t><list style="numbers">
<t>The domain name is processed using a VRF keyed with the private
NSEC5 key to obtain the NSEC5 proof. Anyone who knows the public
NSEC5 key, normally acquired via an NSEC5KEY RR, can verify that a
given NSEC5 proof corresponds to a given domain name.</t>
<t>The NSEC5 proof is then processed using a publicly-computable VRF
VRF_proof_to_hash function to obtain the NSEC5 hash. The NSEC5 hash can
be computed by anyone who knows the input NSEC5 proof.</t>
</list></t>
<t>The NSEC5 hash determines the position of a domain name in an NSEC5
chain.</t>
<t>To sign a zone, the private NSEC5 key is used to compute the NSEC5
hashes for each name in the zone. These NSEC5 hashes are sorted in
canonical order <xref target="RFC4034"/>, and each consecutive pair forms an NSEC5
RR. Each NSEC5 RR is signed offline using the private zone-signing
key. The resulting signed chain of NSEC5 RRs is provided to all
authoritative servers for the zone, along with the private NSEC5 key.</t>
<t>To prove non-existence of a particular domain name in response to a
query, the server uses the private NSEC5 key to compute the NSEC5
proof and NSEC5 hash corresponding to the queried name. The server
then identifies the NSEC5 RR that covers the NSEC5 hash, and responds
with this NSEC5 RR and its corresponding RRSIG signature RRset, as
well as a synthesized NSEC5PROOF RR that contains the NSEC5 proof
corresponding to the queried name.</t>
<t>To validate the response, the client verifies the following items:</t>
<t><list style="symbols">
<t>The client uses the public NSEC5 key, normally acquired from the
NSEC5KEY RR, to verify that the NSEC5 proof in the NSEC5PROOF RR
corresponds to the queried name.</t>
<t>The client uses the VRF_proof_to_hash function to compute the NSEC5
hash from the NSEC5 proof in the NSEC5PROOF RR. The client verifies
that the NSEC5 hash is covered by the NSEC5 RR.</t>
<t>The client verifies that the NSEC5 RR is validly signed by the RRSIG
RRset.</t>
</list></t>
</section>
<section anchor="nsec5-algorithms" title="NSEC5 Algorithms">
<t>The algorithms used for NSEC5 authenticated denial are independent of
the algorithms used for DNSSEC signing. An NSEC5 algorithm defines how
the NSEC5 proof and the NSEC5 hash are computed and validated.</t>
<t>The NSEC5 proof corresponding to a name is computed using ECVRF_prove(),
as specified in <xref target="I-D.irtf-cfrg-vrf"/>.
The input to ECVRF_prove() is a private NSEC5 key and the
RR owner name in <xref target="RFC4034"/> canonical wire format.
The output of ECVRF_prove() is an octet string.</t>
<t>An NSEC5 hash corresponding to a name is computed from
its NSEC5 proof using ECVRF_proof_to_hash(), as specified in <xref target="I-D.irtf-cfrg-vrf"/>.
The input to ECVRF_proof_to_hash() is
an NSEC5 proof as an octet string.
The output NSEC5 hash is either an octet string, or INVALID.</t>
<t>An NSEC5 proof for a name is verified using ECVRF_verify(), as specified in
<xref target="I-D.irtf-cfrg-vrf"/>.
The input is the NSEC5 public key,
followed by an NSEC5 proof as an octet string,
followed by an RR owner name in <xref target="RFC4034"/> canonical wire format.
The output is either VALID or INVALID.</t>
<t>This document defines the EC-P256-SHA256 NSEC5 algorithm as follows:</t>
<t><list style="symbols">
<t>The VRF is the ECVRF algorithm using the ECVRF-P256-SHA256
ciphersuite specified in <xref target="I-D.irtf-cfrg-vrf"/>.</t>
<t>The public key format to be used in the NSEC5KEY RR is defined in
Section 4 of <xref target="RFC6605"/> and thus is the same as the format used to
store ECDSA public keys in DNSKEY RRs. <vspace />
[NOTE: This specification does
not compress the elliptic curve point used for the public key,
but we do compress curve points in every other place we use them. The NSEC5KEY record can be shrunk by 31 additional octets by encoding the
public key with point compression.]</t>
</list></t>
<t>This document defines the EC-ED25519-SHA512 NSEC5 algorithm as follows:</t>
<t><list style="symbols">
<t>The VRF is the EC-VRF algorithm using the ECVRF-ED25519-SHA512
ciphersuite specified in <xref target="I-D.irtf-cfrg-vrf"/>.</t>
<t>The public key format to be used in the NSEC5KEY RR is defined in
Section 3 of <xref target="RFC8080"/> and thus is the same as the format used to
store Ed25519 public keys in DNSKEY RRs.</t>
</list></t>
<t>[NOTE: Could alternatively have the EC-ED25519-SHA512 NSEC5 ciphersuite
use the
EC-VRF-ED25519-SHA512-ELLIGATOR2 ciphersuite specified in <xref target="I-D.irtf-cfrg-vrf"/>.]</t>
</section>
<section anchor="the-nsec5key-resource-record" title="The NSEC5KEY Resource Record">
<t>The NSEC5KEY RR stores a public NSEC5 key. The key allows clients to
validate an NSEC5 proof sent by a server.</t>
<section anchor="nsec5key-rdata-wire-format" title="NSEC5KEY RDATA Wire Format">
<t>The RDATA for the NSEC5KEY RR is as shown below:</t>
<figure><artwork><![CDATA[
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Algorithm | Public Key /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>
<t>Algorithm is a single octet identifying the NSEC5 algorithm.</t>
<t>Public Key is a variable-sized field holding public key material for
NSEC5 proof verification.</t>
</section>
<section anchor="nsec5key-rdata-presentation-format" title="NSEC5KEY RDATA Presentation Format">
<t>The presentation format of the NSEC5KEY RDATA is as follows:</t>
<t>The Algorithm field is represented as an unsigned decimal integer.</t>
<t>The Public Key field is represented in Base64 encoding. Whitespace is
allowed within the Base64 text.</t>
</section>
</section>
<section anchor="the-nsec5-resource-record" title="The NSEC5 Resource Record">
<t>The NSEC5 RR provides authenticated denial of existence for an RRset
or domain name. One NSEC5 RR represents one piece of an NSEC5 chain,
proving existence of the owner name and non-existence of other domain
names in the part of the hashed domain space that is covered until the next
owner name hashed in the RDATA.</t>
<section anchor="nsec5-rdata-wire-format" title="NSEC5 RDATA Wire Format">
<t>The RDATA for the NSEC5 RR is as shown below:</t>
<figure><artwork><![CDATA[
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Key Tag | Flags | Next Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Hashed Owner Name /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ Type Bit Maps /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>
<t>The Key Tag field contains the key tag value of the NSEC5KEY RR that
validates the NSEC5 RR, in network byte order. The value is computed
from the NSEC5KEY RDATA using the same algorithm used to
compute key tag values for DNSKEY RRs. This algorithm is defined in
<xref target="RFC4034"/>.</t>
<t>The Flags field is a single octet. The meaning of individual bits of
the field is defined in <xref target="nsec5_flags"/>.</t>
<t>The Next Length field is an unsigned single octet specifying the
length of the Next Hashed Owner Name field in octets.</t>
<t>The Next Hashed Owner Name field is a sequence of binary octets. It
contains an NSEC5 hash of the next domain name in the NSEC5 chain.</t>
<t>Type Bit Maps is a variable-sized field encoding RR types present at
the original owner name matching the NSEC5 RR. The format of the field
is equivalent to the format used in the NSEC3 RR, described in
<xref target="RFC5155"/>.</t>
</section>
<section anchor="nsec5_flags" title="NSEC5 Flags Field">
<t>The following one-bit NSEC5 flags are defined:</t>
<figure><artwork><![CDATA[
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
| |W|O|
+-+-+-+-+-+-+-+-+
]]></artwork></figure>
<t><list style='empty'>
<t>O - Opt-Out flag</t>
</list></t>
<t><list style='empty'>
<t>W - Wildcard flag</t>
</list></t>
<t>All the other flags are reserved for future use and MUST be zero.</t>
<t>The Opt-Out flag has the same semantics as in NSEC3. The definition
and considerations in <xref target="RFC5155"/> are valid, except that NSEC3 is
replaced by NSEC5.</t>
<t>The Wildcard flag indicates that a wildcard synthesis is possible at
the original domain name level (i.e., there is a wildcard node
immediately descending from the immediate ancestor of the original
domain name). The purpose of the Wildcard flag is to reduce the
maximum number of RRs required for an authenticated denial of
existence proof from (at most) three to (at most) two,
as originally described in <xref target="I-D.gieben-nsec4"/>
Section 7.2.1.</t>
</section>
<section anchor="nsec5-rdata-presentation-format" title="NSEC5 RDATA Presentation Format">
<t>The presentation format of the NSEC5 RDATA is as follows:</t>
<t>The Key Tag field is represented as an unsigned decimal integer.</t>
<t>The Flags field is represented as an unsigned decimal integer.</t>
<t>The Next Length field is not represented.</t>
<t>The Next Hashed Owner Name field is represented as a sequence of
case-insensitive Base32hex digits without any whitespace and without
padding.</t>
<t>The Type Bit Maps representation is equivalent to the representation
used in NSEC3 RR, described in <xref target="RFC5155"/>.</t>
</section>
</section>
<section anchor="the-nsec5proof-resource-record" title="The NSEC5PROOF Resource Record">
<t>The NSEC5PROOF record is not to be included in the zone file. The
NSEC5PROOF record contains the NSEC5 proof, proving the position of
the owner name in an NSEC5 chain.</t>
<section anchor="nsec5proof_rdata" title="NSEC5PROOF RDATA Wire Format">
<t>The RDATA for the NSEC5PROOF RR is shown below:</t>
<figure><artwork><![CDATA[
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Key Tag | Owner Name Hash /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>
<t>Key Tag field contains the key tag value of the NSEC5KEY RR that
validates the NSEC5PROOF RR, in network byte order.</t>
<t>Owner Name Hash is a variable-sized sequence of binary octets encoding
the NSEC5 proof of the owner name of the RR.</t>
</section>
<section anchor="nsec5proof-rdata-presentation-format" title="NSEC5PROOF RDATA Presentation Format">
<t>The presentation format of the NSEC5PROOF RDATA is as follows:</t>
<t>The Key Tag field is represented as an unsigned decimal integer.</t>
<t>The Owner Name Hash is represented in Base64 encoding. Whitespace is
allowed within the Base64 text.</t>
</section>
</section>
<section anchor="nsec5_proofs" title="Types of Authenticated Denial of Existence with NSEC5">
<t>This section summarizes all possible types of authenticated denial of
existence. For each type the following lists are included:</t>
<t><list style="numbers">
<t>Facts to prove: the minimum amount of information that an
authoritative server must provide to a client to assure the client
that the response content is valid.</t>
<t>Authoritative server proofs: the names for which the NSEC5PROOF RRs
are synthesized and added into the response along with the NSEC5 RRs
matching or covering each such name. These records together prove
the listed facts.</t>
<t>Validator checks: the individual checks that a validating server is
required to perform on a response. The response content is
considered valid only if all of the checks pass.</t>
</list></t>
<t>If NSEC5 is said to match a domain name, the owner name of the NSEC5
RR has to be equivalent to an NSEC5 hash of that domain name. If an
NSEC5 RR is said to cover a domain name, the NSEC5 hash of the domain
name must sort in canonical order between that NSEC5 RR's Owner Name
and Next Hashed Owner Name.</t>
<section anchor="name-error-responses" title="Name Error Responses">
<t>Facts to prove:</t>
<t><list style='empty'>
<t>Non-existence of the domain name that explictly matches the QNAME.</t>
</list></t>
<t><list style='empty'>
<t>Non-existence of the wildcard that matches the QNAME.</t>
</list></t>
<t>Authoritative server proofs:</t>
<t><list style='empty'>
<t>NSEC5PROOF for closest encloser and matching NSEC5 RR.</t>
</list></t>
<t><list style='empty'>
<t>NSEC5PROOF for next closer name and covering NSEC5 RR.</t>
</list></t>
<t>Validator checks:</t>
<!-- Dimitris 01/2018 commented out the next two. They are covered by the last two validator checks, right?-->
<!-- The QNAME does not fall into a delegation.-->
<!-- The QNAME does not fall into a DNAME redirection.-->
<t><list style='empty'>
<t>Closest encloser is in the zone.</t>
</list></t>
<t><list style='empty'>
<t>The NSEC5 RR matching the closest encloser has its Wildcard flag cleared.</t>
</list></t>
<t><list style='empty'>
<t>The NSEC5 RR matching the closest encloser does not have NS without SOA in the Type Bit Map.</t>
</list></t>
<t><list style='empty'>
<t>The NSEC5 RR matching the closest encloser does not have DNAME in
the Type Bit Map.</t>
</list></t>
<!--> Next closer name is derived correctly.-->
<t><list style='empty'>
<t>Next closer name is not in the zone.</t>
</list></t>
</section>
<section anchor="no-data-responses" title="No Data Responses">
<t>The processing of a No Data response for DS QTYPE differs if the
Opt-Out is in effect. For DS QTYPE queries, the validator has two
possible checking paths. The correct path can be simply decided by
inspecting if the NSEC5 RR in the response matches the QNAME.</t>
<t>Note that the Opt-Out is valid only for DS QTYPE queries.</t>
<section anchor="no-data-response-opt-out-not-in-effect" title="No Data Response, Opt-Out Not In Effect">
<t>Facts to prove:</t>
<t><list style='empty'>
<t>Existence of an RRset explicitly matching the QNAME.</t>
</list></t>
<t><list style='empty'>
<t>Non-existence of QTYPE RRset matching the QNAME.</t>
</list></t>
<t><list style='empty'>
<t>Non-existence of CNAME RRset matching the QNAME.</t>
</list></t>
<t>Authoritative server proofs:</t>
<t><list style='empty'>
<t>NSEC5PROOF for the QNAME and matching NSEC5 RR.</t>
</list></t>
<t>Validator checks:</t>
<t><list style='empty'>
<t>QNAME is in the zone.</t>
</list></t>
<t><list style='empty'>
<t>NSEC5 RR matching the QNAME does not have QTYPE in Type Bit Map.</t>
</list></t>
<t><list style='empty'>
<t>NSEC5 RR matching the QNAME does not have CNAME in Type Bit Map.</t>
</list></t>
</section>
<section anchor="no-data-response-opt-out-in-effect" title="No Data Response, Opt-Out In Effect">
<t>Facts to prove:</t>
<t><list style='empty'>
<t>The delegation is not covered by the NSEC5 chain.</t>
</list></t>
<t>Authoritative server proofs:</t>
<t><list style='empty'>
<t>NSEC5PROOF for closest provable encloser and matching NSEC5 RR.</t>
</list></t>
<t>Validator checks:</t>
<t><list style='empty'>
<t>Closest provable encloser is in zone.</t>
</list></t>
<t><list style='empty'>
<t>Closest provable encloser covers (not matches) the QNAME.</t>
</list></t>
<t><list style='empty'>
<t>NSEC5 RR matching the closest provable encloser has Opt-Out flag set.</t>
</list></t>
</section>
</section>
<section anchor="wildcard-responses" title="Wildcard Responses">
<t>Facts to prove:</t>
<t><list style='empty'>
<t>A signed positive response to the QNAME demonstrating the existence of the wildcard (label count in RRSIG is less than in QNAME), and also providing closest encloser name.</t>
</list></t>
<t><list style='empty'>
<t>Non-existence of the domain name matching the QNAME.</t>
</list></t>
<t>Authoritative server proofs:</t>
<t><list style='empty'>
<t>A signed positive response for the wildcard expansion of the QNAME.</t>
</list></t>
<t><list style='empty'>
<t>NSEC5PROOF for next closer name and covering NSEC5 RR.</t>
</list></t>
<t>Validator checks:</t>
<!--> Next closer name is derived correctly.-->
<t><list style='empty'>
<t>Next closer name is not in the zone.</t>
</list></t>
</section>
<section anchor="wildcard-no-data-responses" title="Wildcard No Data Responses">
<t>Facts to prove:</t>
<t><list style='empty'>
<t>The existence of the wildcard at the closest encloser to the QNAME.</t>
</list></t>
<t><list style='empty'>
<t>Non-existence of both the QTYPE and of the CNAME type that matches QNAME via wildcard expansion.</t>
</list></t>
<t>Authoritative server proofs:</t>
<t><list style='empty'>
<t>NSEC5PROOF for source of synthesis (i.e., wildcard at closest
encloser) and matching NSEC5 RR.</t>
</list></t>
<t><list style='empty'>
<t>NSEC5PROOF for next closer name and covering NSEC5 RR.</t>
</list></t>
<t>Validator checks:</t>
<t><list style='empty'>
<t>Closest encloser to the QNAME exists.</t>
</list></t>
<t><list style='empty'>
<t>NSEC5 RR matching the wildcard label prepended to the closest encloser, and which does not have the bits corresponding to the QTYPE and CNAME types set it the type bitmap.</t>
</list></t>
</section>
</section>
<section anchor="authoritative-server-considerations" title="Authoritative Server Considerations">
<section anchor="zone_signing" title="Zone Signing">
<t>Zones using NSEC5 MUST satisfy the same properties as described in
Section 7.1 of <xref target="RFC5155"/>, with NSEC3 replaced by NSEC5. In addition,
the following conditions MUST be satisfied as well:</t>
<t><list style="symbols">
<t>If the original owner name has a wildcard label immediately
descending from the original owner name, the corresponding NSEC5 RR
MUST have the Wildcard flag set in the Flags field. Otherwise, the
flag MUST be cleared.</t>
<t>The zone apex MUST include an NSEC5KEY RRset containing a NSEC5
public key allowing verification of the current NSEC5 chain.</t>
</list></t>
<t>The following steps describe one possible method to properly add
required NSEC5 related records into a zone. This is not the only such
existing method.</t>
<t><list style="numbers">
<t>Select an algorithm for NSEC5 and generate the public and private NSEC5 keys.</t>
<t>Add an NSEC5KEY RR into the zone apex containing the public NSEC5 key.</t>
<t>For each unique original domain name in the zone and each empty
non-terminal, add an NSEC5 RR. If Opt-Out is used, owner names of
unsigned delegations MAY be excluded. <vspace blankLines='1'/>
A. The owner name of the NSEC5 RR is the NSEC5 hash of the
original owner name encoded in Base32hex without padding,
prepended as a single label to the zone name. <vspace blankLines='1'/>
B. Set the Key Tag field to be the key tag corresponding
to the public NSEC5 key. <vspace blankLines='1'/>
C. Clear the Flags field. If Opt-Out is being used, set the Opt-Out
flag. If there is a wildcard label directly descending from the
original domain name, set the Wildcard flag. Note that the
wildcard can be an empty non-terminal (i.e., the wildcard synthesis
does not take effect and therefore the flag is not to be set). <vspace blankLines='1'/>
D. Set the Next Length field to a value determined by the used
NSEC5 algorithm. Leave the Next Hashed Owner Name field blank. <vspace blankLines='1'/>
E. Set the Type Bit Maps field based on the RRsets present at the
original owner name.</t>
<t>Sort the set of NSEC5 RRs into canonical order.</t>
<t>For each NSEC5 RR, set the Next Hashed Owner Name field by using
the owner name of the next NSEC5 RR in the canonical order. If the
updated NSEC5 is the last NSEC5 RR in the chain, the owner name of the
first NSEC5 RR in the chain is used instead.</t>
</list></t>
<t>The NSEC5KEY and NSEC5 RRs MUST have the same class as the zone SOA
RR. Also the NSEC5 RRs SHOULD have the same TTL value as the SOA
minimum TTL field.</t>
<t>Notice that a use of Opt-Out is not indicated in the zone. This does
not affect the ability of a server to prove insecure delegations. The
Opt-Out MAY be part of the zone-signing tool configuration.</t>
<section anchor="precompute" title="Precomputing Closest Provable Encloser Proofs">
<t>Per <xref target="nsec5_proofs"/>, the worst-case scenario when answering a negative
query with NSEC5 requires the authoritative server to respond with two
NSEC5PROOF RRs and
two NSEC5 RRs. One pair of NSEC5PROOF and NSEC5
RRs corresponds to the closest provable encloser, and the other pair
corresponds to the next closer name. The NSEC5PROOF corresponding to
the next closer name MUST be computed on the fly by the authoritative
server when responding to the query. However, the NSEC5PROOF
corresponding to the closest provable encloser MAY be precomputed and
stored as part of zone signing.</t>
<t>Precomputing NSEC5PROOF RRs can halve the number of online
cryptographic computations required when responding to a negative
query. NSEC5PROOF RRs MAY be precomputed as part of zone signing as
follows: For each NSEC5 RR, compute an NSEC5PROOF RR corresponding to
the original owner name of the NSEC5 RR. The content of the
precomputed NSEC5PROOF record MUST be the same as if the record was
computed on the fly when serving the zone. NSEC5PROOF records are not
part of the zone and SHOULD be stored separately from the zone file.</t>
</section>
</section>
<section anchor="zone-serving" title="Zone Serving">
<t>This specification modifies DNSSEC-enabled DNS responses generated by
authoritative servers. In particular, it replaces use of NSEC or NSEC3
RRs in such responses with NSEC5 RRs and adds NSEC5PROOF RRs.</t>
<t>According to the type of a response, an authoritative server MUST
include NSEC5 RRs in the response, as defined in <xref target="nsec5_proofs"/>. For
each NSEC5 RR in the response, a corresponding RRSIG RRset and an
NSEC5PROOF MUST be added as well. The NSEC5PROOF RR has its owner name
set to the domain name required according to the description in
<xref target="nsec5_proofs"/>. The
class and TTL of the NSEC5PROOF RR MUST be the same as the class and
TTL value of the corresponding NSEC5 RR. The RDATA payload of the
NSEC5PROOF is set according to the description in
<xref target="nsec5proof_rdata"/>.</t>
<t>Notice that the NSEC5PROOF owner name can be a wildcard (e.g., source
of synthesis proof in wildcard No Data responses). The name also
always matches the domain name required for the proof while the NSEC5
RR may only cover (not match) the name in the proof (e.g., closest
encloser in Name Error responses).</t>
<t>If NSEC5 is used, an answering server MUST use exactly one NSEC5 chain
for one signed zone.</t>
<t>NSEC5 MUST NOT be used in parallel with NSEC, NSEC3, or any other
authenticated denial of existence mechanism that allows for
enumeration of zone contents, as this would defeat a principal
security goal of NSEC5.</t>
<t>Similarly to NSEC3, the owner names of NSEC5 RRs are not represented
in the NSEC5 chain and therefore NSEC5 records deny their own
existence. The desired behavior caused by this paradox is the same as
described in Section 7.2.8 of <xref target="RFC5155"/>.</t>
</section>
<section anchor="nsec5key-rollover-mechanism" title="NSEC5KEY Rollover Mechanism">
<t>Replacement of the NSEC5 key implies generating a new NSEC5 chain. The
NSEC5KEY rollover mechanism is similar to "Pre-Publish Zone Signing
Key Rollover" as specified in <xref target="RFC6781"/>. The NSEC5KEY rollover MUST
be performed as a sequence of the following steps:</t>
<t><list style="numbers">
<t>A new public NSEC5 key is added into the NSEC5KEY RRset in the zone
apex.</t>
<t>The old NSEC5 chain is replaced by a new NSEC5 chain constructed
using the new key. This replacement MUST happen as a single atomic
operation; the server MUST NOT be responding with RRs from both the
new and old chain at the same time.</t>
<t>The old public key is removed from the NSEC5KEY RRset in the zone
apex.</t>
</list></t>
<t>The minimum delay between steps 1 and 2 MUST be the time it takes for
the data to propagate to the authoritative servers, plus the TTL value
of the old NSEC5KEY RRset.</t>
<t>The minimum delay between steps 2 and 3 MUST be the time it takes for
the data to propagate to the authoritative servers, plus the maximum
zone TTL value of any of the data in the previous version of the zone.</t>
</section>
<section anchor="secondary-servers" title="Secondary Servers">
<t>This document does not define mechanism to distribute private NSEC5 keys.
See <xref target="keyleak"/> for security considerations for private NSEC5 keys.</t>
</section>
<section anchor="zones-using-unknown-nsec5-algorithms" title="Zones Using Unknown NSEC5 Algorithms">
<t>Zones that are signed with an unknown NSEC5 algorithm or with an
unavailable private NSEC5 key cannot be effectively served. Such zones
SHOULD be rejected when loading and servers SHOULD respond with
RCODE=2 (Server failure) when handling queries that would fall under
such zones.</t>
</section>
<section anchor="dynamic-updates" title="Dynamic Updates">
<t>A zone signed using NSEC5 MAY accept dynamic updates <xref target="RFC2136"/>. The
changes to the zone MUST be performed in a way that ensures that the
zone satisfies the properties specified in <xref target="zone_signing"/> at any
time. The process described in <xref target="RFC5155"/> Section 7.5 describes how
to handle the issues surrounding the handling of empty non-terminals
as well as Opt-Out.</t>
<t>It is RECOMMENDED that the server rejects all updates containing
changes to the NSEC5 chain and its related RRSIG RRs, and performs
itself any required alternations of the NSEC5 chain induced by the
update. Alternatively, the server MUST verify that all the properties
are satisfied prior to performing the update atomically.</t>
</section>
</section>