Cryptography and Number Theory

Size: px
Start display at page:

Download "Cryptography and Number Theory"

Transcription

1 Chapter 2 Cryptography and Number Theory 2.1 Cryptography and Modular Arithmetic Introduction to Cryptography For thousands of years people have searched for ways to send messages in secret. For example, in ancient times a king desired to send a secret message to his general in battle. The king took a servant, shaved his head, and wrote the message on his head. He then waited for the servant s hair to grow back and then sent the servant to the general. The general then shaved the servant s head and read the message. If the enemy had captured the servant, they presumably would not have known to shave his head, and the message would have been safe. Cryptography is the study of methods to send and receive secret messages; it is also concerned with methods used by the adversary to decode messages. In general, we have a sender who is trying to send a message to a receiver. There is also an adversary, who wants to steal the message. We are successful if the sender is able to communicate a message to the receiver without the adversary learning what that message was. In traditional cryptography, the sender and receiver agree in advance on a secret code, and then send messages using that code. For example, one of the oldest types of code is known as a Caesar cipher. In this code, the letters of the alphabet are shifted by some fixed amount. Typically, we call the original message the plaintext and the encoded text the ciphertext. Then an example of a Caesar cipher would be the following code plaintext A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ciphertext E F G H I J K L M N O P Q R S T U V W X Y Z A B C D Thus if we wanted to send the plaintext message we would send the ciphertext ONE IF BY LAND AND TWO IF BY SEA SRI MJ FC PERH ERH XAS MJ FC WIE 25

2 26 CHAPTER 2. CRYPTOGRAPHY AND NUMBER THEORY Note that it is easy for the sender to encode the message, and for the receiver to decode the message. The disadvantage of this scheme is that it is also easy for the adversary to just try the 26 different possible Caesar ciphers and decode the message (only one will decode into plain English, with very high probability). Of course, there is no reason to use such a simple code; we can use any arbitrary permutation of the alphabet as the ciphertext, e.g. plaintext A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ciphertext H D I E T J K L M X N Y O P F Q R U V W G Z A S B C If we encode a short message with a code like this, it would be hard for the adversary to decode it. However, with a message of any reasonable length (greater than about 50 letters), an adversary with a knowledge of the statistics of the English language can easily crack the code. There is no reason that we have to use simple mappings of letters to letters. For example, our coding algorithm can be to take three consecutive letters, reverse their order, interpret each as a base 26 integer (with A=0;B=1, etc.) multiply that number by 37, add 95 and then convert that number to base 8. Continue with each three letters, appending as we go along, using 8 s and 9 s to separate the numbers. When we are done, we reverse the number, and replace each digit 5 by two 5 s. Here is an example of this method: plaintext: ONEIFBYLANDTWOIFBYSEA block and reverse: ENO BFI ALY TDN IOW YBF AES base 26 integer: * base 8: appended : reverse, 5rep : Now, we can verify that it is possible for the receiver, who knows the code, to decode this message, and that the casual reader of the message will have no hope of decoding it. So it seems that with a complicated enough code, we can have secure cryptography. Unfortunately, there are at least two flaws with this method. The first is that if the adversary learns, somehow, what the code is, then she can easily decode it. Second, if this coding scheme is repeated often enough, and if the adversary has enough time, money and computing power, this code could be broken. In the field of cryptography, there are definitely players who have all these resources (such as a government, or a large corporation). The infamous German Enigma is an example of a much more complicated coding scheme, yet it was broken and this helped the Allies win World War II. (The reader might be interested in looking up more details on this.) In general, any scheme that uses a codebook, a secretly agreed upon (possibly complicated) code, suffers from these drawbacks. These codes are also called one-time pads, as the communicating parties agree on using the same pad or page in a codebook. A public-key cryptosystem overcomes the problems mentioned above. In a public key cryptosystem, the sender and receiver (often called Alice and Bob respectively) don t have to agree in advance on a secret code. In fact, they each publish part of their code in a public directory. Further, the adversary can intercept the message, and can have the public directory, and these will not be able to help him decode the message.

3 2.1. CRYPTOGRAPHY AND MODULAR ARITHMETIC 27 More precisely, Alice and Bob will each have two keys, a public key and a secret key. W e will denote Alice s public and secret keys as P A and S A and Bob s as P B and S B. They each keep their secret keys to themselves, but can publish their public keys and make them available to anyone, including the adversary. For convenience, we will think of these keys as functions; in particular we require that they each be one-to-one functions from the set D of possible messages onto itself. The public and secret keys are chosen to be inverses of each other, i.e for any M D we have that M = S A (P A (M)) = P A (S A (M)). (2.1) We also assume that, for Alice, S A and P A are easily computable. However, it is essential that for everyone except Alice, S A is hard to compute, even if you know P A. At first glance, this may seem to be an impossible task, Alice creates a function P A, that is public and easy to compute for everyone, yet this function has an inverse, S A, that is hard to compute for everyone except Alice. It is not at all clear how to design such a function. The first such cryptosystem is the now-famous RSA cryptosystem, widely used in many contexts. To understand how such a cryptosystem is possible will rely on some knowledge of number theory and on computational complexity. We will develop the necessary number theory in the next few sections. Before doing so, let us just assume that we have such a function and see how we can make use of it. Suppose Alice wants to send Bob a message M, she takes the following two steps: Alice obtains Bob s public key P B. Alice applies Bob s public key to M to create ciphertext C = P B (M). Alice then sends C to Bob. Bob can decode the message by using his secret key to compute S B (C) which is identical to S B (P B (M)), which by (2.1) is identical to M the original message. The beauty of the scheme is that even if the adversary has C and knows P B, she cannot decode the message without S B.ButS B is a secret that only Bob has. And even though the adversary knows that S B is the inverse of P B, the nature of P B is such that the adversary cannot easily compute its inverse Congruence modulo m The RSA encryption scheme is built upon the idea of congruence mod n. The symbolism m mod n means the remainder we get when we divide m by n. A bit more precisely, for integers m and n, m mod n is the smallest nonnegative integer r such that for some integer q. 1 m = nq + r (2.2) 1 In an unfortunate historical evolution of terminology, the fact that for every nonnegative integer m and positive integer n, there exist unique nonnegative integers q and r such that m = nq + r and r<nis called Euclid s algorithm. In modern language we would call this Euclid s Theorem instead. While it seems obvious that there is such a smallest nonnegative integer r and that there is exactly one such pair q, r with r<n, a technically complete study would derive these facts from the basic axioms of number theory, just as obvious facts of geometry are derived form the basic axioms of geometry. The reasons why mathematicians take the time to derive such obvious facts from basic axioms is so that everyone can understand exactly what we are assuming as the foundations of our subject; as the rules of the game in effect.

