chiark / gitweb /
Expunge CVS cruft.
[tripe] / doc / protocol.ms
CommitLineData
a50a1fa9 1.\" -*-nroff-*-
2.so tmac.rfc
3.
4.TL "Straylight/Edgeware" "Mark Wooding"
5.TL "Request for Comments: XXXX" "Straylight/Edgeware"
620078f9 6.TL "" "11 April 2003"
a50a1fa9 7
8
620078f9 9.TT XXXX Wooding "April 2003" \
a50a1fa9 10 "TrIPE: The Trivial IP Encryption Protocol"
11
620078f9 12.T0 "Status of this Memo"
a50a1fa9 13
14This memo defines an Experimental Protocol for the Internet community.
15This memo does not specify an Internet standard of any kind. Discussion
16and suggestions for improvement are requested. Distribution of this
17memo is unlimited.
18
19.T0 "Introduction"
20
21TrIPE is a simple protocol which enables IP datagrams (or other data) to
22be exchanged between a pair of hosts over a hostile network while
23maintaining the properties of secrecy and authenticity; i.e., that the
24content of the datagrams cannot be determined by eavesdroppers on the
25network, and that either endpoint can determine whether a datagram
26received is an unaltered copy of one that was sent by the other.
27
28While similar services are provided by other protocols (e.g., [IPSEC]),
29they tend to be very complicated and difficult to analyze (see, for
30example, [IPSEC-EVAL]). By contrast, TrIPE attempts to get away with
31doing as little as possible. There are no negotiations to decide which
32ciphers are to be used: these things are defined in the protocol
33specification. There is only one key-exchange algorithm defined.
34
35In addition to making analysis easier, a simpler protocol also helps
36reduce the complexity of implementations: this makes implementation
37errors less likely, and makes auditing an implementation for security
38holes a more realistic proposition.
39
40.T0 "Interpretation"
41
42The key words `MUST', `MUST NOT', `REQUIRED', `SHALL', `SHALL NOT',
43`SHOULD', `SHOULD NOT', `RECOMMENDED', `MAY', and `OPTIONAL' in this
44document are to be interpreted as described in [REQ].
45
46.T0 "Protocol overview"
47
48The TrIPE protocol sets up a secure point-to-point channel between two
49peer hosts, through which IP datagrams may be passed securely.
50
51All TrIPE messages are sent as UDP datagrams. No UDP port has been
52registered for TrIPE yet.
53
54When a pair of peer hosts are made aware of each other, they begin a key
55negotiation, using an authenticated Diffie-Hellman key exchange
56protocol. This enables them to agree a
57.I keyset :
58a collection of short-term symmetric keys and other parameters (such as
59sequence numbering spaces). Keysets expire after a fixed amount of
60time, or after they have been used to encrypt a given amount of data,
61whichever happens first. Before the current keyset expires, a new key
62negotation is started, so that the peers can seamlessly start using the
63new keys before the old ones become invalid.
64
65.T1 "Keysets"
66
67A
68.I keyset
69is a collection of symmetric keys and associated state information. The
70items required, and the symbolic names by which they are described in
71this document are:
72
73.UL
74.LI
75.B "Incoming and outgoing encryption keys"
76.K c (
77and
78.K' c "" )
620078f9 79.LE
a50a1fa9 80
81.T1 "Key exchange"
82
83
84
620078f9 85.T0 "Data representation and notation"
86.de SD
87.LS
88..
89.de SM
90.br
91.B "\\$1" \c
92.if !'\\$2'.' \ \\$2\c
93.if !'\\$3'' \{\
94:
95.I "\\$3" \c
96.\}
97..
98.de SR
99.br
100.B "\\$1" \c
101.if !'\\$2'.' \ \\$2\c
102.if !'\\$3'' : \\$3
103..
104.de ST
105.SM "\\$1" "\\$2" "\\$3"
106.LS 2n
107..
108
109We need to deal with a number of data items during the protocol.
110.if t \{\
111Object names are given in
112.I italics .
113.\}
114A plain name indicates `our' value; a `primed' name (e.g.,
115.I alpha' )
116indicates the peer's corresponding value. If a compound data item name
117is primed, toggle the primed-ness of the components.
118
119Data objects are given types which determine their representation in
120protocol messages. Type names are given in
121.B UPPERCASE .
122
123.T1 "Atomic data items"
a50a1fa9 124
125.DL
620078f9 126.DI OCTET
127A single octet, representing a value between 0 and 255.
128
129.DI U16
130A pair of octets, representing a value between 0 and 65535. The more
131significant octet appears first.
132
133.DI U32
134Four octets, representing a value between 0 and 4294967295. More
135significant octets appear first.
136
137.DI "STRING \fIn\fR\fB"
138A string of
139.I n
140octets. A
141.B STRING
142does not have a numeric value.
143
144.DI MP
145A nonnegative multiprecision integer. Let
146.I n
147be the integer to be represented, and let
148.I z
149be the number of octets required to represent
150.I n
151in base-256 format with no leading zeroes; i.e., if
152.I n
153= 0, then
154.I z
155= 0; otherwise
156.I z
157is the unique integer such that
158.ie t 256\*(^(\fIz\fP\-1\*(^) \(<= \fIn\fP < 256\*(^(\fIz\fP\*(^).
159.el 256^{z-1} <= n < 256^z.
160The encoding for
161.I n
162then consists of two octets encoding
163.I z
164as a
165.B U16
166followed by the
167.I z
168octets which are the base-256 digits of
169.I n ,
170most significant first.
171.LE
172
173.T1 "Structured data items"
174
175A
176.I structure
177is a compound object which is simply the concatenation of a number of
178its component objects. Structures are used directly as messages, and
179indirectly as things to be hashed or encrypted.
180
181The notation
182
183.SD
184. ST STRUCT . kx-cookie
185. SR OCTET . 0x11
186. SM MP . c
187. SM STRING 20 hash
188. LE
189.LE
190
191indicates that
192.I msg-cookie
193consists of the two items
194
195
196
197
198.SD
199. ST STRUCT . kx-prechal
200. SR OCTET . 0x10
201. SM MP . c
202. LE
203.LE
a50a1fa9 204
620078f9 205.SD
206. ST STRUCT . kx-cookie
207. SR OCTET . 0x11
208. SM MP . c
209. ST HASH .
210. SR TEXT . "tripe-cookie"
211. SM MP . c'
212. LE
213. LE
a50a1fa9 214.LE
215
216.T0 "Security considerations"
217
218This memo describes a cryptographic protocol for ensuring secrecy and
219integrity of communications between network hosts. From this point of
220view, it is entirely about security.
221
222Before deploying TrIPE on their own systems, administrators ought to
223satisfy themselves that the cryptographic algorithms used are
224sufficiently strong for their purposes, and that their implementation of
620078f9 225the TrIPE software has come from a trustworthy source. They should also
a50a1fa9 226ensure that they have adequate procedures in place for transporting
227public keys without a risk of them being modified by adversaries.
228
229.T0 "References"
230
231.BS IPSEC-EVAL
232.BR IPSEC
233Kent, S., Atkinson, R., `Security Architecture for the Internet
234Protocol', RFC 2401, November 1998.
235
236.BR IPSEC-EVAL
237Ferguson, N., Schneier, B., `A Cryptographic Evaluation of IPsec',
238December 1999.
239
240.BR REQ
241Bradner, S., `Key words for use in RFCs to Indicate Requirement Levels',
242BCP 14, RFC 2119, March 1997.
243.BE