corrected copyright notices
[gnutls.git] / doc / protocol / draft-benaloh-pct-00.txt
blob9d6dd35110c6f6526b18630a611f2ec88dea79f9
1 Internet Draft                                      Josh Benaloh
2                                                     Butler Lampson
3                                                     Daniel Simon
4                                                     Terence Spies
5                                                     Bennet Yee
6                                                     Microsoft Corp.
7                                                     October 1995
9             The Private Communication Technology Protocol
10                      <draft-benaloh-pct-00.txt>
12 1. Status of this Memo
14 This document is an Internet-Draft.  Internet-Drafts are working
15 documents of the Internet Engineering Task Force (IETF), its areas,
16 and its working groups. Note that other groups may also distribute
17 working documents as Internet-Drafts.
19 Internet-Drafts are draft documents valid for a maximum of six months
20 and may be updated, replaced, or obsoleted by other documents at any
21 time. It is inappropriate to use Internet-Drafts as reference
22 material or to cite them other than as "work in progress".
24 To learn the current status of any Internet-Draft, please check the
25 "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
26 Directories on ds.internic.net (US East Coast), nic.nordu.net
27 (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
29 This Internet-Draft expires 27 March 1996.
32 2. Abstract
34 This document specifies Version 1 of the Private Communication
35 Technology (PCT) protocol, a security protocol that provides privacy
36 over the Internet.  Like SSL (see [1]), the protocol is intended to
37 prevent eavesdropping on communications in client/server applications,
38 with servers always being authenticated and clients being
39 authenticated at the server's option.  However, this protocol corrects
40 or improves on several weaknesses of SSL.
43 3. Introduction
45 The Private Communication Technology (PCT) Protocol is designed to
46 provide privacy between two communicating applications (a client and a
47 server), and to authenticate the server and (optionally) the client.
48 PCT assumes a reliable transport protocol (e.g. TCP) for data
49 transmission and reception.
51 The PCT Protocol is application protocol-independent.  A "higher
52 level" application protocol (e.g. HTTP, FTP, TELNET, etc.) can layer
53 on top of the PCT Protocol transparently.  The PCT Protocol begins
54 with a handshake phase that negotiates an encryption algorithm and
55 (symmetric) session key as well as authenticating a server to the
58 Benaloh/Lampson/Simon/Spies/Yee                                 [Page 1]
59 \fInternet Draft              The PCT Protocol               November 1995
62 client (and, optionally, vice versa), based on certified asymmetric
63 public keys. Once transmission of application protocol data begins,
64 all data is encrypted using the session key negotiated during the
65 handshake.
67 It should be noted that the PCT protocol does not specify any details
68 about verification of certificates with respect to certification
69 authorities, revocation lists, and so on.  Rather, it is assumed that
70 protocol implementations have access to a "black box" which is capable
71 of ruling on the validity of received certificates in a manner
72 satisfactory to the implementation's user.  Such a ruling may, for
73 instance, involve remote consultation with a trusted service, or even
74 with the actual user through a text or graphic interface.
76 In addition to encryption and authentication, the PCT protocol
77 verifies the integrity of messages using a hash function-based message
78 authentication code (MAC).
80 The PCT protocol's record format is compatible with that of SSL (see
81 [1]).  Servers implementing both protocols can distinguish between PCT
82 and SSL clients because the version number field occurs in the same
83 position in the first handshake message in both protocols.  In PCT,
84 the most significant bit of the protocol version number is set to one.
86 The PCT protocol differs from SSL chiefly in the design of its
87 handshake phase, which differs from SSL's in a number of respects:
89 - The round and message structures are considerably shorter and
90   simpler: a reconnected session without client authentication
91   requires only one message in each direction, and no other type of
92   connection requires more than two messages in each direction.
94 - Negotiation for the choice of cryptographic algorithms and formats
95   to use in a session has been extended to cover more protocol
96   characteristics and to allow different characteristics to be
97   negotiated independently.  The PCT client and server negotiate, in
98   addition to a cipher type and server certificate type, a hash
99   function type and a key exchange type.  If client authentication is
100   requested, a client certificate type and signature type are also 
101   negotiated.
103 - Message authentication has been revamped so that it now uses
104   different keys from the encryption keys.  Thus, message
105   authentication keys may be much longer (and message authentication
106   therefore much more secure) than the encryption keys, which may be
107   weak or even non-existent.  
109 - A security hole in SSL's client authentication has been repaired;
110   the PCT client's authentication challenge response now depends on
111   the type of cipher negotiated for the session.  SSL's client
112   authentication is independent of the cipher strength used in the
113   session and also of whether the authentication is being performed
116 Benaloh/Lampson/Simon/Spies/Yee                                 [Page 2]
117 \fInternet Draft              The PCT Protocol               November 1995
120   for a reconnection of an old session or for a new one.  As a result,
121   a "man-in-the-middle" attacker who has obtained the session key for
122   a session using weak cryptography can use this broken session to
123   authenticate as the client in a session using strong cryptography.
124   If, for example, the server normally restricts certain sensitive
125   functions to high-security sessions, then this security hole allows 
126   intruders to circumvent the restriction.
128 - A "verify-prelude" field has been added to the handshake phase,
129   with which the client and server can check that the cipher type
130   (and other) negotiations carried out in the clear have not been
131   tampered with.  (SSL version 3 uses a similar mechanism, but its
132   complete version 2 compatibility negates its security function,
133   by allowing adversaries simply to alter version numbers as well
134   as cipher types.)
138 4. PCT Record Protocol Specification
140 4.1 PCT Record Header Format
142 For compatibility with SSL, the PCT protocol uses the same basic
143 record format as SSL.  In PCT, all data sent is encapsulated in a
144 record, an object which is composed of a header and some non-zero
145 amount of data.  Each record header contains a two- or three-byte
146 length code.  If the most significant bit is set in the first byte of
147 the record length code then the record has no padding and the total
148 header length is two bytes; otherwise the record has padding and the
149 total header length is three bytes. The record header is transmitted
150 before the data portion of the record.
152 Note that in the long header case (three bytes total), the second most
153 significant bit in the first byte has special meaning.  When zero, the
154 record being sent is a data record.  When one, the record being sent
155 is a security escape, and the first byte of the record is an
156 ESCAPE_TYPE_CODE that indicates the type of escape.  (Currently, the
157 two examples of security escapes are the "out-of-band data" escape and
158 the "redo handshake" escape.)  In either case, the length code
159 describes how much data is in the record as transmitted; this may be
160 greater than the amount of data after decryption, particularly if
161 padding was used.
163 The record length code does not include the number of bytes consumed
164 by the record header (two or three). For the two-byte header, the
165 record length is computed by (using a "C"-like notation):
167 RECORD_LENGTH = ((byte[0] & 0x7f) << 8)) | byte[1],
169 where byte[0] represents the first byte received and byte[1] the
170 second byte received. When the three-byte header is used, the record
171 length is computed as follows (using a "C"-like notation):
174 Benaloh/Lampson/Simon/Spies/Yee                                 [Page 3]
175 \fInternet Draft              The PCT Protocol               November 1995
178 RECORD_LENGTH = ((byte[0] & 0x3f) << 8)) | byte[1];
179 IS_ESCAPE = (byte[0] & 0x40) != 0;
180 PADDING_LENGTH = byte[2];
182 The record header defines a value called PADDING_LENGTH. The
183 PADDING_LENGTH value specifies how many bytes of data were appended
184 to the original record by the sender. The padding data is used to
185 make the record length a multiple of the block cipher's block size
186 when a block cipher is used for encryption.
188 The sender of a "padded" record appends the padding data to the end of
189 its normal data and then encrypts the total amount (which is now a
190 multiple of the block cipher's block size).  The actual value of the
191 padding data is unimportant, but the encrypted form of it must be
192 transmitted for the receiver to decrypt the record properly.  Once the
193 total amount being transmitted is known the header can be properly
194 constructed with the PADDING value set appropriately.
196 The receiver of a padded record uses the PADDING_LENGTH value from the
197 header when determining the length of the ACTUAL_DATA in the data
198 record (see section 4.2).
201 4.2 PCT Record Data Format
203 The format of the data portion of an encrypted PCT record is slightly
204 different from that of SSL.  However, not only is the record header
205 format identical in both protocols, but the first handshake message
206 sent in each direction is also sent in the clear, and contains a
207 version number field in the same location in both protocols.  (In PCT
208 protocol handshake messages, the most significant bit of this field is
209 1.)  Hence, PCT is still compatible with SSL, in the sense that PCT
210 handshake messages can be recognized and distinguished from SSL
211 handshake messages by examination of the version number.
213 The PCT record is composed of two fields (transmitted and received in
214 the order shown):
216 ENCRYPTED_DATA[N+PADDING_LENGTH]
217 MAC_DATA[MAC_LENGTH]
219 The ENCRYPTED_DATA field contains an encryption of the concatenation
220 of ACTUAL_DATA (the N bytes of actual data being transmitted) and
221 PADDING_DATA (the use of which is explained below).  The MAC_DATA
222 field contains the "Message Authentication Code" (MAC).
224 PCT handshake records are sent in the clear, and no MAC is used.
225 Consequently PADDING_LENGTH will be zero and MAC_LENGTH will be zero.
226 For non-handshake data records, the sender appends a PADDING_DATA
227 field containing arbitrary data, so that N + PADDING_LENGTH is the
228 appropriate length for the cipher being used to encrypt the data.  (In
229 the case where a block cipher is used, PADDING_LENGTH must be the
232 Benaloh/Lampson/Simon/Spies/Yee                                 [Page 4]
233 \fInternet Draft              The PCT Protocol               November 1995
236 minimum value such that the length of the concatenation of ACTUAL_DATA
237 and PADDING_DATA is an exact multiple of the cipher's block size.
238 Otherwise, PADDING_LENGTH is zero.)
240 MAC_DATA is computed as follows:
242 MAC_DATA := Hash( MAC_KEY, Hash( ACTUAL_DATA, PADDING_DATA, 
243 SEQUENCE_NUMBER ) )
245 If the client is sending the record, then the MAC_KEY is the
246 CLIENT_MAC_KEY; if the server is sending the record, then the MAC_KEY
247 is the SERVER_MAC_KEY.  (The details of the derivation of these keys
248 are given in section 5.3.1.)  The selection of the hash function used
249 to compute MAC_DATA is discussed in sections 5.2.1 and 5.2.2.  The
250 parameters of the inner invocation of the hash function are input into
251 the hash function in the order shown above, with SEQUENCE_NUMBER
252 represented in network byte order or "big endian" order.  If the
253 length of MAC_KEY is not an exact multiple of eight bits, then MAC_KEY
254 is considered, for the purposes of MAC computation, to have (fewer
255 than eight) zero bits appended to it, to create a string of an
256 integral number of bytes for input into the MAC hash function.
258 The SEQUENCE_NUMBER is a counter which is incremented by both the
259 sender and the receiver. For each transmission direction, a pair of
260 counters is kept (one by the sender, one by the receiver).  Before the
261 first (handshake) record is sent or received in a PCT connection all
262 sequence numbers are initialized to zero (except in the case of a
263 restarting connection with a token-based exchange type, in which case
264 the entire cipher state is preserved; see section 5.2.2).  The
265 sender's sender-to-receiver sequence number is incremented after every
266 record sent, and the receiver's sender-to-receiver sequence number is
267 incremented after every record received.  Sequence numbers are 32-bit
268 unsigned quantities, and may not increment past 0xFFFFFFFF.  (See
269 section 4.3.2.)
271 The receiver of a record (whether PCT client or server) first uses the
272 sender's WRITE_KEY to decrypt the concatenated ACTUAL_DATA and
273 PADDING_DATA fields, then uses the sender's MAC_KEY, the ACTUAL_DATA,
274 the PADDING_DATA, and the expected value of the sequence number as
275 input into the MAC_DATA function described above (the hash function
276 algorithm used is determined the same way for the receiver as for the
277 sender).  The computed MAC_DATA must agree bit for bit with the
278 transmitted MAC_DATA.  If the two are not identical, then an
279 INTEGRITY_CHECK_FAILED error occurs, and it is recommended that the
280 record be treated as though it contained no data.  (See section 5.4.)
281 The same error occurs if N + PADDING_LENGTH is not correct for the
282 block cipher used.
284 The PCT Record Layer is used for all PCT communications, including
285 handshake messages, security escapes and application data transfers.
286 The PCT Record Layer is used by both the client and the server at all
287 times.
290 Benaloh/Lampson/Simon/Spies/Yee                                 [Page 5]
291 \fInternet Draft              The PCT Protocol               November 1995
294 For a two-byte header, the maximum record length is 32767 bytes.  For
295 a three-byte header, the maximum record length is 16383 bytes.  The
296 PCT Handshake Protocol messages are constrained to fit in a single PCT
297 Record Protocol record.  Application protocol messages are allowed to
298 consume multiple PCT Record Protocol records.
301 4.3 Security Escapes
303 4.3.1 Out-Of-Band Data
305 PCT, like SSL, supports the transmission and reception of "out-of-band
306 data".  Out of band data is normally defined at the TCP/IP protocol
307 level, but because of PCT's privacy enhancements and support for block
308 ciphers, this becomes difficult to support.
310 To send out-of-band data, the sender sends an escape record whose body
311 contains a single byte of data which is the ESCAPE_TYPE_CODE value
312 PCT_ET_OOB_DATA.  The record following the escape record will be
313 interpreted as "out-of-band" data and will only be made available to
314 the receiver through an unspecified mechanism that is different from
315 the receiver's normal data reception method.  The escape record and
316 the transmitted data record are transmitted normally (i.e. encryption,
317 MAC computations, and block cipher padding remain in effect).
319 Note that the escape record and the associated data record are sent
320 using normal TCP sending mechanisms, not using the "out of band"
321 mechanisms.  Note also that a "Redo Handshake" escape record (see
322 below) and its associated handshake messages may be interposed between
323 an "Out-of-Band Data" escape record and its associated data record.
324 In such a case, the first non-escape, non-handshake record following
325 the "Out-of-Band Data" escape record is treated as out-of-band data.
327 4.3.2  Redo Handshake
329 PCT allows either the client or the server to request, at any time
330 after the handshake phase has been completed for a connection, that
331 another handshake phase be performed for that connection.  For
332 example, either party is required to request another handshake phase
333 rather than allow its sequence number to "wrap" beyond 0xFFFFFFFF.  In
334 addition, it is recommended that implementations enforce limits on the
335 duration of both connections and sessions, with respect to the total
336 number of bytes sent, the number of records sent, the actual time
337 elapsed since the beginning of the connection or session, and, in the
338 case of sessions, the number of reconnections made.  These limits
339 serve to ensure that keys are not used more or longer than it is safe
340 to do so; hence the limits may depend on the type and strength of
341 cipher, key exchange and authentication used, and may, at the
342 implementer's discretion, include indications from the application as
343 to the sensitivity of the data being transmitted or received.
345 To request a new handshake phase for this connection, the sender
348 Benaloh/Lampson/Simon/Spies/Yee                                 [Page 6]
349 \fInternet Draft              The PCT Protocol               November 1995
352 (client or server) sends an escape record whose body contains a single
353 byte of data which is the ESCAPE_TYPE_CODE value PCT_ET_REDO_CONN.
354 The escape record is transmitted normally (i.e.  encryption, MAC
355 computations, and block cipher padding remain in effect).
357 There are several cases to consider to ensure that the message
358 pipeline gets flushed and to enable handshake messages to be
359 distinguished from data records.  The following rules ensure that the
360 first messages in the redone handshake are always immediately preceded
361 by a "Redo Handshake" escape message.
363 If the client initiates the "Redo Handshake", it sends the "Redo
364 Handshake" escape message immediately followed by a normal
365 CLIENT_HELLO message; the server, on receiving the "Redo Handshake"
366 escape message, may be in one of two states.  If the last message it
367 sent was a "Redo Handshake" escape message, then it simply waits for
368 the CLIENT_HELLO message; otherwise, it sends a "Redo Handshake"
369 escape message in response, and then waits for the CLIENT_HELLO
370 message.
372 If the server initiates the "Redo Handshake", then the server sends
373 the "Redo Handshake" escape message and simply waits for a "Redo
374 Handshake" escape message in response; this "Redo Handshake" should be
375 immediately followed by a normal CLIENT_HELLO message.  The client, on
376 receiving the server's "Redo Handshake" escape message, may be in one
377 of two states.  If the last two messages it sent were a "Redo 
378 Handshake" escape message followed by a CLIENT_HELLO message, then it
379 simply waits for a SERVER_HELLO message; otherwise, it sends a "Redo
380 Handshake" escape message in response, followed by a CLIENT_HELLO
381 message, and then waits for a SERVER_HELLO message.
383 In all cases, the sender of the "Redo Handshake" escape message
384 continues to process incoming messages, but may not send any
385 non-handshake messages until the new handshake completes.
387 The handshake phase that follows the "Redo Handshake" escape message 
388 is a normal one in most respects; the client may request the 
389 reconnection of an old session or request that a new session be 
390 initiated, and the server, on receiving a reconnection request, can 
391 accept the reconnection or demand that a new session be initiated 
392 instead.  If a new session is being established, then the server must 
393 request client authentication if and only if client authentication 
394 was requested during the previous session.  Otherwise, client 
395 authentication is optional.  Both parties must verify that the 
396 specifications negotiated previously in the session (cipher type, key 
397 exchange type, certificate type, hash function type, client 
398 certificate type, and signature type), as well as any certificates 
399 exchanged, are identical to those found in the new handshake phase.  
400 A mismatch results in a SPECS_MISMATCH or BAD_CERTIFICATE error (see 
401 section 5.4.)  This ensures that the security properties of the 
402 communication channel do not change.
406 Benaloh/Lampson/Simon/Spies/Yee                                 [Page 7]
407 \fInternet Draft              The PCT Protocol               November 1995
410 5. PCT Handshake Protocol Specification
412 5.1 PCT Handshake Protocol Flow
414 The PCT Handshake Protocol is used to negotiate security enhancements
415 to data sent using the PCT Record Protocol.  The security enhancements
416 consist of authentication, symmetric encryption, and message
417 integrity.  Symmetric encryption is facilitated using a "Key Exchange
418 Algorithm".  PCT version 1 supports RSA {TM} -based key exchange (see
419 [13]), Diffie-Hellman key exchange, and FORTEZZA token key exchange.
421 The PCT Handshake Protocol consists of four messages, sent
422 respectively by the client, then server, then client, then server, in
423 that order.  (Moreover, under certain circumstances, the last two
424 messages are omitted.)  The messages are named, in order,
425 CLIENT_HELLO, SERVER_HELLO, CLIENT_MASTER_KEY, and SERVER_VERIFY.
427 The general contents of the messages depend upon two criteria: whether
428 the connection being made is a reconnection (a continuation of a
429 previous session) or a new session and whether the client is to be
430 authenticated.  (The server is always authenticated.)  The first
431 criterion is determined by the client and server together; the
432 CLIENT_HELLO will have different contents depending on whether a new
433 session is being initiated or an old one continued, and the
434 SERVER_HELLO message will either confirm a requested continuation of
435 an old session, or require that a new session be initiated.  The
436 second criterion is determined by the server, whose SERVER_HELLO may
437 contain a demand for authentication of the client.  If the server does
438 not require client authentication, and the reconnection of an old
439 session is requested by the client and accepted by the server, then
440 the CLIENT_MASTER_KEY and SERVER_VERIFY messages are unnecessary, and
441 are omitted.
443 The CLIENT_HELLO message contains a random authentication challenge
444 to the server and a request for the type and level of cryptography
445 and certification to be used for the session.  If the client is
446 attempting to continue an old session, then it also supplies that
447 session's ID.
449 In the case of a new session, the SERVER_HELLO message contains a
450 certificate and a random connection identifier; this identifier
451 doubles as an authentication challenge to the client if the server
452 desires client authentication.  The CLIENT_MASTER_KEY message sent by
453 the client in response includes the master key for the session (from
454 which session keys are derived), encrypted using the public key from
455 the server's certificate, as well as a certificate and response to the
456 server's authentication challenge, if requested.  To ensure that
457 previous unencrypted handshake messages were not tampered with, their
458 keyed hash is included with the CLIENT_MASTER_KEY message.  Finally,
459 the server sends a SERVER_VERIFY message which includes a response to
460 the client's challenge and a random session id for the session.
464 Benaloh/Lampson/Simon/Spies/Yee                                 [Page 8]
465 \fInternet Draft              The PCT Protocol               November 1995
468 If the server accepts the old session id, then the SERVER_HELLO
469 message contains a response to the client's challenge, and a random
470 connection identifier which again doubles as a random challenge to the
471 client, if the server requires client authentication.  If no client
472 authentication is requested, the handshake is finished (although an
473 authentication of the client is implicit in the MAC included with the
474 client's first data message).  Otherwise, the subsequent
475 CLIENT_MASTER_KEY message contains the client's response, and the
476 SERVER_VERIFY message simply signals to the client to continue.
478 For a new session, the handshake phase has the following form (items
479 in square brackets are included only if client authentication is
480 required):
482 Client                                  Server
483 ------                                  ------
485 CLIENT_HELLO:
486 client challenge;
487 client's cipher, hash,
488     server-certificate,
489     and key-exchange 
490     specification lists
492                                         SERVER_HELLO:
493                                         connection id/server challenge;
494                                         server's cipher, hash,
495                                             server-certificate,
496                                             and key-exchange
497                                             specification choices;
498                                         server certificate
499                                         [; server's signature-type
500                                             and client-certificate
501                                             specification lists]
503 CLIENT_MASTER_KEY:
504 master key, encrypted with
505     server's public key;
506 authentication of previous two
507     messages
508 [; client's signature-type and
509     client-certificate
510     specification choices;
511 client's certificate;
512 client's challenge response]
514                                         SERVER_VERIFY:
515                                         session id;
516                                         server's challenge response
519 For a reconnection of an old session, the handshake phase has the
522 Benaloh/Lampson/Simon/Spies/Yee                                 [Page 9]
523 \fInternet Draft              The PCT Protocol               November 1995
526 following form (items in square brackets are included if client
527 authentication is required):
529 Client                                  Server
530 ------                                  ------
532 CLIENT_HELLO:
533 client challenge;
534 session id;
535 client's cipher, hash,
536     server-certificate,
537     and key-exchange 
538     specification lists
540                                         SERVER_HELLO:
541                                         connection id/server challenge;
542                                         old session's cipher, hash,
543                                             server-certificate,
544                                             and key-exchange
545                                             specification choices;
546                                         server's challenge response
547                                         [; server's signature-type
548                                             and client-certificate
549                                             specification lists]
551 [CLIENT_MASTER_KEY:
552 client's certificate;
553 client's challenge response]
556                                         [SERVER_VERIFY]
559 Note that the protocol is asymmetric between client and server.  The
560 client authenticates the server because only the server can decrypt
561 the master key which is encrypted with the server's public key, and
562 the server's challenge response depends on knowing that master key.
563 The server authenticates the client because the client signs its
564 challenge response with its public key.  The reason for the asymmetry
565 is that when there is no client authentication there is no client
566 public key, so the client must choose the master key and encrypt it
567 with the server public key to hide it from everyone except the server.
569 Usually the client can safely send data on the underlying transport
570 immediately following the CLIENT_MASTER_KEY message, without waiting
571 for the SERVER_VERIFY; we call this "initial data".  Sending initial
572 data is good because it means that PCT adds only one round trip; it is
573 not possible to do better without exposing the server to a replay
574 attack.  However, it is unwise to send initial data if for some reason
575 it is important for the client to be sure of being in contact with the
576 correct server before sending any data.
580 Benaloh/Lampson/Simon/Spies/Yee                                [Page 10]
581 \fInternet Draft              The PCT Protocol               November 1995
584 5.2 PCT Handshake Protocol Messages
586 The PCT Handshake Protocol messages are sent using the PCT Record
587 Protocol and consist of a single byte message type code, followed by
588 some data.  The client and server exchange messages as described
589 above, sending either one or two messages each.  Once the handshake
590 has been completed successfully, the client sends its first actual
591 data.
593 Handshake protocol messages are sent in the clear, with the exception
594 of the key-exchange-related fields in the CLIENT_MASTER_KEY message,
595 some of which involve (public-key) encryption.
597 The following notation is used for PCT messages:
599 char MSG_EXAMPLE
600 char FIELD1
601 char FIELD2
602 char THING_LENGTH_MSB
603 char THING_LENGTH_LSB
604 char THING_DATA[(MSB << 8)|LSB];
607 This notation defines the data in the protocol message, including the
608 message type code. The order is presented top to bottom, with the
609 topmost element being transmitted first.
611 For the "THING_DATA" entry, the MSB and LSB values are actually
612 THING_LENGTH_MSB and THING_LENGTH_LSB (respectively) and define the
613 number of bytes of data actually present in the message. For example,
614 if THING_LENGTH_MSB were one and THING_LENGTH_LSB were four then the
615 THING_DATA array would be exactly 260 bytes long.  This shorthand is
616 used below.  Occasionally, a "THING_DATA" field is referred to as
617 "THING", with the word "DATA" omitted.
619 The names of message elements have prefixes that identify the messages
620 in which they appear; these prefixes are sometimes omitted in the text
621 when the containing messages are obvious.
623 Length codes are unsigned values, and when the MSB and LSB are
624 combined the result is an unsigned value.  Length values are in bytes.
627 5.2.1 CLIENT_HELLO (Sent in the clear)
629 char CH_MSG_CLIENT_HELLO
630 char CH_CLIENT_VERSION_MSB
631 char CH_CLIENT_VERSION_LSB
632 char CH_PAD
633 char CH_SESSION_ID_DATA[32]
634 char CH_CHALLENGE_DATA[32]
635 char CH_OFFSET_MSB
638 Benaloh/Lampson/Simon/Spies/Yee                                [Page 11]
639 \fInternet Draft              The PCT Protocol               November 1995
642 char CH_OFFSET_LSB
643 char CH_CIPHER_SPECS_LENGTH_MSB
644 char CH_CIPHER_SPECS_LENGTH_LSB
645 char CH_HASH_SPECS_LENGTH_MSB
646 char CH_HASH_SPECS_LENGTH_LSB
647 char CH_CERT_SPECS_LENGTH_MSB
648 char CH_CERT_SPECS_LENGTH_LSB
649 char CH_EXCH_SPECS_LENGTH_MSB
650 char CH_EXCH_SPECS_LENGTH_LSB
651 char CH_KEY_ARG_LENGTH_MSB
652 char CH_KEY_ARG_LENGTH_LSB
653 char CH_CIPHER_SPECS_DATA[(MSB << 8)|LSB]
654 char CH_HASH_SPECS_DATA[(MSB << 8)|LSB]
655 char CH_CERT_SPECS_DATA[(MSB << 8)|LSB]
656 char CH_EXCH_SPECS_DATA[(MSB << 8)|LSB]
657 char CH_KEY_ARG_DATA[(MSB << 8)|LSB]
659 When a client first connects to a server it is required to send the
660 CLIENT_HELLO message.  The server is expecting this message from the
661 client as its first message. It is an ILLEGAL_MESSAGE error for a
662 client to send anything else as its first message.  The CLIENT_HELLO
663 message begins with the PCT version number, and two fixed-length
664 fields followed by an offset to the variable length data.  The
665 CH_OFFSET field contains the number of bytes used by the various
666 fields (currently only length fields) that follow the offset field and
667 precede the variable-length fields.  For PCT version 1, this offset
668 value is always PCT_CH_OFFSET_V1, i.e., ten.  However, inclusion of
669 this field will allow future versions to be compatible with version 1,
670 even if the number of these fields changes: a version 1 server should
671 be able to find all the PCT version 1 fields in a higher-version
672 CLIENT_HELLO message.  The CH_PAD field may contain any value.
674 The CLIENT_HELLO message includes a string of random bytes used as
675 challenge data from the client.  Also, if the client finds a session
676 identifier in its cache for the server, then that session-identifier
677 data is sent.  Otherwise, the special PCT_SESSION_ID_NONE value is
678 used.  In either case, the client specifies in CIPHER_SPECS_DATA,
679 HASH_SPECS_DATA, CERT_SPECS_DATA, and EXCH_SPECS_DATA its preferred
680 choices of symmetric cipher, key lengths, hash function, certificate,
681 and asymmetric key exchange algorithm.  However, if a session
682 identifier is sent, then these choices are only relevant in the case
683 where the server cannot recognize the session identifier, and a new
684 session must therefore be initiated.  If the server recognizes the
685 session, then these fields are ignored by the server.
687 The CHALLENGE_DATA field contains 32 bytes of random bits, to be used
688 to authenticate the server.  The CHALLENGE_DATA should be
689 cryptographically random, in the same sense as the MASTER_KEY (see
690 section 5.3.1).
692 The CIPHER_SPECS_DATA field contains a list of possible symmetric
693 ciphers supported by the client, in order of (the client's)
696 Benaloh/Lampson/Simon/Spies/Yee                                [Page 12]
697 \fInternet Draft              The PCT Protocol               November 1995
700 preference.  Each element in the list is a four-byte field, of which
701 the first two bytes contain a code representing a cipher type, the
702 third byte contains the encryption key length in bits (0-255), and the
703 fourth byte contains the MAC key length in bits, minus 64 (values
704 0-255, representing lengths 64-319; this encoding enforces the
705 requirement that the MAC key length be at least 64 bits).  The entire
706 list's length in bytes (four times the number of elements) is placed
707 in CIPHER_SPECS_LENGTH.
709 The HASH_SPECS_DATA field contains a list of possible hash functions
710 supported by the client, in order of (the client's) preference.  The
711 server will choose one of these to be used for computing MACs and
712 deriving keys.  Each element in the list is a two-byte field
713 containing a code representing a hash function choice.  The entire
714 length of the list (twice the number of elements) is placed in
715 HASH_SPECS_LENGTH.
717 The CERT_SPECS_DATA field contains a list of possible certificate
718 formats supported by the client, in order of (the client's)
719 preference.  Each element in the list is a two-byte field containing a
720 code representing a certificate format.  The entire length of the list
721 (twice the number of elements) is placed in CERT_SPECS_LENGTH.
723 The EXCH_SPECS_DATA field contains a list of possible asymmetric key
724 exchange algorithms supported by the client, in order of (the
725 client's) preference.  Each element in the list is a two-byte field
726 containing a code representing a key exchange algorithm type.  The
727 entire length of the list (twice the number of elements) is placed in
728 EXCH_SPECS_LENGTH.
730 The KEY_ARG_DATA field contains an initialization vector to be used in
731 a reconnected session when the cipher type is a block cipher (any
732 cipher type except PCT_CIPHER_RC4, and any key exchange type except
733 PCT_EXCH_RSA_PKCS1_TOKEN_RC4).  If a new session is being requested
734 (i.e., the value of CH_SESSION_ID_DATA is PCT_SESSION_ID_NONE), then
735 KEY_ARG_LENGTH must be zero.
737 The CLIENT_HELLO message must be the first message sent by the client
738 to the server.  After the message is sent the client waits for a
739 SERVER_HELLO message.  Any other message returned by the server (other
740 than ERROR) generates the PCT_ERR_ILLEGAL_MESSAGE error.
742 The server, on receiving a CLIENT_HELLO message, checks the version
743 number and the offset field to determine where the variable-length
744 data fields start.  (The OFFSET value should be at least
745 PCT_CH_OFFSET_V1.)  The server then checks whether there is a non-null
746 SESSION_ID field, and if so, whether it recognizes the SESSION_ID.  In
747 that case, the server responds with a SERVER_HELLO message containing
748 a non-zero RESTART_SESSION_OK field, and the appropriate value (see
749 below) in the RESPONSE and CONNECTION_ID fields.  Otherwise, it checks
750 whether the CIPHER_SPECS, HASH_SPECS, CERT_SPECS and EXCH_SPECS lists
751 in the CLIENT_HELLO message each contain at least one type supported
754 Benaloh/Lampson/Simon/Spies/Yee                                [Page 13]
755 \fInternet Draft              The PCT Protocol               November 1995
758 by the server.  If so, then the server sends a SERVER_HELLO message to
759 the client as described below; otherwise, the server detects a
760 SPECS_MISMATCH error.
762 5.2.2 SERVER_HELLO (Sent in the clear)
764 char SH_MSG_SERVER_HELLO
765 char SH_PAD
766 char SH_SERVER_VERSION_MSB
767 char SH_SERVER_VERSION_LSB
768 char SH_RESTART_SESSION_OK
769 char SH_CLIENT_AUTH_REQ
770 char SH_CIPHER_SPECS_DATA[4]
771 char SH_HASH_SPECS_DATA[2]
772 char SH_CERT_SPECS_DATA[2]
773 char SH_EXCH_SPECS_DATA[2]
774 char SH_CONNECTION_ID_DATA[32]
775 char SH_CERTIFICATE_LENGTH_MSB
776 char SH_CERTIFICATE_LENGTH_LSB
777 char SH_CLIENT_CERT_SPECS_LENGTH_MSB
778 char SH_CLIENT_CERT_SPECS_LENGTH_LSB
779 char SH_CLIENT_SIG_SPECS_LENGTH_MSB
780 char SH_CLIENT_SIG_SPECS_LENGTH_LSB
781 char SH_RESPONSE_LENGTH_MSB
782 char SH_RESPONSE_LENGTH_LSB
783 char SH_CERTIFICATE_DATA[(MSB << 8)|LSB]
784 char SH_CLIENT_CERT_SPECS_DATA[(MSB << 8)|LSB]
785 char SH_CLIENT_SIG_SPECS_DATA[(MSB << 8)|LSB]
786 char SH_RESPONSE_DATA[(MSB << 8)|LSB]
788 The server sends this message after receiving the client's
789 CLIENT_HELLO message.  The PCT version number in SH_SERVER_VERSION is
790 always the maximum protocol version that the server supports; the
791 remainder of the message and all subsequent messages will conform to
792 the format specified by the protocol version corresponding to the
793 minimum of the client and server protocol version numbers.  Unless
794 there is an error, the server always returns a random value 32 bytes
795 in length in the CONNECTION_ID field.  This value doubles as challenge
796 data if the server requests client authentication, and should
797 therefore be random in the same sense as the challenge data in the
798 CLIENT_HELLO message.  The SH_PAD field may contain any value.
800 There are two cases for RESTART_SESSION_OK.  In the first case, the
801 server returns a zero RESTART_SESSION_OK flag because the CLIENT_HELLO
802 message did not contain a session id or because the one it contained
803 is unrecognized by the server.  In this case, the server must behave
804 as follows:
806 The server selects any choice with which it is compatible, from each
807 of the CH_CIPHER_SPECS, CH_HASH_SPECS, CH_CERT_SPECS and CH_EXCH_SPECS
808 lists supplied in the CLIENT_HELLO message.  (These values are
809 returned to the client in the SH_CIPHER_SPECS_DATA,
812 Benaloh/Lampson/Simon/Spies/Yee                                [Page 14]
813 \fInternet Draft              The PCT Protocol               November 1995
816 SH_HASH_SPECS_DATA, SH_CERT_SPECS_DATA, and SH_EXCH_SPECS_DATA fields,
817 respectively.)  The certificate of the type specified in
818 SH_CERT_SPECS_DATA and SH_EXCH_SPECS_DATA is placed in the
819 CERTIFICATE_DATA field.  The SH_RESPONSE_DATA field is empty, and its
820 length is zero.
822 In the second case, the server returns a non-zero RESTART_SESSION_OK
823 flag because the CLIENT_HELLO message contained a session-identifier
824 known by the server (i.e. in the server's session-identifier cache).
825 In this case, the server must behave as follows:
827 The server omits the CERTIFICATE_DATA field (with CERTIFICATE_LENGTH
828 set to zero), and sets the CIPHER_SPECS_DATA, HASH_SPECS_DATA,
829 CERT_SPECS_DATA and EXCH_SPECS_DATA values to the values stored along
830 with the session identifier.  There are two subcases: (1) If the
831 SH_EXCH_SPECS_DATA does not refer to a TOKEN type, then the
832 CLIENT_MAC, SERVER_MAC, CLIENT_WRITE, and SERVER_WRITE keys are
833 rederived using the MASTER_KEY from the old session, as well as the
834 CONNECTION_ID and CH_CHALLENGE values from the SERVER_HELLO and
835 CLIENT_HELLO messages, respectively, for this connection.  (2) If the
836 SH_EXCH_SPECS_DATA refers to a TOKEN type, then the keys from the
837 on-going session are reused.  In order to obtain fresh key material or
838 change the sequence number, TOKEN implementations must use the redo
839 handshake mechanism (PCT_ET_REDO_CONN security escape).  When this
840 mechanism is used with a TOKEN exchange type, the client must send
841 PCT_SESSION_ID_NONE in the CH_SESSION_ID_DATA field of the subsequent
842 CLIENT_HELLO message.
844 The RESPONSE_DATA is constructed by computing the function
846 Hash( SERVER_MAC_KEY, Hash( "sr", CH_CHALLENGE_DATA, 
847 SH_CONNECTION_ID_DATA, CH_SESSION_ID_DATA ) ).
849 The CH_CHALLENGE_DATA and CH_SESSION_ID_DATA values are found in the
850 CLIENT_HELLO message for this connection.  The SH_CONNECTION_ID_DATA
851 value is from this SERVER_HELLO message.  The SERVER_MAC_KEY is the
852 one rederived for this connection as described in section 5.3.1.  If
853 the length of SERVER_MAC_KEY is not an exact multiple of eight bits,
854 then SERVER_MAC_KEY is considered, for the purposes of MAC
855 computation, to have (fewer than eight) zero bits appended to it, to
856 create a string of an integral number of bytes for input into the MAC
857 hash function.  The hash function choice used is determined by the
858 SH_HASH_SPECS_DATA field in this SERVER_HELLO message.  The values are
859 input into the interior invocation of the hash function in the exact
860 order specified above, with the string in quotation marks representing
861 actual ASCII text.
863 In both reconnection cases, if the server requires client
864 authentication, then the CLIENT_AUTH_REQ field is set to a non-zero
865 value.  Also, a list of (client) certificate types acceptable to the
866 server, in order of (the server's) preference, is placed in the
867 CLIENT_CERT_SPECS_DATA field, and a list of (client's) signature
870 Benaloh/Lampson/Simon/Spies/Yee                                [Page 15]
871 \fInternet Draft              The PCT Protocol               November 1995
874 algorithms supported by the server, in order of (the server's)
875 preference, is placed in the CLIENT_SIG_SPECS_DATA field.  The
876 certificate type values in the list are from the same set of two byte
877 codes used for the CERT_SPECS list appearing in the CLIENT_HELLO
878 message, and the signature algorithm type codes are also two bytes
879 long.  (See section 5.3.4 and 5.3.5 below.)  The lengths of the lists
880 in bytes (twice the number of elements) are placed in the
881 CLIENT_CERT_SPECS_LENGTH and CLIENT_SIG_SPECS_LENGTH fields.  If no
882 client authentication is required, then these length fields, as well
883 as the CLIENT_AUTH_REQ field, are set to zero, and the corresponding
884 data fields are empty.
886 When the client receives a SERVER_HELLO message, it checks whether the
887 server has accepted a reconnection of an old session or is
888 establishing a new session.  If a new session is being initiated, and
889 client authentication is requested, then the client checks whether it
890 is compatible with any of the certificate and signature types listed
891 in the CLIENT_CERT_SPECS and CLIENT_SIG_SPECS lists.  (Note that the
892 server can make client authentication optional for the client simply
893 by including PCT_CERT_NONE and PCT_SIG_NONE as a "last resort".)  If
894 the client can provide a compatible certificate, then it sends a
895 CLIENT_MASTER_KEY message as described below; otherwise, it generates
896 a SPECS_MISMATCH error.
898 If the session is an old one, then the client establishes the new
899 CLIENT_WRITE_KEY, SERVER_WRITE_KEY, CLIENT_MAC_KEY and SERVER_MAC_KEY
900 according to the cipher-specific rules described below in section
901 5.3.1.  The client then checks the contents of the RESPONSE_DATA field
902 in the SERVER_HELLO message for correctness.  If the response matches
903 the value calculated by the client (exactly as described above for the
904 server), then the handshake is finished, and the client begins sending
905 data; otherwise, a SERVER_AUTH_FAILED error occurs.
908 5.2.3 CLIENT_MASTER_KEY (sent in the clear, except for encrypted keys)
910 char CMK_MSG_CLIENT_MASTER_KEY
911 char CMK_PAD
912 char CMK_CLIENT_CERT_SPECS_DATA[2]
913 char CMK_CLIENT_SIG_SPECS_DATA[2]
914 char CMK_CLEAR_KEY_LENGTH_MSB
915 char CMK_CLEAR_KEY_LENGTH_LSB
916 char CMK_ENCRYPTED_KEY_LENGTH_MSB
917 char CMK_ENCRYPTED_KEY_LENGTH_LSB
918 char CMK_KEY_ARG_LENGTH_MSB
919 char CMK_KEY_ARG_LENGTH_LSB
920 char CMK_VERIFY_PRELUDE_LENGTH_MSB
921 char CMK_VERIFY_PRELUDE_LENGTH_LSB
922 char CMK_CLIENT_CERT_LENGTH_MSB
923 char CMK_CLIENT_CERT_LENGTH_LSB
924 char CMK_RESPONSE_LENGTH_MSB
925 char CMK_RESPONSE_LENGTH_LSB
928 Benaloh/Lampson/Simon/Spies/Yee                                [Page 16]
929 \fInternet Draft              The PCT Protocol               November 1995
932 char CMK_CLEAR_KEY_DATA[(MSB << 8)|LSB]
933 char CMK_ENCRYPTED_KEY_DATA[(MSB << 8)|LSB]
934 char CMK_KEY_ARG_DATA[(MSB << 8)|LSB]
935 char CMK_VERIFY_PRELUDE_DATA[(MSB << 8)|LSB]
936 char CMK_CLIENT_CERT_DATA[(MSB << 8)|LSB]
937 char CMK_RESPONSE_DATA[(MSB << 8)|LSB]
939 The client sends this message after receiving the SERVER_HELLO message
940 from the server if a new session is being started or if client
941 authentication has been requested.  If no client authentication has
942 been requested in the SERVER_HELLO message and an old session is being
943 reconnected (i.e., if the CLIENT_AUTH_REQ field is zero and the
944 RESTART_SESSION_OK field is nonzero), then the CLIENT_MASTER_KEY
945 message is not sent.
947 For TOKEN exchange types, both client and server (re)set the sequence
948 numbers to zero when this message is sent/received.
950 The contents of the CLEAR_KEY_DATA, ENCRYPTED_KEY_DATA, and
951 KEY_ARG_DATA fields depend on the contents of the SH_CIPHER_SPECS_DATA
952 and SH_EXCH_SPECS_DATA fields in the preceding SERVER_HELLO message.
953 These will be described for each possible choice of these values in
954 section 5.3.1 and 5.3.2, along with how the various keys
955 (CLIENT_WRITE_KEY, SERVER_WRITE_KEY, CLIENT_MAC_KEY, and
956 SERVER_MAC_KEY) are derived in each case.  The CMK_PAD field may
957 contain any value.
959 The CMK_VERIFY_PRELUDE_DATA field contains the value
961 Hash( CLIENT_MAC_KEY, Hash( "cvp", CLIENT_HELLO, SERVER_HELLO ) ).
963 If the length of CLIENT_MAC_KEY is not an exact multiple of eight
964 bits, then CLIENT_MAC_KEY is considered, for the purposes of MAC
965 computation, to have (fewer than eight) zero bits appended to it, to
966 create a string of an integral number of bytes for input into the MAC
967 hash function.  The hash function used is the one specified in
968 SH_HASH_SPECS_DATA.  The parameters are input into the hash function
969 in the order presented above, with the strings in quotation marks
970 representing ASCII text.  Note that the client need only keep a
971 "running hash" of all the values passed in these first two messages as
972 they appear, then hash the result using the CLIENT_MAC_KEY when
973 generated, to compute the value of VERIFY_PRELUDE.
975 If SH_CLIENT_AUTH_REQ is zero, then CMK_CLIENT_CERT_SPECS_DATA and
976 CMK_CLIENT_SIG_SPECS_DATA are both zero, and the CMK_CLIENT_CERT and
977 CMK_RESPONSE_DATA fields are empty.  Otherwise, the CMK_RESPONSE_DATA
978 field contains the client's authentication response, and the
979 CMK_CLIENT_CERT_SPECS_DATA and CMK_CLIENT_SIG_SPECS_DATA fields
980 contain the client's choices from the SH_CLIENT_CERT_SPECS_DATA and
981 SH_CLIENT_SIG_SPECS_DATA lists, respectively.  The
982 CMK_CLIENT_CERT_DATA field contains the client's certificate, which
983 must match the certificate type specified in the
986 Benaloh/Lampson/Simon/Spies/Yee                                [Page 17]
987 \fInternet Draft              The PCT Protocol               November 1995
990 CMK_CLIENT_CERT_SPECS_DATA field.  Also, the public key in the
991 certificate must be a signature key of the type specified in
992 CMK_CLIENT_SIG_SPECS_DATA, which in turn must match one of the types
993 in the SH_CLIENT_SIG_SPECS_DATA list.
995 CMK_RESPONSE_DATA is simply a digital signature, using the private
996 signature key associated with the public key in the client's
997 certificate, of the value in the CMK_VERIFY_PRELUDE_DATA field.  The
998 signature algorithm is determined by the CMK_CLIENT_SIG_SPECS_DATA
999 field.  (Note that the signature algorithm may itself require that a
1000 hash function be applied to the data being signed, apart from the one
1001 used to compute the value in CMK_VERIFY_PRELUDE_DATA.)
1003 Upon receiving a CLIENT_MASTER_KEY message, the server performs the
1004 cipher-specific functions described in section 5.3 to establish the
1005 new CLIENT_WRITE_KEY, SERVER_WRITE_KEY, CLIENT_MAC_KEY and
1006 SERVER_MAC_KEY.  The server then checks the VERIFY_PRELUDE_DATA value,
1007 the client certificate, and the client response for correctness and
1008 validity (the latter two only if client authentication had been
1009 requested).  The checks of the VERIFY_PRELUDE_DATA and RESPONSE_DATA
1010 are performed by recomputing their correct value, and comparing with
1011 the values received.  The certificate is verified using whatever
1012 mechanism has been implemented to validate certificates, and the
1013 signature in the RESPONSE_DATA field is verified using the
1014 verification algorithm associated with the signature scheme being
1015 used.  If all of these values pass their checks, then the server sends
1016 the SERVER_VERIFY message; otherwise, an error occurs
1017 (INTEGRITY_CHECK_FAILED, BAD_CERTIFICATE, or CLIENT_AUTH_FAILED,
1018 respectively).
1020 5.2.4 SERVER_VERIFY (Sent in the clear)
1022 char SV_MSG_SERVER_VERIFY
1023 char SV_PAD
1024 char SV_SESSION_ID_DATA[32]
1025 char SV_RESPONSE_LENGTH_MSB
1026 char SV_RESPONSE_LENGTH_LSB
1027 char SV_RESPONSE_DATA[(MSB << 8)|LSB]
1029 The server sends this message upon receiving a valid CLIENT_MASTER_KEY
1030 message from the client.  The SV_PAD field may contain any value.  If
1031 an old session is being reconnected, then the RESPONSE_DATA field is
1032 empty, its length is zero, and the SESSION_ID_DATA field may contain
1033 any value.  Otherwise, the SV_SESSION_ID_DATA field contains a value
1034 32 bytes in length, which should be generated randomly (in the same
1035 sense as the CHALLENGE_DATA field in the CLIENT_HELLO message).  The
1036 value PCT_SESSION_ID_NONE should not be used as a SV_SESSION_ID_DATA
1037 value.  The contents of the SV_RESPONSE_DATA field are constructed by
1038 computing the function
1040 Hash( SERVER_MAC_KEY, Hash( "sr", CH_CHALLENGE_DATA, 
1041 SH_CONNECTION_ID_DATA, SV_SESSION_ID_DATA ) ).
1044 Benaloh/Lampson/Simon/Spies/Yee                                [Page 18]
1045 \fInternet Draft              The PCT Protocol               November 1995
1048 The CH_CHALLENGE_DATA and SH_CONNECTION_ID_DATA values, the choice of
1049 hash function used, and the value of SERVER_MAC_KEY are determined by
1050 the CLIENT_HELLO, SERVER_HELLO, SERVER_HELLO and CLIENT_MASTER_KEY
1051 messages, respectively, immediately preceding the SERVER_VERIFY
1052 message.  The values are input into the interior invocation of the
1053 hash function in the exact order specified above, with the string in
1054 quotation marks representing actual ASCII text.  If the length of
1055 SERVER_MAC_KEY is not an exact multiple of eight bits, then
1056 SERVER_MAC_KEY is considered, for the purposes of MAC computation, to
1057 have (fewer than eight) zero bits appended to it, to create a string
1058 of an integral number of bytes for intput into the MAC hash function.
1060 When the client receives this message, it verifies the correctness of
1061 the response data, by computing the hash value as described above and
1062 comparing it with the one received.  If it is correct, then the client
1063 proceeds with the first data record transmission; otherwise, a
1064 SERVER_AUTH_FAILED error occurs.  An implementation may choose to send
1065 initial data immediately after the CLIENT_MASTER_KEY message, without
1066 waiting for the SERVER_VERIFY message to arrive, if verifying the
1067 server's identity before sending it any data is unimportant.
1070 5.3  Algorithm and Certificate Types
1072 5.3.1  Key Exchange Algorithms
1074 PCT version 1 permits the following key exchange types:
1076 PCT_EXCH_RSA_PKCS1
1077 PCT_EXCH_RSA_PKCS1_TOKEN_DES
1078 PCT_EXCH_RSA_PKCS1_TOKEN_DES3
1079 PCT_EXCH_RSA_PKCS1_TOKEN_RC2
1080 PCT_EXCH_RSA_PKCS1_TOKEN_RC4
1081 PCT_EXCH_DH_PKCS3
1082 PCT_EXCH_DH_PKCS3_TOKEN_DES
1083 PCT_EXCH_DH_PKCS3_TOKEN_DES3
1084 PCT_EXCH_FORTEZZA_TOKEN
1086 Note that the token-based key exchange types specify cipher as well
1087 (including, implicitly, the FORTEZZA key exchange type); if one of
1088 these is chosen, then its choice of cipher overrides whatever choice
1089 of cipher appears in the SH_CIPHER_SPECS_DATA field of the
1090 SERVER_HELLO message.
1092 For the PCT_EXCH_RSA_PKCS1 key exchange type, a MASTER_KEY value is
1093 generated by the client, which should be random in the following
1094 strong sense: attackers must not be able to predict any of the bits in
1095 the MASTER_KEY.  It is recommended that the bits used be either truly
1096 random and uniformly generated (using some random physical process) or
1097 else generated using a cryptographically secure pseudorandom number
1098 generator, which was in turn seeded with a truly random and uniformly
1099 generated seed.  This MASTER_KEY value is encrypted using the server's
1102 Benaloh/Lampson/Simon/Spies/Yee                                [Page 19]
1103 \fInternet Draft              The PCT Protocol               November 1995
1106 public encryption key, as obtained from the server's certificate in
1107 the SH_CERTIFICATE_DATA field of the SERVER_HELLO message.  The
1108 encryption must follow the RSA PKCS#1 standard format (see [2]), block
1109 type 2.  This encryption is sent to the server in the
1110 CMK_ENCRYPTED_KEY_DATA field of the CLIENT_MASTER_KEY message, and is
1111 decrypted by the server to obtain the MASTER_KEY.
1113 For the PCT_EXCH_DH_PKCS3 key exchange type, a random private value x
1114 (generated in the same way as the MASTER_KEY above) and corresponding
1115 public value y are generated by the client following RSA PKCS#3
1116 standard format (see [3]). The value y is then sent to the server in
1117 the CMK_ENCRYPTED_KEY_DATA field of the CLIENT_MASTER_KEY message.
1118 The client's private value x, along with the public value y' included
1119 in the server's certificate in the SH_CERTIFICATE_DATA field of the
1120 SERVER_HELLO message, is used to generate the MASTER_KEY.  The server
1121 uses its private value, x', along with the y value sent by the client,
1122 to obtain the same MASTER_KEY value.
1124 For the various TOKEN key exchange types, all the key material is
1125 contained in the CMK_ENCRYPTED_KEY_DATA field, but the format of the
1126 data is defined by the token implementation, or by other future
1127 documents.
1129 The length of the MASTER_KEY depends on the key exchange type.  For
1130 the PCT_EXCH_RSA_PKCS1 and PCT_EXCH_DH_PKCS3 exchange types, the
1131 MASTER_KEY is a 128-bit value.  The CLIENT_WRITE_KEY and
1132 SERVER_WRITE_KEY are computed as follows:
1134 CLIENT_WRITE_KEY_i = Hash( i, "cw", MASTER_KEY, "cw"^i, 
1135 SH_CONNECTION_ID_DATA, "cw"^i, SH_CERTIFICATE_DATA,"cw"^i, 
1136 CH_CHALLENGE_DATA, "cw"^i )
1138 SERVER_WRITE_KEY_i = Hash( i, "svw", MASTER_KEY, "svw"^i, 
1139 SH_CONNECTION_ID_DATA, "svw"^i, CH_CHALLENGE_DATA, "svw"^i )
1141 The values in quotation marks are treated as (sequences of) ASCII
1142 characters; "x"^i denotes i copies of the string "x" concatenated
1143 together.  The function "Hash" is the one determined by the value of
1144 SH_HASH_SPECS_DATA.  The parameters are input into the hash function
1145 in the order presented above; the variable i is input as a single-byte
1146 unsigned integer.  The WRITE_KEYs (i.e., CLIENT_WRITE_KEY and
1147 SERVER_WRITE_KEY) are obtained by concatenating WRITE_KEY_1 through
1148 WRITE_KEY_m, where m is the negotiated encryption key length (the
1149 value in the third byte of the SH_CIPHER_SPECS_DATA field) divided by
1150 the hash output length, in bits, rounded up to the nearest integer.
1151 This resulting string is then truncated if necessary (by removing bits
1152 from the end) to produce a string of the correct length.
1154 The CLIENT_MAC_KEY and SERVER_MAC_KEY are computed as follows:
1156 CLIENT_MAC_KEY_i = Hash( i, MASTER_KEY, "cmac"^i, 
1157 SH_CONNECTION_ID_DATA, "cmac"^i, SH_CERTIFICATE_DATA, "cmac"^i, 
1160 Benaloh/Lampson/Simon/Spies/Yee                                [Page 20]
1161 \fInternet Draft              The PCT Protocol               November 1995
1164 CH_CHALLENGE_DATA, "cmac"^i )
1166 SERVER_MAC_KEY_i = Hash( i, MASTER_KEY, "svmac"^i, 
1167 SH_CONNECTION_ID_DATA, "svmac"^i, CH_CHALLENGE_DATA, "svmac"^i )
1169 The values in quotation marks are treated as (sequences of) ASCII
1170 characters; "x"^i denotes i copies of the string "x" concatenated
1171 together.  The function "Hash" is the one determined by the value of
1172 SH_HASH_SPECS_DATA.  The parameters are input into the hash function
1173 in the order presented above; the variable i is input as a single-byte
1174 unsigned integer.  The MAC_KEYs (ie., CLIENT_MAC_KEY and
1175 SERVER_MAC_KEY) are obtained by concatenating MAC_KEY_1 through
1176 MAC_KEY_m, where m is the negotiated MAC key length (64 plus the value
1177 in the fourth byte of the SH_CIPHER_SPECS_DATA field) divided by the
1178 hash output length, in bits, rounded up to the nearest integer.  This
1179 resulting string is then truncated if necessary (by removing bits from
1180 the end) to produce a string of the correct length.
1182 Note that tokens which are capable of deriving keys using "keyed
1183 hashes", as described above, are free to use the PCT_EXCH_RSA_PKCS1
1184 or PCT_EXCH_DH_PKCS3 key exchange type to exchange the MASTER_KEY,
1185 and then to derive the rest of the keys normally.  The TOKEN key
1186 exchange types are for tokens that cannot do such keyed-hash key
1187 derivation, and can only use an exchanged key for bulk encryption
1188 (of, for example, other keys).  Such tokens can exchange multiple
1189 keys by using an initially exchanged MASTER_KEY to encrypt other
1190 keys, as described above.
1192 5.3.2  Cipher Types
1194 PCT version 1 permits the following cipher types to be specified:
1196 PCT_CIPHER_DES
1197 PCT_CIPHER_IDEA
1198 PCT_CIPHER_RC2
1199 PCT_CIPHER_RC4
1200 PCT_CIPHER_DES_112
1201 PCT_CIPHER_DES_168
1203 Each of these types is denoted by a two-byte code, and is followed in
1204 CIPHER_SPECS_DATA fields by two one-byte length specifications, as
1205 described in section 5.2.1.  An encryption length specification of
1206 zero associated with any cipher denotes the choice of no encryption; a
1207 key exchange is performed in such cases solely to share keys for MAC
1208 computation.  The MAC key length must always be at least 64 bits (see
1209 section 5.2.1).
1211 The CLEAR_KEY_DATA field is used only when encryption keys of length
1212 less than the standard length for the specified cipher are used;
1213 otherwise, the field is empty.  When a key length is specified which
1214 is less than the standard key length for the specified cipher, then
1215 keys of the specified length are derived normally as described in
1218 Benaloh/Lampson/Simon/Spies/Yee                                [Page 21]
1219 \fInternet Draft              The PCT Protocol               November 1995
1222 section 5.3.1, and then "expanded" to derive standard-length keys.
1223 The expansion proceeds as follows:
1225 1.  Assign to d the result of dividing the standard key length for 
1226 the cipher, in bits, by the output length of the hash function, in 
1227 bits, rounded up to the nearest integer.
1229 2.  Divide CLEAR_KEY_DATA sequentially into d equal subsegments.
1230 (Note that the length of the CLEAR_KEY_DATA field must therefore be a
1231 multiple of d bytes, and that no two of its d equal parts, when so
1232 divided, may be identical.)  Denote these subsegments CLEAR_KEY_DATA_1
1233 through CLEAR_KEY_DATA_d.
1235 3.  Compute the d hash values
1237 STANDARD_LENGTH_KEY_i := Hash( i, "sl"^i, WRITE_KEY, "sl"^i, 
1238 CLEAR_KEY_DATA_i ).
1240 The values in quotation marks are treated as (sequences of) ASCII
1241 characters; "x"^i denotes i copies of the string "x" concatenated
1242 together.  The function "Hash" is the one determined by the value of
1243 SH_HASH_SPECS_DATA.  The parameters are input into the hash function
1244 in the order presented above; the variable i is input as a
1245 single-byte unsigned integer.  The WRITE_KEY is the encryption key
1246 (CLIENT_WRITE_KEY or SERVER_WRITE_KEY) being expanded to standard
1247 length. If the length of the WRITE_KEY is not an exact number of
1248 bytes, then its final byte is padded with zeroes to increase its
1249 length to an exact number of bytes.
1251 4.  Concatenate STANDARD_LENGTH_KEY_1 through STANDARD_LENGTH_KEY_d,
1252 and then truncate as necessary (by removing bits from the end) to
1253 produce the STANDARD_LENGTH_KEY which is actually used for encryption.
1255 The KEY_ARG_DATA field contains a random eight-byte value to be used
1256 as an initialization vector (IV) for the first encrypted message when
1257 a block cipher (any cipher except RC4) is used.  The IV for the first
1258 block encrypted in any subsequent encrypted message is simply the last
1259 encrypted block of the previous message.  The KEY_ARG_DATA field is
1260 empty when cipher type PCT_CIPHER_RC4 (or key exchange type
1261 PCT_EXCH_RSA_PKCS1_TOKEN_RC4) is used.
1263 PCT_CIPHER_DES denotes DES (see [4]).  Its standard key length is 56
1264 bits.  PCT_CIPHER_DES_112 and PCT_CIPHER_DES_168 denote ciphers in
1265 which the input is first encrypted under DES with a first key, then
1266 "decrypted" under DES with a second key, then encrypted under DES with
1267 a third key.  For PCT_CIPHER_DES_112, the first and third keys are
1268 identical, and correspond to the initial 56 bits of the 112-bit
1269 WRITE_KEY.  The second key corresponds to the final 56 bits of the
1270 WRITE_KEY.  For PCT_CIPHER_DES_168, the three keys are distinct, and
1271 correspond to the first, second, and third 56-bit subsegments of the
1272 WRITE_KEY.  All three of these DES-based cipher types have 64-bit data
1273 blocks and are used with cipher block chaining (CBC).
1276 Benaloh/Lampson/Simon/Spies/Yee                                [Page 22]
1277 \fInternet Draft              The PCT Protocol               November 1995
1280 The standard key lengths for PCT_CIPHER_DES_112 and PCT_CIPHER_DES_168
1281 are 112 bits and 168 bits, respectively.  If a key length less than
1282 the standard length is specified for one of these ciphers (or for
1283 PCT_CIPHER_DES), then the WRITE_KEY is expanded to the standard length
1284 as described above.
1286 Note that before use, each 56-bit DES key must be "adjusted" to add
1287 eight parity bits to form an eight-byte DES key (see [4]).  Similarly,
1288 if the specified WRITE_KEY length is less than its corresponding
1289 standard length, then each WRITE_KEY is expanded to the standard
1290 length using CLEAR_KEY_DATA as described above, to produce one, two,
1291 or three keys of 56 bits each, which are then each "adjusted" by
1292 adding parity bits to form an eight-byte key.
1294 PCT_CIPHER_IDEA denotes the IDEA block cipher (see [5]), with 64-bit
1295 data blocks and cipher block chaining.  This cipher has a standard key
1296 length of 128 bits.
1298 PCT_CIPHER_RC2 denotes the RC2 block cipher, with 64-bit blocks and
1299 cipher block chaining.  Like IDEA, this cipher has a standard key
1300 length of 128 bits.
1302 PCT_CIPHER_RC4 denotes the RC4 stream cipher.  Like the IDEA and RC2
1303 block ciphers, this cipher has a standard key length of 128 bits.
1305 5.3.3  Hash Types
1307 PCT version 1 permits the following hash function types to be
1308 specified:
1310 PCT_HASH_MD5
1311 PCT_HASH_MD5_TRUNC_64
1312 PCT_HASH_SHA
1313 PCT_HASH_SHA_TRUNC_80
1314 PCT_HASH_DES_DM
1316 PCT_CIPHER_MD5 denotes the MD5 hash function (see [6]), with 128-bit
1317 output.  PCT_CIPHER_MD5_TRUNC_64 denotes the MD5 hash function, with
1318 its 128-bit output truncated to 64 bits.  PCT_HASH_SHA denotes the
1319 Secure Hash Algorithm (see [7]), with 160-bit output.
1320 PCT_HASH_SHA_TRUNC_80 denotes the Secure Hash Algorithm, with its
1321 160-bit output truncated to 80 bits.  PCT_HASH_DES_DM denotes the
1322 DES-based Davies-Meyer hash algorithm (see [8]), with 64-bit output.
1325 5.3.4  Certificate Types
1327 PCT version 1 permits the following certificate types to be specified:
1329 PCT_CERT_NONE
1330 PCT_CERT_X509
1331 PCT_CERT_PKCS7
1334 Benaloh/Lampson/Simon/Spies/Yee                                [Page 23]
1335 \fInternet Draft              The PCT Protocol               November 1995
1338 These types apply equally to the client's and server's certificates.
1339 PCT_CERT_NONE denotes that no certificate is necessary; this type can
1340 be included by, say, the server as a choice, thereby making
1341 authentication optional for the client.  PCT_CERT_X509 denotes a
1342 CCITT X.509 standard-conformant certificate (see [9]).
1343 PCT_CERT_PKCS7 denotes an RSA PKCS#7 standard-conformant certificate
1344 (see [10]).
1347 5.3.5  Signature Types
1349 PCT version 1 permits the following signature key types to be
1350 specified:
1352 PCT_SIG_NONE
1353 PCT_SIG_RSA_MD5
1354 PCT_SIG_RSA_SHA
1355 PCT_SIG_DSA_SHA
1357 PCT_SIG_NONE denotes that no signature is necessary; this type can be
1358 included by the server as a choice, thereby making authentication
1359 optional for the client.  PCT_SIG_RSA_MD5 denotes the signature scheme
1360 consisting of hashing the data to be signed using the MD5 hash
1361 algorithm, and then performing an RSA private-key signature function
1362 (the inverse of RSA encryption) on the result.  The signature must
1363 conform to RSA PKCS#1, block type 1 (see [2]).  PCT_SIG_RSA_SHA
1364 denotes the same signature scheme with SHA substituted for MD5.
1365 PCT_SIG_DSA_SHA denotes the signature scheme consisting of hashing the
1366 data to be signed using the SHA hash algorithm, then computing a
1367 signature of the resulting value using the Digital Signature Algorithm
1368 (DSA; see [11]).
1371 5.4 Errors
1373 Error handling in the PCT protocol is very simple.  When an error is
1374 detected during the handshake phase, the detecting party sends a
1375 message to the other party indicating the error so that both parties
1376 will know about it, and then closes the connection.  If a party
1377 detects an error after it has sent its last handshake message, the
1378 detecting party simply closes the connection without sending an error
1379 message.  In the second case there are only two possible errors, and
1380 the party that does not detect the error can distinguish them as
1381 follows: if the server sees an aborted connection and the most recent
1382 message it sent the client was a handshake message, then the error was
1383 SERVER_AUTH_FAILED; otherwise, the error was INTEGRITY_CHECK_FAILED.
1385 Receiving an error message also causes the receiving party to close
1386 the connection.  Servers and clients should not make any further use
1387 of any keys, challenges, connection identifiers, or session
1388 identifiers associated with such an aborted connection.
1392 Benaloh/Lampson/Simon/Spies/Yee                                [Page 24]
1393 \fInternet Draft              The PCT Protocol               November 1995
1396 It is recommended that implementations perform some kind of alert or
1397 logging function when errors are generated to facilitate monitoring of
1398 various types of attack on the system.
1401 The message sent in the event of a handshake-phase error has the
1402 following form:
1404 char MSG_ERROR
1405 char ERROR_CODE_MSB
1406 char ERROR_CODE_LSB
1407 char ERROR_INFO_LENGTH_MSB
1408 char ERROR_INFO_LENGTH_LSB
1409 char ERROR_INFO_DATA[(MSB << 8)|LSB]
1411 The ERROR_INFO_LENGTH field is zero except in the case of the
1412 SPECS_MISMATCH error message, which has a six-byte ERROR_INFO_DATA
1413 field.
1415 The PCT Handshake Protocol defines the following errors:
1417 PCT_ERR_BAD_CERTIFICATE
1419 This error occurs when the client receives a SERVER_HELLO message in
1420 which the certificate is invalid, either because one or more of the
1421 signatures in the certificate is invalid, or because the identity or
1422 attributes on the certificate are in some way incorrect.
1424 PCT_ERR_CLIENT_AUTH_FAILED
1426 This error occurs when the server receives a CLIENT_MASTER_KEY message
1427 from the client in which the client's authentication response is
1428 incorrect.  The certificate may be invalid, the signature may be
1429 invalid, or the contents of the signed response may be incorrect.
1431 PCT_ERR_ILLEGAL_MESSAGE
1433 This error occurs under a number of circumstances.  For example, it
1434 occurs when an unrecognized security escape code is received, when an
1435 unrecognized handshake message is encountered, or when the value of
1436 CH_OFFSET is to large for its CLIENT_HELLO message.
1438 PCT_ERR_INTEGRITY_CHECK_FAILED
1440 This error occurs when either the client or the server receives a
1441 message in which the MAC_DATA is incorrect.  It is also recommended
1442 that the record be treated as if it contained no data, in order to
1443 ensure that applications do not receive and process invalid data
1444 before learning that it has failed its integrity check.
1446 This error also occurs when the VERIFY_PRELUDE_DATA value sent by the
1447 client in the CLIENT_MASTER_KEY message (during the handshake phase)
1450 Benaloh/Lampson/Simon/Spies/Yee                                [Page 25]
1451 \fInternet Draft              The PCT Protocol               November 1995
1454 is incorrect.  In this case, an error message is sent.
1456 PCT_ERR_SERVER_AUTH_FAILED
1458 This error occurs when the client receives a SERVER_HELLO or
1459 SERVER_VERIFY message in which the authentication response is
1460 incorrect.
1462 PCT_ERR_SPECS_MISMATCH
1464 This error occurs when a server cannot find a cipher, hash function,
1465 certificate type, or key exchange algorithm it supports in the lists
1466 supplied by the client in the CLIENT_HELLO message.  It also occurs
1467 when the client cannot find a certificate or signature type it
1468 supports in the list supplied by the server in a SERVER_HELLO message
1469 that requests client authentication.  (Note that the client or server
1470 can select the "NONE" option as the last resort for any security
1471 feature it wishes to make optional.  For example, the server can make
1472 client authentication optional for the client by passing a list of
1473 certificate and signature types, each list containing the "NONE" type
1474 as the last entry.)  This error may also occur as a result of a
1475 mismatch in cipher specifications or client authentication requests
1476 between the initial specifications and those that resulted from a redo
1477 handshake sequence.
1479 The error message for this error includes a six-byte informational
1480 field, defined as follows:
1482 char SPECS_MISMATCH_CIPHER
1483 char SPECS_MISMATCH_HASH
1484 char SPECS_MISMATCH_CERT
1485 char SPECS_MISMATCH_EXCH
1486 char SPECS_MISMATCH_CLIENT_CERT
1487 char SPECS_MISMATCH_CLIENT_SIG
1489 Each field is set to a non-zero value if and only if the corresponding
1490 list resulted in a mismatch.  For example, if and only if the
1491 SPECS_MISMATCH error message is being sent because server failed to
1492 find a certificate type it supports in the list supplied by the client
1493 in the CH_CERT_SPECS_DATA field, then the SPECS_MISMATCH_CERT field in
1494 the error message would be non-zero.
1496 5.5  Constants
1498 Following is a list of constant values used in the PCT protocol
1499 version 1.
1501 5.5.1  Message type codes
1503 These codes are each placed in the first byte of the corresponding
1504 PCT handshake phase message.
1508 Benaloh/Lampson/Simon/Spies/Yee                                [Page 26]
1509 \fInternet Draft              The PCT Protocol               November 1995
1512 PCT_MSG_CLIENT_HELLO            :=      0x01
1513 PCT_MSG_SERVER_HELLO            :=      0x02
1514 PCT_MSG_CLIENT_MASTER_KEY       :=      0x03
1515 PCT_MSG_SERVER_VERIFY           :=      0x04
1516 PCT_MSG_ERROR                   :=      0x05
1518 5.5.2  Specification Type Codes
1520 These are codes used to specify types of cipher, key exchange, hash
1521 function, certificate, and digital signature in the protocol.
1523 PCT_EXCH_RSA_PKCS1              :=      0x0001
1524 PCT_EXCH_RSA_PKCS1_TOKEN_DES    :=      0x0002
1525 PCT_EXCH_RSA_PKCS1_TOKEN_DES3   :=      0x0003
1526 PCT_EXCH_RSA_PKCS1_TOKEN_RC2    :=      0x0004
1527 PCT_EXCH_RSA_PKCS1_TOKEN_RC4    :=      0x0005
1528 PCT_EXCH_DH_PKCS3               :=      0x0006
1529 PCT_EXCH_DH_PKCS3_TOKEN_DES     :=      0x0007
1530 PCT_EXCH_DH_PKCS3_TOKEN_DES3    :=      0x0008
1531 PCT_EXCH_FORTEZZA_TOKEN         :=      0x0009
1533 PCT_CIPHER_DES          :=      0x0001
1534 PCT_CIPHER_IDEA         :=      0x0002
1535 PCT_CIPHER_RC2          :=      0x0003
1536 PCT_CIPHER_RC4          :=      0x0004
1537 PCT_CIPHER_DES_112      :=      0x0005
1538 PCT_CIPHER_DES_168      :=      0x0006
1540 PCT_HASH_MD5            :=      0x0001
1541 PCT_HASH_MD5_TRUNC_64   :=      0x0002
1542 PCT_HASH_SHA            :=      0x0003
1543 PCT_HASH_SHA_TRUNC_80   :=      0x0004
1544 PCT_HASH_DES_DM         :=      0x0005
1546 PCT_CERT_NONE           :=      0x0000
1547 PCT_CERT_X509           :=      0x0001
1548 PCT_CERT_PKCS7          :=      0x0002
1550 PCT_SIG_NONE            :=      0x0000
1551 PCT_SIG_RSA_MD5         :=      0x0001
1552 PCT_SIG_RSA_SHA         :=      0x0002
1553 PCT_SIG_DSA_SHA         :=      0x0003
1555 5.5.3  Error Codes
1557 These codes are used to identify errors, when they occur, in error
1558 messages.
1560 PCT_ERR_BAD_CERTIFICATE         :=      0x0001
1561 PCT_ERR_CLIENT_AUTH_FAILED      :=      0x0002
1562 PCT_ERR_ILLEGAL_MESSAGE         :=      0x0003
1563 PCT_ERR_INTEGRITY_CHECK_FAILED  :=      0x0004
1566 Benaloh/Lampson/Simon/Spies/Yee                                [Page 27]
1567 \fInternet Draft              The PCT Protocol               November 1995
1570 PCT_ERR_SERVER_AUTH_FAILED      :=      0x0005
1571 PCT_ERR_SPECS_MISMATCH          :=      0x0006
1573 5.5.4  Miscellaneous Codes
1575 These include escape type codes, version numbers, and assorted
1576 constants associated with the PCT protocol.
1578 PCT_SESSION_ID_NONE             :=      0x00 (32 bytes of zeros)
1580 PCT_ET_OOB_DATA                 :=      0x01
1581 PCT_ET_REDO_CONN                :=      0x02
1583 PCT_VERSION_1                   :=      0x8001
1585 PCT_CH_OFFSET_V1                :=      0x000A
1587 PCT_MAX_RECORD_LENGTH_2_BYTE_HEADER :=  32767
1588 PCT_MAX_RECORD_LENGTH_3_BYTE_HEADER :=  16383
1591 6. Security Considerations
1593 This entire document is about security.
1596 References
1598 [1]  K. Hickman and T. Elgamal.  The SSL Protocol.  Internet-draft,
1599 June 1995.
1601 [2]  RSA Laboratories, "PKCS #1: RSA Encryption Standard", Version
1602 1.5, November 1993.
1604 [3]  RSA Laboratories, "PKCS #3: "Diffie-Hellman Key-Agreement
1605 Standard", Version 1.4, November 1993.
1607 [4]  NBS FIPS PUB 46, "Data Encryption Standard", National Bureau of
1608 Standards, US Department of Commerce, Jan. 1977.
1610 [5]  X. Lai, "On the Design and Security of Block Ciphers", ETH Series
1611 in Information Processing, v. 1, Konstanz: Hartung-Gorre Verlag, 1992.
1613 [6]  R. Rivest, RFC 1321: "The MD5 Message Digest Algorithm", April
1614 1992.
1616 [7]  NIST FIPS PUB 180-1, "Secure Hash Standard", National Institute
1617 of Standards and Technology, US Department of Commerce, Apr. 1995.
1619 [8]  ISO/IEC 9797, "Data Cryptographic Techniques--Data Integrity
1620 Mechanism Using a Cryptographic Check Function Employing a Block
1621 Cipher Algorithm", 1989.
1624 Benaloh/Lampson/Simon/Spies/Yee                                [Page 28]
1625 \fInternet Draft              The PCT Protocol               November 1995
1628 [9]  CCITT. Recommendation X.509: "The Directory - Authentication
1629 Framework". 1988.
1631 [10]  RSA Laboratories, "PKCS #7: Cryptographc Message Syntax
1632 Standard", Version 1.5, November 1993.
1634 [11]  NIST FIPS PUB 186, "Digital Signature Standard", National
1635 Institute of Standards and Technology, US Department of Commerce, May
1636 1994.
1638 [12]  B. Schneier, "Applied Cryptography: Protocols, Algorithms, and
1639 Source Code in C", John Wiley & Sons, Inc., 1994.
1641 [13]  R.L. Rivest, A. Shamir, L. Adelman, "A Method for Obtaining
1642 Digital Signatures and Public Key Cryptosystems" MIT Laboratory for
1643 Computer Science and Department of Mathematics, S.L. Graham,
1644 R.L. Rivest ed. Communications of the ACM, February 1978 (Vol 21,
1645 No. 2) pages 120-126.
1647 Patent Statement
1649 This version of the PCT protocol relies on the use of patented public
1650 key encryption technology for authentication and encryption. The
1651 Internet Standards Process as defined in RFC 1310 requires a written
1652 statement from the Patent holder that a license will be made
1653 available to applicants under reasonable terms and conditions prior
1654 to approving a specification as a Proposed, Draft or Internet
1655 Standard.
1657 See existing RFCs, including RFC 1170, that discuss known public key
1658 cryptography patents and licensing terms and conditions.
1660 The Internet Society, Internet Architecture Board, Internet
1661 Engineering Steering Group and the Corporation for National Research
1662 Initiatives take no position on the validity or scope of the patents
1663 and patent applications, nor on the appropriateness of the terms of
1664 the assurance. The Internet Society and other groups mentioned above
1665 have not made any determination as to any other intellectual property
1666 rights which may apply to the practice of this standard. Any further
1667 consideration of these matters is the user's own responsibility.
1669 Author's Address
1671 Josh Benaloh/Butler Lampson/Daniel R. Simon/Terence Spies/Bennet Yee
1672 Microsoft Corp.
1673 One Microsoft Way
1674 Redmond WA 98052
1677 pct@microsoft.com
1679 This Internet-Draft expires 27 March 1996.
1682 Benaloh/Lampson/Simon/Spies/Yee                                [Page 29]