4 28 CHAPTER 2. CRYPTOGRAPHY AND NUMBER THEORY Compute 10 mod 7, -10 mod 7, 10 mod 7. The last one has two possible interpretations. We are looking for the one that is an integer Compute 21 mod 9, 38 mod 9, mod 9, (21 mod 9) (38 mod 9), mod 9, (21 mod 9) + (38 mod 9), 21 mod mod Show that 16 mod 9 = 34 mod 9. Is the same true of the pairs 16+1 and 34+1? 16+2 and 34+2? 16+7 and 34+7? What about 16 + k and 34 + k for an arbitrary integer k? In Exercise 2.1-1, 10 mod 7 is 3, while 10 mod 7 is 4. Note that 3 mod 7 is 4 also. Also, mod 7 = 0, suggesting that -10 is essentially the same as -3 when we are considering integers mod 7. We will be able to make this idea more precise in a few paragraphs. What do we mean by 1 10 mod 7? In algebra, 1 10 means the number that we multiply by 10 in order to get one. If we try multiplying ten by the numbers 1,2,3,4,5,6,etc., and taking the result mod n, weseethat5 10 = 50 and 50 mod 7 = 1, so that so it is natural to say that 1 10 mod 7 = 5. In Exercise 2.1-2, the point to notice is that and 5 10 mod 7 = 1, mod 9 = (21 mod 9)(38 mod 9) mod 9 = (21 mod 9) + (38 mod 9). These equations are very suggestive, though the general equations that they first suggest aren t true! Some closely related equations are true; the idea of congruence modulo n that we explore below allows us to discover these equations. Closely related to the operation m mod n is the relationship of congruence modulo n. Wesay that p and q are congruent modulo n if p mod n = q mod n. Another way to say this is to say that p and q are congruent mod n if p q is an integer multiple of n. The usual way of writing the statement that p and q are congruent mod n is p q (mod n). The congruence class of m mod n, denoted by m when the n is clear from context, is the set of all numbers congruent to m mod n. Thus every number is in some congruence class mod n. Two different congruence classes mod n cannot have any numbers in common, because if k were both i and j, then i mod n = k mod n = j mod n, so that i and j are congruent. However i and j are arbitrary members of their classes, so what we can conclude is that every member of i is congruent to every member of j. Thus the classes i and j have exactly the same members and are thus the same set. Therefore different congruence classes must be disjoint. This proves our next theorem: Theorem Congruence mod n is an equivalence relation.

5 2.1. CRYPTOGRAPHY AND MODULAR ARITHMETIC 29 Proof: Given above. Exercise is really a statement about congruence modulo n. All the pairs given in Exercise have the same mods, and the last pair corresponds to the fact that if i j (mod n), then for any integer k, i + k j + k (mod n). While we can think about (and define rigorously) modular arithmetic via congruences and congruence classes, a slightly different approach will turn out to be more closely related to what we do computationally. We will pull the smallest positive number out of each congruence class, and use that instead of the class itself. Thus, if we are doing arithmetic mod n, we will restrict ourselves to using the numbers 0, 1,...,n 1. We will redefine addition to be addition modulo n, and multiplication to be multiplication modulo n. We will use the notation Z n to represent the integers 0, 1,...,n 1 together with a redefinition of addition, which we denote by + n,and a redefinition of multiplication, which we denote n. The redefinitions are: i + n j = (i + j) modn (2.3) i n j = (i j) modn (2.4) We must now verify that all the usual rules of arithmetic normally apply to addition and multiplication still apply with + n and n. In particular, we wish to verify the commutative, associative and distributive laws. The intuition behind why these laws will hold is that as we are doing addition and multiplication on integers, if the final result is going to be expressed mod n, then at any point in the computation, we can take any partial sum or product mod n. Thiscan be formalized in the following lemma. Lemma (i + j) modn =(i mod n + j mod n) modn. (2.5) Proof: Using (2.2), we can write i as k 1 n + r 1,wherer 1 <n,andcanwritej as k 2 n + r 2, where r 2 <n. Then we can rewrite the left side of (2.5) as (i + j) modn = (k 1 n + r 1 + k 2 n + r 2 )modn = ((k 1 + k 2 )n +(r 1 + r 2 )) mod n = (r 1 + r 2 )modn, where the last line follows because any integral multiple of n is 0 mod n. Wecanrewritethe right side of (2.5) as (i mod n + j mod n) modn = ((k 1 n + r 1 )modn +(k 2 n + r 2 )modn) modn = (r 1 mod n + r 2 mod n) modn = (r 1 + r 2 )modn, where the last line follows because r 1 <nand r 2 <n. Similarly, we can show that (i + j) modn =(i + j mod n) modn =(i mod n + j) modn. (2.6) We now turn to verifying the various laws of addition and multiplication. First, the fact that + n is commutative follows immediately from the definition. We will now prove that it is also associative.

6 30 CHAPTER 2. CRYPTOGRAPHY AND NUMBER THEORY Lemma For any x, y, z Z n, (x + n y)+ n z = x + n (y + n z) Proof: following We will repeatedly use the definition of + n and equations 2.5 and 2.6 to get the (x + n y)+ n z = ((x + n y)+z) modn = ((x + n y)+z mod n) modn = ((x + y) modn + z mod n) modn = ((x mod n + y mod n) modn + z mod n) modn = (x mod n + y mod n + z mod n) modn = (x mod n +(y mod n + z mod n) modn) modn = (x mod n +(y + z) modn) modn = (x +(y + z) modn) modn = (x + y + n z)modn = x + n (y + n z). We can also show that a version of Equation 2.5 and Equation 2.6 holds with addition replaced by multiplication, i.e. that (i j) modn =(i mod n j mod n) modn =(i j mod n) modn =(i mod n j) modn. (2.7) The proof of this will be an exercise. Using this we can show that n is associative. (The proof of this is also an exercise.) Given these, we can show that the distributive law also holds, i.e. Lemma For any x, y, z Z n, x n (y + n z)=(x n y)+ n (x n z). Proof: Using (2.5), (2.6) and (2.7), x n (y + n z) = (x(y + n z)) mod n = (x((y + z) modn)) mod n = (x((y mod n + z mod n) modn)) mod n = ((x mod n)((y mod n + z mod n) modn)) mod n = ((x mod n)(y mod n + z mod n)) mod n = ((x mod n)(y mod n)+(x mod n)(z mod n)) mod n = (((x mod n)(y mod n)) mod n +((x mod n)(z mod n)) mod n) modn = ((xy) modn +(xz) modn) modn = ((x n y)+(x n z)) mod n = (x n y)+ n (x n z))

