<t>The Peer Distributed Transfer Protocol (PDTP) provides a method of transferring files using peers to aid in distribution of content, similar to <eref target="http://www.bitconjurer.org/BitTorrent/">BitTorrent</eref>. PDTP servers export a dynamically changing directory heirarchy, making it somewhat more like HTTP or FTP, and support a number of other features such as metadata rich directory listings and support for file integrity validation through the use of DSS signatures, and large networks designed to replace FTP mirroring.</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<section title="Overview">
<t>
This document describes version 1 of PDTP. Version 1 currently only allows
for operation on IPv4 networks. IPv6 support has been planned from the
start, and may or may not make it into version 1 depending on the
additional design complexity of facilitating transfers between
IPv4 and IPv6 hosts.
</t>
<t>
PDTP is actually a suite of four different protocol formats used by different components of the system:
<list style="symbols">
<t><xref target="client-server-protocol">The client/server protocol</xref>, which is used by clients to query the contents of a file repository and manages the file transfer process. No file data is transferred using this protocol directly. The PDTP client/server protocol's standard port number is XXXX (pending IANA assignment).</t>
<t><xref target="hub-protocol">The hub protocol</xref>, used by PDTP servers to talk to PDTP hubs in order to query file repository contents, network mappings, and various transfer regulation functions. The PDTP hub protocol's standard port number is XXXX (pending IANA assignment).</t>
<t><xref target="piece-transfer-protocol">The piece transfer protocol</xref>, or "peer protocol", used by clients
to transfer pieces to/from each other or from PDTP hubs. The PDTP piece transfer protocol's standard port number is XXXX (pending IANA assignment).</t>
<t><xref target="proxy-protocol">The proxy protocol</xref>, used by clients behind firewalls to access PDTP servers. The PDTP proxy protocol's standard port number is XXXX (pending IANA assignment).</t>
</list>
</t>
</section>
<section title="Integer abbreviations">
<figure>
<preamble>The following abbreviations will be used to describe various integers:</preamble>
<artwork>
uint8 Big-endian 8-bit unsigned integer
uint16 Big-endian 16-bit unsigned integer
uint32 Big-endian 32-bit unsigned integer
uint64 Big-endian 64-bit unsigned integer
</artwork>
</figure>
</section>
<section title="Handshaking">
<figure>
<preamble>Handshaking occurs when a PDTP client connects to a PDTP server:</preamble>
<artwork>
Client sends:
uint32 Magic number (0x50445450, "PDTP")
Server responds:
uint32 Magic number (0x50445450, "PDTP")
uint16 Number of available protocol versions
uint16 Minimum protocol version
uint16 Next available protocol version [Optional]
...
uint16 Maximum available protocol version [Optional]
</artwork>
</figure>
<figure>
<preamble>- OR -</preamble>
<artwork>
Server rebonds:
uint16 Magic number (0x5244526E, "REDR");
uint16 String length
string Name of destination host
uint16 Host port
</artwork>
</figure>
<figure>
<preamble>- OR -</preamble>
<artwork>
Server responds:
uint16 Magic number (0x41555448, "AUTH")
... Authorization process (See Appendix C)
uint32 Magic number (0x50445450, "PDTP")
uint16 Minimum protocol version
uint16 Maximum protocol version
</artwork>
</figure>
<t>
The 'PDTP' response indicates the server has accepted the connection. An
'AUTH' response may be issued prior to a 'PDTP' response if the server
requires authorization to login.
</t>
<t>
If the server wishes to redirect the client to a different named server,
it can send a REDR response, followed by the hostname, IPv4 address in
dotted quad format, or IPv6 address of the remote server, and the port
number to redirect to.
</t>
<t>
The server and client arbitrate which protocol version to use by having
the client pick a version number from an ordered list. The list consists
of a 16-bit value indicating how many protocol versions are supported,
and an ordered list of 16-bit integers comprising the specific protocol
revisions supported.
</t>
<t>
Currently the only available protocol version is 1. Therefore this list
should consist only of two 16-bit integers, each set to 1, the first
to indicate that only one protocol version is available and the
second to indicate that version 1 is the only supported version.
</t>
<figure>
<artwork>
Client responds:
uint16 Protocol version
</artwork>
</figure>
<t>
The client then selects which protocol version it would like to use. If
the client selects a protocol version which wasn't in the list, the
client has violated the protocol and the server should terminate the
connection.
</t>
</section>
<section title="Transaction format">
<t>
All communication following the handshake takes the form of transactions.
Transactions may originate from the server as well, in which case the
serial number of the response should be set to zero. All outstanding
transactions from a client should have a unique serial number so the
client can determine which transaction a particular response is
associated with.
</t>
<figure>
<artwork>
Client or server sends: [Required]
uint32 Transaction length
uint32 Transaction serial number
uint16 Transaction ID
uint16 Object count
</artwork>
</figure>
<t>
Each transaction begins with a length field, which is the length of the entire
remainder of the transaction in bytes (i.e. the 4 bytes for the transaction
length value itself are not included) Thus the smallest possible value for
the transaction length is 8 bytes: 4 bytes for the serial number, 2 for the
transaction ID, and two for the object count. The entire transaction would
be 12 bytes, counting 4 extra bytes for the transaction length value.
</t>
<t>
Every transaction has a type, which is specified in the "Transaction ID" field.
This transaction ID actually consists of a 1-bit boolean value which indicates
whether the transaction is 0: a command or 1: a reply. The remaining 15 bits
in the field comprise a big endian integer identifier for the transaction.
Specific types of transactions will be enumerated below. This value is set to
zero to indicate an error when responding to a client's transaction. Otherwise,
all server responses will have the same ID and serial number as the original
client's transaction.
</t>
<figure>
<preamble>
Transactions may or may not have a number of parameters known as "objects".
The number of objects contained within a transaction are stored in the
"Object count" field of the transaction header. The length of all the objects
and the object headers is counted in the "Transaction length" value.
Objects take the following format:
</preamble>
<artwork>
uint32 Object length
uint16 Object ID
string Object payload of specified length
</artwork>
</figure>
<t>
What follows is a description of all transactions and associated objects used
by the various protocols in the PDTP suite. All objects are mandatory unless
stated otherwise. Objects should be arranged in order of their respective
numerical object identifiers from least to greatest. This document arranges
its object lists in such a manner; transactions should be constructed in the
same order presented in this document in order to be valid.
<t>This document describes HMAC, a mechanism for message authentication using cryptographic hash functions. HMAC can be used with any iterative cryptographic hash function, e.g., MD5, SHA-1, in combination with a secret shared key. The cryptographic strength of HMAC depends on the properties of the underlying hash function.</t></abstract></front>
<t>ISO/IEC 10646-1 defines a multi-octet character set called the Universal Character Set (UCS) which encompasses most of the world's writing systems. Multi-octet characters, however, are not compatible with many current applications and protocols, and this has led to the development of a few so-called UCS transformation formats (UTF), each with different characteristics. UTF-8, the object of this memo, has the characteristic of preserving the full US-ASCII range, providing compatibility with file systems, parsers and other software that rely on US-ASCII values but are transparent to other values. This memo updates and replaces RFC 2044, in particular addressing the question of versions of the relevant standards.</t></abstract></front>
<t>This memo profiles the X.509 v3 certificate and X.509 v2 CRL for use in the Internet. An overview of the approach and model are provided as an introduction. The .509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms (e.g., IP addresses). Standard certificate extensions are described and one new Internet-specific extension is defined. A required set of certificate extensions is specified. The X.509 v2 CRL format is described and a required extension set is defined as well. An algorithm for X.509 certificate path validation is described. Supplemental information is provided describing the format of public keys and digital signatures in X.509 certificates for common Internet public key encryption algorithms (i.e., RSA, DSA, and Diffie-Hellman). ASN.1 modules and examples are provided in the appendices.</t>
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.</t>
<t>Please send comments on this document to the ietf-pkix@imc.org mail list.</t></abstract></front>