chap-15(cs)
chap-15(cs)
473
LEARNING OBJECTIVES
After studying this chapter, you should be able to:
◆◆ Discuss the concept of a key hierarchy.
◆◆ Understand the issues involved in using asymmetric encryption to distribute
symmetric keys.
◆◆ Present an overview of approaches to public-key distribution and analyze
the risks involved in various approaches.
◆◆ List and explain the elements in an X.509 certificate.
◆◆ Present an overview of public-key infrastructure concepts.
The secure use of cryptographic key algorithms depends on the protection of the
cryptographic keys. All keys need to be protected against modification, and se-
cret and private keys need to be protected against disclosure. Cryptographic key
management is the process of administering or managing cryptographic keys for a
cryptographic system. It involves the generation, creation, protection, storage, ex-
change, replacement, and use of keys and enables selective restriction for certain
keys. In addition to access restriction, key management also involves the monitor-
ing and recording of each key’s access, use, and context. A key management system
will also include key servers, user procedures, and protocols, including cryptographic
protocol design. The security of the cryptosystem is dependent upon successful key
management.
The topics of cryptographic key management and cryptographic key distri-
bution are complex, involving cryptographic, protocol, and management consider-
ations. The purpose of this chapter is to give the reader a feel for the issues involved
and a broad survey of the various aspects of key management and distribution. For
more information, the place to start is the three-volume NIST SP 800-57, followed
by the recommended readings listed at the end of this chapter.
This section looks at techniques for distributing secret keys using only symmetric
encryption techniques.
n(n - 1)
2
If encryption is done at the application level, then a key is needed for every
pair of users or processes that require communication. Thus, a network may have
hundreds of hosts but thousands of users and processes. A network using node-level
encryption with 1000 nodes would conceivably need to distribute as many as half a
million keys. If that same network supported 10,000 applications, then as many as
50 million keys may be required for application-level encryption.
Returning to our list, option 3 is a possibility for either link encryption or end-
to-end encryption, but if an attacker ever succeeds in gaining access to one key, then
all subsequent keys will be revealed. Furthermore, the initial distribution of poten-
tially millions of keys must still be made.
For end-to-end encryption, some variation on option 4 has been widely ad-
opted. In this scheme, a key distribution center is responsible for distributing keys
to pairs of users (hosts, processes, applications) as needed. Each user must share a
unique key with the key distribution center for purposes of key distribution.
(1) Request,
(1) Request,
E(Kma, Ks)
E(Kma, Ks) Key (2) E(Kmb, Ks) Key
Translation Translation
Center Center
(2) E(Kmb, Ks)
temporary session key that will last for the duration of a logical connection, such as
a TCP connection. A and B each share a long-lasting master key with a third party
that is involved in providing the session key. For this discussion, the session key
is labeled Ks and the master key between entities A and B and the third party are
labeled Kma and Kmb, respectively.
A key translation center (KTC) transfers symmetric keys for future commu-
nication between two entities, at least one of whom has the ability to generate or
acquire symmetric keys by themselves. Entity A generates or acquires a symmetric
key to be used as a session key for communication with B. A encrypts the key using
the master key it shares with the KTC and sends the encrypted key to the KTC. The
KTC decrypts the session key, reencrypts the session key in the master key it shares
with B, and either sends that reencrypted session key to A (Figure 15.1a) for A to
forward to B or sends it directly to B (Figure 15.1b).
A key distribution center (KDC) generates and distributes session keys.
Entity A sends a request to the KDC for a symmetric key to be used as a session key
for communication with B. The KDC generates a symmetric session key, and then
encrypts the session key with the master key it shares with A and sends it to A. The
KDC also encrypts the session key with the master key is shares with B and sends
it to B (Figure 15.1c). Alternatively, it sends both encrypted key values to A, and A
forwards the session key encrypted with the master key shared by the KDC and B
to B (Figure 15.1d).
The foregoing discussion leaves out a number of details. For example,
parties that exchange keys need to authenticate themselves to each other.
Key Hierarchy
A common requirement in a variety of protocols, such as IEEE 802.11i and IPsec,
discussed in Part Six, is for the encryption of a symmetric key so that it can be dis-
tributed to two parties for future communication. Quite often, a protocol calls for
a hierarchy of keys, with keys lower on the hierarchy used more frequently, and
changed more frequently to thwart attacks (Figure 15.2). A higher-level key, which
is used infrequently and therefore more resistant to cryptanalysis, is used to encrypt
a newly created lower-level key so that it can be exchanged between parties that
share the higher-level key. The term ephemeral key in Figure 15.2 refers to a key
that is used only once or at most is very short-lived.
Master keys
Inc
rea
e
s
tim
ing
life
freq
ing
uen
s
rea
cy
Inc
of
use
Intermediate-level keys
Ephemeral keys
Because of the inefficiency of public-key cryptosystems, they are almost never used
for the direct encryption of sizable blocks of data, but are limited to relatively small
blocks. One of the most important uses of a public-key cryptosystem is to encrypt
secret keys for distribution. We see many specific examples of this in Part Five.
Here, we discuss general principles and typical approaches.
A B
PUa, IDA
PUd, IDA
E(PUd, Ks)
Ks 5
D(PRd, E(PUd, Ks))
E(PUa, Ks)
Initiator Responder
A B
Several techniques have been proposed for the distribution of public keys. Virtually
all these proposals can be grouped into the following general schemes:
■■ Public announcement
■■ Publicly available directory
■■ Public-key authority
■■ Public-key certificates
PUa PUb
PUa PUb
A B
PUa PUb
PUa PUb
Public-key
directory
PUa PUb
A B
3. A participant may replace the existing key with a new one at any time, either
because of the desire to replace a public key that has already been used for
a large amount of data, or because the corresponding private key has been
compromised in some way.
4. Participants could also access the directory electronically. For this purpose,
secure, authenticated communication from the authority to the participant is
mandatory.
This scheme is clearly more secure than individual public announcements
but still has vulnerabilities. If an adversary succeeds in obtaining or computing the
private key of the directory authority, the adversary could authoritatively pass out
counterfeit public keys and subsequently impersonate any participant and eaves-
drop on messages sent to any participant. Another way to achieve the same end is
for the adversary to tamper with the records kept by the authority.
Public-Key Authority
Stronger security for public-key distribution can be achieved by providing tighter
control over the distribution of public keys from the directory. A typical scenario
is illustrated in Figure 15.8, which is based on a figure in [POPE79]. As before, the
scenario assumes that a central authority maintains a dynamic directory of public
keys of all participants. In addition, each participant reliably knows a public key for
the authority, with only the authority knowing the corresponding private key. The
following steps (matched by number to Figure 15.8) occur.
1. A sends a timestamped message to the public-key authority containing a
request for the current public key of B.
2. The authority responds with a message that is encrypted using the authority’s
private key, PRauth. Thus, A is able to decrypt the message using the author-
ity’s public key. Therefore, A is assured that the message originated with the
authority. The message includes the following:
(1) Request || T1
(4) Request || T2
■ B’s public key, PUb, which A can use to encrypt messages destined for B
■ The original request used to enable A to match this response with the cor-
responding earlier request and to verify that the original request was not
altered before reception by the authority
■ The original timestamp given so A can determine that this is not an old mes-
sage from the authority containing a key other than B’s current public key
3. A stores B’s public key and also uses it to encrypt a message to B containing
an identifier of A (IDA) and a nonce (N1), which is used to identify this trans-
action uniquely.
4, 5. B retrieves A’s public key from the authority in the same manner as A retrieved
B’s public key.
At this point, public keys have been securely delivered to A and B, and they
may begin their protected exchange. However, two additional steps are desirable:
6. B sends a message to A encrypted with PUa and containing A’s nonce (N1) as well
as a new nonce generated by B (N2). Because only B could have d ecrypted mes-
sage (3), the presence of N1 in message (6) assures A that the correspondent is B.
7. A returns N2, which is encrypted using B’s public key, to assure B that its
correspondent is A.
Thus, a total of seven messages are required. However, the initial five
essages need be used only infrequently because both A and B can save the other’s
m
public key for future use—a technique known as caching. Periodically, a user should
request fresh copies of the public keys of its correspondents to ensure currency.
Public-Key Certificates
The scenario of Figure 15.8 is attractive, yet it has some drawbacks. The public-key
authority could be somewhat of a bottleneck in the system, for a user must appeal
to the authority for a public key for every other user that it wishes to contact.
As before, the directory of names and public keys maintained by the authority is
vulnerable to tampering.
An alternative approach, first suggested by Kohnfelder [KOHN78], is to use
certificates that can be used by participants to exchange keys without contacting a
public-key authority, in a way that is as reliable as if the keys were obtained directly
from a public-key authority. In essence, a certificate consists of a public key, an
identifier of the key owner, and the whole block signed by a trusted third party.
Typically, the third party is a certificate authority, such as a government agency or
a financial institution, that is trusted by the user community. A user can present
his or her public key to the authority in a secure manner and obtain a certificate.
The user can then publish the certificate. Anyone needing this user’s public key can
obtain the certificate and verify that it is valid by way of the attached trusted signa-
ture. A participant can also convey its key information to another by transmitting
its certificate. Other participants can verify that the certificate was created by the
authority. We can place the following requirements on this scheme:
1. Any participant can read a certificate to determine the name and public key of
the certificate’s owner.
2. Any participant can verify that the certificate originated from the certificate
authority and is not counterfeit.
3. Only the certificate authority can create and update certificates.
These requirements are satisfied by the original proposal in [KOHN78]. Denning
[DENN83] added the following additional requirement:
4. Any participant can verify the time validity of the certificate.
A certificate scheme is illustrated in Figure 15.9. Each participant applies
to the certificate authority, supplying a public key and requesting a certificate.
Application must be in person or by some form of secure authenticated communi-
cation. For participant A, the authority provides a certificate of the form
CA = E(PRauth, [T } IDA } PUa])
where PRauth is the private key used by the authority and T is a timestamp. A may
then pass this certificate on to any other participant, who reads and verifies the
certificate as follows:
D(PUauth, CA) = D(PUauth, E(PRauth, [T } IDA } PUa])) = (T } IDA } PUa)
The recipient uses the authority’s public key, PUauth, to decrypt the certificate.
Because the certificate is readable only using the authority’s public key, this verifies
that the certificate came from the certificate authority. The elements IDA and PUa
provide the recipient with the name and public key of the certificate’s holder. The
timestamp T validates the currency of the certificate. The timestamp counters the
following scenario. A’s private key is learned by an adversary. A generates a new
Certificate
Authority
PUa PUb
A B
(1) CA
A B
(2) CB
private/public key pair and applies to the certificate authority for a new c ertificate.
Meanwhile, the adversary replays the old certificate to B. If B then encrypts messages
using the compromised old public key, the adversary can read those messages.
In this context, the compromise of a private key is comparable to the loss of a
credit card. The owner cancels the credit card number but is at risk until all possible
communicants are aware that the old credit card is obsolete. Thus, the timestamp
serves as something like an expiration date. If a certificate is sufficiently old, it is
assumed to be expired.
One scheme has become universally accepted for formatting public-key
certificates: the X.509 standard. X.509 certificates are used in most network security
applications, including IP security, transport layer security (TLS), and S/MIME, all
of which are discussed in Part Six. X.509 is examined in detail in the next section.
Bob’s ID
Unsigned certificate: information
contains user ID,
user's public key Bob’s public key
H
H CA information
Certificate
information Verify algorithm
S V indicates whether
the signature is
Generate hash Signed certificate valid
code of unsigned
certificate
Certificates
The heart of the X.509 scheme is the public-key certificate associated with each
user. These user certificates are assumed to be created by some trusted certification
authority (CA) and placed in the directory by the CA or by the user. The directory
server itself is not responsible for the creation of public keys or for the certifica-
tion function; it merely provides an easily accessible location for users to obtain
certificates.
Figure 15.11a shows the general format of a certificate, which includes the
following elements.
■■ Version: Differentiates among successive versions of the certificate format; the
default is version 1. If the issuer unique identifier or subject unique identifier
are present, the value must be version 2. If one or more extensions are present,
the version must be version 3. Although the X.509 specification is currently at
version 7, no changes have been made to the fields that make up the certificate
since version 3.
■■ Serial number: An integer value unique within the issuing CA that is unam-
biguously associated with this certificate.
■■ Signature algorithm identifier: The algorithm used to sign the certificate
together with any associated parameters. Because this information is repeated
in the signature field at the end of the certificate, this field has little, if any, utility.
■■ Issuer name: X.500 name of the CA that created and signed this certificate.
Signature Algorithm
Version algorithm
identifier Parameters
Certificate
Issuer name
serial number
Signature Algorithm
algorithm This update date
identifier Parameters
Version 1
Subject name •
Subject's Algorithms •
public key Parameters •
info Key
Issuer unique Revoked User certificate serial #
identifier certificate Revocation date
Subject unique Algorithms
Signature Parameters
identifier Signature of certificate
Extensions
(b) Certificate revocation list
versions
Algorithms
Signature
All
Parameters
Signature of certificate
■■ Period of validity: Consists of two dates: the first and last on which the certifi-
cate is valid.
■■ Subject name: The name of the user to whom this certificate refers. That is, this
certificate certifies the public key of the subject who holds the corresponding
private key.
■■ Subject’s public-key information: The public key of the subject, plus an identi-
fier of the algorithm for which this key is to be used, together with any associ-
ated parameters.
■■ Issuer unique identifier: An optional-bit string field used to identify uniquely
the issuing CA in the event the X.500 name has been reused for different
entities.
■■ Subject unique identifier: An optional-bit string field used to identify uniquely
the subject in the event the X.500 name has been reused for different entities.
■■ Extensions: A set of one or more extension fields. Extensions were added in
version 3 and are discussed later in this section.
■■ Signature: Covers all of the other fields of the certificate. One component of
this field is the digital signature applied to the other fields of the certificate.
This field includes the signature algorithm identifier.
The unique identifier fields were added in version 2 to handle the possible
reuse of subject and/or issuer names over time. These fields are rarely used.
The standard uses the following notation to define a certificate:
where
The CA signs the certificate with its private key. If the corresponding public
key is known to a user, then that user can verify that a certificate signed by the CA is
valid. This is the typical digital signature approach illustrated in Figure 13.2.
Step 2 A then goes back to the directory and obtains the certificate of B signed by
X 2. Because A now has a trusted copy of X 2 >s public key, A can verify the
signature and securely obtain B’s public key.
A has used a chain of certificates to obtain B’s public key. In the notation of
X.509, this chain is expressed as
X1 V X2 W X2 V B W
In the same fashion, B can obtain A’s public key with the reverse chain:
X2 V X1 W X1 V A W
U
U,,V..
V,,U..
V,,W.. V,,Y..
W,,V.. Y,,V..
W Y
W,,X.. Y,,Z..
X,,W.. Z,,Y..
X,,Z.. X Z Z,,X..
C A B
X.509 Version 3
The X.509 version 2 format does not convey all of the information that recent d
esign
and implementation experience has shown to be needed. [FORD95] lists the follow-
ing requirements not satisfied by version 2.
NIST SP 800-32 (Introduction to Public Key Technology and the Federal PKI
Infrastructure) defines a public-key infrastructure (PKI) as a set of policies,
processes, server platforms, software, and workstations used for the purpose of
administering certificates and public–private key pairs, including the ability to
issue, maintain, and revoke public key certificates. The principal objective for
developing a PKI is to enable secure, convenient, and efficient acquisition of
public keys.
A PKI architecture defines the organization and interrelationships among
CAs and PKI users. PKI architectures satisfy the following requirements:
1. Any participant can read a certificate to determine the name and public key of
the certificate’s owner.
2. Any participant can verify that the certificate originated from the certificate
authority and is not counterfeit.
3. Only the certificate authority can create and update certificates.
4. Any participant can verify the currency of the certificate.
Figure 15.13 provides a typical architecture for a PKI. The essential compo-
nents are:
■■ End entity: This can be an end user; a device, such as a router or server; a
process; or any item that can be identified in the subject name of a public key
certificate. End entities can also be consumers of PKI-related services and,
in some cases, providers of PKI-related services. For example, a Registration
Authority is considered to be an end entity from the point of view of the
Certification Authority.
■■ Certification authority (CA): An authority trusted by one or more users to
create and assign public key certificates. Optionally the certification authority
may create the subjects’ keys. CAs digitally sign public key certificates, which
effectively binds the subject’s name to the public key. CAs are also respon-
sible for issuing Certificate Revocation Lists (CRLs). The CRL identifies cer-
tificates previously issued by the CA that are revoked before their expiration
date. A certificate could be revoked because the user’s private key is assumed
to be compromise, the user is no longer certified by this CA, or the certificate
is assumed to be compromised.
■■ Registration authority (RA): An optional component that can be used to
offload many of the administrative functions that a CA ordinarily assumes.
The RA is normally associated with the end entity registration process. This
includes the verification of the identity of the end entity attempting to register
with the PKI and obtain a certificate for its public key.
■■ Repository: Denotes any method for storing and retrieving PKI-related in-
formation, such as public key certificates and CRLs. A repository can be
an X.500-based directory with client access via the Lightweight Directory
Access Protocol (LDAP). It also can be something simple, such as a means for
Public key
CA¿s
Public key
Bob¿s
Bob¿s
Public key
Public key
certificate
certificate
Application
for
certificate
Signing
Party
Bob
Bob¿s Document
Public key Relying
Public key signed with
certificate Bob¿s private Party Alice
Private key
key
retrieval of a flat file on a remote server via the File Transfer Protocol (FTP) or
the Hyper Text Transfer Protocol (HTTP).
■■ Relying party: Any user or agent that relies on the data in a certificate in
making decisions.
Figure 15.13 illustrates the interaction of the various components. Consider
a relying party Alice that needs to use Bob’s public key. Alice must first obtain in
a reliable, secure fashion a copy of the public key of the CA. This can be done in a
number of ways and depends on the particular PKI architecture and enterprise pol-
icy. If Alice wishes to send encrypted data to Bob, Alice checks with the Repository
to determine if Bob’s certificate has been revoked, and if not obtains a copy of
Bob’s certificate. Alice can then use Bob’s public key to encrypt data sent to Bob.
Bob can also send a document to Alice signed with Bob’s private key. Bob may in-
clude his certificate with the document or assume that Alice already has or can ob-
tain the certificate. In either case, Alice first uses the CA’s public key to verify that
the certificate is valid, then uses Bob’s public key (obtained from the certificate) to
validate Bob’s signature.
Rather than a single CA, an enterprise may need to rely on multiple CAs
and multiple repositories. CAs can be organized in a hierarchical fashion, with a
root CA that is widely trusted signing the public key certificate of subordinate CAs.
Many root certificates are embedded in Web browsers so they have built-in trust of
those CAs. Web servers, email clients, smartphones and many other types of hard-
ware and software also support PKI and contain trusted root certificates from the
major CAs.
Key Terms
Review Questions
15.1 Explain why man-in-the-middle attacks are ineffective on the secret key distribution
protocol discussed in Figure 15.8.
15.2 What is the difference between a session key and a master key?
15.3 What is a key distribution center?
15.4 What is one role that nonces play in key distribution using public-key cryptography?
15.5 List four requirements for the distribution of public keys using the public-key
certificates scheme.
15.6 Discuss the potential security issues that arise due to a public-key–directory-based system.
15.7 What is a public-key certificate?
15.8 What are the requirements for the use of a public-key certificate scheme?
15.9 What is the purpose of the X.509 standard?
15.10 What types of certificates does an X.509 CA’s directory entry contain?
15.11 What is a certificate revocation list?
Problems
15.1 One local area network vendor provides a key distribution facility, as illustrated in
Figure 15.14. Describe the operation of the scheme.
15.2 “We are under great pressure, Holmes.” Detective Lestrade looked nervous. “We
have learned that copies of sensitive government documents are stored in computers
of one foreign embassy here in London. Normally these documents exist in electronic
form only on a selected few government computers that satisfy the most stringent
security requirements. However, sometimes they must be sent through the network
connecting all government computers. But all messages in this network are encrypted
using a top-secret encryption algorithm certified by our best crypto experts. Even the
NSA and the KGB are unable to break it. And now these documents have appeared
in hands of diplomats of a small, otherwise insignificant, country. And we have no
idea how it could happen.”
Key
Distribution
Center (KDC)
(2) IDA, E(Ka, Na), IDB, E(Kb, Nb)
B A
“But you do have some suspicion who did it, do you?” asked Holmes.
“Yes, we did some routine investigation. There is a man who has legal access
to one of the government computers and has frequent contacts with diplomats from
the embassy. But the computer he has access to is not one of the trusted ones where
these documents are normally stored. He is the suspect, but we have no idea how he
could obtain copies of the documents. Even if he could obtain a copy of an encrypted
document, he couldn’t decrypt it.”
“Hmm, please describe the communication protocol used on the network.”
Holmes opened his eyes, thus proving that he had followed Lestrade’s talk with an
attention that contrasted with his sleepy look.
“Well, the protocol is as follows. Each node N of the network has been a ssigned
a unique secret key Kn. This key is used to secure communication between the node
and a trusted server. That is, all the keys are stored also on the server. User A, wishing
to send a secret message M to user B, initiates the following protocol:
1. A generates a random number R and sends to the server his name A, destination
B, and E(Ka, R).
2. Server responds by sending E(Kb, R) to A.
3. A sends E(R, M) together with E(Kb, R) to B.
4. B knows Kb, thus decrypts E(Kb, R), to get R and will subsequently use R to
decrypt E(R, M) to get M.
You see that a random key is generated every time a message has to be sent. I admit
the man could intercept messages sent between the top-secret trusted nodes, but I see
no way he could decrypt them.”
“Well, I think you have your man, Lestrade. The protocol isn’t secure because
the server doesn’t authenticate users who send him a request. Apparently designers
of the protocol have believed that sending E(Kx, R) implicitly authenticates user X as
the sender, as only X (and the server) knows Kx. But you know that E(Kx, R) can be
intercepted and later replayed. Once you understand where the hole is, you will be
able to obtain enough evidence by monitoring the man’s use of the computer he has
access to. Most likely he works as follows. After intercepting E(Ka, R) and E(R, M)
(see steps 1 and 3 of the protocol), the man, let’s denote him as Z, will continue by
pretending to be A and . . .
Finish the sentence for Holmes.
15.3 The 1988 version of X.509 lists properties that RSA keys must satisfy to be secure
given current knowledge about the difficulty of factoring large numbers. The discus-
sion concludes with a constraint on the public exponent and the modulus n:
It must be ensured that e 7 log 2(n) to prevent attack by taking the eth
root mod n to disclose the plaintext.
Although the constraint is correct, the reason given for requiring it is incorrect. What
is wrong with the reason given and what is the correct reason?
15.4 Determine the chain of certificates associated with the website www.pearson.com,
describing the type of each CA.
15.5 NIST defines the term cryptoperiod as the time span during which a specific key is
authorized for use or in which the keys for a given system or application may remain
in effect. One document on key management uses the following time diagram for
a shared secret key.
Cryptoperiod
Explain the overlap by giving an example application in which the originator’s usage
period for the shared secret key begins before the recipient’s usage period and also
ends before the recipients usage period.
15.6 Consider the following protocol, designed to let A and B decide on a fresh, shared
=
session key KAB . We assume that they already share a long-term key KAB.
1. A S B: A, NA.
=
2. B S A: E(KAB, [NA, KAB ])
=
3. A S B: E(KAB, NA)
a. We first try to understand the protocol designer’s reasoning:
=
—Why would A and B believe after the protocol ran that they share KAB with the
other party?
—Why would they believe that this shared key is fresh?
In both cases, you should explain both the reasons of both A and B, so your answer
should complete the sentences
=
A believes that she shares KAB with B since . . .
=
B believes that he shares KAB with A since . . .
=
A believes that KAB is fresh since . . .
=
B believes that KAB is fresh since . . .
b. Assume now that A starts a run of this protocol with B. However, the connection
is intercepted by the adversary C. Show how C can start a new run of the protocol
using reflection, causing A to believe that she has agreed on a fresh key with B (in
spite of the fact that she has only been communicating with C). Thus, in particular,
the belief in (a) is false.
c. Propose a modification of the protocol that prevents this attack.
15.7 What are the core components of a PKI? Briefly describe each component.
15.10 Suppose N different systems use the IBM Cryptographic Subsystem with host master
keys KMH[i](i = 1, 2, c N). Devise a method for communicating between sys-
tems without requiring the system to either share a common host master key or to
divulge their individual host master keys. Hint: Each system needs three variants of
its host master key.
15.11 The principal objective of the IBM Cryptographic Subsystem is to protect transmis-
sions between a terminal and the processing system. Devise a procedure, perhaps
adding instructions, which will allow the processor to generate a session key KS and
distribute it to Terminal i and Terminal j without having to store a key-equivalent
variable in the host.