7 2.1. CRYPTOGRAPHY AND MODULAR ARITHMETIC 31 We conclude this section by observing that repeated applications of Lemma are useful when computing sums in which the numbers are large. For example, suppose you had m integers x 1,...,x m and you wanted to compute m j=1 x i mod m. One natural way to do so would be to compute the sum, and take the result modulo m. However, it is possible that, on the computer that you are using, even though m j=1 x i mod m is a number that can be stored in an integer, and each x i can be stored in an integer, m j=1 x i mightbetoolargetobestoredinaninteger. (Recall that integers are typically stored as 4 or 8 bytes, and thus have a maximum value of roughly or ) Another way to say this is that if we are computing a result mod n, we should do all our calculations in Z n using + n and n. Cryptography Revisited One natural way to use addition of a number m mod n in encryption is to first convert the message to a sequence of digits say concatenating all the ASCII codes for all the symbols in the message and then simply add m to the message mod n. Ifn happens to be larger than the message in numerical value, then it is simple for someone who knows m to decode the encrypted message. However an adversary who sees the encrypted message has no special knowledge and so unless m was ill chosen (for example m = 1 would be a silly choice) the adversary who knows what system you are using, even including the value of n, but does not know m, is essentially reduced to trying all possible m values. This is an example of a one time pad, discussed in Section 2.1.1, because if you use m only once, there is no way for the adversary to collect any data that will aid in guessing m. Thus, if only you and your intended recipient know m, this kind of encryption is quite secure: guessing m is just as hard as guessing the message. It is possible that once n has been chosen, you will find you have a message which translates to a larger number than n. Normally you would then break the message into segments, each with no more digits than n, and send the segments individually. So long as you were not sending a large number of segments, it would still be quite difficult for your adversary to guess m by observing the encrypted information. In fact, it would not be unusual to use the same value of m for a day, say, (or for one session on the internet) and then to change it. However, if you used the value often enough, the adversary could collect enough information to be able to break the code Multiplication Mod n Show that (i j) modn =(i mod n)(j mod n) modn Would it make sense to encode a message by multiplying it by a key mod n? When we encoded a message by adding m mod n, we could decode the message simply by subtracting m mod n. By analogy, if we encode by multiplying by m mod n, we would expect to decode by dividing by m mod n. However division mod n can be problematic for some values of n. Let us do a trivial example. Suppose your value of n was 12 and the value of m was 4. You send the message 3 as (mod 12). Thus you send the encoded message 0. Now your partner sees 0, and says the message might have been 0; after all, (mod 12). On the

8 32 CHAPTER 2. CRYPTOGRAPHY AND NUMBER THEORY other hand, (mod 12), (mod 12), and (mod 12) as well. Thus your partner has four different choices for the original message, which is almost as bad as having to guess the original message itself! You might think that 0 would present special problems for division, so let s look at another example. Suppose that m =3andn = 12. Now we encode the message 6 by computing (mod 12). Simple calculation show that (mod 12), (mod 12), and (mod 12). Thus in this case, there are three possible ways to decode the message. Let s look at one more example that will provide some hope. Let m =5andn = 12, and let s encode the message 7 as (mod 12). This time, simple calculation shows that 7 is the unique solution (mod 12) to the equation x 5 11 (mod 12). Thus in this case we can correctly decode the message. As we shall see in the next section, the kind of problem we had happens only when m is a factor of n. Thus all our receiver needs to know, in our cases, is how to divide by m mod n, and she can decrypt our message. If you don t now know how to divide by m, then you can begin to understand the idea of public key cryptography. The message is there for anyone who knows how to divide by m to find, but if nobody but our receiver can divide by m, we can tell everyone what m is and our messages will still be secret. As we shall soon see, dividing by m is not particularly difficult, so a better trick is needed for public key cryptography to work. Exercises E2.1-1 State and prove the commutative and associative law for n. E2.1-2 It is obvious how to solve any equation of the form x + n a = b in Z n, and that the result will be a unique value of x. On the other hand we saw that 0, 3, 6, and 9 are all solutions to the equation 4 n x =0 in Z 12. Are there any equations of the form a n x = b that don t have any solutions at all in Z 12? If so, give one, and find out whether there are any numbers a such that each equation of the form a n x = b does have a solution. On the other hand if each equation of the form a n x = b has a solution in Z 12, give a proof of this. (Note that having a solution is different from having a unique solution.) E2.1-3 Does every equation of the form a n x = b have a solution in Z 5?inZ 7?inZ 9?in Z 11? E2.1-4 Recall that if a prime number divides a product of two integers, then it divides one of the factors. a) Use this to show that as b runs though the integers from 0 to p 1, with p prime, the products a n b are all different (for each fixed choice of a between 1 and p 1). b) Explain why every integer greater than 0 has a unique multiplicative inverse mod p, ifp is prime.

9 2.1. CRYPTOGRAPHY AND MODULAR ARITHMETIC 33 E2.1-5 Modular arithmetic is used in generating psuedo-random numbers. One basic algorithm (still used on many machines!) is by linear congruential random number generation. The following piece of code generates a sequence of numbers that may appear random to an unaware user. seed := x := 0 /* set seed */ repeat x := (ax + b) modn print x until x = seed Execute the loop for a =3,b=7,n = 11. E2.1-6 Write down the 7 multiplication table for Z 7.

Number theory (Chapter 4)

Number theory (Chapter 4) EECS 203 Spring 2016 Lecture 12 Page 1 of 8 Number theory (Chapter 4) Review Compute 6 11 mod 13 in an efficient way What is the prime factorization of 100? 138? What is gcd(100, 138)? What is lcm(100,138)?

More information

Cryptography. P. Danziger. Transmit...Bob...

Cryptography. P. Danziger. Transmit...Bob... 10.4 Cryptography P. Danziger 1 Cipher Schemes A cryptographic scheme is an example of a code. The special requirement is that the encoded message be difficult to retrieve without some special piece of

More information

Public Key Cryptography

Public Key Cryptography Public Key Cryptography Spotlight on Science J. Robert Buchanan Department of Mathematics 2011 What is Cryptography? cryptography: study of methods for sending messages in a form that only be understood

More information

10 Modular Arithmetic and Cryptography

