]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/bind9/doc/rfc/rfc2931.txt
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / bind9 / doc / rfc / rfc2931.txt
1
2
3
4
5
6
7 Network Working Group                                    D. Eastlake 3rd
8 Request for Comments: 2931                                      Motorola
9 Updates: 2535                                             September 2000
10 Category: Standards Track
11
12
13            DNS Request and Transaction Signatures ( SIG(0)s )
14
15 Status of this Memo
16
17    This document specifies an Internet standards track protocol for the
18    Internet community, and requests discussion and suggestions for
19    improvements.  Please refer to the current edition of the "Internet
20    Official Protocol Standards" (STD 1) for the standardization state
21    and status of this protocol.  Distribution of this memo is unlimited.
22
23 Copyright Notice
24
25    Copyright (C) The Internet Society (2000).  All Rights Reserved.
26
27 Abstract
28
29    Extensions to the Domain Name System (DNS) are described in [RFC
30    2535] that can provide data origin and transaction integrity and
31    authentication to security aware resolvers and applications through
32    the use of cryptographic digital signatures.
33
34    Implementation experience has indicated the need for minor but non-
35    interoperable changes in Request and Transaction signature resource
36    records ( SIG(0)s ).  These changes are documented herein.
37
38 Acknowledgments
39
40    The contributions and suggestions of the following persons (in
41    alphabetic order) to this memo are gratefully acknowledged:
42
43          Olafur Gudmundsson
44
45          Ed Lewis
46
47          Erik Nordmark
48
49          Brian Wellington
50
51
52
53
54
55
56
57
58 Eastlake                    Standards Track                     [Page 1]
59 \f
60 RFC 2931                       DNS SIG(0)                 September 2000
61
62
63 Table of Contents
64
65    1. Introduction.................................................  2
66    2. SIG(0) Design Rationale......................................  3
67    2.1 Transaction Authentication..................................  3
68    2.2 Request Authentication......................................  3
69    2.3 Keying......................................................  3
70    2.4 Differences Between TSIG and SIG(0).........................  4
71    3. The SIG(0) Resource Record...................................  4
72    3.1 Calculating Request and Transaction SIGs....................  5
73    3.2 Processing Responses and SIG(0) RRs.........................  6
74    3.3 SIG(0) Lifetime and Expiration..............................  7
75    4. Security Considerations......................................  7
76    5. IANA Considerations..........................................  7
77    References......................................................  7
78    Author's Address................................................  8
79    Appendix: SIG(0) Changes from RFC 2535..........................  9
80    Full Copyright Statement........................................ 10
81
82 1. Introduction
83
84    This document makes minor but non-interoperable changes to part of
85    [RFC 2535], familiarity with which is assumed, and includes
86    additional explanatory text.  These changes concern SIG Resource
87    Records (RRs) that are used to digitally sign DNS requests and
88    transactions / responses.  Such a resource record, because it has a
89    type covered field of zero, is frequently called a SIG(0). The
90    changes are based on implementation and attempted implementation
91    experience with TSIG [RFC 2845] and the [RFC 2535] specification for
92    SIG(0).
93
94    Sections of [RFC 2535] updated are all of 4.1.8.1 and parts of 4.2
95    and 4.3.  No changes are made herein related to the KEY or NXT RRs or
96    to the processing involved with data origin and denial authentication
97    for DNS data.
98
99    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
100    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
101    document are to be interpreted as described in [RFC 2119].
102
103
104
105
106
107
108
109
110
111
112
113
114 Eastlake                    Standards Track                     [Page 2]
115 \f
116 RFC 2931                       DNS SIG(0)                 September 2000
117
118
119 2. SIG(0) Design Rationale
120
121    SIG(0) provides protection for DNS transactions and requests that is
122    not provided by the regular SIG, KEY, and NXT RRs specified in [RFC
123    2535].  The authenticated data origin services of secure DNS either
124    provide protected data resource records (RRs) or authenticatably deny
125    their nonexistence.  These services provide no protection for glue
126    records, DNS requests, no protection for message headers on requests
127    or responses, and no protection of the overall integrity of a
128    response.
129
130 2.1 Transaction Authentication
131
132    Transaction authentication means that a requester can be sure it is
133    at least getting the messages from the server it queried and that the
134    received messages are in response to the query it sent.  This is
135    accomplished by optionally adding either a TSIG RR [RFC 2845] or, as
136    described herein, a SIG(0) resource record at the end of the response
137    which digitally signs the concatenation of the server's response and
138    the corresponding resolver query.
139
140 2.2 Request Authentication
141
142    Requests can also be authenticated by including a TSIG or, as
143    described herein, a special SIG(0) RR at the end of the request.
144    Authenticating requests serves no function in DNS servers that
145    predate the specification of dynamic update.  Requests with a non-
146    empty additional information section produce error returns or may
147    even be ignored by a few such older DNS servers. However, this syntax
148    for signing requests is defined for authenticating dynamic update
149    requests [RFC 2136], TKEY requests [RFC 2930], or future requests
150    requiring authentication.
151
152 2.3 Keying
153
154    The private keys used in transaction security belong to the host
155    composing the DNS response message, not to the zone involved.
156    Request authentication may also involve the private key of the host
157    or other entity composing the request or of a zone to be affected by
158    the request or other private keys depending on the request authority
159    it is sought to establish. The corresponding public key(s) are
160    normally stored in and retrieved from the DNS for verification as KEY
161    RRs with a protocol byte of 3 (DNSSEC) or 255 (ANY).
162
163    Because requests and replies are highly variable, message
164    authentication SIGs can not be pre-calculated.  Thus it will be
165    necessary to keep the private key on-line, for example in software or
166    in a directly connected piece of hardware.
167
168
169
170 Eastlake                    Standards Track                     [Page 3]
171 \f
172 RFC 2931                       DNS SIG(0)                 September 2000
173
174
175 2.4 Differences Between TSIG and SIG(0)
176
177    There are significant differences between TSIG and SIG(0).
178
179    Because TSIG involves secret keys installed at both the requester and
180    server the presence of such a key implies that the other party
181    understands TSIG and very likely has the same key installed.
182    Furthermore, TSIG uses keyed hash authentication codes which are
183    relatively inexpensive to compute.  Thus it is common to authenticate
184    requests with TSIG and responses are authenticated with TSIG if the
185    corresponding request is authenticated.
186
187    SIG(0) on the other hand, uses public key authentication, where the
188    public keys are stored in DNS as KEY RRs and a private key is stored
189    at the signer.  Existence of such a KEY RR does not necessarily imply
190    implementation of SIG(0).  In addition, SIG(0) involves relatively
191    expensive public key cryptographic operations that should be
192    minimized and the verification of a SIG(0) involves obtaining and
193    verifying the corresponding KEY which can be an expensive and lengthy
194    operation.  Indeed, a policy of using SIG(0) on all requests and
195    verifying it before responding would, for some configurations, lead
196    to a deadly embrace with the attempt to obtain and verify the KEY
197    needed to authenticate the request SIG(0) resulting in additional
198    requests accompanied by a SIG(0) leading to further requests
199    accompanied by a SIG(0), etc.  Furthermore, omitting SIG(0)s when not
200    required on requests halves the number of public key operations
201    required by the transaction.
202
203    For these reasons, SIG(0)s SHOULD only be used on requests when
204    necessary to authenticate that the requester has some required
205    privilege or identity.  SIG(0)s on replies are defined in such a way
206    as to not require a SIG(0) on the corresponding request and still
207    provide transaction protection.  For other replies, whether they are
208    authenticated by the server or required to be authenticated by the
209    requester SHOULD be a local configuration option.
210
211 3. The SIG(0) Resource Record
212
213    The structure of and type number of SIG resource records (RRs) is
214    given in [RFC 2535] Section 4.1.  However all of Section 4.1.8.1 and
215    the parts of Sections 4.2 and 4.3 related to SIG(0) should be
216    considered replaced by the material below.  Any conflict between [RFC
217    2535] and this document concerning SIG(0) RRs should be resolved in
218    favor of this document.
219
220    For all transaction SIG(0)s, the signer field MUST be a name of the
221    originating host and there MUST be a KEY RR at that name with the
222    public key corresponding to the private key used to calculate the
223
224
225
226 Eastlake                    Standards Track                     [Page 4]
227 \f
228 RFC 2931                       DNS SIG(0)                 September 2000
229
230
231    signature.  (The host domain name used may be the inverse IP address
232    mapping name for an IP address of the host if the relevant KEY is
233    stored there.)
234
235    For all SIG(0) RRs, the owner name, class, TTL, and original TTL, are
236    meaningless.  The TTL fields SHOULD be zero and the CLASS field
237    SHOULD be ANY.  To conserve space, the owner name SHOULD be root (a
238    single zero octet).  When SIG(0) authentication on a response is
239    desired, that SIG RR MUST be considered the highest priority of any
240    additional information for inclusion in the response. If the SIG(0)
241    RR cannot be added without causing the message to be truncated, the
242    server MUST alter the response so that a SIG(0) can be included.
243    This response consists of only the question and a SIG(0) record, and
244    has the TC bit set and RCODE 0 (NOERROR).  The client should at this
245    point retry the request using TCP.
246
247 3.1 Calculating Request and Transaction SIGs
248
249    A DNS request may be optionally signed by including one SIG(0)s at
250    the end of the query additional information section.  Such a SIG is
251    identified by having a "type covered" field of zero. It signs the
252    preceding DNS request message including DNS header but not including
253    the UDP/IP header and before the request RR counts have been adjusted
254    for the inclusions of the request SIG(0).
255
256    It is calculated by using a "data" (see [RFC 2535], Section 4.1.8) of
257    (1) the SIG's RDATA section entirely omitting (not just zeroing) the
258    signature subfield itself, (2) the DNS query messages, including DNS
259    header, but not the UDP/IP header and before the reply RR counts have
260    been adjusted for the inclusion of the SIG(0).  That is
261
262       data = RDATA | request - SIG(0)
263
264    where "|" is concatenation and RDATA is the RDATA of the SIG(0) being
265    calculated less the signature itself.
266
267    Similarly, a SIG(0) can be used to secure a response and the request
268    that produced it.  Such transaction signatures are calculated by
269    using a "data" of (1) the SIG's RDATA section omitting the signature
270    itself, (2) the entire DNS query message that produced this response,
271    including the query's DNS header but not its UDP/IP header, and (3)
272    the entire DNS response message, including DNS header but not the
273    UDP/IP header and before the response RR counts have been adjusted
274    for the inclusion of the SIG(0).
275
276
277
278
279
280
281
282 Eastlake                    Standards Track                     [Page 5]
283 \f
284 RFC 2931                       DNS SIG(0)                 September 2000
285
286
287    That is
288
289       data = RDATA | full query | response - SIG(0)
290
291    where "|" is concatenation and RDATA is the RDATA of the SIG(0) being
292    calculated less the signature itself.
293
294    Verification of a response SIG(0) (which is signed by the server host
295    key, not the zone key) by the requesting resolver shows that the
296    query and response were not tampered with in transit, that the
297    response corresponds to the intended query, and that the response
298    comes from the queried server.
299
300    In the case of a DNS message via TCP, a SIG(0) on the first data
301    packet is calculated with "data" as above and for each subsequent
302    packet, it is calculated as follows:
303
304       data = RDATA | DNS payload - SIG(0) | previous packet
305
306    where "|" is concatenations, RDATA is as above, and previous packet
307    is the previous DNS payload including DNS header and the SIG(0) but
308    not the TCP/IP header.  Support of SIG(0) for TCP is OPTIONAL.  As an
309    alternative, TSIG may be used after, if necessary, setting up a key
310    with TKEY [RFC 2930].
311
312    Except where needed to authenticate an update, TKEY, or similar
313    privileged request, servers are not required to check a request
314    SIG(0).
315
316    Note: requests and responses can either have a single TSIG or one
317    SIG(0) but not both a TSIG and a SIG(0).
318
319 3.2 Processing Responses and SIG(0) RRs
320
321    If a SIG RR is at the end of the additional information section of a
322    response and has a type covered of zero, it is a transaction
323    signature covering the response and the query that produced the
324    response.  For TKEY responses, it MUST be checked and the message
325    rejected if the checks fail unless otherwise specified for the TKEY
326    mode in use.  For all other responses, it MAY be checked and the
327    message rejected if the checks fail.
328
329    If a response's SIG(0) check succeed, such a transaction
330    authentication SIG does NOT directly authenticate the validity any
331    data-RRs in the message.  However, it authenticates that they were
332    sent by the queried server and have not been diddled.  (Only a proper
333    SIG(0) RR signed by the zone or a key tracing its authority to the
334    zone or to static resolver configuration can directly authenticate
335
336
337
338 Eastlake                    Standards Track                     [Page 6]
339 \f
340 RFC 2931                       DNS SIG(0)                 September 2000
341
342
343    data-RRs, depending on resolver policy.) If a resolver or server does
344    not implement transaction and/or request SIGs, it MUST ignore them
345    without error where they are optional and treat them as failing where
346    they are required.
347
348 3.3 SIG(0) Lifetime and Expiration
349
350    The inception and expiration times in SIG(0)s are for the purpose of
351    resisting replay attacks.  They should be set to form a time bracket
352    such that messages outside that bracket can be ignored.  In IP
353    networks, this time bracket should not normally extend further than 5
354    minutes into the past and 5 minutes into the future.
355
356 4. Security Considerations
357
358    No additional considerations beyond those in [RFC 2535].
359
360    The inclusion of the SIG(0) inception and expiration time under the
361    signature improves resistance to replay attacks.
362
363 5. IANA Considerations
364
365    No new parameters are created or parameter values assigned by this
366    document.
367
368 References
369
370    [RFC 1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982,
371               September 1996.
372
373    [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate
374               Requirement Levels", BCP 14, RFC 2119, March 1997.
375
376    [RFC 2136] Vixie, P., Thomson, S., Rekhter, Y. and J. Bound, "Dynamic
377               Updates in the Domain Name System (DNS UPDATE)", RFC 2136,
378               April 1997.
379
380    [RFC 2535] Eastlake, D., "Domain Name System Security Extensions",
381               RFC 2535, March 1999.
382
383    [RFC 2845] Vixie, P., Gudmundsson, O., Eastlake, D. and B.
384               Wellington, "Secret Key Transaction Signatures for DNS
385               (TSIG)", RFC 2845, May 2000.
386
387    [RFC 2930] Eastlake, D., "Secret Key Establishment for DNS (RR)", RFC
388               2930, September 2000.
389
390
391
392
393
394 Eastlake                    Standards Track                     [Page 7]
395 \f
396 RFC 2931                       DNS SIG(0)                 September 2000
397
398
399 Author's Address
400
401    Donald E. Eastlake 3rd
402    Motorola
403    140 Forest Avenue
404    Hudson, MA 01749 USA
405
406    Phone: +1-978-562-2827(h)
407           +1-508-261-5434(w)
408    Fax:   +1 978-567-7941(h)
409           +1-508-261-4447(w)
410    EMail: Donald.Eastlake@motorola.com
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 Eastlake                    Standards Track                     [Page 8]
451 \f
452 RFC 2931                       DNS SIG(0)                 September 2000
453
454
455 Appendix: SIG(0) Changes from RFC 2535
456
457    Add explanatory text concerning the differences between TSIG and
458    SIG(0).
459
460    Change the data over which SIG(0) is calculated to include the SIG(0)
461    RDATA other than the signature itself so as to secure the signature
462    inception and expiration times and resist replay attacks.  Specify
463    SIG(0) for TCP.
464
465    Add discussion of appropriate inception and expiration times for
466    SIG(0).
467
468    Add wording to indicate that either a TSIG or one or more SIG(0)s may
469    be present but not both.
470
471    Reword some areas for clarity.
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 Eastlake                    Standards Track                     [Page 9]
507 \f
508 RFC 2931                       DNS SIG(0)                 September 2000
509
510
511 Full Copyright Statement
512
513    Copyright (C) The Internet Society (2000).  All Rights Reserved.
514
515    This document and translations of it may be copied and furnished to
516    others, and derivative works that comment on or otherwise explain it
517    or assist in its implementation may be prepared, copied, published
518    and distributed, in whole or in part, without restriction of any
519    kind, provided that the above copyright notice and this paragraph are
520    included on all such copies and derivative works.  However, this
521    document itself may not be modified in any way, such as by removing
522    the copyright notice or references to the Internet Society or other
523    Internet organizations, except as needed for the purpose of
524    developing Internet standards in which case the procedures for
525    copyrights defined in the Internet Standards process must be
526    followed, or as required to translate it into languages other than
527    English.
528
529    The limited permissions granted above are perpetual and will not be
530    revoked by the Internet Society or its successors or assigns.
531
532    This document and the information contained herein is provided on an
533    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
534    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
535    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
536    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
537    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
538
539 Acknowledgement
540
541    Funding for the RFC Editor function is currently provided by the
542    Internet Society.
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562 Eastlake                    Standards Track                    [Page 10]
563 \f