draft-ietf-secsh-architecture-09.txt   draft-ietf-secsh-architecture-10.txt 
Network Working Group T. Ylonen Network Working Group T. Ylonen
Internet-Draft T. Kivinen Internet-Draft T. Kivinen
Expires: January 18, 2002 SSH Communications Security Corp Expires: May 10, 2002 SSH Communications Security Corp
M. Saarinen M. Saarinen
University of Jyvaskyla University of Jyvaskyla
T. Rinne T. Rinne
S. Lehtinen S. Lehtinen
SSH Communications Security Corp SSH Communications Security Corp
July 20, 2001 November 9, 2001
SSH Protocol Architecture SSH Protocol Architecture
draft-ietf-secsh-architecture-09.txt draft-ietf-secsh-architecture-10.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 groups may also distribute working documents as Internet- other groups may also distribute working documents as Internet-
Drafts. Drafts.
Internet-Drafts are draft documents valid for a maximum of six Internet-Drafts are draft documents valid for a maximum of six months
months and may be updated, replaced, or obsoleted by other and may be updated, replaced, or obsoleted by other documents at any
documents at any time. It is inappropriate to use Internet-Drafts time. It is inappropriate to use Internet-Drafts as reference
as reference material or to cite them other than as "work in material or to cite them other than as "work in progress."
progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://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 January 18, 2002. This Internet-Draft will expire on May 10, 2002.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2001). All Rights Reserved. Copyright (C) The Internet Society (2001). All Rights Reserved.
Abstract Abstract
SSH is a protocol for secure remote login and other secure network SSH is a protocol for secure remote login and other secure network
services over an insecure network. This document describes the services over an insecure network. This document describes the
architecture of the SSH protocol, as well as the notation and architecture of the SSH protocol, as well as the notation and
skipping to change at page 2, line 25 skipping to change at page 2, line 24
2. Specification of Requirements . . . . . . . . . . . . . . . . 3 2. Specification of Requirements . . . . . . . . . . . . . . . . 3
3. Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1 Host Keys . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1 Host Keys . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2 Extensibility . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2 Extensibility . . . . . . . . . . . . . . . . . . . . . . . . 5
3.3 Policy Issues . . . . . . . . . . . . . . . . . . . . . . . . 5 3.3 Policy Issues . . . . . . . . . . . . . . . . . . . . . . . . 5
3.4 Security Properties . . . . . . . . . . . . . . . . . . . . . 6 3.4 Security Properties . . . . . . . . . . . . . . . . . . . . . 6
3.5 Packet Size and Overhead . . . . . . . . . . . . . . . . . . . 6 3.5 Packet Size and Overhead . . . . . . . . . . . . . . . . . . . 6
3.6 Localization and Character Set Support . . . . . . . . . . . . 7 3.6 Localization and Character Set Support . . . . . . . . . . . . 7
4. Data Type Representations Used in the SSH Protocols . . . . . 8 4. Data Type Representations Used in the SSH Protocols . . . . . 8
5. Algorithm Naming . . . . . . . . . . . . . . . . . . . . . . . 10 5. Algorithm Naming . . . . . . . . . . . . . . . . . . . . . . . 10
6. Message Numbers . . . . . . . . . . . . . . . . . . . . . . . 11 6. Message Numbers . . . . . . . . . . . . . . . . . . . . . . . 10
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
8. Security Considerations . . . . . . . . . . . . . . . . . . . 12 8. Security Considerations . . . . . . . . . . . . . . . . . . . 12
9. Trademark Issues . . . . . . . . . . . . . . . . . . . . . . . 12 9. Trademark Issues . . . . . . . . . . . . . . . . . . . . . . . 12
10. Additional Information . . . . . . . . . . . . . . . . . . . . 12 10. Additional Information . . . . . . . . . . . . . . . . . . . . 12
References . . . . . . . . . . . . . . . . . . . . . . . . . . 12 References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 14 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 13
Full Copyright Statement . . . . . . . . . . . . . . . . . . . 15 Full Copyright Statement . . . . . . . . . . . . . . . . . . . 15
1. Introduction 1. Introduction
SSH is a protocol for secure remote login and other secure network SSH is a protocol for secure remote login and other secure network
services over an insecure network. It consists of three major services over an insecure network. It consists of three major
components: components:
o The Transport Layer Protocol [SSH-TRANS] provides server o The Transport Layer Protocol [SSH-TRANS] provides server
authentication, confidentiality, and integrity. It may authentication, confidentiality, and integrity. It may optionally
optionally also provide compression. The transport layer will also provide compression. The transport layer will typically be
typically be run over a TCP/IP connection, but might also be run over a TCP/IP connection, but might also be used on top of any
used on top of any other reliable data stream. other reliable data stream.
o The User Authentication Protocol [SSH-USERAUTH] authenticates o The User Authentication Protocol [SSH-USERAUTH] authenticates the
the client-side user to the server. It runs over the transport client-side user to the server. It runs over the transport layer
layer protocol. protocol.
o The Connection Protocol [SSH-CONNECT] multiplexes the encrypted o The Connection Protocol [SSH-CONNECT] multiplexes the encrypted
tunnel into several logical channels. It runs over the user tunnel into several logical channels. It runs over the user
authentication protocol. authentication protocol.
The client sends a service request once a secure transport layer The client sends a service request once a secure transport layer
connection has been established. A second service request is sent connection has been established. A second service request is sent
after user authentication is complete. This allows new protocols after user authentication is complete. This allows new protocols to
to be defined and coexist with the protocols listed above. be defined and coexist with the protocols listed above.
The connection protocol provides channels that can be used for a The connection protocol provides channels that can be used for a wide
wide range of purposes. Standard methods are provided for setting range of purposes. Standard methods are provided for setting up
up secure interactive shell sessions and for forwarding secure interactive shell sessions and for forwarding ("tunneling")
("tunneling") arbitrary TCP/IP ports and X11 connections. arbitrary TCP/IP ports and X11 connections.
2. Specification of Requirements 2. Specification of Requirements
All documents related to the SSH protocols shall use the keywords All documents related to the SSH protocols shall use the keywords
"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" to describe "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" to describe
requirements. They are to be interpreted as described in [RFC- requirements. They are to be interpreted as described in [RFC-2119].
2119].
3. Architecture 3. Architecture
3.1 Host Keys 3.1 Host Keys
Each server host SHOULD have a host key. Hosts MAY have multiple Each server host SHOULD have a host key. Hosts MAY have multiple
host keys using multiple different algorithms. Multiple hosts MAY host keys using multiple different algorithms. Multiple hosts MAY
share the same host key. If a host has keys at all, it MUST have share the same host key. If a host has keys at all, it MUST have at
at least one key using each REQUIRED public key algorithm least one key using each REQUIRED public key algorithm (currently DSS
(currently DSS [FIPS-186]). [FIPS-186]).
The server host key is used during key exchange to verify that the The server host key is used during key exchange to verify that the
client is really talking to the correct server. For this to be client is really talking to the correct server. For this to be
possible, the client must have a priori knowledge of the server's possible, the client must have a priori knowledge of the server's
public host key. public host key.
Two different trust models can be used: Two different trust models can be used:
o The client has a local database that associates each host name o The client has a local database that associates each host name (as
(as typed by the user) with the corresponding public host key. typed by the user) with the corresponding public host key. This
This method requires no centrally administered infrastructure, method requires no centrally administered infrastructure, and no
and no third-party coordination. The downside is that the third-party coordination. The downside is that the database of
database of name-to-key associations may become burdensome to name-to-key associations may become burdensome to maintain.
maintain.
o The host name-to-key association is certified by some trusted o The host name-to-key association is certified by some trusted
certification authority. The client only knows the CA root certification authority. The client only knows the CA root key,
key, and can verify the validity of all host keys certified by and can verify the validity of all host keys certified by accepted
accepted CAs. CAs.
The second alternative eases the maintenance problem, since The second alternative eases the maintenance problem, since
ideally only a single CA key needs to be securely stored on the ideally only a single CA key needs to be securely stored on the
client. On the other hand, each host key must be appropriately client. On the other hand, each host key must be appropriately
certified by a central authority before authorization is certified by a central authority before authorization is possible.
possible. Also, a lot of trust is placed on the central Also, a lot of trust is placed on the central infrastructure.
infrastructure.
The protocol provides the option that the server name - host key The protocol provides the option that the server name - host key
association is not checked when connecting to the host for the association is not checked when connecting to the host for the first
first time. This allows communication without prior communication time. This allows communication without prior communication of host
of host keys or certification. The connection still provides keys or certification. The connection still provides protection
protection against passive listening; however, it becomes against passive listening; however, it becomes vulnerable to active
vulnerable to active man-in-the-middle attacks. Implementations man-in-the-middle attacks. Implementations SHOULD NOT normally allow
SHOULD NOT normally allow such connections by default, as they such connections by default, as they pose a potential security
pose a potential security problem. However, as there is no widely problem. However, as there is no widely deployed key infrastructure
deployed key infrastructure available on the Internet yet, this available on the Internet yet, this option makes the protocol much
option makes the protocol much more usable during the transition more usable during the transition time until such an infrastructure
time until such an infrastructure emerges, while still providing a emerges, while still providing a much higher level of security than
much higher level of security than that offered by older solutions that offered by older solutions (e.g. telnet [RFC-854] and rlogin
(e.g. telnet [RFC-854] and rlogin [RFC-1282]). [RFC-1282]).
Implementations SHOULD try to make the best effort to check host Implementations SHOULD try to make the best effort to check host
keys. An example of a possible strategy is to only accept a host keys. An example of a possible strategy is to only accept a host key
key without checking the first time a host is connected, save the without checking the first time a host is connected, save the key in
key in a local database, and compare against that key on all a local database, and compare against that key on all future
future connections to that host. connections to that host.
Implementations MAY provide additional methods for verifying the Implementations MAY provide additional methods for verifying the
correctness of host keys, e.g. a hexadecimal fingerprint derived correctness of host keys, e.g. a hexadecimal fingerprint derived
from the SHA-1 hash of the public key. Such fingerprints can from the SHA-1 hash of the public key. Such fingerprints can easily
easily be verified by using telephone or other external be verified by using telephone or other external communication
communication channels. channels.
All implementations SHOULD provide an option to not accept host All implementations SHOULD provide an option to not accept host keys
keys that cannot be verified. that cannot be verified.
We believe that ease of use is critical to end-user acceptance of We believe that ease of use is critical to end-user acceptance of
security solutions, and no improvement in security is gained if security solutions, and no improvement in security is gained if the
the new solutions are not used. Thus, providing the option not to new solutions are not used. Thus, providing the option not to check
check the server host key is believed to improve the overall the server host key is believed to improve the overall security of
security of the Internet, even though it reduces the security of the Internet, even though it reduces the security of the protocol in
the protocol in configurations where it is allowed. configurations where it is allowed.
3.2 Extensibility 3.2 Extensibility
We believe that the protocol will evolve over time, and some We believe that the protocol will evolve over time, and some
organizations will want to use their own encryption, organizations will want to use their own encryption, authentication
authentication and/or key exchange methods. Central registration and/or key exchange methods. Central registration of all extensions
of all extensions is cumbersome, especially for experimental or is cumbersome, especially for experimental or classified features.
classified features. On the other hand, having no central On the other hand, having no central registration leads to conflicts
registration leads to conflicts in method identifiers, making in method identifiers, making interoperability difficult.
interoperability difficult.
We have chosen to identify algorithms, methods, formats, and We have chosen to identify algorithms, methods, formats, and
extension protocols with textual names that are of a specific extension protocols with textual names that are of a specific format.
format. DNS names are used to create local namespaces where DNS names are used to create local namespaces where experimental or
experimental or classified extensions can be defined without fear classified extensions can be defined without fear of conflicts with
of conflicts with other implementations. other implementations.
One design goal has been to keep the base protocol as simple as One design goal has been to keep the base protocol as simple as
possible, and to require as few algorithms as possible. However, possible, and to require as few algorithms as possible. However, all
all implementations MUST support a minimal set of algorithms to implementations MUST support a minimal set of algorithms to ensure
ensure interoperability (this does not imply that the local policy interoperability (this does not imply that the local policy on all
on all hosts would necessary allow these algorithms). The hosts would necessary allow these algorithms). The mandatory
mandatory algorithms are specified in the relevant protocol algorithms are specified in the relevant protocol documents.
documents.
Additional algorithms, methods, formats, and extension protocols Additional algorithms, methods, formats, and extension protocols can
can be defined in separate drafts. See Section Algorithm Naming be defined in separate drafts. See Section Algorithm Naming (Section
(Section 5) for more information. 5) for more information.
3.3 Policy Issues 3.3 Policy Issues
The protocol allows full negotiation of encryption, integrity, key The protocol allows full negotiation of encryption, integrity, key
exchange, compression, and public key algorithms and formats. exchange, compression, and public key algorithms and formats.
Encryption, integrity, public key, and compression algorithms can Encryption, integrity, public key, and compression algorithms can be
be different for each direction. different for each direction.
The following policy issues SHOULD be addressed in the The following policy issues SHOULD be addressed in the configuration
configuration mechanisms of each implementation: mechanisms of each implementation:
o Encryption, integrity, and compression algorithms, separately o Encryption, integrity, and compression algorithms, separately for
for each direction. The policy MUST specify which is the each direction. The policy MUST specify which is the preferred
preferred algorithm (e.g. the first algorithm listed in each algorithm (e.g. the first algorithm listed in each category).
category). o Public key algorithms and key exchange method to be used for host
o Public key algorithms and key exchange method to be used for authentication. The existence of trusted host keys for different
host authentication. The existence of trusted host keys for public key algorithms also affects this choice.
different public key algorithms also affects this choice. o The authentication methods that are to be required by the server
o The authentication methods that are to be required by the for each user. The server's policy MAY require multiple
server for each user. The server's policy MAY require multiple authentication for some or all users. The required algorithms MAY
authentication for some or all users. The required algorithms depend on the location where the user is trying to log in from.
MAY depend on the location where the user is trying to log in
from.
o The operations that the user is allowed to perform using the o The operations that the user is allowed to perform using the
connection protocol. Some issues are related to security; for connection protocol. Some issues are related to security; for
example, the policy SHOULD NOT allow the server to start example, the policy SHOULD NOT allow the server to start sessions
sessions or run commands on the client machine, and MUST NOT or run commands on the client machine, and MUST NOT allow
allow connections to the authentication agent unless forwarding connections to the authentication agent unless forwarding such
such connections has been requested. Other issues, such as connections has been requested. Other issues, such as which
which TCP/IP ports can be forwarded and by whom, are clearly TCP/IP ports can be forwarded and by whom, are clearly issues of
issues of local policy. Many of these issues may involve local policy. Many of these issues may involve traversing or
traversing or bypassing firewalls, and are interrelated with bypassing firewalls, and are interrelated with the local security
the local security policy. policy.
3.4 Security Properties 3.4 Security Properties
The primary goal of the SSH protocol is improved security on the The primary goal of the SSH protocol is improved security on the
Internet. It attempts to do this in a way that is easy to deploy, Internet. It attempts to do this in a way that is easy to deploy,
even at the cost of absolute security. even at the cost of absolute security.
o All encryption, integrity, and public key algorithms used are o All encryption, integrity, and public key algorithms used are
well-known, well-established algorithms. well-known, well-established algorithms.
o All algorithms are used with cryptographically sound key sizes o All algorithms are used with cryptographically sound key sizes
that are believed to provide protection against even the that are believed to provide protection against even the strongest
strongest cryptanalytic attacks for decades. cryptanalytic attacks for decades.
o All algorithms are negotiated, and in case some algorithm is o All algorithms are negotiated, and in case some algorithm is
broken, it is easy to switch to some other algorithm without broken, it is easy to switch to some other algorithm without
modifying the base protocol. modifying the base protocol.
Specific concessions were made to make wide-spread fast deployment Specific concessions were made to make wide-spread fast deployment
easier. The particular case where this comes up is verifying that easier. The particular case where this comes up is verifying that
the server host key really belongs to the desired host; the the server host key really belongs to the desired host; the protocol
protocol allows the verification to be left out (but this is NOT allows the verification to be left out (but this is NOT RECOMMENDED).
RECOMMENDED). This is believed to significantly improve usability This is believed to significantly improve usability in the short
in the short term, until widespread Internet public key term, until widespread Internet public key infrastructures emerge.
infrastructures emerge.
3.5 Packet Size and Overhead 3.5 Packet Size and Overhead
Some readers will worry about the increase in packet size due to Some readers will worry about the increase in packet size due to new
new headers, padding, and MAC. The minimum packet size is in the headers, padding, and MAC. The minimum packet size is in the order
order of 28 bytes (depending on negotiated algorithms). The of 28 bytes (depending on negotiated algorithms). The increase is
increase is negligible for large packets, but very significant for negligible for large packets, but very significant for one-byte
one-byte packets (telnet-type sessions). There are, however, packets (telnet-type sessions). There are, however, several factors
several factors that make this a non-issue in almost all cases: that make this a non-issue in almost all cases:
o The minimum size of a TCP/IP header is 32 bytes. Thus, the o The minimum size of a TCP/IP header is 32 bytes. Thus, the
increase is actually from 33 to 51 bytes (roughly). increase is actually from 33 to 51 bytes (roughly).
o The minimum size of the data field of an Ethernet packet is 46 o The minimum size of the data field of an Ethernet packet is 46
bytes [RFC-894]. Thus, the increase is no more than 5 bytes. bytes [RFC-894]. Thus, the increase is no more than 5 bytes.
When Ethernet headers are considered, the increase is less than When Ethernet headers are considered, the increase is less than 10
10 percent. percent.
o The total fraction of telnet-type data in the Internet is o The total fraction of telnet-type data in the Internet is
negligible, even with increased packet sizes. negligible, even with increased packet sizes.
The only environment where the packet size increase is likely to The only environment where the packet size increase is likely to have
have a significant effect is PPP [RFC-1134] over slow modem lines a significant effect is PPP [RFC-1134] over slow modem lines (PPP
(PPP compresses the TCP/IP headers, emphasizing the increase in compresses the TCP/IP headers, emphasizing the increase in packet
packet size). However, with modern modems, the time needed to size). However, with modern modems, the time needed to transfer is
transfer is in the order of 2 milliseconds, which is a lot faster in the order of 2 milliseconds, which is a lot faster than people can
than people can type. type.
There are also issues related to the maximum packet size. To There are also issues related to the maximum packet size. To
minimize delays in screen updates, one does not want excessively minimize delays in screen updates, one does not want excessively
large packets for interactive sessions. The maximum packet size large packets for interactive sessions. The maximum packet size is
is negotiated separately for each channel. negotiated separately for each channel.
3.6 Localization and Character Set Support 3.6 Localization and Character Set Support
For the most part, the SSH protocols do not directly pass text For the most part, the SSH protocols do not directly pass text that
that would be displayed to the user. However, there are some would be displayed to the user. However, there are some places where
places where such data might be passed. When applicable, the such data might be passed. When applicable, the character set for
character set for the data MUST be explicitly specified. In most the data MUST be explicitly specified. In most places, ISO 10646
places, ISO 10646 with UTF-8 encoding is used [RFC-2279]. When with UTF-8 encoding is used [RFC-2279]. When applicable, a field is
applicable, a field is also provided for a language tag [RFC- also provided for a language tag [RFC-1766].
1766].
One big issue is the character set of the interactive session. One big issue is the character set of the interactive session. There
There is no clear solution, as different applications may display is no clear solution, as different applications may display data in
data in different formats. Different types of terminal emulation different formats. Different types of terminal emulation may also be
may also be employed in the client, and the character set to be employed in the client, and the character set to be used is
used is effectively determined by the terminal emulation. Thus, effectively determined by the terminal emulation. Thus, no place is
no place is provided for directly specifying the character set or provided for directly specifying the character set or encoding for
encoding for terminal session data. However, the terminal terminal session data. However, the terminal emulation type (e.g.
emulation type (e.g. "vt100") is transmitted to the remote site, "vt100") is transmitted to the remote site, and it implicitly
and it implicitly specifies the character set and encoding. specifies the character set and encoding. Applications typically use
Applications typically use the terminal type to determine what the terminal type to determine what character set they use, or the
character set they use, or the character set is determined using character set is determined using some external means. The terminal
some external means. The terminal emulation may also allow emulation may also allow configuring the default character set. In
configuring the default character set. In any case, the character any case, the character set for the terminal session is considered
set for the terminal session is considered primarily a client primarily a client local issue.
local issue.
Internal names used to identify algorithms or protocols are Internal names used to identify algorithms or protocols are normally
normally never displayed to users, and must be in US-ASCII. never displayed to users, and must be in US-ASCII.
The client and server user names are inherently constrained by The client and server user names are inherently constrained by what
what the server is prepared to accept. They might, however, the server is prepared to accept. They might, however, occasionally
occasionally be displayed in logs, reports, etc. They MUST be be displayed in logs, reports, etc. They MUST be encoded using ISO
encoded using ISO 10646 UTF-8, but other encodings may be required 10646 UTF-8, but other encodings may be required in some cases. It
in some cases. It is up to the server to decide how to map user is up to the server to decide how to map user names to accepted user
names to accepted user names. Straight bit-wise binary comparison names. Straight bit-wise binary comparison is RECOMMENDED.
is RECOMMENDED.
For localization purposes, the protocol attempts to minimize the For localization purposes, the protocol attempts to minimize the
number of textual messages transmitted. When present, such number of textual messages transmitted. When present, such messages
messages typically relate to errors, debugging information, or typically relate to errors, debugging information, or some externally
some externally configured data. For data that is normally configured data. For data that is normally displayed, it SHOULD be
displayed, it SHOULD be possible to fetch a localized message possible to fetch a localized message instead of the transmitted
instead of the transmitted message by using a numerical code. The message by using a numerical code. The remaining messages SHOULD be
remaining messages SHOULD be configurable. configurable.
4. Data Type Representations Used in the SSH Protocols 4. Data Type Representations Used in the SSH Protocols
byte byte
A byte represents an arbitrary 8-bit value (octet) [RFC-1700]. A byte represents an arbitrary 8-bit value (octet) [RFC-1700].
Fixed length data is sometimes represented as an array of Fixed length data is sometimes represented as an array of bytes,
bytes, written byte[n], where n is the number of bytes in the written byte[n], where n is the number of bytes in the array.
array.
boolean boolean
A boolean value is stored as a single byte. The value 0 A boolean value is stored as a single byte. The value 0
represents FALSE, and the value 1 represents TRUE. All non- represents FALSE, and the value 1 represents TRUE. All non-zero
zero values MUST be interpreted as TRUE; however, applications values MUST be interpreted as TRUE; however, applications MUST NOT
MUST NOT store values other than 0 and 1. store values other than 0 and 1.
uint32 uint32
Represents a 32-bit unsigned integer. Stored as four bytes in Represents a 32-bit unsigned integer. Stored as four bytes in the
the order of decreasing significance (network byte order). For order of decreasing significance (network byte order). For
example, the value 699921578 (0x29b7f4aa) is stored as 29 b7 f4 example, the value 699921578 (0x29b7f4aa) is stored as 29 b7 f4
aa. aa.
uint64 uint64
Represents a 64-bit unsigned integer. Stored as eight bytes in Represents a 64-bit unsigned integer. Stored as eight bytes in
the order of decreasing significance (network byte order). the order of decreasing significance (network byte order).
string string
Arbitrary length binary string. Strings are allowed to contain Arbitrary length binary string. Strings are allowed to contain
arbitrary binary data, including null characters and 8-bit arbitrary binary data, including null characters and 8-bit
characters. They are stored as a uint32 containing its length characters. They are stored as a uint32 containing its length
(number of bytes that follow) and zero (= empty string) or more (number of bytes that follow) and zero (= empty string) or more
bytes that are the value of the string. Terminating null bytes that are the value of the string. Terminating null
characters are not used. characters are not used.
Strings are also used to store text. In that case, US-ASCII is Strings are also used to store text. In that case, US-ASCII is
skipping to change at page 9, line 10 skipping to change at page 8, line 49
string string
Arbitrary length binary string. Strings are allowed to contain Arbitrary length binary string. Strings are allowed to contain
arbitrary binary data, including null characters and 8-bit arbitrary binary data, including null characters and 8-bit
characters. They are stored as a uint32 containing its length characters. They are stored as a uint32 containing its length
(number of bytes that follow) and zero (= empty string) or more (number of bytes that follow) and zero (= empty string) or more
bytes that are the value of the string. Terminating null bytes that are the value of the string. Terminating null
characters are not used. characters are not used.
Strings are also used to store text. In that case, US-ASCII is Strings are also used to store text. In that case, US-ASCII is
used for internal names, and ISO-10646 UTF-8 for text that used for internal names, and ISO-10646 UTF-8 for text that might
might be displayed to the user. The terminating null character be displayed to the user. The terminating null character SHOULD
SHOULD NOT normally be stored in the string. NOT normally be stored in the string.
For example, the US-ASCII string "testing" is represented as 00 00
00 07 t e s t i n g. The UTF8 mapping does not alter the encoding
of US-ASCII characters.
For example, the US-ASCII string "testing" is represented as 00
00 00 07 t e s t i n g. The UTF8 mapping does not alter the
encoding of US-ASCII characters.
mpint mpint
Represents multiple precision integers in two's complement Represents multiple precision integers in two's complement format,
format, stored as a string, 8 bits per byte, MSB first. stored as a string, 8 bits per byte, MSB first. Negative numbers
Negative numbers have the value 1 as the most significant bit have the value 1 as the most significant bit of the first byte of
of the first byte of the data partition. If the most the data partition. If the most significant bit would be set for
significant bit would be set for a positive number, the number a positive number, the number MUST be preceded by a zero byte.
MUST be preceded by a zero byte. Unnecessary leading bytes Unnecessary leading bytes with the value 0 or 255 MUST NOT be
with the value 0 or 255 MUST NOT be included. The value zero included. The value zero MUST be stored as a string with zero
MUST be stored as a string with zero bytes of data. bytes of data.
By convention, a number that is used in modular computations in By convention, a number that is used in modular computations in
Z_n SHOULD be represented in the range 0 &lt= x &lt n. Z_n SHOULD be represented in the range 0 &lt= x &lt n.
Examples: Examples:
value (hex) representation (hex) value (hex) representation (hex)
--------------------------------------------------------------- ---------------------------------------------------------------
0 00 00 00 00 0 00 00 00 00
9a378f9b2e332a7 00 00 00 08 09 a3 78 f9 b2 e3 32 a7 9a378f9b2e332a7 00 00 00 08 09 a3 78 f9 b2 e3 32 a7
80 00 00 00 02 00 80 80 00 00 00 02 00 80
-1234 00 00 00 02 ed cc -1234 00 00 00 02 ed cc
-deadbeef 00 00 00 05 ff 21 52 41 11 -deadbeef 00 00 00 05 ff 21 52 41 11
name-list name-list
A string containing a comma separated list of names. A name A string containing a comma separated list of names. A name list
list is represented as a uint32 containing its length (number is represented as a uint32 containing its length (number of bytes
of bytes that follow) followed by a comma-separated list of that follow) followed by a comma-separated list of zero or more
zero or more names. A name MUST be non-zero length, and it names. A name MUST be non-zero length, and it MUST NOT contain a
MUST NOT contain a comma (','). Context may impose additional comma (','). Context may impose additional restrictions on the
restrictions on the names; for example, the names in a list may names; for example, the names in a list may have to be valid
have to be valid algorithm identifier (see Algorithm Naming algorithm identifier (see Algorithm Naming below), or [RFC-1766]
below), or [RFC-1766] language tags. The order of the names in language tags. The order of the names in a list may or may not be
a list may or may not be significant, also depending on the significant, also depending on the context where the list is is
context where the list is is used. Terminating NUL characters used. Terminating NUL characters are not used, neither for the
are not used, neither for the individual names, nor for the individual names, nor for the list as a whole.
list as a whole.
Examples: Examples:
value representation (hex) value representation (hex)
--------------------------------------- ---------------------------------------
(), the empty list 00 00 00 00 (), the empty list 00 00 00 00
("zlib") 00 00 00 04 7a 6c 69 62 ("zlib") 00 00 00 04 7a 6c 69 62
("zlib", "none") 00 00 00 09 7a 6c 69 62 2c 6e 6f 6e 65 ("zlib", "none") 00 00 00 09 7a 6c 69 62 2c 6e 6f 6e 65
5. Algorithm Naming 5. Algorithm Naming
The SSH protocols refer to particular hash, encryption, integrity, The SSH protocols refer to particular hash, encryption, integrity,
compression, and key exchange algorithms or protocols by names. compression, and key exchange algorithms or protocols by names.
There are some standard algorithms that all implementations MUST There are some standard algorithms that all implementations MUST
support. There are also algorithms that are defined in the support. There are also algorithms that are defined in the protocol
protocol specification but are OPTIONAL. Furthermore, it is specification but are OPTIONAL. Furthermore, it is expected that
expected that some organizations will want to use their own some organizations will want to use their own algorithms.
algorithms.
In this protocol, all algorithm identifiers MUST be printable US- In this protocol, all algorithm identifiers MUST be printable US-
ASCII non-empty strings no longer than 64 characters. Names MUST ASCII non-empty strings no longer than 64 characters. Names MUST be
be case-sensitive. case-sensitive.
There are two formats for algorithm names: There are two formats for algorithm names:
o Names that do not contain an at-sign (@) are reserved to be o Names that do not contain an at-sign (@) are reserved to be
assigned by IETF consensus (RFCs). Examples include `3des- assigned by IETF consensus (RFCs). Examples include `3des-cbc',
cbc', `sha-1', `hmac-sha1', and `zlib' (the quotes are not part `sha-1', `hmac-sha1', and `zlib' (the quotes are not part of the
of the name). Names of this format MUST NOT be used without name). Names of this format MUST NOT be used without first
first registering them. Registered names MUST NOT contain an registering them. Registered names MUST NOT contain an at-sign
at-sign (@) or a comma (,). (@) or a comma (,).
o Anyone can define additional algorithms by using names in the o Anyone can define additional algorithms by using names in the
format name@domainname, e.g. "ourcipher-cbc@ssh.com". The format name@domainname, e.g. "ourcipher-cbc@ssh.com". The format
format of the part preceding the at sign is not specified; it of the part preceding the at sign is not specified; it MUST
MUST consist of US-ASCII characters except at-sign and comma. consist of US-ASCII characters except at-sign and comma. The part
The part following the at-sign MUST be a valid fully qualified following the at-sign MUST be a valid fully qualified internet
internet domain name [RFC-1034] controlled by the person or domain name [RFC-1034] controlled by the person or organization
organization defining the name. It is up to each domain how it defining the name. It is up to each domain how it manages its
manages its local namespace. local namespace.
6. Message Numbers 6. Message Numbers
SSH packets have message numbers in the range 1 to 255. These SSH packets have message numbers in the range 1 to 255. These
numbers have been allocated as follows: numbers have been allocated as follows:
Transport layer protocol: Transport layer protocol:
1 to 19 Transport layer generic (e.g. disconnect, ignore, debug, 1 to 19 Transport layer generic (e.g. disconnect, ignore, debug,
etc.) etc.)
skipping to change at page 11, line 48 skipping to change at page 11, line 34
Allocation of the following types of names in the SSH protocols is Allocation of the following types of names in the SSH protocols is
assigned by IETF consensus: assigned by IETF consensus:
o encryption algorithm names, o encryption algorithm names,
o MAC algorithm names, o MAC algorithm names,
o public key algorithm names (public key algorithm also implies o public key algorithm names (public key algorithm also implies
encoding and signature/encryption capability), encoding and signature/encryption capability),
o key exchange method names, and o key exchange method names, and
o protocol (service) names. o protocol (service) names.
These names MUST be printable US-ASCII strings, and MUST NOT These names MUST be printable US-ASCII strings, and MUST NOT contain
contain the characters at-sign ('@'), comma (','), or whitespace the characters at-sign ('@'), comma (','), or whitespace or control
or control characters (ASCII codes 32 or less). Names are case- characters (ASCII codes 32 or less). Names are case-sensitive, and
sensitive, and MUST NOT be longer than 64 characters. MUST NOT be longer than 64 characters.
Names with the at-sign ('@') in them are allocated by the owner of Names with the at-sign ('@') in them are allocated by the owner of
DNS name after the at-sign (hierarchical allocation in [RFC- DNS name after the at-sign (hierarchical allocation in [RFC-2343]),
2343]), otherwise the same restrictions as above. otherwise the same restrictions as above.
Each category of names listed above has a separate namespace. Each category of names listed above has a separate namespace.
However, using the same name in multiple categories SHOULD be However, using the same name in multiple categories SHOULD be avoided
avoided to minimize confusion. to minimize confusion.
Message numbers (see Section Message Numbers (Section 6)) in the Message numbers (see Section Message Numbers (Section 6)) in the
range of 0..191 should be allocated via IETF consensus; message range of 0..191 should be allocated via IETF consensus; message
numbers in the 192..255 range (the "Local extensions" set) are numbers in the 192..255 range (the "Local extensions" set) are
reserved for private use. reserved for private use.
8. Security Considerations 8. Security Considerations
Special care should be taken to ensure that all of the random Special care should be taken to ensure that all of the random numbers
numbers are of good quality. The random numbers SHOULD be are of good quality. The random numbers SHOULD be produced with safe
produced with safe mechanisms discussed in [RFC-1750]. mechanisms discussed in [RFC-1750].
When displaying text, such as error or debug messages to the user, When displaying text, such as error or debug messages to the user,
the client software SHOULD replace any control characters (except the client software SHOULD replace any control characters (except
tab, carriage return and newline) with safe sequences to avoid tab, carriage return and newline) with safe sequences to avoid
attacks by sending terminal control characters. attacks by sending terminal control characters.
Not using MAC or encryption SHOULD be avoided. The user Not using MAC or encryption SHOULD be avoided. The user
authentication protocol is subject to man-in-the-middle attacks if authentication protocol is subject to man-in-the-middle attacks if
the encryption is disabled. The SSH protocol does not protect the encryption is disabled. The SSH protocol does not protect
against message alteration if no MAC is used. against message alteration if no MAC is used.
9. Trademark Issues 9. Trademark Issues
As of this writing, SSH Communications Security Oy claims ssh as As of this writing, SSH Communications Security Oy claims ssh as its
its trademark. As with all IPR claims the IETF takes no position trademark. As with all IPR claims the IETF takes no position
regarding the validity or scope of this trademark claim. regarding the validity or scope of this trademark claim.
10. Additional Information 10. Additional Information
The current document editor is: Darren.Moffat@Sun.COM. Comments The current document editor is: Darren.Moffat@Sun.COM. Comments on
on this internet draft should be sent to the IETF SECSH working this internet draft should be sent to the IETF SECSH working group,
group, details at: http://ietf.org/html.charters/secsh- details at: http://ietf.org/html.charters/secsh-charter.html
charter.html
References References
[FIPS-186] Federal Information Processing Standards [FIPS-186] Federal Information Processing Standards Publication,
Publication, ., "FIPS PUB 186, Digital Signature ., "FIPS PUB 186, Digital Signature Standard", May
Standard", May 1994. 1994.
[RFC0854] Postel, J. and J. Reynolds, "Telnet Protocol [RFC0854] Postel, J. and J. Reynolds, "Telnet Protocol
Specification", STD 8, RFC 854, May 1983. Specification", STD 8, RFC 854, May 1983.
[RFC0894] Hornig, C., "Standard for the transmission of IP [RFC0894] Hornig, C., "Standard for the transmission of IP
datagrams over Ethernet networks", STD 41, RFC datagrams over Ethernet networks", STD 41, RFC 894,
894, Apr 1984. Apr 1984.
[RFC1034] Mockapetris, P., "Domain names - concepts and [RFC1034] Mockapetris, P., "Domain names - concepts and
facilities", STD 13, RFC 1034, Nov 1987. facilities", STD 13, RFC 1034, Nov 1987.
[RFC1134] Perkins, D., "Point-to-Point Protocol: A proposal [RFC1134] Perkins, D., "Point-to-Point Protocol: A proposal for
for multi-protocol transmission of datagrams over multi-protocol transmission of datagrams over Point-
Point-to-Point links", RFC 1134, Nov 1989. to-Point links", RFC 1134, Nov 1989.
[RFC1282] Kantor, B., "BSD Rlogin", RFC 1282, December 1991. [RFC1282] Kantor, B., "BSD Rlogin", RFC 1282, December 1991.
[RFC1700] Reynolds, J. and J. Postel, "Assigned Numbers", [RFC1700] Reynolds, J. and J. Postel, "Assigned Numbers", STD
STD 2, RFC 1700, October 1994. 2, RFC 1700, October 1994.
[RFC1750] Eastlake, D., Crocker, S. and J. Schiller, [RFC1750] Eastlake, D., Crocker, S. and J. Schiller,
"Randomness Recommendations for Security", RFC "Randomness Recommendations for Security", RFC 1750,
1750, December 1994. December 1994.
[RFC1766] Alvestrand, H., "Tags for the Identification of [RFC1766] Alvestrand, H., "Tags for the Identification of
Languages", RFC 1766, March 1995. Languages", RFC 1766, March 1995.
[RFC2119] Bradner, S., "Key words for use in RFCs to [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Indicate Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119, March 1997.
March 1997.
[RFC2279] Yergeau, F., "UTF-8, a transformation format of [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO
ISO 10646", RFC 2279, January 1998. 10646", RFC 2279, January 1998.
[RFC2434] Narten, T. and H. Alvestrand, "Guidelines for [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing
Writing an IANA Considerations Section in RFCs", an IANA Considerations Section in RFCs", BCP 26, RFC
BCP 26, RFC 2434, October 1998. 2434, October 1998.
[SSH-ARCH] Ylonen, T., "SSH Protocol Architecture", I-D [SSH-ARCH] Ylonen, T., "SSH Protocol Architecture", I-D draft-
draft-ietf-architecture-09.txt, July 2001. ietf-architecture-09.txt, July 2001.
[SSH-TRANS] Ylonen, T., "SSH Transport Layer Protocol", I-D [SSH-TRANS] Ylonen, T., "SSH Transport Layer Protocol", I-D
draft-ietf-transport-11.txt, July 2001. draft-ietf-transport-11.txt, July 2001.
[SSH-USERAUTH] Ylonen, T., "SSH Authentication Protocol", I-D [SSH-USERAUTH] Ylonen, T., "SSH Authentication Protocol", I-D draft-
draft-ietf-userauth-11.txt, July 2001. ietf-userauth-11.txt, July 2001.
[SSH-CONNECT] Ylonen, T., "SSH Connection Protocol", I-D draft- [SSH-CONNECT] Ylonen, T., "SSH Connection Protocol", I-D draft-
ietf-connect-11.txt, July 2001. ietf-connect-11.txt, July 2001.
Authors' Addresses Authors' Addresses
Tatu Ylonen Tatu Ylonen
SSH Communications Security Corp SSH Communications Security Corp
Fredrikinkatu 42 Fredrikinkatu 42
HELSINKI FIN-00100 HELSINKI FIN-00100
skipping to change at page 15, line 9 skipping to change at page 15, line 9
Fredrikinkatu 42 Fredrikinkatu 42
HELSINKI FIN-00100 HELSINKI FIN-00100
Finland Finland
EMail: sjl@ssh.com EMail: sjl@ssh.com
Full Copyright Statement Full Copyright Statement
Copyright (C) The Internet Society (2001). All Rights Reserved. Copyright (C) The Internet Society (2001). All Rights Reserved.
This document and translations of it may be copied and furnished This document and translations of it may be copied and furnished to
to others, and derivative works that comment on or otherwise others, and derivative works that comment on or otherwise explain it
explain it or assist in its implementation may be prepared, or assist in its implementation may be prepared, copied, published
copied, published and distributed, in whole or in part, without and distributed, in whole or in part, without restriction of any
restriction of any kind, provided that the above copyright notice kind, provided that the above copyright notice and this paragraph are
and this paragraph are included on all such copies and derivative included on all such copies and derivative works. However, this
works. However, this document itself may not be modified in any document itself may not be modified in any way, such as by removing
way, such as by removing the copyright notice or references to the the copyright notice or references to the Internet Society or other
Internet Society or other Internet organizations, except as needed Internet organizations, except as needed for the purpose of
for the purpose of developing Internet standards in which case the developing Internet standards in which case the procedures for
procedures for copyrights defined in the Internet Standards copyrights defined in the Internet Standards process must be
process must be followed, or as required to translate it into followed, or as required to translate it into languages other than
languages other than English. English.
The limited permissions granted above are perpetual and will not The limited permissions granted above are perpetual and will not be
be revoked by the Internet Society or its successors or assigns. revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on This document and the information contained herein is provided on an
an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement Acknowledgement
Funding for the RFC Editor function is currently provided by the Funding for the RFC Editor function is currently provided by the
Internet Society. Internet Society.
 End of changes. 

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