10 Modular Arithmetic and Cryptography 10 Modular Arithmetic and Cryptography 10.1 Encryption and Decryption Encryption is used to send messages secretly. The sender has a message or plaintext. Encryption by the sender takes the plaintext and

More information

THE RSA ENCRYPTION SCHEME

THE RSA ENCRYPTION SCHEME THE RSA ENCRYPTION SCHEME Contents 1. The RSA Encryption Scheme 2 1.1. Advantages over traditional coding methods 3 1.2. Proof of the decoding procedure 4 1.3. Security of the RSA Scheme 4 1.4. Finding

More information

Notes. Number Theory: Applications. Notes. Number Theory: Applications. Notes. Hash Functions I

Notes. Number Theory: Applications. Notes. Number Theory: Applications. Notes. Hash Functions I Number Theory: Applications Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Fall 2007 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 3.4 3.7 of Rosen cse235@cse.unl.edu

More information

Number Theory: Applications. Number Theory Applications. Hash Functions II. Hash Functions III. Pseudorandom Numbers

Number Theory: Applications. Number Theory Applications. Hash Functions II. Hash Functions III. Pseudorandom Numbers Number Theory: Applications Number Theory Applications Computer Science & Engineering 235: Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu Results from Number Theory have many applications

More information

CRYPTOGRAPHY AND LARGE PRIMES *

CRYPTOGRAPHY AND LARGE PRIMES * CRYPTOGRAPHY AND LARGE PRIMES * B. Hartley University of Manchester, England, and National University of Singapore The word "cryptography" derives from Greek and means "secret writing". Since ancient times,

More information

RSA RSA public key cryptosystem

RSA RSA public key cryptosystem RSA 1 RSA As we have seen, the security of most cipher systems rests on the users keeping secret a special key, for anyone possessing the key can encrypt and/or decrypt the messages sent between them.

More information

CRYPTOGRAPHY AND NUMBER THEORY

CRYPTOGRAPHY AND NUMBER THEORY CRYPTOGRAPHY AND NUMBER THEORY XINYU SHI Abstract. In this paper, we will discuss a few examples of cryptographic systems, categorized into two different types: symmetric and asymmetric cryptography. We

More information

MODULAR ARITHMETIC KEITH CONRAD

MODULAR ARITHMETIC KEITH CONRAD MODULAR ARITHMETIC KEITH CONRAD. Introduction We will define the notion of congruent integers (with respect to a modulus) and develop some basic ideas of modular arithmetic. Applications of modular arithmetic

More information

Public Key Encryption

Public Key Encryption Public Key Encryption KG October 17, 2017 Contents 1 Introduction 1 2 Public Key Encryption 2 3 Schemes Based on Diffie-Hellman 3 3.1 ElGamal.................................... 5 4 RSA 7 4.1 Preliminaries.................................

More information

Cryptography. pieces from work by Gordon Royle

Cryptography. pieces from work by Gordon Royle Cryptography pieces from work by Gordon Royle The set-up Cryptography is the mathematics of devising secure communication systems, whereas cryptanalysis is the mathematics of breaking such systems. We

More information

Simple Math: Cryptography

Simple Math: Cryptography 1 Introduction Simple Math: Cryptography This section develops some mathematics before getting to the application. The mathematics that I use involves simple facts from number theory. Number theory is

More information

Lecture Notes, Week 6

Lecture Notes, Week 6 YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE CPSC 467b: Cryptography and Computer Security Week 6 (rev. 3) Professor M. J. Fischer February 15 & 17, 2005 1 RSA Security Lecture Notes, Week 6 Several

More information

Discrete Mathematics GCD, LCM, RSA Algorithm

Discrete Mathematics GCD, LCM, RSA Algorithm Discrete Mathematics GCD, LCM, RSA Algorithm Abdul Hameed http://informationtechnology.pk/pucit abdul.hameed@pucit.edu.pk Lecture 16 Greatest Common Divisor 2 Greatest common divisor The greatest common

More information

CPE 776:DATA SECURITY & CRYPTOGRAPHY. Some Number Theory and Classical Crypto Systems

CPE 776:DATA SECURITY & CRYPTOGRAPHY. Some Number Theory and Classical Crypto Systems CPE 776:DATA SECURITY & CRYPTOGRAPHY Some Number Theory and Classical Crypto Systems Dr. Lo ai Tawalbeh Computer Engineering Department Jordan University of Science and Technology Jordan Some Number Theory

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 11 February 21, 2013 CPSC 467b, Lecture 11 1/27 Discrete Logarithm Diffie-Hellman Key Exchange ElGamal Key Agreement Primitive Roots

More information

An Introduction to Cryptography

An Introduction to Cryptography An Introduction to Cryptography Spotlight on Science J. Robert Buchanan Department of Mathematics Spring 2008 What is Cryptography? cryptography: study of methods for sending messages in a form that only

More information

17.1 Binary Codes Normal numbers we use are in base 10, which are called decimal numbers. Each digit can be 10 possible numbers: 0, 1, 2, 9.

17.1 Binary Codes Normal numbers we use are in base 10, which are called decimal numbers. Each digit can be 10 possible numbers: 0, 1, 2, 9. ( c ) E p s t e i n, C a r t e r, B o l l i n g e r, A u r i s p a C h a p t e r 17: I n f o r m a t i o n S c i e n c e P a g e 1 CHAPTER 17: Information Science 17.1 Binary Codes Normal numbers we use

More information

Week 7 An Application to Cryptography

Week 7 An Application to Cryptography SECTION 9. EULER S GENERALIZATION OF FERMAT S THEOREM 55 Week 7 An Application to Cryptography Cryptography the study of the design and analysis of mathematical techniques that ensure secure communications

More information

Lecture 1: Introduction to Public key cryptography

Lecture 1: Introduction to Public key cryptography Lecture 1: Introduction to Public key cryptography Thomas Johansson T. Johansson (Lund University) 1 / 44 Key distribution Symmetric key cryptography: Alice and Bob share a common secret key. Some means

More information

Lecture 1: Perfect Secrecy and Statistical Authentication. 2 Introduction - Historical vs Modern Cryptography

Lecture 1: Perfect Secrecy and Statistical Authentication. 2 Introduction - Historical vs Modern Cryptography CS 7880 Graduate Cryptography September 10, 2015 Lecture 1: Perfect Secrecy and Statistical Authentication Lecturer: Daniel Wichs Scribe: Matthew Dippel 1 Topic Covered Definition of perfect secrecy One-time

More information

The RSA public encryption scheme: How I learned to stop worrying and love buying stuff online

