draft-ietf-secsh-dns-02.txt   draft-ietf-secsh-dns-03.txt 
Secure Shell Working Group J. Schlyter Secure Shell Working Group J. Schlyter
Internet-Draft Carlstedt Research & Internet-Draft Carlstedt Research &
Expires: July 12, 2003 Technology Expires: September 23, 2003 Technology
W. Griffin W. Griffin
Network Associates Laboratories Network Associates Laboratories
January 11, 2003 March 25, 2003
Using DNS to securely publish SSH key fingerprints Using DNS to securely publish SSH key fingerprints
draft-ietf-secsh-dns-02.txt draft-ietf-secsh-dns-03.txt
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC2026. all provisions of Section 10 of RFC2026.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that other
other groups may also distribute working documents as groups may also distribute working documents as Internet-Drafts.
Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at http:// The list of current Internet-Drafts can be accessed at http://
www.ietf.org/ietf/1id-abstracts.txt. www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on July 12, 2003. This Internet-Draft will expire on September 23, 2003.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2003). All Rights Reserved. Copyright (C) The Internet Society (2003). All Rights Reserved.
Abstract Abstract
This document describes a method to verify SSH host keys using This document describes a method to verify SSH host keys using
DNSSEC. The document defines a new DNS resource record that contains DNSSEC. The document defines a new DNS resource record that contains
a standard SSH key fingerprint. a standard SSH key fingerprint.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. SSH Host Key Verification . . . . . . . . . . . . . . . . . 3 2. SSH Host Key Verification . . . . . . . . . . . . . . . . . 3
2.1 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Implementation notes . . . . . . . . . . . . . . . . . . . . 3 2.2 Implementation Notes . . . . . . . . . . . . . . . . . . . . 3
2.3 Fingerprint matching . . . . . . . . . . . . . . . . . . . . 4 2.3 Fingerprint Matching . . . . . . . . . . . . . . . . . . . . 4
2.4 Authentication . . . . . . . . . . . . . . . . . . . . . . . 4 2.4 Authentication . . . . . . . . . . . . . . . . . . . . . . . 4
3. The SSHFP resource record . . . . . . . . . . . . . . . . . 4 3. The SSHFP Resource Record . . . . . . . . . . . . . . . . . 4
3.1 The SSHFP RDATA format . . . . . . . . . . . . . . . . . . . 4 3.1 The SSHFP RDATA Format . . . . . . . . . . . . . . . . . . . 4
3.1.1 Algorithm number specification . . . . . . . . . . . . . . . 4 3.1.1 Algorithm Number Specification . . . . . . . . . . . . . . . 4
3.1.2 Fingerprint type specification . . . . . . . . . . . . . . . 5 3.1.2 Fingerprint Type Specification . . . . . . . . . . . . . . . 5
3.1.3 Fingerprint . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1.3 Fingerprint . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Presentation format of the SSHFP RR . . . . . . . . . . . . 5 3.2 Presentation Format of the SSHFP RR . . . . . . . . . . . . 5
4. Security considerations . . . . . . . . . . . . . . . . . . 5 4. Security Considerations . . . . . . . . . . . . . . . . . . 5
5. IANA considerations . . . . . . . . . . . . . . . . . . . . 6 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . 7
Normative References . . . . . . . . . . . . . . . . . . . . 7 Normative References . . . . . . . . . . . . . . . . . . . . 7
Informational References . . . . . . . . . . . . . . . . . . 7 Informational References . . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 8
A. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 A. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8
Intellectual Property and Copyright Statements . . . . . . . 9 Intellectual Property and Copyright Statements . . . . . . . 10
1. Introduction 1. Introduction
The SSH [5] protocol provides secure remote login and other secure The SSH [5] protocol provides secure remote login and other secure
network services over an insecure network. The security of the network services over an insecure network. The security of the
connection relies on the server authenticating itself to the client. connection relies on the server authenticating itself to the client.
Server authentication is normally done by presenting the fingerprint Server authentication is normally done by presenting the fingerprint
of an unknown public key to the user for verification. If the user of an unknown public key to the user for verification. If the user
decides the fingerprint is correct and accepts the key, the key is decides the fingerprint is correct and accepts the key, the key is
skipping to change at page 3, line 44 skipping to change at page 3, line 44
2.1 Method 2.1 Method
Upon connection to a SSH server, the SSH client MAY look up the SSHFP Upon connection to a SSH server, the SSH client MAY look up the SSHFP
resource record(s) for the host it is connecting to. If the resource record(s) for the host it is connecting to. If the
algorithm and fingerprint of the key received from the SSH server algorithm and fingerprint of the key received from the SSH server
matches the algorithm and fingerprint of one of the SSHFP resource matches the algorithm and fingerprint of one of the SSHFP resource
record(s) returned from DNS, the client MAY accept the identity of record(s) returned from DNS, the client MAY accept the identity of
the server. the server.
2.2 Implementation notes 2.2 Implementation Notes
Client implementors SHOULD provide a configurable policy used to Client implementors SHOULD provide a configurable policy used to
select the order of methods used to verify a host key and which select the order of methods used to verify a host key and which
fingerprints to trust ultimately, after user confirmation or not at fingerprints to trust ultimately, after user confirmation or not at
all. all.
One specific scenario for having a configurable policy is where One specific scenario for having a configurable policy is where
clients use unqualified host names to connect to servers. In this clients use unqualified host names to connect to servers. In this
scenario, the implementation SHOULD verify the host key against a scenario, the implementation SHOULD verify the host key against a
local database before verifying the key via the fingerprint returned local database before verifying the key via the fingerprint returned
from DNS. This would help prevent an attacker from injecting a DNS from DNS. This would help prevent an attacker from injecting a DNS
search path into the local resolver and forcing the client to connect search path into the local resolver and forcing the client to connect
to a different host. to a different host.
2.3 Fingerprint matching 2.3 Fingerprint Matching
The public key and the SSHFP resource record are matched together by The public key and the SSHFP resource record are matched together by
comparing algorithm number and fingerprint. comparing algorithm number and fingerprint.
2.4 Authentication 2.4 Authentication
A public key verified using this method MUST only be trusted if the A public key verified using this method MUST only be trusted if the
SSHFP RR used for verification was authenticated by a trusted SIG RR. SSHFP RR used for verification was authenticated by a trusted SIG RR.
Clients that do not validate the DNSSEC signatures themselves MUST Clients that do not validate the DNSSEC signatures themselves MUST
use a secure transport, e.g. TSIG [8], SIG(0) [9] or IPsec [7], use a secure transport, e.g. TSIG [8], SIG(0) [9] or IPsec [7],
between themselves and the entity performing the signature between themselves and the entity performing the signature
validation. validation.
3. The SSHFP resource record 3. The SSHFP Resource Record
The SSHFP resource record (RR) is used to store a fingerprint of a The SSHFP resource record (RR) is used to store a fingerprint of a
SSH public host key that is associated with a Domain Name System SSH public host key that is associated with a Domain Name System
(DNS) name. (DNS) name.
The RR type code for the SSHFP RR is TBA. The RR type code for the SSHFP RR is TBA.
3.1 The SSHFP RDATA format 3.1 The SSHFP RDATA Format
The RDATA for a SSHFP RR consists of an algorithm number, fingerprint The RDATA for a SSHFP RR consists of an algorithm number, fingerprint
type and the fingerprint of the public host key. type and the fingerprint of the public host key.
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 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 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 | fp type | / | algorithm | fp type | /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /
/ / / /
/ fingerprint / / fingerprint /
/ / / /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3.1.1 Algorithm number specification 3.1.1 Algorithm Number Specification
This algorithm number octet describes the algorithm of the public This algorithm number octet describes the algorithm of the public
key. The following values are assigned: key. The following values are assigned:
Value Algorithm name Value Algorithm name
----- -------------- ----- --------------
0 reserved 0 reserved
1 RSA 1 RSA
2 DSS 2 DSS
Reserving other types requires IETF consensus. Reserving other types requires IETF consensus.
3.1.2 Fingerprint type specification 3.1.2 Fingerprint Type Specification
The fingerprint type octet describes the message-digest algorithm The fingerprint type octet describes the message-digest algorithm
used to calculate the fingerprint of the public key. The following used to calculate the fingerprint of the public key. The following
values are assigned: values are assigned:
Value Fingerprint type Value Fingerprint type
----- ---------------- ----- ----------------
0 reserved 0 reserved
1 SHA-1 1 SHA-1
Reserving other types requires IETF consensus. For interoperability Reserving other types requires IETF consensus. For interoperability
reasons, as few fingerprint types as possible should be reserved. reasons, as few fingerprint types as possible should be reserved.
The only reason to reserve additional types is to increase security. The only reason to reserve additional types is to increase security.
3.1.3 Fingerprint 3.1.3 Fingerprint
The fingerprint is calculated over the public key blob as described The fingerprint is calculated over the public key blob as described
in [6]. in [6].
3.2 Presentation format of the SSHFP RR 3.2 Presentation Format of the SSHFP RR
The presentation format of the SSHFP resource record consists of two The presentation format of the SSHFP resource record consists of two
numbers (algorithm and fingerprint type) followed by the fingerprint numbers (algorithm and fingerprint type) followed by the fingerprint
itself presented in hex, e.g: itself presented in hex, e.g:
host.example. SSHFP 2 1 123456789abcdef67890123456789abcdef67890 host.example. SSHFP 2 1 123456789abcdef67890123456789abcdef67890
4. Security considerations 4. Security Considerations
Currently, the amount of trust a user can realistically place in a Currently, the amount of trust a user can realistically place in a
server key is proportional to the amount of attention paid to server key is proportional to the amount of attention paid to
verifying that the key presented is actually the key at the server. verifying that the key presented is actually the key at the server.
If a user accepts a key without verifying the fingerprint with If a user accepts a key without verifying the fingerprint with
something learned through a secured channel, the connection is something learned through a secured channel, the connection is
vulnerable to a man-in-the-middle attack. vulnerable to a man-in-the-middle attack.
The approach suggested here shifts the burden of key checking from The approach suggested here shifts the burden of key checking from
each user of a machine to the key checking performed by the each user of a machine to the key checking performed by the
skipping to change at page 6, line 30 skipping to change at page 6, line 30
If SSHFP is checked first, new SSH host keys may be distributed by If SSHFP is checked first, new SSH host keys may be distributed by
replacing the corresponding SSHFP in DNS. replacing the corresponding SSHFP in DNS.
If SSH host key verification can be configured to require SSHFP, If SSH host key verification can be configured to require SSHFP,
we can implement SSH host key revocation by removing the we can implement SSH host key revocation by removing the
corresponding SSHFP from DNS. corresponding SSHFP from DNS.
As stated in Section 2.2, we recommend that SSH implementors provide As stated in Section 2.2, we recommend that SSH implementors provide
a policy mechanism to control the order of methods used for host key a policy mechanism to control the order of methods used for host key
verification. verification. One specific scenario for having a configurable policy
is where clients use unqualified host names to connect to servers. In
this case, we recommend that SSH implementations check the host key
against a local database before verifying the key via the fingerprint
returned from DNS. This would help prevent an attacker from injecting
a DNS search path into the local resolver and forcing the client to
connect to a different host.
A different approach to solve the DNS search path issue would be for
clients to use a trusted DNS search path, i.e., one not acquired
through DHCP or other autoconfiguration mechanisms. Since there is no
way with current DNS lookup APIs to tell whether a search path is
from a trusted source, the entire client system would need to be
configured with this trusted DNS search path.
Another dependency is on the implementation of DNSSEC itself. As Another dependency is on the implementation of DNSSEC itself. As
stated in Section 2.4, we mandate the use of secure methods for stated in Section 2.4, we mandate the use of secure methods for
lookup and that SSHFP RRs are authenticated by trusted SIG RRs. This lookup and that SSHFP RRs are authenticated by trusted SIG RRs. This
is especially important if SSHFP is to be used as a basis for host is especially important if SSHFP is to be used as a basis for host
key rollover and/or revocation, as described above. key rollover and/or revocation, as described above.
Since DNSSEC only protects the integrity of the host key fingerprint Since DNSSEC only protects the integrity of the host key fingerprint
after it is signed by the DNS zone administrator, the fingerprint after it is signed by the DNS zone administrator, the fingerprint
must be transferred securely from the SSH host administrator to the must be transferred securely from the SSH host administrator to the
DNS zone administrator. This could be done manually between the DNS zone administrator. This could be done manually between the
administrators or automatically using secure DNS dynamic update [10] administrators or automatically using secure DNS dynamic update [10]
between the SSH server and the nameserver. We note that this is no between the SSH server and the nameserver. We note that this is no
different from other key enrollment situations, e.g. a client different from other key enrollment situations, e.g. a client sending
sending a certificate request to a certificate authority for signing. a certificate request to a certificate authority for signing.
5. IANA considerations 5. IANA Considerations
IANA needs to allocate a RR type code for SSHFP from the standard RR IANA needs to allocate a RR type code for SSHFP from the standard RR
type space (type 44 requested). type space (type 44 requested).
IANA needs to open a new registry for the SSHFP RR type for public IANA needs to open a new registry for the SSHFP RR type for public
key algorithms. Defined types are: key algorithms. Defined types are:
0 is reserved 0 is reserved
1 is RSA 1 is RSA
2 is DSA 2 is DSA
skipping to change at page 7, line 34 skipping to change at page 7, line 47
[2] Mockapetris, P., "Domain names - implementation and [2] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, November 1987. specification", STD 13, RFC 1035, November 1987.
[3] Bradner, S., "Key words for use in RFCs to Indicate Requirement [3] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997. Levels", BCP 14, RFC 2119, March 1997.
[4] Eastlake, D., "Domain Name System Security Extensions", RFC [4] Eastlake, D., "Domain Name System Security Extensions", RFC
2535, March 1999. 2535, March 1999.
[5] Ylonen, T., Kivinen, T., Saarinen, M., Rinne, T J. and S. [5] Rinne, T., Ylonen, T., Kivinen, T. and S. Lehtinen, "SSH
Lehtinen, "SSH Transport Layer Protocol", work in progress Protocol Architecture", draft-ietf-secsh-architecture-13 (work
draft-ietf-secsh-architecture-13.txt, September 2002. in progress), September 2002.
[6] Ylonen, T., Kivinen, T., Saarinen, M., Rinne, T J. and S. [6] Rinne, T., Ylonen, T., Kivinen, T., Saarinen, M. and S.
Lehtinen, "SSH Transport Layer Protocol", work in progress
draft-ietf-secsh-transport-15.txt, September 2002. Lehtinen, "SSH Transport Layer Protocol",
draft-ietf-secsh-transport-15 (work in progress), September
2002.
Informational References Informational References
[7] Thayer, R., Doraswamy, N. and R. Glenn, "IP Security Document [7] Thayer, R., Doraswamy, N. and R. Glenn, "IP Security Document
Roadmap", RFC 2411, November 1998. Roadmap", RFC 2411, November 1998.
[8] Vixie, P., Gudmundsson, O., Eastlake, D. and B. Wellington, [8] Vixie, P., Gudmundsson, O., Eastlake, D. and B. Wellington,
"Secret Key Transaction Authentication for DNS (TSIG)", RFC "Secret Key Transaction Authentication for DNS (TSIG)", RFC
2845, May 2000. 2845, May 2000.
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/