PKI and Cryptographic Applications Chapter
Total Page:16
File Type:pdf, Size:1020Kb
Chapter PKI and Cryptographic 10 Applications THE CISSP EXAM TOPICS COVERED IN THIS CHAPTER INCLUDE: 5. Cryptography C. Understand encryption concepts C.3 Asymmetric cryptography C.4 Hybrid cryptography C.5 Message digests C.6 Hashing D. Understand key management processes D.1 Creation/distribution D.2 Storage/destruction D.3 Recovery D.4 Key escrow E. Understand digital signatures F. Understand non-repudiation G. Understand methods of cryptanalytic attacks G.2 Social engineering for key discovery G.3 Brute force (e.g., rainbow tables, specialized/scalable architecture) G.4 Cipher-text only G.5 Known plaintext G.6 Frequency analysis G.7 Chosen cipher-text G.8 Implementation attacks cc10.indd10.indd 440303 229/05/129/05/12 77:39:39 AAMM H. Use cryptography to maintain network security I. Use cryptography to maintain application security J. Understand Public Key Infrastructure (PKI) K. Understand certificate related issues L. Understand information hiding alternatives (e.g., steganography, watermarking) cc10.indd10.indd 440404 229/05/129/05/12 77:39:39 AAMM In Chapter 9, “Cryptography and Symmetric Key Algorithms,” we introduced basic cryptography concepts and explored a variety of private key cryptosystems. These symmetric cryp- tosystems offer fast, secure communication but introduce the substantial challenge of key exchange between previously unrelated parties. This chapter explores the world of asym- metric (or public key) cryptography and the public key infrastructure (PKI) that supports worldwide secure communication between parties that don’t necessarily know each other prior to the communication. We’ll also explore several practical applications of cryptogra- phy: securing electronic mail, web communications, electronic commerce, and networking. The chapter concludes with an examination of a variety of attacks malicious individuals might use to compromise weak cryptosystems. Asymmetric Cryptography The section “Modern Cryptography” in Chapter 9 introduced the basic principles behind both private (symmetric) and public (asymmetric) key cryptography. You learned that sym- metric key cryptosystems require both communicating parties to have the same shared secret key, creating the problem of secure key distribution. You also learned that asym- metric cryptosystems avoid this hurdle by using pairs of public and private keys to facilitate secure communication without the overhead of complex key distribution systems. The secu- rity of these systems relies upon the difficulty of reversing a one-way function. In the following sections, we’ll explore the concepts of public key cryptography in greater detail and look at three of the more common public key cryptosystems in use today: RSA, El Gamal, and the elliptic curve cryptosystem. Public and Private Keys Recall from Chapter 9 that public key cryptosystems rely on pairs of keys assigned to each user of the cryptosystem. Every user maintains both a public key and a private key. As the names imply, public key cryptosystem users make their public keys freely available to anyone with whom they want to communicate. The mere possession of the public key by third parties does not introduce any weaknesses into the cryptosystem. The private key, on the other hand, is reserved for the sole use of the individual who owns the keys. It is never shared with any other cryptosystem user. Normal communication between public key cryptosystem users is quite straightforward. Figure 10.1 shows the general process. cc10.indd10.indd 440505 229/05/129/05/12 77:39:39 AAMM 406 Chapter 10 ■ PKI and Cryptographic Applications FIGURE 10.1 Asymmetric key cryptography Sender Receiver P Encryption C C Decryption P Algorithm Algorithm Receiver’s Receiver’s Public Key Private Key Notice that the process does not require the sharing of private keys. The sender encrypts the plain-text message (P) with the recipient’s public key to create the ciphertext message (C). When the recipient opens the ciphertext message, they decrypt it using their private key to recreate the original plain-text message. Once the sender encrypts the message with the recipient’s public key, no user (including the sender) can decrypt that message without know- ing the recipient’s private key (the second half of the public-private key pair used to generate the message). This is the beauty of public key cryptography—public keys can be freely shared using unsecured communications and then used to create secure communications channels between users previously unknown to each other. You also learned in the previous chapter that public key cryptography entails a higher degree of computational complexity. Keys used within public key systems must be longer than those used in private key systems to produce cryptosystems of equivalent strengths. RSA The most famous public key cryptosystem is named after its creators. In 1977, Ronald Rivest, Adi Shamir, and Leonard Adleman proposed the RSA public key algorithm that remains a worldwide standard today. They patented their algorithm and formed a commercial venture known as RSA Security to develop mainstream implementations of their security technol- ogy. Today, the RSA algorithm forms the security backbone of a large number of well-known security infrastructures produced by companies like Microsoft, Nokia, and Cisco. The RSA algorithm depends upon the computational difficulty inherent in factoring large prime numbers. Each user of the cryptosystem generates a pair of public and private keys using the algorithm described in the following steps: 1. Choose two large prime numbers (approximately 200 digits each), labeled p and q. 2. Compute the product of those two numbers: n = p * q. 3. Select a number, e, that satisfies the following two requirements: a. e is less than n. b. e and (n – 1)(q – 1) are relatively prime—that is, the two numbers have no com- mon factors other than 1. cc10.indd10.indd 440606 229/05/129/05/12 77:39:39 AAMM Asymmetric Cryptography 407 4. Find a number, d, such that (ed – 1) mod (p – 1)(q – 1) = 0. 5. Distribute e and n as the public key to all cryptosystem users. Keep d secret as the pri- vate key. If Alice wants to send an encrypted message to Bob, she generates the ciphertext (C) from the plain text (P) using the following formula (where e is Bob’s public key and n is the product of p and q created during the key generation process): C = Pe mod n When Bob receives the message, he performs the following calculation to retrieve the plain-text message: P = Cd mod n Merkle-Hellman Knapsack Another early asymmetric algorithm, the Merkle-Hellman Knapsack algorithm, was developed the year after RSA was publicized. Like RSA, it’s based upon the diffi culty of performing factoring operations, but it relies upon a component of set theory known as super-increasing sets rather than on large prime numbers. Merkle-Hellman was proven ineffective when it was broken in 1984. Importance of Key Length The length of the cryptographic key is perhaps the most important security parameter that can be set at the discretion of the security administrator. It’s important to under- stand the capabilities of your encryption algorithm and choose a key length that provides an appropriate level of protection. This judgment can be made by weighing the diffi culty of defeating a given key length (measured in the amount of processing time required to defeat the cryptosystem) against the importance of the data. Generally speaking, the more critical your data, the stronger the key you use to protect it should be. Timeliness of the data is also an important consideration. You must take into account the rapid growth of computing power—the famous Moore’s law suggests that computing power doubles approximately every 18 months. If it takes current comput- ers one year of processing time to break your code, it will take only three months if the attempt is made with contemporary technology three years down the road. If you expect that your data will still be sensitive at that time, you should choose a much longer crypto- graphic key that will remain secure well into the future. cc10.indd10.indd 440707 229/05/129/05/12 77:39:39 AAMM 408 Chapter 10 ■ PKI and Cryptographic Applications The strengths of various key lengths also vary greatly according to the cryptosystem you’re using. The key lengths shown in the following table for three asymmetric crypto- systems all provide equal protection: Cryptosystem Key Length RSA 1,088 bits DSA 1,024 bits Elliptic curve 160 bits El Gamal In Chapter 9, you learned how the Diffie-Hellman algorithm uses large integers and modu- lar arithmetic to facilitate the secure exchange of secret keys over insecure communications channels. In 1985, Dr. T. El Gamal published an article describing how the mathematical principles behind the Diffie-Hellman key exchange algorithm could be extended to support an entire public key cryptosystem used for encrypting and decrypting messages. At the time of its release, one of the major advantages of El Gamal over the RSA algo- rithm was that it was released into the public domain. Dr. El Gamal did not obtain a patent on his extension of Diffie-Hellman, and it is freely available for use, unlike the then-patented RSA technology. (RSA released its algorithm into the public domain in 2000.) However, El Gamal also has a major disadvantage—the algorithm doubles the length of any message it encrypts. This presents a major hardship when encrypting long messages or data that will be transmitted over a narrow bandwidth communications circuit. Elliptic Curve Also in 1985, two mathematicians, Neal Koblitz from the University of Washington and Victor Miller from International Business Machines (IBM), independently proposed the application of elliptic curve cryptography theory to develop secure cryptographic systems. The mathematical concepts behind elliptic curve cryptography are quite complex and well beyond the scope of this book.