The RSA public encryption scheme: How I learned to stop worrying and love buying stuff online The RSA public encryption scheme: How I learned to stop worrying and love buying stuff online Anthony Várilly-Alvarado Rice University Mathematics Leadership Institute, June 2010 Our Goal Today I will

More information

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya BBM 205 Discrete Mathematics Hacettepe University http://web.cs.hacettepe.edu.tr/ bbm205 Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya Resources: Kenneth Rosen,

More information

Review. CS311H: Discrete Mathematics. Number Theory. Computing GCDs. Insight Behind Euclid s Algorithm. Using this Theorem. Euclidian Algorithm

Review. CS311H: Discrete Mathematics. Number Theory. Computing GCDs. Insight Behind Euclid s Algorithm. Using this Theorem. Euclidian Algorithm Review CS311H: Discrete Mathematics Number Theory Instructor: Işıl Dillig What does it mean for two ints a, b to be congruent mod m? What is the Division theorem? If a b and a c, does it mean b c? What

More information

19. Coding for Secrecy

19. Coding for Secrecy 19. Coding for Secrecy 19.1 Introduction Protecting sensitive information from the prying eyes and ears of others is an important issue today as much as it has been for thousands of years. Government secrets,

More information

CSE 311 Lecture 11: Modular Arithmetic. Emina Torlak and Kevin Zatloukal

