11Chapter 4: Key Predistribution
22===============================
33
4- To use ciphers and authenticators, the communicating participants need
4+ We have seen that ciphers and authentication codes are parameterized
5+ by keys. So the communicating participants need
56to know what keys to use. In the case of a secret-key cipher, how does a
67pair of participants obtain the key they share? In the case of a
7- public-key cipher, how do participants know what public key belongs to a
8- certain participant? The answer differs depending on whether the keys
9- are short-lived *session keys * or longer-lived *predistributed keys *.
10-
11- A session key is a key used to secure a single, relatively short episode
12- of communication: a session. Each distinct session between a pair of
13- participants uses a new session key, which is always a secret key for
14- speed. The participants determine what session key to use by means of a
15- protocol—a session key establishment protocol. A session key
16- establishment protocol needs its own security (so that, for example, an
17- adversary cannot learn the new session key); that security is based on
18- the longer-lived predistributed keys.
8+ public-key cipher, how does one participants know which public key
9+ belongs to another chosen participant? To answer these questions, we
10+ need firs to understand that there are two different classes of keys
11+ to consider: short-lived *session keys * and longer-lived *predistributed keys *.
12+
13+ A session key is a key used to secure a single, relatively short
14+ episode of communication: a session. This might be, for example, a
15+ single HTTPS connection between a client and a server. Each distinct
16+ session between a pair of participants uses a new session key, which
17+ is always a secret key for speed. The participants determine what
18+ session key to use by means of a protocol—a session key establishment
19+ protocol. A session key establishment protocol needs its own security
20+ (so that, for example, an adversary cannot learn the new session key);
21+ that security is based on the longer-lived predistributed keys.
1922
2023There are two primary motivations for this division of labor between
2124session keys and predistributed keys:
@@ -24,12 +27,12 @@ session keys and predistributed keys:
2427 computationally intensive attacks, less ciphertext for cryptanalysis,
2528 and less information exposed should the key be broken.
2629
27- - Public key ciphers are generally superior for authentication and
28- session key establishment but too slow to use for encrypting entire
29- messages for confidentiality.
30+ - Public key ciphers are generally superior for initial authentication
31+ and session key establishment but too slow to use for encrypting
32+ bulk traffic for confidentiality.
3033
3134This chapter explains how predistributed keys are distributed, and then
32- explains how session keys are then established. We
35+ explains how session keys are subsequently established. We
3336henceforth use “Alice” and “Bob” to designate participants, as is common
3437in the cryptography literature. Bear in mind that although we tend to
3538refer to participants in anthropomorphic terms, we are more frequently
@@ -42,11 +45,12 @@ any particular person.
4245
4346The algorithms to generate a matched pair of public and private keys are
4447publicly known, and software that does it is widely available. So, if
45- Alice wanted to use a public-key cipher, she could generate her own pair
48+ Alice wants to use a public-key cipher, she can generate her own pair
4649of public and private keys, keep the private key hidden, and publicize
4750the public key. But, how can she publicize her public key—assert that it
4851belongs to her—in such a way that other participants can be sure it
49- really belongs to her? Not via email or Web, because an adversary could
52+ really belongs to her? It is not as simple as putting it on a public
53+ web page or dropping it in an email, because an adversary could
5054forge an equally plausible claim that key *x * belongs to Alice when *x *
5155really belongs to the adversary.
5256
@@ -55,7 +59,7 @@ identities—what key belongs to whom—is called a *Public Key
5559Infrastructure * (PKI). A PKI starts with the ability to verify
5660identities and bind them to keys out of band. By “out of band,” we mean
5761something outside the network and the computers that comprise it, such
58- as in the following If Alice and Bob are individuals who know each
62+ as in the following. If Alice and Bob are individuals who know each
5963other, then they could get together in the same room and Alice could
6064give her public key to Bob directly, perhaps on a business card. If Bob
6165is an organization, Alice the individual could present conventional
@@ -87,8 +91,14 @@ public key. You can see how starting from a very small number of keys
8791(in this case, just Bob’s) you could build up a large set of trusted
8892keys over time. Bob in this case is playing the role often referred to
8993as a *certification authority * (CA), and much of today’s Internet
90- security depends on CAs. VeriSign is one well-known commercial CA. We
91- return to this topic below.
94+ security depends on CAs. VeriSign is one well-known commercial CA.
95+
96+ One thing to note about the above example is that we have to know two
97+ things about Bob. First, we need to know his public key so that we can
98+ verify that certain messages were originated by Bob. But we also have
99+ to know that Bob is trustworthy enough to make statements about the
100+ keys of others, which is where certification authorities (rather than
101+ random individuals) come into play. We return to this topic below.
92102
93103One of the major standards for certificates is known as X.509. This
94104standard leaves a lot of details open, but specifies a basic structure.
@@ -105,8 +115,8 @@ A certificate clearly must include:
105115- A digital signature algorithm identifier (which cryptographic hash
106116 and which cipher)
107117
108- An optional component is an expiration time for the certificate . We will
109- see a particular use of this feature below.
118+ In addition, certificates invariably contain an expiration date . We will
119+ see how this feature is used below.
110120
111121Since a certificate creates a binding between an identity and a public
112122key, we should look more closely at what we mean by “identity.” For
@@ -172,23 +182,28 @@ of a certificate is, in turn, trusted to certify.
172182
173183There can be more than one root to a certification tree, and this is
174184common in securing Web transactions today, for example. Web browsers
175- such as Firefox and Internet Explorer come pre-equipped with
176- certificates for a set of CAs; in effect, the browser’s producer has
177- decided these CAs and their keys can be trusted. A user can also add CAs
178- to those that their browser recognizes as trusted. These certificates
179- are accepted by Secure Socket Layer (SSL)/Transport Layer Security
185+ such as Firefox and Chrome come pre-equipped with certificates for a
186+ (reasonably large) set of CAs; in effect, the browser’s producer has
187+ decided these CAs and their associated public keys can be trusted. A
188+ user can also add CAs to those that their browser recognizes as
189+ trusted (or remove CAs from the default list). In other words, for
190+ most users, the browser manufacturer becomes the entity that they
191+ trust to look after PKI for them.
192+
193+ The certificates that are configured to be accepted by the browser
194+ are used by Secure Socket Layer (SSL)/Transport Layer Security
180195(TLS), the protocol most often used to secure Web transactions, which we
181- discuss in a later chapter. ( If you are curious, you can poke around in
196+ discuss in a later chapter. If you are curious, you can poke around in
182197the preferences settings for your browser and find the “view
183198certificates” option to see how many CAs your browser is configured to
184- trust.)
199+ trust.
185200
1862014.1.2 Web of Trust
187202~~~~~~~~~~~~~~~~~~
188203
189204An alternative model of trust is the *web of trust * exemplified by
190205Pretty Good Privacy (PGP), which is further discussed in a later
191- chapter. PGP is a security system for email, so email addresses are the
206+ chapter. PGP uses email addresses (among other options) as the
192207identities to which keys are bound and by which certificates are signed.
193208In keeping with PGP’s roots as protection against government intrusion,
194209there are no CAs. Instead, every individual decides whom they trust and
@@ -200,8 +215,8 @@ attesting to the same key binding before he is willing to trust it.
200215
201216For example, suppose you have a certificate for Bob provided by Alice;
202217you can assign a moderate level of trust to that certificate. However,
203- if you have additional certificates for Bob that were provided by C and
204- D , each of whom is also moderately trustworthy, that might considerably
218+ if you have additional certificates for Bob that were provided by Carol and
219+ Dave , each of whom is also moderately trustworthy, that might considerably
205220increase your level of confidence that the public key you have for Bob
206221is valid. In short, PGP recognizes that the problem of establishing
207222trust is quite a personal matter and gives users the raw material to
@@ -210,13 +225,16 @@ to trust in a single hierarchical structure of CAs. To quote Phil
210225Zimmerman, the developer of PGP, “PGP is for people who prefer to pack
211226their own parachutes.”
212227
213- PGP has become quite popular in the networking community, and PGP
214- key-signing parties are a regular feature of various networking events,
215- such as IETF meetings. At these gatherings, an individual can
228+ PGP has become quite popular in the networking community, and PGP was
229+ eventually developed into an Internet standard known as OpenPGP. PGP
230+ key-signing parties were once a regular feature of IETF meetings. At a
231+ key-signing party, an individual can:
216232
217- - Collect public keys from others whose identity he knows.
233+ - Collect public keys from others whose identity he knows (often by
234+ collecting the fingerprint of the key on a printed card.)
218235
219- - Provide his public key to others.
236+ - Provide his public key (or its fingerprint) to others, perhaps
237+ showing some other form of ID.
220238
221239- Get his public key signed by others, thus collecting certificates
222240 that will be persuasive to an increasingly large set of people.
@@ -228,8 +246,10 @@ such as IETF meetings. At these gatherings, an individual can
228246- Collect certificates from other individuals whom he trusts enough to
229247 sign keys.
230248
231- Thus, over time, a user will collect a set of certificates with varying
232- degrees of trust.
249+ Thus, over time, users collect a set of certificates with varying
250+ degrees of trust and the web of trust can be extended and made stronger.
251+
252+
233253
2342544.1.3 Certificate Revocation
235255~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -263,10 +283,14 @@ original expiration date is passed, it can be removed from the CRL.
2632834.2 Predistribution of Secret Keys
264284------------------------------------
265285
286+ Secret key ciphers present a bootstrapping problem: how do you
287+ securely get the secret key to be shared by two participants?
266288If Alice wants to use a secret-key cipher to communicate with Bob, she
267289can’t just pick a key and send it to him because, without already having
268- a key, they can’t encrypt this key to keep it confidential and they
269- can’t authenticate each other. As with public keys, some predistribution
290+ a key, they can’t encrypt this key to keep it confidential. Further
291+ more, if they
292+ can’t authenticate each other, then Alice can't safely send the key to
293+ some unauthenticated recipient. As with public keys, then, some predistribution
270294scheme is needed. Predistribution is harder for secret keys than for
271295public keys for two obvious reasons:
272296
@@ -280,7 +304,11 @@ public keys for two obvious reasons:
280304In summary, there are a lot more keys to distribute, and you can’t use
281305certificates that everyone can read.
282306
283- The most common solution is to use a *Key Distribution Center * (KDC). A
307+ One common solution is to use public key operations to bootstrap the
308+ communication. This is how keys for symmetric ciphers get distributed
309+ in HTTPS, for example. We will see more detail of this later.
310+
311+ Another common solution is to use a *Key Distribution Center * (KDC). A
284312KDC is a trusted entity that shares a secret key with each other entity.
285313This brings the number of keys down to a more manageable N-1, few enough
286314to establish out of band for some applications. When Alice wishes to
@@ -296,7 +324,7 @@ a powerful alternative.
2963244.3 Diffie-Hellman Key Exchange
297325---------------------------------
298326
299- Another approach to establishing a shared secret key is to use the
327+ A widely used approach to establishing a shared secret key is to use the
300328Diffie-Hellman key exchange protocol, which works without using any
301329predistributed keys. The messages exchanged between Alice and Bob can be
302330read by anyone able to eavesdrop, and yet the eavesdropper won’t know
@@ -305,9 +333,9 @@ the secret key that Alice and Bob end up with.
305333Diffie-Hellman doesn’t authenticate the participants. Since it is rarely
306334useful to communicate securely without being sure whom you’re
307335communicating with, Diffie-Hellman is usually augmented in some way to
308- provide authentication. One of the main uses of Diffie-Hellman is in the
309- Internet Key Exchange (IKE) protocol, a central part of the IP Security
310- (IPsec) architecture.
336+ provide authentication. Diffie-Hellman is used in both the
337+ Internet Key Exchange (IKE) protocol, a part of the IP Security
338+ (IPsec) architecture, and in Transport Layer Security (TLS) .
311339
312340The Diffie-Hellman protocol has two parameters, *p * and *g *, both of
313341which are public and may be used by all the users in a particular
@@ -378,7 +406,8 @@ compute the resulting key. Determining *a* or *b* from that information
378406is, however, computationally infeasible for suitably large *p,a, * and
379407*b *; it is known as the *discrete logarithm problem *.
380408
381- For example, using *p = 5 * and *g = 2 * from above, suppose Alice picks
409+ Let's look at an example using small numbers to illustrate the
410+ calculation. Let *p = 5 * and *g = 2 *, and suppose Alice picks
382411the random number *a = 3 * and Bob picks the random number *b = 4 *.
383412Then Alice sends Bob the public value
384413
@@ -443,3 +472,24 @@ example, when one participant is a web server and the other is an
443472arbitrary client, the client can authenticate the web server and
444473establish a secret key for confidentiality before sending a credit card
445474number to the web server.
475+
476+ A further variant of Diffie-Hellman, which is used in TLS, is called
477+ *ephemeral * Diffie-Hellman. Like the fixed variant, it relies on at
478+ least one participant having a certificate issued by a CA, but in this
479+ case it certifies that Alice is associated with a given public key
480+ (e.g., an RSA key). Alice then generates an ephemeral value of $a$
481+ rather than a fixed one, and uses her private key to sign the Diffie
482+ Hellman parameters: *p, g *, and :math: `g^a \bmod p`. By providing the
483+ certificate and the signed value, Alice is able to show Bob that the
484+ message has really come from her and authenticate the Diffie-Hellman
485+ parameters, while still keeping $a$ secret. Unlike fixed
486+ Diffie-Hellman, this approach provides *forward secrecy *, meaning that
487+ even if the long-lived private key of Alice were to be compromised,
488+ past sessions that had been recorded by an attacker will still be
489+ secure, since they used ephemeral keys that changed with every
490+ session. Note that while the word "ephemeral" strictly implies only
491+ that *a * is a short-lived value, it is widely used in protocol
492+ specifications to apply to cases where authentication is also
493+ performed using a public key as we have described it here. To avoid
494+ confusion, the original form of Diffie-Hellman that lacks
495+ authentication is often referred to as "anonymous" mode.
0 commit comments