An Exploration of Mathematical Applications in Cryptography
Total Page:16
File Type:pdf, Size:1020Kb
AN EXPLORATION OF MATHEMATICAL APPLICATIONS IN CRYPTOGRAPHY THESIS Presented in Partial Fulfillment of the Requirements for the Degree Masters of Mathematical Sciences in the Graduate School of the Ohio State University By Amy Kosek, B.S. in Mathematics Graduate Program in Mathematical Sciences The Ohio State University 2015 Thesis Committee: James Cogdell, Advisor Rodica Costin c Copyright by Amy Kosek 2015 ABSTRACT Modern cryptography relies heavily on concepts from mathematics. In this thesis we will be discussing several cryptographic ciphers and discovering the mathematical applications which can be found by exploring them. This paper is intended to be accessible to undergraduate or graduate students as a supplement to a course in number theory or modern algebra. The structure of the paper also lends itself to be accessible to a person interested in learning about mathematics in cryptography on their own, since we will always give a review of the background material which will be needed before delving into the cryptographic ciphers. ii ACKNOWLEDGMENTS My sincerest thanks to Jim Cogdell for working with me as my advisor for this thesis project. His encouragement and guidance during the last year has meant so much to me, and I am exceedingly grateful for it. Working with him has been a pleasure and an honor. Also, thank you to Rodica Costin for being a member of my thesis committee and my academic advisor. I so appreciate all of the advice and support she has given me during my time at OSU. Lastly, I would like to thank my wonderful husband, Pete Kosek. He has loved and supported me through every part of this process, and I wouldn't be where I am today without him. iii VITA 2013 . B.S. in Mathematics, The College at Brockport, SUNY 2013-Present . Graduate Teaching Associate, The Ohio State University PUBLICATIONS Benjamin D. Sokolowsky, Amy G. VanHooft, Rachel M. Volkert, and Clifford A. Reiter. An Infinite Family of Perfect Parallelepipeds. Mathematics of Computation, 83(289):2441-2454, 2014. FIELDS OF STUDY Major Field: Mathematical Sciences Specialization: Mathematics for Educators iv TABLE OF CONTENTS Abstract . ii Acknowledgments . iii Vita . iv CHAPTER PAGE 1 Introduction . 1 1.1 Motivation . 1 1.2 Public-Key vs. Private-Key Ciphers . 2 2 Number Theory and the RSA Cipher . 5 2.1 Elementary Number Theory . 5 2.2 The RSA Cipher . 13 3 Cryptographic Systems Based on the Discrete Logarithm Problem . 20 3.1 The Discrete Logarithm Problem . 20 3.2 Diffie-Hellman Key Exchange . 25 3.3 ElGamal Cipher . 29 4 Elliptic Curve Cryptography . 34 4.1 Elliptic Curves . 34 4.2 Diffie-Hellman Key Exchange for Elliptic Curves . 41 4.3 ElGamal Cipher for Elliptic Curves . 43 4.4 The Elliptic Curve Digital Signature Algorithm . 45 Bibliography . 49 v CHAPTER 1 INTRODUCTION 1.1 Motivation In cryptography people design systems which can be used for protecting data. A cryptographic cipher can be used to encrypt information so that it cannot be read except by the person who can decrypt it. It is as if you put the message which you want safe into a box with a lock on it; that way only someone with the key to the lock can read the message. Information security is an extremely important and relevant problem in the world, particularly in this day and age in which so much of our communication occurs over the internet. Think about the last time you paid for something online with your credit card. Did you trust that your card information was safe and that it couldn't be stolen by someone intercepting it? It most likely was safe, and that was most likely thanks to cryptography! Modern cryptography relies heavily on concepts from number theory. We are going to learn several different cryptographic ciphers and focus on what types of mathematical concepts we can find by exploring them. Chapters 2 and 3 should be very accessible to anyone who is familiar with elementary number theory or group theory. In each of those chapters, we will do a brief refresher of the main mathe- matical concepts which we will use before we jump into learning the cryptographic ciphers. Chapter 4 will look into the study of elliptic curves and their applications to 1 cryptography. In that chapter we will give an introduction to elliptic curves before studying the way they can be used in cryptographic ciphers. So you do not need to have any prior exposure to elliptic curves to be able to study that section. It may be helpful, however, to have some familiarity with finite fields in order to easily understand the theory of elliptic curves which we will discuss. 1.2 Public-Key vs. Private-Key Ciphers The main purpose of both public-key and private-key cryptographic ciphers is to be able to send important or sensitive messages and information from party to party in such a way that it cannot be intercepted or tampered with. Some examples could be communicating military plans or banks sending information about money transfers. Public-key and private-key ciphers provide two techniques for this. In each of these types of ciphers we will discuss encryption keys and decryption keys. The encryption key is what will be used to encode the message from \plaintext" into \ciphertext", whereas the decryption key is what will be used to decode the ciphertext back into the plaintext message [1]. In a private-key cipher (also known as a symmetric cipher) knowledge of the encryption key is equivalent to knowledge of the decryption key. A simple example of this is Caesar's Cipher, which is a very simple shift cipher. To do this you take each letter in your message and replace it with a different letter which is a fixed number of places further in the alphabet. For example you could replace A with E, B with F, C with G, etc. To decrypt the message you simply reverse shift the letters the same fixed amount you used in the encryption. So anyone who knows how the message was encrypted could decrypt it. Currently used symmetric ciphers are far more complicated and provide far more security than Caesar's Cipher. The main idea to grasp at this point, however, is that in a private-key cipher both the 2 encryption key and decryption key must be kept secret from those who are not a part of the communications at hand in order to ensure the cipher's security. Because of this encryption/decryption keys must be generated for pairs of people each time they wish to communicate. One thing to note is that because the encryption key and decryption key for a symmetric cipher are essentially equivalent we will sometimes only refer to the cipher having a single key. In contrast, public-key ciphers (also known as asymmetric ciphers) are devel- oped in such a way that knowledge of the encryption key gives no information as to what the decryption key is (at least not in any reasonable amount of computing time). A way in which public-key ciphers are developed is by making use of a mathematical problem which is \easy" in one direction, but “difficult” in the other direction. For example, the RSA Cipher which we will discuss in the next chapter uses the notion that multiplying two large primes together, each on the order of 1080 or larger, is relatively easy in a computational sense, versus trying to factor a large number, say on the order of 10160 or larger, into its prime factors, which is seemingly impossible to do in any realistic amount of time. This may not make perfect sense now, but as we move on to the sections describing the various public-key ciphers we will explain how it works in greater detail. The benefit of a public-key cipher is that one person, say Bob, could use it to set up an encryption key which he then makes public and keeps his decryption key private to himself. Now several parties could look up Bob's encryption key and send him a message which only he will be able to decrypt. This reduces the number of keys needed to be generated and remembered tremendously. A disadvantage of public-key ciphers is that they are much more computationally costly than symmetric ciphers. A common method which is used in cryptography is to use a public-key cipher in order to encrypt and send a shared private-key which can 3 then be used for communication using a faster running symmetric cipher. This shared private-key will be used for a single session of communication and then discarded after that session is finished. 4 CHAPTER 2 NUMBER THEORY AND THE RSA CIPHER 2.1 Elementary Number Theory In this section we will be outlining several topics from number theory which we will need in order to explore the mathematics behind the cryptographic cipher known as the RSA Cipher. The RSA Cipher is a wonderful example of a real world application of the theoretical topics learned in elementary number theory. As you read through this section you will find that we have omitted much of the material surrounding the definitions and theorems given, and instead trimmed it down into just the basics which we will need to recall when we learn the RSA cipher. If you need a more in depth explanation of any of these topics there are several wonderful resources such as [3] and [7] referenced at the conclusion of this paper. Definition 2.1.1. Suppose we have two integers a and b with a 6= 0.