CSE 311 Lecture 11: Modular Arithmetic. Emina Torlak and Kevin Zatloukal CSE 311 Lecture 11: Modular Arithmetic Emina Torlak and Kevin Zatloukal 1 Topics Sets and set operations A quick wrap-up of Lecture 10. Modular arithmetic basics Arithmetic over a finite domain (a.k.a

More information

Math 299 Supplement: Modular Arithmetic Nov 8, 2013

Math 299 Supplement: Modular Arithmetic Nov 8, 2013 Math 299 Supplement: Modular Arithmetic Nov 8, 2013 Numbers modulo n. We have previously seen examples of clock arithmetic, an algebraic system with only finitely many numbers. In this lecture, we make

More information

Public-Key Cryptosystems CHAPTER 4

Public-Key Cryptosystems CHAPTER 4 Public-Key Cryptosystems CHAPTER 4 Introduction How to distribute the cryptographic keys? Naïve Solution Naïve Solution Give every user P i a separate random key K ij to communicate with every P j. Disadvantage:

More information

Powers in Modular Arithmetic, and RSA Public Key Cryptography

Powers in Modular Arithmetic, and RSA Public Key Cryptography 1 Powers in Modular Arithmetic, and RSA Public Key Cryptography Lecture notes for Access 2006, by Nick Korevaar. It was a long time from Mary Queen of Scotts and substitution ciphers until the end of the

More information

2.2 Inverses and GCDs

2.2 Inverses and GCDs 34 CHAPTER 2. CRYPTOGRAPHY AND NUMBER THEORY 2.2 Inverses and GCDs 2.2.1 Inverses mod p In the last section we explored the multiplication in Z n. We saw in the special case with n =12 and a = 4 that if

More information

Clock Arithmetic and Euclid s Algorithm

Clock Arithmetic and Euclid s Algorithm Clock Arithmetic and Euclid s Algorithm Lecture notes for Access 2008 by Erin Chamberlain. Earlier we discussed Caesar Shifts and other substitution ciphers, and we saw how easy it was to break these ciphers

More information

MEETING 6 - MODULAR ARITHMETIC AND INTRODUCTORY CRYPTOGRAPHY

MEETING 6 - MODULAR ARITHMETIC AND INTRODUCTORY CRYPTOGRAPHY MEETING 6 - MODULAR ARITHMETIC AND INTRODUCTORY CRYPTOGRAPHY In this meeting we go through the foundations of modular arithmetic. Before the meeting it is assumed that you have watched the videos and worked

More information

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2 Contents 1 Recommended Reading 1 2 Public Key/Private Key Cryptography 1 2.1 Overview............................................. 1 2.2 RSA Algorithm.......................................... 2 3 A Number

More information

Theme : Cryptography. Instructor : Prof. C Pandu Rangan. Speaker : Arun Moorthy CS

Theme : Cryptography. Instructor : Prof. C Pandu Rangan. Speaker : Arun Moorthy CS 1 C Theme : Cryptography Instructor : Prof. C Pandu Rangan Speaker : Arun Moorthy 93115 CS 2 RSA Cryptosystem Outline of the Talk! Introduction to RSA! Working of the RSA system and associated terminology!

More information

download instant at

download instant at 2 CRYPTOGRAPHY AND NUMBER THEORY 2.1 CRYPTOGRAPHY AND MODULAR ARITHMETIC Pages 54 to 56 Problem 1 Problem 2 Problem 3 Problem 4 14 mod 9 = 5; 1 mod 9 = 8; 11 mod 9 = 7. KHUH LV D PHVVDJH. EBOB FP X JBPPXDB.

More information

Classical Cryptography

Classical Cryptography Classical Cryptography CSG 252 Fall 2006 Riccardo Pucella Goals of Cryptography Alice wants to send message X to Bob Oscar is on the wire, listening to communications Alice and Bob share a key K Alice

More information

CSCI3390-Lecture 16: Probabilistic Algorithms: Number Theory and Cryptography

CSCI3390-Lecture 16: Probabilistic Algorithms: Number Theory and Cryptography CSCI3390-Lecture 16: Probabilistic Algorithms: Number Theory and Cryptography 1 Two Problems Problem 1. Generate Primes Find a prime number p of between 200 and 1000 decimal digits that has never been

More information

( c ) E p s t e i n, C a r t e r a n d B o l l i n g e r C h a p t e r 1 7 : I n f o r m a t i o n S c i e n c e P a g e 1

( c ) E p s t e i n, C a r t e r a n d B o l l i n g e r C h a p t e r 1 7 : I n f o r m a t i o n S c i e n c e P a g e 1 ( c ) E p s t e i n, C a r t e r a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 7 : I n f o r m a t i o n S c i e n c e P a g e 1 CHAPTER 17: Information Science In this chapter, we learn how data can

More information

Great Theoretical Ideas in Computer Science

Great Theoretical Ideas in Computer Science 15-251 Great Theoretical Ideas in Computer Science Lecture 22: Cryptography November 12th, 2015 What is cryptography about? Adversary Eavesdropper I will cut your throat I will cut your throat What is

More information

Practice Assignment 2 Discussion 24/02/ /02/2018

Practice Assignment 2 Discussion 24/02/ /02/2018 German University in Cairo Faculty of MET (CSEN 1001 Computer and Network Security Course) Dr. Amr El Mougy 1 RSA 1.1 RSA Encryption Practice Assignment 2 Discussion 24/02/2018-29/02/2018 Perform encryption

More information

Homework 4 for Modular Arithmetic: The RSA Cipher

Homework 4 for Modular Arithmetic: The RSA Cipher Homework 4 for Modular Arithmetic: The RSA Cipher Gregory V. Bard April 25, 2018 This is a practice workbook for the RSA cipher. It is not suitable for learning the RSA cipher from scratch. However, there

More information

10 Public Key Cryptography : RSA

10 Public Key Cryptography : RSA 10 Public Key Cryptography : RSA 10.1 Introduction The idea behind a public-key system is that it might be possible to find a cryptosystem where it is computationally infeasible to determine d K even if

More information

Lemma 1.2. (1) If p is prime, then ϕ(p) = p 1. (2) If p q are two primes, then ϕ(pq) = (p 1)(q 1).

Lemma 1.2. (1) If p is prime, then ϕ(p) = p 1. (2) If p q are two primes, then ϕ(pq) = (p 1)(q 1). 1 Background 1.1 The group of units MAT 3343, APPLIED ALGEBRA, FALL 2003 Handout 3: The RSA Cryptosystem Peter Selinger Let (R, +, ) be a ring. Then R forms an abelian group under addition. R does not

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Instructor: Michael Fischer Lecture by Ewa Syta Lecture 13 March 3, 2013 CPSC 467b, Lecture 13 1/52 Elliptic Curves Basics Elliptic Curve Cryptography CPSC

More information

Cryptography and Secure Communication Protocols

Cryptography and Secure Communication Protocols Cryptography and Secure Communication Protocols Jayadev Misra The University of Texas at Austin October 1, 2003 Contents 1 Introduction 1 2 Early Encryption Schemes 2 2.1 Substitution cyphers.........................

More information

Public-key Cryptography and elliptic curves

Public-key Cryptography and elliptic curves Public-key Cryptography and elliptic curves Dan Nichols nichols@math.umass.edu University of Massachusetts Oct. 14, 2015 Cryptography basics Cryptography is the study of secure communications. Here are

More information

The Hill Cipher A Linear Algebra Perspective

The Hill Cipher A Linear Algebra Perspective The Hill Cipher A Linear Algebra Perspective Contents 1 Introduction to Classical Cryptography 3 1.1 Alice, Bob & Eve................................. 3 1.2 Types of Attacks.................................

More information

Cryptography and RSA. Group (1854, Cayley) Upcoming Interview? Outline. Commutative or Abelian Groups

Cryptography and RSA. Group (1854, Cayley) Upcoming Interview? Outline. Commutative or Abelian Groups Great Theoretical Ideas in CS V. Adamchik CS 15-251 Upcoming Interview? Lecture 24 Carnegie Mellon University Cryptography and RSA How the World's Smartest Company Selects the Most Creative Thinkers Groups

More information

An Introduction to Probabilistic Encryption

An Introduction to Probabilistic Encryption Osječki matematički list 6(2006), 37 44 37 An Introduction to Probabilistic Encryption Georg J. Fuchsbauer Abstract. An introduction to probabilistic encryption is given, presenting the first probabilistic

More information

Notes 10: Public-key cryptography

Notes 10: Public-key cryptography MTH6115 Cryptography Notes 10: Public-key cryptography In this section we look at two other schemes that have been proposed for publickey ciphers. The first is interesting because it was the earliest such

More information

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

6.080 / Great Ideas in Theoretical Computer Science Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

More information

CS 282A/MATH 209A: Foundations of Cryptography Prof. Rafail Ostrosky. Lecture 4

CS 282A/MATH 209A: Foundations of Cryptography Prof. Rafail Ostrosky. Lecture 4 CS 282A/MATH 209A: Foundations of Cryptography Prof. Rafail Ostrosky Lecture 4 Lecture date: January 26, 2005 Scribe: Paul Ray, Mike Welch, Fernando Pereira 1 Private Key Encryption Consider a game between

More information

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2000 2013 Contents 9 Introduction to Number Theory 63 9.1 Subgroups

More information

A Quick Look at some Mathematics and Cryptography A Talk for CLIR at UConn

A Quick Look at some Mathematics and Cryptography A Talk for CLIR at UConn A Quick Look at some Mathematics and Cryptography A Talk for CLIR at UConn Jeremy Teitelbaum September 5, 2014 Secret Key Ciphers A cipher is a method of communication in which the letters making up the

More information

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Jan Stelovsky based on slides by Dr. Baek and Dr. Still Originals by Dr. M. P. Frank and Dr. J.L. Gross Provided by

More information

9 Knapsack Cryptography

9 Knapsack Cryptography 9 Knapsack Cryptography In the past four weeks, we ve discussed public-key encryption systems that depend on various problems that we believe to be hard: prime factorization, the discrete logarithm, and

More information

NUMBER THEORY AND CRYPTOGRAPHY

NUMBER THEORY AND CRYPTOGRAPHY NUMBER THEORY AND CRYPTOGRAPHY KEITH CONRAD 1. Introduction Cryptography is the study of secret messages. For most of human history, cryptography was important primarily for military or diplomatic purposes

More information

Logic gates. Quantum logic gates. α β 0 1 X = 1 0. Quantum NOT gate (X gate) Classical NOT gate NOT A. Matrix form representation

Logic gates. Quantum logic gates. α β 0 1 X = 1 0. Quantum NOT gate (X gate) Classical NOT gate NOT A. Matrix form representation Quantum logic gates Logic gates Classical NOT gate Quantum NOT gate (X gate) A NOT A α 0 + β 1 X α 1 + β 0 A N O T A 0 1 1 0 Matrix form representation 0 1 X = 1 0 The only non-trivial single bit gate

More information

Solutions to the Midterm Test (March 5, 2011)

Solutions to the Midterm Test (March 5, 2011) MATC16 Cryptography and Coding Theory Gábor Pete University of Toronto Scarborough Solutions to the Midterm Test (March 5, 2011) YOUR NAME: DO NOT OPEN THIS BOOKLET UNTIL INSTRUCTED TO DO SO. INSTRUCTIONS:

More information

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Module No. # 01 Lecture No. # 33 The Diffie-Hellman Problem

More information

Introduction. What is RSA. A Guide To RSA by Robert Yates. Topics

Introduction. What is RSA. A Guide To RSA by Robert Yates. Topics A Guide To RSA by Robert Yates. Topics Introduction...01/09 What is RSA...01/09 Mod-Exponentiation...02/09 Euler's Theorem...03/09 RSA Algorithm...08/09 RSA Security...09/09 Introduction Welcome to my

More information

Lecture 19: Public-key Cryptography (Diffie-Hellman Key Exchange & ElGamal Encryption) Public-key Cryptography

Lecture 19: Public-key Cryptography (Diffie-Hellman Key Exchange & ElGamal Encryption) Public-key Cryptography Lecture 19: (Diffie-Hellman Key Exchange & ElGamal Encryption) Recall In private-key cryptography the secret-key sk is always established ahead of time The secrecy of the private-key cryptography relies

More information

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2006 Contents 9 Introduction to Number Theory and Cryptography 1 9.1 Subgroups

More information

Candidates must show on each answer book the type of calculator used. Only calculators permitted under UEA Regulations may be used.

Candidates must show on each answer book the type of calculator used. Only calculators permitted under UEA Regulations may be used. UNIVERSITY OF EAST ANGLIA School of Mathematics May/June UG Examination 2010 2011 CRYPTOGRAPHY Time allowed: 2 hours Attempt THREE questions. Candidates must show on each answer book the type of calculator

More information

CPSC 467: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security CPSC 467: Cryptography and Computer Security Michael J. Fischer 1 Lecture 13 October 16, 2017 (notes revised 10/23/17) 1 Derived from lecture notes by Ewa Syta. CPSC 467, Lecture 13 1/57 Elliptic Curves

More information

Math Circles Cryptography

Math Circles Cryptography Math Circles Cryptography Nickolas Rollick nrollick@uwaterloo.ca March 7, 2018 Introduction Last time, we talked about public key cryptography, an idea from the 1970s that opened the door for encryption

More information

AN INTRODUCTION TO THE UNDERLYING COMPUTATIONAL PROBLEM OF THE ELGAMAL CRYPTOSYSTEM

AN INTRODUCTION TO THE UNDERLYING COMPUTATIONAL PROBLEM OF THE ELGAMAL CRYPTOSYSTEM AN INTRODUCTION TO THE UNDERLYING COMPUTATIONAL PROBLEM OF THE ELGAMAL CRYPTOSYSTEM VORA,VRUSHANK APPRENTICE PROGRAM Abstract. This paper will analyze the strengths and weaknesses of the underlying computational

More information

Hans Delfs & Helmut Knebl: Kryptographie und Informationssicherheit WS 2008/2009. References. References

Hans Delfs & Helmut Knebl: Kryptographie und Informationssicherheit WS 2008/2009. References. References Hans Delfs & Helmut Knebl: Kryptographie und Informationssicherheit WS 2008/2009 Die Unterlagen sind ausschliesslich zum persoenlichen Gebrauch der Vorlesungshoerer bestimmt. Die Herstellung von elektronischen

More information

MATHEMATICS EXTENDED ESSAY

MATHEMATICS EXTENDED ESSAY MATHEMATICS EXTENDED ESSAY How does the RSA algorithm function and why is it used in modern communication? Candidate Name: Murtuza Kainan Candidate Session Number: 003077006 Word Count: 3908 1 P a g e

More information

MODULAR ARITHMETIC. Suppose I told you it was 10:00 a.m. What time is it 6 hours from now?

MODULAR ARITHMETIC. Suppose I told you it was 10:00 a.m. What time is it 6 hours from now? MODULAR ARITHMETIC. Suppose I told you it was 10:00 a.m. What time is it 6 hours from now? The time you use everyday is a cycle of 12 hours, divided up into a cycle of 60 minutes. For every time you pass

More information

Number Theory in Cryptography

Number Theory in Cryptography Number Theory in Cryptography Introduction September 20, 2006 Universidad de los Andes 1 Guessing Numbers 2 Guessing Numbers (person x) (last 6 digits of phone number of x) 3 Guessing Numbers (person x)

More information

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE CPSC 467a: Cryptography and Computer Security Notes 23 (rev. 1) Professor M. J. Fischer November 29, 2005 1 Oblivious Transfer Lecture Notes 23 In the locked

More information

Introduction to Cryptography. Lecture 8

Introduction to Cryptography. Lecture 8 Introduction to Cryptography Lecture 8 Benny Pinkas page 1 1 Groups we will use Multiplication modulo a prime number p (G, ) = ({1,2,,p-1}, ) E.g., Z 7* = ( {1,2,3,4,5,6}, ) Z p * Z N * Multiplication

More information

CODING AND CRYPTOLOGY III CRYPTOLOGY EXERCISES. The questions with a * are extension questions, and will not be included in the assignment.

CODING AND CRYPTOLOGY III CRYPTOLOGY EXERCISES. The questions with a * are extension questions, and will not be included in the assignment. CODING AND CRYPTOLOGY III CRYPTOLOGY EXERCISES A selection of the following questions will be chosen by the lecturer to form the Cryptology Assignment. The Cryptology Assignment is due by 5pm Sunday 1

More information

Implementation Tutorial on RSA

Implementation Tutorial on RSA Implementation Tutorial on Maciek Adamczyk; m adamczyk@umail.ucsb.edu Marianne Magnussen; mariannemagnussen@umail.ucsb.edu Adamczyk and Magnussen Spring 2018 1 / 13 Overview Implementation Tutorial Introduction

More information

MATH 158 FINAL EXAM 20 DECEMBER 2016

MATH 158 FINAL EXAM 20 DECEMBER 2016 MATH 158 FINAL EXAM 20 DECEMBER 2016 Name : The exam is double-sided. Make sure to read both sides of each page. The time limit is three hours. No calculators are permitted. You are permitted one page

More information

during transmission safeguard information Cryptography: used to CRYPTOGRAPHY BACKGROUND OF THE MATHEMATICAL

during transmission safeguard information Cryptography: used to CRYPTOGRAPHY BACKGROUND OF THE MATHEMATICAL THE MATHEMATICAL BACKGROUND OF CRYPTOGRAPHY Cryptography: used to safeguard information during transmission (e.g., credit card number for internet shopping) as opposed to Coding Theory: used to transmit

More information

Elliptic Curve Cryptography

Elliptic Curve Cryptography Elliptic Curve Cryptography Elliptic Curves An elliptic curve is a cubic equation of the form: y + axy + by = x 3 + cx + dx + e where a, b, c, d and e are real numbers. A special addition operation is

More information

Private Key Cryptography. Fermat s Little Theorem. One Time Pads. Public Key Cryptography

Private Key Cryptography. Fermat s Little Theorem. One Time Pads. Public Key Cryptography Fermat s Little Theorem Private Key Cryptography Theorem 11 (Fermat s Little Theorem): (a) If p prime and gcd(p, a) = 1, then a p 1 1 (mod p). (b) For all a Z, a p a (mod p). Proof. Let A = {1, 2,...,

More information

Solutions for week 1, Cryptography Course - TDA 352/DIT 250

Solutions for week 1, Cryptography Course - TDA 352/DIT 250 Solutions for week, Cryptography Course - TDA 352/DIT 250 In this weekly exercise sheet: you will use some historical ciphers, the OTP, the definition of semantic security and some combinatorial problems.

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 3 January 22, 2013 CPSC 467b, Lecture 3 1/35 Perfect secrecy Caesar cipher Loss of perfection Classical ciphers One-time pad Affine

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 8 February 1, 2012 CPSC 467b, Lecture 8 1/42 Number Theory Needed for RSA Z n : The integers mod n Modular arithmetic GCD Relatively

More information

COMP424 Computer Security

COMP424 Computer Security COMP424 Computer Security Prof. Wiegley jeffw@csun.edu Rivest, Shamir & Adelman (RSA) Implementation 1 Relatively prime Prime: n, is prime if its only two factors are 1 and n. (and n 1). Relatively prime:

More information

ENEE 457: Computer Systems Security 10/3/16. Lecture 9 RSA Encryption and Diffie-Helmann Key Exchange

ENEE 457: Computer Systems Security 10/3/16. Lecture 9 RSA Encryption and Diffie-Helmann Key Exchange ENEE 457: Computer Systems Security 10/3/16 Lecture 9 RSA Encryption and Diffie-Helmann Key Exchange Charalampos (Babis) Papamanthou Department of Electrical and Computer Engineering University of Maryland,

More information

Introduction to Modern Cryptography. Benny Chor

Introduction to Modern Cryptography. Benny Chor Introduction to Modern Cryptography Benny Chor RSA: Review and Properties Factoring Algorithms Trapdoor One Way Functions PKC Based on Discrete Logs (Elgamal) Signature Schemes Lecture 8 Tel-Aviv University

More information

OWO Lecture: Modular Arithmetic with Algorithmic Applications

OWO Lecture: Modular Arithmetic with Algorithmic Applications OWO Lecture: Modular Arithmetic with Algorithmic Applications Martin Otto Winter Term 2008/09 Contents 1 Basic ingredients 1 2 Modular arithmetic 2 2.1 Going in circles.......................... 2 2.2

More information

For your quiz in recitation this week, refer to these exercise generators:

For your quiz in recitation this week, refer to these exercise generators: Monday, Oct 29 Today we will talk about inverses in modular arithmetic, and the use of inverses to solve linear congruences. For your quiz in recitation this week, refer to these exercise generators: GCD

More information

8 Elliptic Curve Cryptography

8 Elliptic Curve Cryptography 8 Elliptic Curve Cryptography 8.1 Elliptic Curves over a Finite Field For the purposes of cryptography, we want to consider an elliptic curve defined over a finite field F p = Z/pZ for p a prime. Given

More information

Public-key Cryptography and elliptic curves

Public-key Cryptography and elliptic curves Public-key Cryptography and elliptic curves Dan Nichols University of Massachusetts Amherst nichols@math.umass.edu WINRS Research Symposium Brown University March 4, 2017 Cryptography basics Cryptography

More information

Eindhoven University of Technology MASTER. Kleptography cryptography with backdoors. Antheunisse, M. Award date: 2015

Eindhoven University of Technology MASTER. Kleptography cryptography with backdoors. Antheunisse, M. Award date: 2015 Eindhoven University of Technology MASTER Kleptography cryptography with backdoors Antheunisse, M. Award date: 2015 Disclaimer This document contains a student thesis (bachelor's or master's), as authored

More information

Chapter 2. A Look Back. 2.1 Substitution ciphers

Chapter 2. A Look Back. 2.1 Substitution ciphers Chapter 2 A Look Back In this chapter we take a quick look at some classical encryption techniques, illustrating their weakness and using these examples to initiate questions about how to define privacy.

More information

The RSA cryptosystem and primality tests

The RSA cryptosystem and primality tests Mathematics, KTH Bengt Ek November 2015 Supplementary material for SF2736, Discrete mathematics: The RSA cryptosystem and primality tests Secret codes (i.e. codes used to make messages unreadable to outsiders

More information

2. Cryptography 2.5. ElGamal cryptosystems and Discrete logarithms

2. Cryptography 2.5. ElGamal cryptosystems and Discrete logarithms CRYPTOGRAPHY 19 Cryptography 5 ElGamal cryptosystems and Discrete logarithms Definition Let G be a cyclic group of order n and let α be a generator of G For each A G there exists an uniue 0 a n 1 such

More information

Lecture Notes. Advanced Discrete Structures COT S

Lecture Notes. Advanced Discrete Structures COT S Lecture Notes Advanced Discrete Structures COT 4115.001 S15 2015-01-27 Recap ADFGX Cipher Block Cipher Modes of Operation Hill Cipher Inverting a Matrix (mod n) Encryption: Hill Cipher Example Multiple

More information

Mathematical Foundations of Public-Key Cryptography

Mathematical Foundations of Public-Key Cryptography Mathematical Foundations of Public-Key Cryptography Adam C. Champion and Dong Xuan CSE 4471: Information Security Material based on (Stallings, 2006) and (Paar and Pelzl, 2010) Outline Review: Basic Mathematical

More information

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5 CS 70 Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes wish to work over a

More information

Winter 2008 Introduction to Modern Cryptography Benny Chor and Rani Hod. Assignment #2

Winter 2008 Introduction to Modern Cryptography Benny Chor and Rani Hod. Assignment #2 0368.3049.01 Winter 2008 Introduction to Modern Cryptography Benny Chor and Rani Hod Assignment #2 Published Sunday, February 17, 2008 and very slightly revised Feb. 18. Due Tues., March 4, in Rani Hod

More information

Security Issues in Cloud Computing Modern Cryptography II Asymmetric Cryptography

Security Issues in Cloud Computing Modern Cryptography II Asymmetric Cryptography Security Issues in Cloud Computing Modern Cryptography II Asymmetric Cryptography Peter Schwabe October 21 and 28, 2011 So far we assumed that Alice and Bob both have some key, which nobody else has. How

More information