Sunteți pe pagina 1din 4

protocol is secure (i.e.

, can be used to establish a secure


channel).
We will show that the protocol is not secure when
communication keys are compromised, and propose a
solution Using timestamps. Although the likelihood of
Technical Note R. Stockton Gaines*
such a compromise may be small, the timestamps are
Operating Systems Editor
useful for another reason: they can replace a two-step
Timestamps in Key handshake designed to prevent replays of (noncomprom-
ised) keys.
Distribution Protocols We also show that timestamps can replace the hand-
shake in the Needham and Schroeder protocol for public
Dorothy E. Denning and Giovanni Maria Sacco key systems. Here the AS is responsible for distributing
Purdue University users' public keys; it does not require access to their
private keys. Because there are no secret communication
keys, their compromise is not an issue. However, time-
The distribution of keys in a computer network using stamps are valuable in public key systems to ensure the
single key or public key encryption is discussed. We integrity o f keys.
consider the possibility that communication keys may be Public key systems also provide an alternate method
compromised, and show that key distribution protocols of exchanging communication keys for single-key data
with timestamps prevent replays of compromised keys. encryption. As before, timestamps protect against replays
The timestamps have the additional benefit of replacing o f previously compromised communication keys.
a two-step handshake. No protocol is secure if users' private keys are com-
Key Words and Phrases: encryption, encryption keys, promised. We conclude with a brief discussion o f the
key distribution, communications, security, timestamps. threats to private keys in both types of systems.
CR Categories: 3.81, 4.39

II. Single Key Systems


I. Introduction
A. Distribution of Communication Keys
Secure communication between two users on a com- Needham and Schroeder assume that each user A
puter network is possible using either single key (con- has a private (secret) key KA which is known only to A
ventional) encryption or public key encryption. In both and AS. If two users wish secure communication, one of
systems, key distribution protocols are needed so the them obtains a secret communication key CK from AS
users can acquire keys to establish a secure channel. In and gives a copy to the other. If a new key is obtained
single key systems, the users must acquire a shared for each conversation, a user need not keep a list of
communication key; in public-key systems [2], the users secret communication keys for all his correspondents.
must acquire each others' public keys. The key distribution protocol is as follows. Let (x} r
Needham and Schroeder propose key distribution denote the message x enciphered under key K. For a
protocols for both single key and public key systems user A to acquire a key CK to share with another user B,
based on a centralized key distribution facility called an these steps are taken:
Authentication Server (AS) [6]. Their protocol for a
single key system assumes that the AS is responsible for A ~ AS: A, B, IA (1)
generating and distributing all communication keys, and AS ~ A : {Ia, B, CK, Y} KA (2)
that each user has registered a private (secret) key with
the AS. The AS uses the private keys to protect ( b y where Ia is an identifier chosen by A and used only once,
encryption) the communication keys transmitted to the and Y = {CK, A} KR. Because Ia is returned by AS,
users. If communication keys and private keys are never enciphered under A's secret key, A can be sure that the
compromised (as Needham and Schroeder assume), the response (2) is not a replay o f a previous response. A
then sends to B the message Y, which contains a copy of
CK enciphered under B's private key:
Permission to copy without fee all or part of this material is
granted provided that the copies are not made or distributed for direct
commercial advantage, the ACM copyright notice and the title of the A ~ B: Y. (3)
publication and its date appear, and notice is given that copying is by
permission of the Association for Computing Machinery. To copy B. The Handshake
otherwise, or to republish, requires a fee and/or specificpermission.
* Former editor of Operating Systemsdepartment, of which Anita After step (3), A can be sure that the key CK is safe
K. Jones is the current editor. to use. However, B cannot be sure that the enciphered
This research was supported in part by NSF Grant MCS77-04835. message Y and subsequent messages supposedly sent
Authors' present address: Computer SciencesDept., Purdue Univ.,
W. Lafayette, IN 47907. from A are not replays of previous messages. To protect
© 1981ACM 0001-0782/81/0800-0533 $00.75 against replays, a handshake between B and A follows:

533 Communications August.


