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

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