YALE UNIVERSITY
DEPARTMENT OF COMPUTER SCIENCE
CPSC 467a: Cryptography and Computer Security | Notes 1 (rev. 1) | |
Professor M. J. Fischer | September 3, 2008 | |
Lecture Notes 1
This course is about cryptography and its application to computer and network security. A better term might be information security, which includes all forms of information protection, whether the information resides in a computer, on the network, or on a storage device such as a hard disk, DVD, or even paper. Security is a huge field and includes important non-technical topics such as incentive, opportunity, deterrence, threat, trust, anonymity, and coercion, all of which play together into the overall security picture. Our focus is on a particular set of useful tools—cryptographic primitives—that that can be used to enhance information security. Nevertheless, we need some awareness of general security issues in order to understand the environment in which cryptographic tools are used and to motivate the properties that we desire of these tools.
The classical information security problem is how to send secret messages over an insecure channel. But information security is much broader than this. It is also about preventing hackers from breaking into a computer, preventing denial of service attacks against web servers, preventing unauthorized modification of databases, preventing illegal copying of data, preventing fraud in e-commerce applications, and so forth.
Security generally seems to mean preventing bad things from happening. However, it is not always so easy to decide exactly what are the bad things that one is trying to prevent. Without knowing exactly what is to be prevented, one can never know how effective a security system is at preventing them. This leads to the analysis of attack scenarios—the things an adversary might attempt that we’d like to protect against. Of course, one also wants to allow those activities to proceed normally that are not proscribed by the security policy.
A familiar example of a security problem is that of keeping intruders out of my house.
What do I want to keep out? Specifying exactly what is to be kept out and what allowed is already not such an easy problem. At first sight, I might say that I don’t want anybody entering whom I have not specifically authorized. But even this can be a bit problematical.
While these questions may sound silly, they have serious analogs in information security. To (1), you’d likely say, “Of course, I don’t want to let chimpanzees in the house either, but I don’t consider them a threat because there are no chimpanzees in my neighborhood.” Yet the world of information security is replete with examples of security holes that are of no consequence until someone develops an exploit, at which time they suddenly become serious problems. To (2), you might say, “No, I don’t want mice in, either”, but at the same time you’d realize that the means of preventing mice from entering are quite different from those of protecting against human intruders, and conflating the two problems will only make finding workable solutions that much harder. To (3), you’re forced to think about the meaning of identity. What is it about Alex that makes me want to let him in but not his twin brother? What hope do I have of solving this problem if I can’t distinguish between the two? In fact, the simple solution of giving Alex a key to the house works in practice, as long as I know that it is Alex getting the key and not his brother. Distinguishing among individuals becomes a serious problem on the internet, and schemes purporting to identify individuals generally identify instead possession of secret information (a cryptographic key) or a particular object (such as a smart card) instead, with the assumption that this is sufficient to identify the individual. It isn’t always so in the real world, for secrets can be stolen and smart cards forged. The rapid growth of identity theft today is evidence of this fact. (See http://www.ftc.gov/bcp/edu/microsites/idtheft/ for further information on this topic.)
What are some possible means to keep out intruders, and how effective are they? We now look at some of the means that might be used to keep intruders out and discuss their effectiveness.
Think carefully about each of these means and ask yourself under what conditions it might be effective, and what else must be in place for it to work. For example, suing the intruder presupposes that he can be identified, that you have evidence that he entered illegally, and that society has an effective judicial system. Buying a gun will only deter breakins if it is known that you are likely to possess a gun. Locking the front door has little effect unless the back door and windows are also locked.
Cryptography is to information security as locks are to personal security.
Here are just some of the many goals of information security.
How is security achieved in the real world?
Absolute security in the real world is infeasible. The goal is risk management. The same is true with information security. Security mechanisms have a cost. One needs to weight their cost against the benefits.
The course will be roughly organized around cryptographic primitives, objects having properties that make them useful in solving certain security problems. For each such primitive, one can ask:
Cryptography cuts across subareas of both computer science and mathematics. On the computer science side, cryptographic algorithms and protocols not only carry out sophisticated distributed computations, but they must be implemented in a way so as to not inadvertantly leak senssitive information. It doesn’t matter how mathematically strong the mathematical primitive is if a sloppy implementation allows an adversary to discover the key. There will be some implementation problems to give you a flavor of what it is like to program cryptographic algorithms.
Mathematics enters the field at several levels. Many cryptographic primitives are based on number theoretic problems such as factoring and discrete log and on algebraic properties of structures such as elliptic curves. Understanding and modeling security uses probability theory and coding theory on the one hand, and complexity theory on the other. We will explore these topics in enough depth to give you some understanding into how various cryptographic primitives work and why they are believed to be secure.
A symmetric cryptosystem (sometimes called a private-key or one-key system) is a pair of efficiently-computable functions E and D such that D(k,E(k,m)) = m for all keys k and all messages m. Moreover, given c = E(k,m), it is hard to find m without knowing the key k.
This is the classical tool for solving the secret message transmission problem:
We assume that the network is insecure and that an eavesdropper, Eve, can listen in and learn c. We desire nonetheless that m remain private and unknown to Eve.
A symmetric cryptosystem consists of a set of plaintext messages, a set of ciphertexts, a set of keys, and two functions, an encryption function E : ×→ and a decryption function D : ×→. We often write Ek(m) = E(k,m) and Dk(c) = D(k,c). One may view a cryptosystem as consisting of a family of encryption and decryption functions indexed by k, but this should not obscure the fact that in order to be useful, it must be possible to compute the functions given an arbitrary key k.
We would like a cryptosystem to have three properties:
While these properties are always required of a cryptosystem, we generally want m to remain secret even when Eve has access to various kinds of additional information. This leads us to define several attack scenarios.
Still stronger versions of these attacks are possible. For example, in a chosen plaintext attack, Eve might be able to choose the messages mi one at a time rather than all at once so that m2 depends on the value of c1, m3 depends on both c1 and c2, and so forth. Such an attack is called adaptive. Adaptive chosen ciphertext attacks are of course also possible, where each new ciphertext chosen depends on the plaintexts corresponding to the previously-chosen ciphertexts. One can have mixed chosen plaintext and chosen ciphertext attacks where Eve chooses some plaintexts and some ciphertexts and gets the corresponding decryptions or encryptions of same. Adaptive versions of mixed attacks are also possible.
One might question whether such attack scenarios are feasible in practice. Why would Alice cooperate with Eve in this way? It all depends on the situation in which the cryptosystem is used. “Alice” might be an Internet server, not a person, who encrypts/decrypts certain messages received in the course of carrying out a more complicated cryptographic protocol. We will see such protocols later in the course. One could also imagine that an attacker gets hold of Alice’s encryption device and is able to play with it for awhile even though she can’t extract the secret key that is stored inside. For example, Eve might sit down at Alice’s computer when Alice is out to lunch, or she might slip Alice’s cryptographic smart card out of her purse when Alice isn’t looking. Of course, if Alice discovers the intrusion or learns that her card is missing, she’ll change her key and Eve’s efforts would be for naught, but if Eve puts everything back in order before Alice returns, Alice might be none the wiser.