of Volume 24
the ACM Number 8
B --* A: {IB} cr (4) A ~ AS: A, B (1)
.4 .-, B: ( f ( I B ) ) c r (5) AS ~ A : { B, CK, T, Y) K~ (2)
where In is an identifier chosen by B. A signals his A ~ B: Y (3)
intention to use CK by returning an agreed f u n c t i o n f of
where Y = {,4, CK, T)r~.
IB; f could be something simple like f ( I ) = I - 1. The
A and B can verify that their messages are not replays
complete sequence of steps 0)-(5) establishes a secure
by checking that
channel between A and B as long as previous commu-
nication keys and private keys have not been compro- IClock - TI < Atl + At2
mised.
where Clock gives the local time, Atl is an interval
representing the normal discrepancy between the server's
C. Compromises of Communication Keys clock and the local clock, and A t2 is an interval repre-
If the encryption algorithms are strong and keys senting the expected network delay time. If each node
random, it is unlikely that communication keys will be sets its clock manually by reference to a standard source,
compromised by cryptanalysis. We are more concerned a value of about one or two minutes for A tl would
with the communication key's direct exposure due to suffice. As long as A t I + A t2 is less than the interval
negligence or a design flaw in the system, i.e., an intruder since the last use of the protocol, this method will protect
may be able to break into the AS or into A's or B's against replays. Since the timestamp T is enciphered
computer and steal a key. under the private keys KA and KB, impersonation of the
Let us suppose that a third party C has intercepted AS is impossible.
and recorded all the messages between A and B in steps Needham and Schroeder suggested caching old com-
(3)-(5), and that C has obtained a copy of the commu- munication keys to reduce the number of steps required
nication key CK. C can then later trick B into using the to initiate a conversation. Caching is not recommended
CK as follows: First C replays the message Y to B: here, because the timestamps would become obsolete.
Needham and Schroeder suggested timestamps as a
C - * B: (CK, A} KB. way to validate the time integrity of one way communi-
Thinking that A has initiated a new conversation, B cations such as computer mail. They rejected timestamps
requests a handshake from A : in their key distribution protocol because there might
not be a network-wide reliable source of time. As we
B-.-* A: {I'n) oK. have argued, timestamps can be used reliably even if the
C intercepts the message, deciphers it, and impersonates settings of local clocks are not completely reliable. How-
A's response: ever, this approach may not be suitable for all types of
connections--e.g., connections to terminals without local
A .-~ B: (f(I'n)} cK. day-date clocks.
Thereafter, C can send bogus messages to B that appear
to be from A, intercepting and deciphering B's replies.
Note, however, that A can still communicate safely with III. Public Key Systems
B by initiating a new conversation (assuming A's at-
tempts are not blocked by C), and that B can commu- A. Distribution of Public Keys
nicate safely with other users. Timestamps can also be added to Needham's and
Of course, C cannot impersonate A's response to B Schroeder's protocols for public key systems. Here the
in the handshake without knowing the handshake func- AS stores and distributes users' public keys; it does not
tion f. But the problem of securing secret handshake necessarily have access to their private (secret) keys. As
functions is as difficult as the problem of securing com- in single key systems, the handshake is no longer needed.
munication keys. Users must either privately exchange Furthermore, if the AS distributes public keys inside
and remember permanent handshake functions, or they "certificates" [3], the entire protocol can be reduced to
must obtain them from the AS. If the former approach three steps (from the original seven). Letting PA and SA
is taken, then users may as well exchange directly their denote A's public key and secret (signature) key, respec-
communication keys and dispense with the handshake tively, the complete protocol is
functions. If the latter approach is taken, the problem of A ~AS:A,B (I)
distributing handshake functions is identical to the prob-
lem of distributing keys. AS --* A : CA, CB (2)
A -..* B: CA, CB (3)
D. Timestamps where
If private keys are secure, we can solve the above CA = (A, Pa, T) SAs and CB = ( B, PB, T} Sas
problem and eliminate the handshake by adding a time-
stamp T to steps (2) and (3). The new protocol is thus: are certificates containing, respectively, A's and B's pub-

534 Communications August


of Volume 24
the ACM Number 8
lic keys. The certificates are signed by the AS using its about the third method of attack. An intruder, for ex-
secret key SAs to prevent forgery. Both A and B are ample, might be able to break into the AS, or discover
given copies of their own certificates, so they can validate the user's password and log directly onto his computer.
their own public keys. In this sense, private keys are more vulnerable than
Because public keys are readily available to all users, communication keys, because the AS must keep a list of
their exposure is not an issue. However, their integrity is all private keys, and they have a longer lifetime than
essential, so they still require a high level of protection. communication keys. Although the keys can be en-
The use of timestamps as well as signed certificates helps crypted under a master key at the AS and stored in
protect against replays of old keys or substitution of special hardware (e.g., see [4]), they are never absolutely
bogus keys. Popek and Kline included both in their safe. Because of these vulnerabilities, a mechanism is
public key distribution protocols [7]. needed to generate and distribute new private keys.
Exposure of private keys in public key systems poses
B. Distribution of Communication Keys an equally serious threat. There are two possibilities:
Public key distribution protocols can also be used to exposure of user's private keys, and exposure of the
distribute communication keys for single-key data en- private key used by the AS to sign certificates.
cryption [2, 5]. The above protocol becomes If a user's private key is exposed, all messages sent to
him enciphered under his corresponding public key may
A ---* AS: A, B (1)
be compromised, and his signature may be forged on
AS ~ A: CA, CB (2) other messages. Moreover, he may be able to disavow
A ~ B: CA, CB, {{CK, T} sA} PA (3) his signature on a previously signed message, claiming
that his private key was lost or stolen before the message
The key CK is then used for encrypting messages trans- was signed [8]. (Merkle solves the problems with digital
mitted between A and B. Because the CK is chosen and signatures by having a timekeeper affLXa timestamp and
encrypted by A, there is no risk of its exposure by the its own signature to a signed message [5].) If compromises
AS; however, it is still vulnerable to compromise in A's are reported to the AS and public keys are obtained
or B's computer. Here again, timestamps protect against from the AS immediately prior to use, timestamps are
replays of compromised keys. useful for validating the time integrity of keys.
Because the AS does not have access to users' private
keys, these keys cannot be leaked or stolen from the AS,
IV. Compromises of Private Keys eliminating one of the threats of single key systems.
Moreover, users' private keys need not be stored in the
The exposure of users' private keys poses a much system at all; they could be recorded in ROM or mag-
more serious threat which is not eliminated by the time- netic stripe cards, and inserted into a special reader
stamp protocols. In a single key system, private keys are attached to the users terminal, greatly reducing the threat
used by the AS to encipher all communication keys of any type of attack on the system[l]. The only remain-
transmitted to the user. (Private keys may be used for ing threats are cryptanalysis and intentional leaks on the
other purposes as well, but this is not pertinent to the part of the user.
present discussion.) If an intruder compromises a user's There is still the problem of protecting the AS's
private key, he can decipher any communication key private signature key, which may be leaked or stolen
sent to the user; he can also impersonate the AS and from the AS. Again, this key need not be stored inside
trick the user into accepting and using a false commu- an accessible location of the system. Merkle has sug-
nication key. All information transmitted to or from the gested a method for producing certificates that does not
user is thus vulnerable to attack. Indeed, the intruder can require a digital signature from the AS[5].
even impersonate the user.
There are several methods by which a user's private
key may be compromised: V. Conclusions
(a) An intruder may record messages enciphered with
We have shown that key distribution protocols with
the key and compromise it by cryptanalysis.
timestamps prevent replays of previously compromised
(b) The AS may be untrustworthy and leak the key.
communication keys. Even if the likelihood of compro-
(c) An intruder may exploit a design flaw in the system
mise is small, the timestamps have the benefit of replac-
and steal the key.
ing a two=step handshake. We recommended their inclu-
As with communication keys, the first method is unlikely sion in all key distribution protocols.
to succeed if the encryption algorithm is strong and keys
are random--especially if the private keys are used only Acknowledgments. We wish to thank P. Denning,
to encipher random communication keys. The second A. Jones, S. Kent, C. Kline, G. Popek, and the referees
method is also unlikely to succeed if the AS is verified for many helpful suggestions, and J. Gray, R. Needham,
for correctness and security. We are primarily concerned and M. Schroeder for helpful discussions.

535 Communications August


of Volume24
the ACM Number 8
Received 11/79; revised 1/81; accepted 3/81 5. Merkle, R. C. Protocols for public key cryptosystems. Proc. 1980
Syrup. on Security and Privacy, IEEE Catalog No. 80 CH 1522-2
References (April 1980) 122-133.
i. Denning, D. E. Secure personal computing in an insecure 6. Needham, R. M., and Schroeder, M. Using encryption for
network. Comm. A C M 22, 8 (Aug. 1979) 476-482.
2. Diffie, W., and Hellman, M., New directions in cryptography. authentication in large networks of computers. Comm. A CM 21, 12
IEEE Trans. on Info. Theory IT-22, 6 (Nov. 1976) 644--654. (Dec. 1978) 993-999.
3. Konfelder, L. M., A method for certification. Lab. for Computer 7. Popek, G. J., and Kline, C. S. Encryption and secure computer
Science, MIT, Cambridge, Mass. (May 1978). networks. Comput. Surv. 11, 4 (Dec. 1979) 331-356.
4. Matyas, S. M., and Meyer, C. H. Generation, distribution, and 8. Saltzer, J. On digital signatures Oper. Syst. Rev. 12, 2 (April
installation of cryptographic keys. I B M Syst. J. 17, 2 (1978) 126-137. 1978) 12-14.

technical .
corresponaence
File Updating-Still Once More s y n c h r o n i z a t i o n o f the (sequential) the o l d file, the t r a n s a c t i o n s file, o r
files i n v o l v e d b u t c o n s i d e r e d the even the u p d a t e d file. A n y o f t h e m
[ ] I r e a d w i t h g r e a t interest B a r r y p r o b l e m f r o m different viewpoints: c o u l d be privileged.
D w y e r ' s article o n h o w to u p d a t e a
m a s t e r file in the J a n u a r y issue o f PROCEDURE DIVISION.
UPDATE-SEQUENTIAL-FILES.
C o m m u n i c a t i o n s [1]. M y interest was
OPEN INPUT OLD-FILE, TRANSACTION-FILE,
b a s e d o n s o m e w o r k I h a v e d o n e in OUTPUT MASTER-FILE.
the past. A l t h o u g h I h a v e n o t b e e n
a b l e to see all the r e f e r e n c e d litera- PERFORM READ-OLD-RECORD.
PERFORM READ-A-TRANSACTION.
ture ( I d o n o t h a v e a v a i l a b l e M c - PERFORM CLEAR-MASTER-RECORD.
C r a c k e n ' s [2] o r J a c k s o n ' s [3] work), PERFORM CHOOSE-NEXT-FILE-KEY
D i j k s t r a ' s [4] e x a m p l e stresses t h a t PERFORM PROCESS-ONE-FILE-KEY
the k e y to a n e a t s o l u t i o n is the UNTIL CURRENT-KEY=SENTINEL.
buildup of "the merged sequence" of CLOSE OLD-FILE, TRANSACTION-FILE, MASTER-FILE.
STOP RUN.
all the d i f f e r e n t r e c o r d s w i t h the
s a m e key. T h e p r o c e s s i n g o f the se- PROCESS-ONE-FILE-KEY.
quence, o n c e a l r e a d y built, d e p e n d s IF OLD-KEY=CURRENT-KEY
o n the specific case: types o f records, PERFORM INITIAL-STATUS
PERFORM READ-OLD-RECORD
their origin a n d m e a n i n g , a n d the ELSE IF TRANSACTION-KEY=CURRENT-KEY
a n s w e r to special cases a n d se- PERFORM APPLY-TRANSACTION-TO-MASTER
quences. Y o u c a n t h i n k o f a r e c o r d PERFORM READ-A-TRANSACTION
in the o l d file as e q u i v a l e n t to a n ELSE IF MASTER-KEY=CURRENT-KEY
WRITE MASTER
a d d i t i o n r e c o r d in the t r a n s a c t i o n s
PERFORM CLEAR-MASTER-RECORD.
file. PERFORM CHOOSE-NEXT-FILE-KEY
So, a p a r t f r o m the r e q u i r e d prec-
e d e n c e for those records, the t o t a l INITIAL-STATUS.
MOVE OLD TO MASTER
" m e r g e d s e q u e n c e " is t h e basis for
MOVE CURRENT-KEY TO MASTER-KEY.
the answer: h o w to b u i l d it a n d h o w
to process it. CLEAR-MASTER-RECORD
T h e w o r k I r e f e r r e d to initially, MOVE ZEROS TO MASTER
" N o t a s sobre la p r o g r a m a c i 6 n es- MOVE SENTINEL TO MASTER-KEY.
t r u c t u r a d a y la t a r r a c o t i d i a n a : A c - READ-OLD-RECORD.
t u a l i z a c i 6 n d e a r c h i v o s " [5], ( w h i c h READ OLD-FILE
I assume almost nobody has read AT END MOVE SENTINEL TO TRANSACTION-KEY.
abroad), had a didactic objective--
READ-A-TRANSACTION.
to i n t r o d u c e S t r u c t u r e d P r o g r a m - READ TRANSACTION-FILE
m i n g in e v e r y d a y activities. I n it, I AT END MOVE SENTINEL TO TRANSACTION-KEY.
s h o w e d h o w a p r o b l e m w h i c h was
CHOOSE-NEXT-FILE-KEY.
faced every day and which usually IF TRANSACTION-KEY<OLD-KEY MOVE TRANSACTION-KEY TO CUR-
led to i n t r i c a t e a n s w e r s c o u l d be seen RENT-KEY
in fresh n e w w a y s a n d b e n e a t l y ELSE MOVE OLD-KEY TO CURRENT-KEY.
solved. I also gave i m p o r t a n c e to the IF MASTER-KEY<CURRENT-KEY MOVE MASTER-KEY TO CURRENT-KEY

536 Communications August 1981


of Volume 24
the ACM Number 8

S-ar putea să vă placă și