MATHEMATICS EXTENDED ESSAY

Size: px
Start display at page:

Download "MATHEMATICS EXTENDED ESSAY"

Transcription

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

2 ABSTRACT The research question that this extended essay in mathematics address is How does the RSA algorithm function and why is it used in modern communication? I have first started the essay with an introduction to RSA, public and private key cryptography, number theory, and Modular mathematics. I have investigated the RSA algorithm by taking 3 examples with increasingly large values of prime numbers. Using these numbers, I have demonstrated how the algorithm works. Then using modular mathematics and results from number theory, I have formulated a proof that demonstrates that the RSA algorithm works because of a significant relationship d ( m m ( mod n) = e ) between the public ( e ) and private keys ( d ) and the modulus number ( n ). Furthermore, I have investigated the reasons for the use and effectiveness of this algorithm which I have explained by making use of the concepts of computational hardness and non polynomial time. It was concluded that the RSA algorithm functions effectively due to the relationship between the public key, private key, and modulus number and the fact that decryption requires the private key that can be obtained by factorizing the modulus which is a non polynomial time computation. The relationship between RSA and number theory concepts was also emphasized and it also concluded that the effectiveness of the algorithm would continue to increase with an increase in the value of massive primes and semi prime numbers used to generate the modulus number. Its inherent security and availability of a public key it was concluded were vital reasons because of which RSA is used in modern communication. Word count: P a g e

3 TABLE OF CONTENTS INTRODUCTION... 5 SYMMETRIC KEY ENCRYPTION:... 6 ASYMMETRIC KEY ENCRYPTION:... 6 NOTATIONS... 7 MATHEMATICAL CONCEPTS AND PRINCIPALS ESSENTIAL TO RSA:... 8 PRIME NUMBER... 8 SEMI PRIME NUMBER... 9 ALGORITHM... 9 COMPUTATION... Error! Bookmark not defined. MODULAR MATHEMATICS MODULAR CONGRUENCE MODULAR MULTIPLICATIVE INVERSE FERMAT S LITTLE THEOREM TOTIENT FUNCTION CHINESE REMAINDER THEOREM EULER S TOTIENT THEOREM BIG O NOTATION POLYNOMIAL TIME NON POLYNOMIAL TIME INVESTIGATIONS EXAMPLE MATHEMATICAL EXPLANATION OF THE FIRST EXAMPLE P a g e

4 EXAMPLE 2: EXAMPLE FINAL NUMBER THEORY PROOF FOR THE FUNCTIONING OF RSA INITIATING THE PROOF CASE CASE 2: EFFECTIVENESS OF THE RSA ALGORITHM INFORMATION THEORETIC SECURITY COMPUTATIONAL SECURITY THE RSA PROBLEM USE OF RSA IN MODERN COMMUNICATION CONCLUSION FURTHER INVESTIGATION: BIBLIOGRAPHY P a g e

5 INTRODUCTION Neglect of mathematics works injury to all knowledge, since he who is ignorant of it cannot know the other sciences or the things of the world. ~Quoted by Roger Bacon in C B Boyer, A History of Mathematics (New York 1968) Mathematics is required in every subject and field. In the world of cryptography and computer security, number theory has been instrumental in providing solutions. The entirety of the encryption systems used for transactions and security over the internet is based on the mathematics of prime numbers and factorization. This extended essay explores the working of the first public key algorithm, the RSA algorithm, and further explores the cause of effectiveness of the RSA algorithm. As such the research question that this extended essay addresses is: How does the RSA algorithm function and why is it used in modern communication? In doing so, many mathematical concepts and theorem are explored and their relationship to the functioning of RSA is investigated. I chose to investigate the RSA algorithm because of my interests in the fields of number theory, complexity theory, and computer security. In writing this extended essay, I have had an opportunity to explore number theory and modular arithmetic outside of the prescribed I.B syllabus and apply this new found knowledge to explain RSA. 5 P a g e

6 The type of encryption that preceded the RSA algorithm was symmetric key encryption. SYMMETRIC KEY ENCRYPTION: Symmetric key encryption refers to encryption that is achieved using only one key that is used to encrypt and decrypt information. This type of encryption was difficult and impractical to use due to the difficulty involved in the transferring of keys. Since only one key is required for both encryption and decryption, the transfer of the key if intercepted by an adversary could compromise the security of the information. The conception of the RSA algorithm gave rise to asymmetric key encryption. ASYMMETRIC KEY ENCRYPTION: Asymmetric key encryption or public key encryption is encryption achieved using two different keys for the processes of encryption and decryption. The first algorithm to introduce this type of encryption is the RSA algorithm. The use of asymmetric key encryption is favoured over that of symmetric key encryption because of the transfer of the public key eliminates any risk involving the security of data. The RSA algorithm, named after its inventors Ron Rivest, Adi Shamir, and Leonard Adleman, is a public key cryptography algorithm. It is known to be very secure because of the presumed difficulty of factoring very large semi prime numbers. It was the first asymmetric key encryption algorithm of its kind. The functioning of the RSA algorithm is based on results from a branch of pure mathematics known as number theory. 6 P a g e

7 NOTATIONS a b : a divides b a b : a does not divide b a b(mod c) : a is congruent to b modulo c ( ) ab c a b 1 1 mod, = : a is the modular multiplicative inverse of b modulo c gcd( a, b ) : the greatest common divisor of a and b 7 P a g e

8 MATHEMATICAL CONCEPTS AND PRINCIPALS ESSENTIAL TO RSA: PRIME NUMBER: A prime number is a number that has no factors than the number 1 and itself. Prime numbers are unique and any pattern confirming their emergence is not known. Prime numbers are known to be infinite. This can be demonstrated using a simple Euclidean proof 1 : If a list of prime numbers p, p1, p2, p3, p4, p5,... p n is taken, it is possible to show that no matter how large the list, an additional prime number p k which does not appear on the list is has to exist. Let a number P be the product of all the prime numbers in the list: P = p p p... 2 p3 p4 p5 pn Let some number q = P + 1. Then, q is either prime or not: Now, if q is a prime number, it follows that there is one extra prime number apart from those listed as p, p1, p2, p3, p4, p5,... p n 1 S. P. Glasby Central Washington University February P a g e

9 On the other hand, it is possible that q is not a prime number. If that is the case then no prime number on the list p, p1, p2, p3, p4, p5,... pn will be able to divide q. This is because q = P + 1 and the division of q by any of the prime numbers will result in a remainder of 1 since no number divides 1. A prime number that is not on the list will therefore divide q. It thus follows that for any given list of primes, there is always a prime that is not present on the list. The logical conclusion is that the number of prime numbers are infinite. SEMI PRIME NUMBER: A semi prime number is a number that has two prime numbers as its factors other than 1 and the number itself. For example, 6 is a semi prime number since it is the product of the two prime numbers 2 and 3. Semi prime numbers are essential to cryptosystems such as RSA. The modulus n used in RSA is always a semi prime number. ALGORITHM 2 : An algorithm is a specific set of instructions for carrying out a procedure or solving a problem, usually with the requirement that the procedure terminate at some point. Specific algorithms sometimes also go by the name method, procedure, or technique. The word "algorithm" is a distortion of al-khwārizmī, a Persian mathematician who wrote an influential treatise about algebraic methods. 2 Weisstein, Eric W. "Algorithm." From MathWorld--A Wolfram Web Resource. 9 P a g e

10 MODULAR MATHEMATICS 3 : Modular mathematics or arithmetic focuses upon modular congruence. Numbers tend to wrap around the modulus number and start over when modular arithmetic is considered. For example, consider the equation 15 0 (mod 3). This means that 15 will continure to wrap around 3. For instance 4 will become 1, 5 will become 2, 6 will become 0, and so on until 15. A consequence is also that the remainder obtained when 15 is divided by 3 is equal to 0. Modular arithmetic is used to tell time by converting from the 24 hour format to the twelve hour format. 3 Insall, Matt and Weisstein, Eric W. "Modular Arithmetic." From MathWorld--A Wolfram Web Resource P a g e

11 MODULAR CONGRUENCE: If two numbers a and b have a difference a-b that is divisible by an integer m such that a b m is a whole number, then the two numbers are said to be congruent to modulo m. This written mathematically as: a b ( mod m) MODULAR MULTIPLICATIVE INVERSE 4 : The modular multiplicative inverse of a number a( mod ) m is an integer x such that ax ( m) 1 mod The modular multiplicative inverse can only exist if the numbers a and m are co-prime. This is simply because if a was divisible by m, then, ax m would leave a remainder of zero. This would contradict the relation ax 1 ( mod m) since ax m needs to leave a remainder of 1. 4 Hobson, Nick; Nichol, Reid; and Weisstein, Eric W. "Modular Inverse." From MathWorld--A Wolfram Web Resource P a g e

12 FERMAT S LITTLE THEOREM 5 : If p is a prime number and a a natural number, then p a a(mod p) (1) Furthermore, if p does not divide a, then there exists some smallest exponent d such that d a ( p) 1 0 mod (2) and d divides p 1. Hence, ( p) p 1 a 1 0 mod (3) The theorem is sometimes also simply known as "Fermat's theorem" 5 Weisstein, Eric W. "Fermat's Little Theorem." From MathWorld--A Wolfram Web Resource P a g e

13 TOTIENT FUNCTION 6 : The totient function θ ( n), also called Euler's totient function, is defined as the number of positive integers n that are relatively prime to (i.e., do not contain any factor in common with) n, where 1 is counted as being relatively prime to all numbers. Since a number less than or equal to and relatively prime to a given number is called a totative, the totient function θ ( n) can be simply defined as the number of totatives of n. Example: the number 15 has the following totatives, 1, 2, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14. These are 12 numbers in total. Therefore, θ (15) = 12 In case of a prime number p, the totient function θ ( p) = p 1. This is because all numbers less than a prime number p are relatively co-prime to p. CHINESE REMAINDER THEOREM 7 : A simplification of the Chinese remainder theorem states that for any two relatively prime numbers p and q and any two integers a and b, There exists a number x such that, x a(mod p) x b(mod q) 6 Weisstein, Eric W. "Totient Function." From MathWorld--A Wolfram Web Resource. 7 Weisstein, Eric W. "Chinese Remainder Theorem." From MathWorld--A Wolfram Web Resource P a g e

14 EULER S TOTIENT THEOREM 8 : Euler s totient theorem is a result that was asserted by Leonard Euler as a generalization of Fermat s little theorem using the totient function. It states: a θ ( n) 1(mod n) Where, θ ( n) is the totient function of n and a is any number that is relatively prime to n. This generalization can be made by manipulating the result of Fermat s little theorem: a p 1 ( p) 1 0 mod Let p be a prime number. Then, its totient function, θ ( p), is p 1since all numbers less than a prime number are co-prime to it. Now, a θ ( p) a 1 0(mod p) θ ( p) 1(mod p) BIG O NOTATION 9 : (with a capital letter O, not a zero), also called Landau's symbol, is a symbolism used in complexity theory, computer science, and mathematics to describe the asymptotic behaviour of functions. Basically, it tells you how fast a function grows or declines. 8 Weisstein, Eric W. "Euler's Totient Theorem." From MathWorld--A Wolfram Web Resource P a g e

15 Landau's symbol comes from the name of the German number theoretician Edmund Landau who invented the notation. The letter O is used because the rate of growth of a function is also called its order. POLYNOMIAL TIME 10 : An algorithm is said to be solvable in polynomial time if the number of steps required to k complete the algorithm for a given input is O( n ) for some nonnegative integer k, where n is the complexity of the input. Polynomial-time algorithms are said to be "fast."(fast in what sense?) Most familiar mathematical operations such as addition, subtraction, multiplication, and division, as well as computing square roots, powers, and logarithms, can be performed in polynomial time. Computing the digits of most interesting mathematical constants, including π and e can also be done in polynomial time. NON POLYNOMIAL TIME: An infinitely complex process of computation is said to take place in non polynomial time. k The number of steps required to complete the operation cannot be expressed as O( n ) when non polynomial time is required for computation. 10 Terr, David. "Polynomial Time." From MathWorld--A Wolfram Web Resource, created by Eric W. Weisstein P a g e

16 INVESTIGATIONS EXAMPLE 1: Consider a letter K. Let K be denoted by an integer 65. This letter shall be encrypted and be sent. Step 1: Two prime numbers are chosen, p = 7 q = 11 Step 2: pq is computed to obtain the semi prime number n. n = pq = 7 11 = 77 Step 3: The third step is the computation of the totient function of the semi prime number n. θ ( n) = ( p 1)( q 1) = 6 10 = 60 Step 4: A number e is selected such that 1< e < θ, where e and θ are co prime. Let e = P a g e

17 Step 5: A number d is to be calculated such that de 1(mod θ ) This means that d is the modular multiplicative inverse of e(mod θ ) In this case, d is such that d 23 1(mod 60) This means that d is a number such that 23 d 60 has a remainder of 1. Using a Texas instruments TI-84 calculator a table was generated. The function used to generate the table was a remainder function of the form: Remainder (Dividend, Divisor) = Remainder (23 x, 60) The table generated was: X value Function value (Remainder when divided by 120) P a g e

18 The value of d determined using the table was thus 47. Step 6: The cipher text for a padded integer needs to be generated. For a padded integer P, the cipher text C is such that, m e c ( mod n) 23 The letter K which is denoted by the integer 65 is to be encrypted. 65 c( mod 77) thus calculated to be 32., c is Step 7: Decryption is achieved by computing using the Cipher text and the hidden key d. ( mod ) d c p n, 47 In this case, 32 p( mod 77) Upon computation, it is found that K = 65. Thus the integer that was used to pad the letter K is obtained. 18 P a g e

19 MATHEMATICAL EXPLANATION OF THE FIRST EXAMPLE Consider example 1 for the explanation. ( ). 32 is therefore, the remainder when is divided by mod 77 According to the division algorithm, Dividend = Divisor x quotient + remainder. Thus for some integer k, = k 32 This can be further rewritten as (7 11 k) 32 = +. It can also be determined that = (7 11 k) mod11 This is because both and 32 when divided by 11 will leave the same remainder. Now, by raising both sides the private exponent 47 the following result is obtained: 23 ( ) ( ) mod11 It should be noted that (23 x 47) = 1 + (60 x 18). Using this observation, one can see that: (65 23 ) 47 = 65 (23 x 47) = (60 x 18) = 65 x 65 (60 x 18) = 65 x ( ) 10 Fermat s little theorem states that a P-1 0 (mod P), where, a is a natural number and P is a prime number. Taking as the natural number and 11 as the prime number, it can be stated: 19 P a g e

20 ( ) (mod 11) = ( ) (mod 11) However, by adding 1 to both sides it can be seen that: ( ) 10 1 (mod 11) Using all observations together, it can now be seen that: (65 23 ) 47 = 65 x ( ) x 1 = 65 mod 11 By subtracting 65 from both sides, it can be further seen that: (mod 11) Therefore, 11 divides evenly into This also implies that when divided by 11 yields a remainder of 65. Repeating the same exact steps with the other prime 7 would yield the same result. Since both 7 and 11 leave a remainder of 65, it follows that their multiple 77 will also leave a remainder of 65. This is because of the following result of the following independent lemma: x a(mod p) x a(mod q) x a(mod pq) pq ( x a), where p and q are prime numbers. It therefore needs to be proved that pq ( x a) Now, p multiplied by some integer and added to a gives x. So, for some integer k : x = pk + a 20 P a g e

21 Similarly, for some integer k 1 : x = qk1 + a Therefore, x = pk + a = qk + a ( x a) = pk = qk p qk, q pk Now, since p qk1, and since q is a prime number, p q. Therefore, only k1 is divisible by p p k 1. Therefore, p multiplied by some integer k 2 would be equal to k 1. Since ( x a) qk = 1and k1 pk2 =, ( x a) = pqk2 Similarly, since q pk, and since p is a prime number, p q. Therefore, only k is divisible by p q k. Therefore, q multiplied by some integer k 3 would be equal to k. Since ( x a) = pk and k = qk3, ( x a) = pqk3 Now, ( x a) = pqk = pqk k = k = k ( x a) ( x a) = pqk = k pq pq ( x a) Therefore, x pq will leave a remainder of a. The multiple of the prime numbers 7 and 11, will therefore leave the same remainder of P a g e

22 This example demonstrates the relationship between the padded integer 65, the cipher text 32, the public key 23, the private key 47, and the semi prime number 77. Any padded integer can thus be converted into cipher text and then be retrieved using the private key and the semi prime P a g e

23 The RSA algorithm can thus be generalized: 23 P a g e

24 EXAMPLE 2: Consider a simple random pad: A message Deploy is to be sent using this pad. D has a padded value of 1. E has a padded value of 6. P has a padded value of 5. L has a padded value of 73. O has a padded value of 00. Y has a padded value of 9. The padded integer is thus: P a g e

25 Step 1: Two prime numbers are chosen, p = q = Step 2: pq is computed to obtain the semi prime number n. n = pq = = n = Step 3: The third step is the computation of the totient function of the semi prime number n. ( )( ) ( )( ) θ ( n) = p 1 q 1 = = = Step 4: A number e is selected such that 1< e < θ, where e and θ are co prime. Let e = 1373 Step 5: A number d is to be calculated such that de 1(mod θ ) This means that d is the modular multiplicative inverse of e modθ In this case, d is such that d (mod ) 25 P a g e

26 This means that d is a number such that 1373 d has a remainder of 1. Using a Texas instruments TI-84 calculator a table can be generated. The function used to generate the table was a remainder function of the form: Remainder (Dividend, Divisor) = Remainder (1373 x, ) The table generated was: X value Function value (Remainder when divided by 120) The value of d as determined using the table is P a g e

27 Step 6: The cipher text for a padded integer needs to be generated. For a padded integer P, e the cipher text C is such that, p c( mod n) The message can now be encrypted step by step. As mentioned in the beginning the padded integer is: The cipher text is thus c ( mod ) Since the value of the exponent and numbers was large, the software WX Maxima was used to generate the value of c. The modulus computation function was used: c = P a g e

28 The message Deploy is now encrypted using the RSA algorithm and it now looks like this when it is sent: Step 7: Decryption is achieved by computing using the Cipher text and the hidden key d. d The plain text is related to the cipher text by the following: c p( mod n) For c = , p( mod ) WX maxima was again used for modulus computation. However, due to the presence of large exponents, the application crashed: 28 P a g e

29 The computational engine wolfram alpha was instead used: Upon computation, the value of p obtained was: Upon matching the integer to the appropriate alphabet in the pad, the message Deploy surfaces again. Encryption and decryption is thus achieved. 29 P a g e

30 EXAMPLE 3: Let us assign the following 2 digit numbers to the letters of the English alphabet: A message Begin plan A is to be sent using this pad. B has a padded value of 19. E has a padded value of 63. G has a padded value of 57. I has a padded value of 05. N has a padded value of 41. _ has a padded value of 48. P has a padded value of 08. L has a padded value of 95. A has a padded value of 52. N has a padded value of 41. _ has a padded value of 48. A has a padded value of P a g e

31 The message when substituted by the numbers on the pad looks like this: Step 1: Two prime numbers are chosen, p = q = The large prime numbers were obtained by factorizing random numbers in WX Maxima. Step 2: pq is computed to obtain the semi prime number n. n = pq = = n = Step 3: The third step is the computation of the totient function of the semi prime number n n ( p )( q ) ( )( ) θ ( ) = 1 1 = = = Step 4: A number e is selected such that 1< e < θ, where e and θ are co prime. Let e = P a g e

32 Step 5: A number d is to be calculated such that de 1(mod θ ) This means that d is the modular multiplicative inverse of e modθ In this case, d is such that d (mod ) This means that d is a number such that has a remainder of d The table for such a large value of θ ( n) could not be generated. The online computational engine wolfram alpha was used instead to compute the value of d: 1%28mod %29 d = P a g e

33 Step 6: The cipher text for a padded integer needs to be generated. For a padded integer P, e the cipher text C is such that, p c( mod n) The message can now be encrypted step by step. There integers assigned to each letter in the pad. The padded integer is thus: The resulting cipher text is thus: ( ) c mod Wolfram alpha was again used for modulus computation: %29 33 P a g e

34 c = The message Begin plan A is encrypted using the RSA algorithm and it now looks like this when it is sent: Step 7: Decryption is achieved by computing using the Cipher text and the hidden key d. d The plain text is related to the cipher text by the following: c p( mod n) For c = , p ( mod ) 34 P a g e

35 The modulus computation for decryption was achieved using wolfram alpha: E %28mod %29 Upon computation, the value of p obtained is: Upon matching the integer to the appropriate alphabet in the pad, the message Begin plan A surfaces again. Encryption and decryption is thus achieved using large prime numbers and modulus. 35 P a g e

36 FINAL NUMBER THEORY PROOF FOR THE FUNCTIONING OF RSA The examples demonstrate a general algorithm that defines RSA. It was found that RSA functions because of a relationship between the semi prime modulus, and keys. The RSA algorithm states the following conditions: 1. Two prime numbers p and q are chosen to compute the semi prime modulus n. 2. The totient function of n is θ ( n) = ( p 1)( q 1) and the public key e is chosen such that it is smaller than and relatively prime to θ ( n). 3. The public key is the modular multiplicative inverse of e mod θ ( n). e 4. The padded integer m is encrypted using the function m c ( mod n) d 5. The cipher text c is decrypted using the function c m( mod n).. Consider, m e c ( mod n) or c = m e ( mod n) d d And c m( mod n) or m = c ( mod n) Now, since c = m e d ( mod n), substituting for c in m c ( mod n) = gives: d ( ) ( ) e m = ( m mod n ) mod n Simplifying the expression, ( ) d d m = m e e ( mod n) = m ( mod n) 36 P a g e

37 This is because the modulus inside and outside the bracket is the same thus resulting in a single modulus. A simple example can demonstrate this property of modular arithmetic. 7 mod 3 = (7 mod 3) = 1 = mod 3 = 49 mod 3 = 1 d So eventually, m = m e ( mod n) d Therefore it needs to be proven that m m ( mod n) = e. 37 P a g e

38 INITIATING THE PROOF: d is the modular multiplicative inverse of e mod θ ( n). That is ed 1(mod θ ( n)). So, ed 1(mod θ( n)) ed 1 0(mod θ ( n)) θ( n) ( ed 1) However, n = pq and, θ ( n) = ( θ ( p))( θ ( q)) θ ( n) = ( p 1)( q 1) So, θ ( n) ( ed 1), ( θ ( p))( θ ( q)) ( ed 1) ( p 1)( q 1)( ed 1) A property of divisors is that, if a number divides a dividend, the factors of the divisors also divide the dividend. Now, by the property of divisors, implies θ ( p) θ ( q) ( ed 1) θ ( p) ( ed 1) and θ ( q) ( ed 1) Now, since θ( p) divides ( ed 1), an integer k exists such that θ ( p) k = ( ed 1). 38 P a g e

39 Since, θ ( p) = ( p 1), k( p 1) = ( ed 1). de de Now, consider that m mod p = m mod p. This is important because it can now be stated that de de m m mod p This can also be written as = de de 1+ 1 de 1 m m mod p ( m ) mmod p But, ( ed 1) = k( p 1) de k( p 1) m ( m ) m(mod p) Now, it was stated previously that p is a prime number. Because of this, two possibilities regarding the relationship between p and m exist. 1. m is either relatively prime to p since p is a prime number 2. Or m is a multiple of p There now exist two cases in relation with p and m. 39 P a g e

40 CASE 1: when m is relatively prime to p p 1 By Fermat s little theorem, a 1 0( mod p) Replacing a with m, the result can be rewritten: m p 1 m p 1 ( p) ( p) 1 0 mod 1 mod By modular congruence, if an exponent is added on one side, it is also carried over to the other side. Therefore, for the integer k, m k ( p 1) ( p) k 1 mod However, 1 raised to any exponential power is 1 itself. Therefore, m k ( p 1) m k ( p 1) ( p) 1( mod p) k 1 mod But, k( p 1) = ( ed 1). So now, using the previously obtained result de k( p 1) ( ) (mod ) and the fact that m m m p k( p 1) = ( ed 1), de m m(mod p) 40 P a g e

41 CASE 2: when m is divisible by p p m p m k For any integer k Let l = k, as previously encountered So if k were to be replaced by de, de m p would leave a remainder of 0 since: p m, p m p m k de This can be rewritten as: m 0(mod p), m de 0(mod p) Now, since m and de m are both congruent to 0(mod p ), they are congruent to each other. de m m (mod p) de Therefore, in both cases, the result m m (mod p) is derived. de Similarly, using the same argument as used in case of p, the result m m (mod q) for the prime number q can be derived. 41 P a g e

42 d The result m m ( mod n) = e now needs to be derived using the aforementioned results. This can be done using the independent lemma previously proved on pages 20 and 21. Consider that, de m m (mod p) de m m (mod q) Since, the two prime numbers p and q both have the same modulus computation, their multiple pq will also have the same modulus computation. de So, m m (mod pq). But pq = n, de So, it is proved that m m (mod n) 42 P a g e

43 EFFECTIVENESS OF THE RSA ALGORITHM INFORMATION THEORETIC SECURITY: Information theoretically secure systems are completely secure with regards to information theory in that an adversary may never have any information about the cryptosystem without the required private key. The information in such systems is thus secure even if the adversary has unlimited computational power. COMPUTATIONAL SECURITY: Computationally secure systems are secure because the computational power required to break the systems is unavailable. A typical example of a computationally intensive task is the prime factorization of very large numbers. THE RSA PROBLEM 11 : e Given an RSA public key ( n, e ) and a cipher text, c m ( mod n), to compute m. 11 RSA Problem ~Ronald L. Rivest, MIT Laboratory for Computer Science and Burt Kaliski, RSA Laboratories. - December 10, P a g e

44 To solve the RSA Problem an adversary, who doesn t know the private key, must nonetheless invert the RSA function. The RSA Assumption is that the RSA Problem is hard to solve when the modulus n is sufficiently large and randomly generated, and the plaintext m (and hence the cipher text c ) is a random integer between 0 and n 1. The inversion of RSA requires the factorization of the modulus number n. If the value of n is that of a small integer, n becomes very easy to factor. For example, if n = 9991, it becomes easy to determine its factors. It can be found out by mental calculation that the factors of 9991 are 97 and 103. However, a large value of n such as that used in example 3 is difficult to factor. This is because prime numbers that are used to create the modulus n occur randomly along the number line and the prime factorization of a large n can be a computationally intensive process. Larger values of n need to be used to ensure that the prime factorization of n takes non polynomial time. USE OF RSA IN MODERN COMMUNICATION: The RSA algorithm is used to transfer data over the internet. Modern communication entails the transmission of data digitally and includes the sending of files and sensitive messages, commercial transactions, and sensitive social or personal information. All of this information is transmitted by secure websites using secure socket layers (SSL) which make use of RSA. The computationally intensive task of factorizing the modulus n makes RSA very secure. At the same time, the availability of a public key that can be exchanged between websites and computers without compromising security makes RSA an optimum choice for computer security. 44 P a g e

45 CONCLUSION The investigation in this extended essay addresses the research question: How does the RSA algorithm function and why is it used in modern communication? and demonstrates the relationship between number theory and RSA cryptography. Modular mathematics is used to create functions that are used for encryption and decryption. The two functions used are inverse functions due to which the padded integer appears from the cipher text after decryption. Because of the result provided by the Chinese remainder theorem, the modulus n yields the same modulus computation as its two prime factors, p d and q. The public key, private key, and modulus are related by m m ( mod n) this relation that is eventually proven to be true. = e and it is Furthermore, the RSA algorithm functions based on the results provided by mathematical theorems such as Fermat s little theorem. Prime numbers are immensely important in the functioning of RSA. Since prime numbers are located at random intervals, it is difficult to locate them in a given interval of numbers. Due to this, the prime factorization of any large number becomes a difficult task, especially if the number in question is a large semi prime number. The modulus n is a semi prime number which needs to be factorized in order to break RSA encryption. As the value of n gets larger, it becomes increasingly difficult to factorize and the task requires streamlined algorithms or mathematical applications and a lot of computational power. 45 P a g e

46 The RSA algorithm is used for the purposes of encryption and security in modern communication. This is chiefly because: 1. The encryption provided by RSA is difficult to break due to the difficulty involved in factoring large modulus numbers as explained previously. 2. The encryption provided by RSA is asymmetric or private key encryption that does not rely on just one key but on two separate keys known as the public and private keys. This makes the distribution of keys for encryption much easier and does not lead to the compromise of the private key that can be kept a secret. FURTHER INVESTIGATION: The fascinating RSA algorithm and the field of number theory offer a great number of possibilities that can be explored and investigated. The RSA algorithm discussed in this essay made use of only 2 prime numbers. Variants of RSA known as multi prime RSA can be investigated wherein more than 2 prime numbers can be used to generate the modulus instead of 2: n = pqr or n = pqrs. This might have an effect on the already computationally complex task of factoring the modulus. Another topic that can be investigated are any potential weaknesses that appear in e d the modular functions p c( mod n) and c p( mod n) and whether there exists any theoretical weakness that can be mathematically exploited to break RSA encryption. 46 P a g e

47 BIBLIOGRAPHY [1] S. P. Glasby Central Washington University February 2002 [2] Weisstein, Eric W. "Algorithm." From MathWorld--A Wolfram Web Resource. [3] Insall, Matt and Weisstein, Eric W. "Modular Arithmetic." From MathWorld--A Wolfram Web Resource. [4] Hobson, Nick; Nichol, Reid; and Weisstein, Eric W. "Modular Inverse." From MathWorld--A Wolfram Web Resource P a g e

48 [5] Weisstein, Eric W. "Fermat's Little Theorem." From MathWorld--A Wolfram Web Resource. [6] Weisstein, Eric W. "Totient Function." From MathWorld--A Wolfram Web Resource. [7] Weisstein, Eric W. "Chinese Remainder Theorem." From MathWorld--A Wolfram Web Resource. [8] Weisstein, Eric W. "Euler's Totient Theorem." From MathWorld--A Wolfram Web Resource. [9] Massachusetts institute of technology 48 P a g e

49 [10] Terr, David. "Polynomial Time." From MathWorld--A Wolfram Web Resource, created by Eric W. Weisstein. [11] RSA Problem ~Ronald L. Rivest, MIT Laboratory for Computer Science and Burt Kaliski, RSA Laboratories. - December 10, P a g e

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

CIS 551 / TCOM 401 Computer and Network Security

CIS 551 / TCOM 401 Computer and Network Security CIS 551 / TCOM 401 Computer and Network Security Spring 2008 Lecture 15 3/20/08 CIS/TCOM 551 1 Announcements Project 3 available on the web. Get the handout in class today. Project 3 is due April 4th It

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

Encryption: The RSA Public Key Cipher

Encryption: The RSA Public Key Cipher Encryption: The RSA Public Key Cipher Michael Brockway March 5, 2018 Overview Transport-layer security employs an asymmetric public cryptosystem to allow two parties (usually a client application and a

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

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

CS March 17, 2009

CS March 17, 2009 Discrete Mathematics CS 2610 March 17, 2009 Number Theory Elementary number theory, concerned with numbers, usually integers and their properties or rational numbers mainly divisibility among integers

More information

Integers and Division

Integers and Division Integers and Division Notations Z: set of integers N : set of natural numbers R: set of real numbers Z + : set of positive integers Some elements of number theory are needed in: Data structures, Random

More information

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory. CSS322: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 29 December 2011 CSS322Y11S2L06, Steve/Courses/2011/S2/CSS322/Lectures/number.tex,

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

Number Theory. Modular Arithmetic

Number Theory. Modular Arithmetic Number Theory The branch of mathematics that is important in IT security especially in cryptography. Deals only in integer numbers and the process can be done in a very fast manner. Modular Arithmetic

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

NUMBER THEORY AND CODES. Álvaro Pelayo WUSTL

NUMBER THEORY AND CODES. Álvaro Pelayo WUSTL NUMBER THEORY AND CODES Álvaro Pelayo WUSTL Talk Goal To develop codes of the sort can tell the world how to put messages in code (public key cryptography) only you can decode them Structure of Talk Part

More information

Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013

Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013 RSA Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013 Recap Recap Number theory o What is a prime number? o What is prime factorization? o What is a GCD? o What does relatively prime

More information

Mathematics of Cryptography

Mathematics of Cryptography UNIT - III Mathematics of Cryptography Part III: Primes and Related Congruence Equations 1 Objectives To introduce prime numbers and their applications in cryptography. To discuss some primality test algorithms

More information

Public Key Algorithms

Public Key Algorithms Public Key Algorithms Raj Jain Washington University in Saint Louis Saint Louis, MO 63130 Jain@cse.wustl.edu Audio/Video recordings of this lecture are available at: http://www.cse.wustl.edu/~jain/cse571-09/

More information

Math.3336: Discrete Mathematics. Mathematical Induction

Math.3336: Discrete Mathematics. Mathematical Induction Math.3336: Discrete Mathematics Mathematical Induction Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall 2018

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

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

NUMBER THEORY FOR CRYPTOGRAPHY

NUMBER THEORY FOR CRYPTOGRAPHY 1 CHAPTER 4. NUMBER THEORY FOR CRYPTOGRAPHY 1 INSTITÚID TEICNEOLAÍOCHTA CHEATHARLACH INSTITUTE OF TECHNOLOGY CARLOW NUMBER THEORY FOR CRYPTOGRAPHY Contents 1 Number Theory for Cryptography 2 1.1 Linear

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

Discrete mathematics I - Number theory

Discrete mathematics I - Number theory Discrete mathematics I - Number theory Emil Vatai (based on hungarian slides by László Mérai) 1 January 31, 2018 1 Financed from the financial support ELTE won from the Higher Education

More information

RSA. Ramki Thurimella

RSA. Ramki Thurimella RSA Ramki Thurimella Public-Key Cryptography Symmetric cryptography: same key is used for encryption and decryption. Asymmetric cryptography: different keys used for encryption and decryption. Public-Key

More information

Number Theory A focused introduction

Number Theory A focused introduction Number Theory A focused introduction This is an explanation of RSA public key cryptography. We will start from first principles, but only the results that are needed to understand RSA are given. We begin

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

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

Number Theory & Modern Cryptography

Number Theory & Modern Cryptography Number Theory & Modern Cryptography Week 12 Stallings: Ch 4, 8, 9, 10 CNT-4403: 2.April.2015 1 Introduction Increasing importance in cryptography Public Key Crypto and Signatures Concern operations on

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

[Part 2] Asymmetric-Key Encipherment. Chapter 9. Mathematics of Cryptography. Objectives. Contents. Objectives

[Part 2] Asymmetric-Key Encipherment. Chapter 9. Mathematics of Cryptography. Objectives. Contents. Objectives [Part 2] Asymmetric-Key Encipherment Mathematics of Cryptography Forouzan, B.A. Cryptography and Network Security (International Edition). United States: McGraw Hill, 2008. Objectives To introduce prime

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

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

Addition. Ch1 - Algorithms with numbers. Multiplication. al-khwārizmī. al-khwārizmī. Division 53+35=88. Cost? (n number of bits) 13x11=143. Cost?

Addition. Ch1 - Algorithms with numbers. Multiplication. al-khwārizmī. al-khwārizmī. Division 53+35=88. Cost? (n number of bits) 13x11=143. Cost? Ch - Algorithms with numbers Addition Basic arithmetic Addition ultiplication Division odular arithmetic factoring is hard Primality testing 53+35=88 Cost? (n number of bits) O(n) ultiplication al-khwārizmī

More information

Definition: For a positive integer n, if 0<a<n and gcd(a,n)=1, a is relatively prime to n. Ahmet Burak Can Hacettepe University

Definition: For a positive integer n, if 0<a<n and gcd(a,n)=1, a is relatively prime to n. Ahmet Burak Can Hacettepe University Number Theory, Public Key Cryptography, RSA Ahmet Burak Can Hacettepe University abc@hacettepe.edu.tr The Euler Phi Function For a positive integer n, if 0

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand 1 Divisibility, prime numbers By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a k for some integer k. Notation

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

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

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

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

Mathematics of Public Key Cryptography

Mathematics of Public Key Cryptography Mathematics of Public Key Cryptography Eric Baxter April 12, 2014 Overview Brief review of public-key cryptography Mathematics behind public-key cryptography algorithms What is Public-Key Cryptography?

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

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

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

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

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 9 February 14, 2013 CPSC 467b, Lecture 9 1/42 Integer Division (cont.) Relatively prime numbers, Z n, and φ(n) Computing in Z n

More information

Number Theory and Group Theoryfor Public-Key Cryptography

Number Theory and Group Theoryfor Public-Key Cryptography Number Theory and Group Theory for Public-Key Cryptography TDA352, DIT250 Wissam Aoudi Chalmers University of Technology November 21, 2017 Wissam Aoudi Number Theory and Group Theoryfor Public-Key Cryptography

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

Topics in Cryptography. Lecture 5: Basic Number Theory

Topics in Cryptography. Lecture 5: Basic Number Theory Topics in Cryptography Lecture 5: Basic Number Theory Benny Pinkas page 1 1 Classical symmetric ciphers Alice and Bob share a private key k. System is secure as long as k is secret. Major problem: generating

More information

THE RSA CRYPTOSYSTEM

THE RSA CRYPTOSYSTEM THE RSA CRYPTOSYSTEM SILVIA ROBLES Abstract. This paper explores the history and mathematics behind the RSA cryptosystem, including the idea of public key cryptosystems and number theory. It outlines the

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

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

Ti Secured communications

Ti Secured communications Ti5318800 Secured communications Pekka Jäppinen September 20, 2007 Pekka Jäppinen, Lappeenranta University of Technology: September 20, 2007 Relies on use of two keys: Public and private Sometimes called

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

Chapter 4 Asymmetric Cryptography

Chapter 4 Asymmetric Cryptography Chapter 4 Asymmetric Cryptography Introduction Encryption: RSA Key Exchange: Diffie-Hellman [NetSec/SysSec], WS 2008/2009 4.1 Asymmetric Cryptography General idea: Use two different keys -K and +K for

More information

Asymmetric Cryptography

Asymmetric Cryptography Asymmetric Cryptography Chapter 4 Asymmetric Cryptography Introduction Encryption: RSA Key Exchange: Diffie-Hellman General idea: Use two different keys -K and +K for encryption and decryption Given a

More information

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

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

A Few Facts from Number Theory and the RSA Cryptosystem OVERVIEW. RSA Producing Big Primes. Table of Contents. Overview Basic Facts of Number Theory

A Few Facts from Number Theory and the RSA Cryptosystem OVERVIEW. RSA Producing Big Primes. Table of Contents. Overview Basic Facts of Number Theory A Few Facts from Number Theory and the RSA Cryptosystem Larry Susanka Mathematics Department Bellevue College September 25, 2018 Table of Contents Overview Basic Facts of Number Theory The Idea of Public

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

Congruence of Integers

Congruence of Integers Congruence of Integers November 14, 2013 Week 11-12 1 Congruence of Integers Definition 1. Let m be a positive integer. For integers a and b, if m divides b a, we say that a is congruent to b modulo m,

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

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

Congruence Classes. Number Theory Essentials. Modular Arithmetic Systems

Congruence Classes. Number Theory Essentials. Modular Arithmetic Systems Cryptography Introduction to Number Theory 1 Preview Integers Prime Numbers Modular Arithmetic Totient Function Euler's Theorem Fermat's Little Theorem Euclid's Algorithm 2 Introduction to Number Theory

More information

Ma/CS 6a Class 3: The RSA Algorithm

Ma/CS 6a Class 3: The RSA Algorithm Ma/CS 6a Class 3: The RSA Algorithm By Adam Sheffer Reminder: Putnam Competition Signup ends Wednesday 10/08. Signup sheets available in all Sloan classrooms, Math office, or contact Kathy Carreon, kcarreon@caltech.edu.

More information

RSA ENCRYPTION USING THREE MERSENNE PRIMES

RSA ENCRYPTION USING THREE MERSENNE PRIMES Int. J. Chem. Sci.: 14(4), 2016, 2273-2278 ISSN 0972-768X www.sadgurupublications.com RSA ENCRYPTION USING THREE MERSENNE PRIMES Ch. J. L. PADMAJA a*, V. S. BHAGAVAN a and B. SRINIVAS b a Department of

More information

Implementation of the RSA algorithm and its cryptanalysis. Abstract. Introduction

Implementation of the RSA algorithm and its cryptanalysis. Abstract. Introduction Implementation of the RSA algorithm and its cryptanalysis Chandra M. Kota and Cherif Aissi 1 University of Louisiana at Lafayette, College of Engineering Lafayette, LA 70504, USA Abstract Session IVB4

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

Public Key 9/17/2018. Symmetric Cryptography Review. Symmetric Cryptography: Shortcomings (1) Symmetric Cryptography: Analogy

Public Key 9/17/2018. Symmetric Cryptography Review. Symmetric Cryptography: Shortcomings (1) Symmetric Cryptography: Analogy Symmetric Cryptography Review Alice Bob Public Key x e K (x) y d K (y) x K K Instructor: Dr. Wei (Lisa) Li Department of Computer Science, GSU Two properties of symmetric (secret-key) crypto-systems: The

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

Chapter 8 Public-key Cryptography and Digital Signatures

Chapter 8 Public-key Cryptography and Digital Signatures Chapter 8 Public-key Cryptography and Digital Signatures v 1. Introduction to Public-key Cryptography 2. Example of Public-key Algorithm: Diffie- Hellman Key Exchange Scheme 3. RSA Encryption and Digital

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

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

The RSA Cipher and its Algorithmic Foundations

The RSA Cipher and its Algorithmic Foundations Chapter 1 The RSA Cipher and its Algorithmic Foundations The most important that is, most applied and most analyzed asymmetric cipher is RSA, named after its inventors Ron Rivest, Adi Shamir, and Len Adleman.

More information

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9.1 Chapter 9 Objectives

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

8.1 Principles of Public-Key Cryptosystems

8.1 Principles of Public-Key Cryptosystems Public-key cryptography is a radical departure from all that has gone before. Right up to modern times all cryptographic systems have been based on the elementary tools of substitution and permutation.

More information

CIS 6930/4930 Computer and Network Security. Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography

CIS 6930/4930 Computer and Network Security. Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography CIS 6930/4930 Computer and Network Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography 1 Review of Modular Arithmetic 2 Remainders and Congruency For any integer a and any positive

More information

Introduction to Modern Cryptography. Benny Chor

Introduction to Modern Cryptography. Benny Chor Introduction to Modern Cryptography Benny Chor RSA Public Key Encryption Factoring Algorithms Lecture 7 Tel-Aviv University Revised March 1st, 2008 Reminder: The Prime Number Theorem Let π(x) denote the

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

CPSC 467: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 14 October 23, 2017 CPSC 467, Lecture 14 1/42 Computing in Z n Modular multiplication Modular inverses Extended Euclidean algorithm

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

THE CUBIC PUBLIC-KEY TRANSFORMATION*

THE CUBIC PUBLIC-KEY TRANSFORMATION* CIRCUITS SYSTEMS SIGNAL PROCESSING c Birkhäuser Boston (2007) VOL. 26, NO. 3, 2007, PP. 353 359 DOI: 10.1007/s00034-006-0309-x THE CUBIC PUBLIC-KEY TRANSFORMATION* Subhash Kak 1 Abstract. This note proposes

More information

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION Recall that RSA works as follows. A wants B to communicate with A, but without E understanding the transmitted message. To do so: A broadcasts RSA method,

More information

Asymmetric Encryption

Asymmetric Encryption -3 s s Encryption Comp Sci 3600 Outline -3 s s 1-3 2 3 4 5 s s Outline -3 s s 1-3 2 3 4 5 s s Function Using Bitwise XOR -3 s s Key Properties for -3 s s The most important property of a hash function

More information

NET 311D INFORMATION SECURITY

NET 311D INFORMATION SECURITY 1 NET 311D INFORMATION SECURITY Networks and Communication Department TUTORIAL 3 : Asymmetric Ciphers (RSA) A Symmetric-Key Cryptography (Public-Key Cryptography) Asymmetric-key (public key cryptography)

More information

Jong C. Park Computer Science Division, KAIST

Jong C. Park Computer Science Division, KAIST Jong C. Park Computer Science Division, KAIST Today s Topics The Euclidean Algorithm The RSA Public-Key Cryptosystem Discrete Mathematics, 2008 2 Computer Science Division, KAIST Note If r = a mod b, then

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 Cryptography. All secret key algorithms & hash algorithms do the same thing but public key algorithms look very different from each other.

Public Key Cryptography. All secret key algorithms & hash algorithms do the same thing but public key algorithms look very different from each other. Public Key Cryptography All secret key algorithms & hash algorithms do the same thing but public key algorithms look very different from each other. The thing that is common among all of them is that each

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

Innovation and Cryptoventures. Cryptography 101. Campbell R. Harvey. Duke University, NBER and Investment Strategy Advisor, Man Group, plc

Innovation and Cryptoventures. Cryptography 101. Campbell R. Harvey. Duke University, NBER and Investment Strategy Advisor, Man Group, plc Innovation and Cryptoventures Cryptography 101 Campbell R. Harvey Duke University, NBER and Investment Strategy Advisor, Man Group, plc Revised February 6, 2017 1 Definition Cryptography is the science

More information

LECTURE 5: APPLICATIONS TO CRYPTOGRAPHY AND COMPUTATIONS

LECTURE 5: APPLICATIONS TO CRYPTOGRAPHY AND COMPUTATIONS LECTURE 5: APPLICATIONS TO CRYPTOGRAPHY AND COMPUTATIONS Modular arithmetics that we have discussed in the previous lectures is very useful in Cryptography and Computer Science. Here we discuss several

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 13 (rev. 2) Professor M. J. Fischer October 22, 2008 53 Chinese Remainder Theorem Lecture Notes 13 We

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

Applied Cryptography and Computer Security CSE 664 Spring 2018

Applied Cryptography and Computer Security CSE 664 Spring 2018 Applied Cryptography and Computer Security Lecture 12: Introduction to Number Theory II Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline This time we ll finish the

More information

Attacks on RSA & Using Asymmetric Crypto

Attacks on RSA & Using Asymmetric Crypto Attacks on RSA & Using Asymmetric Crypto Luke Anderson luke@lukeanderson.com.au 7 th April 2017 University Of Sydney Overview 1. Crypto-Bulletin 2. Breaking RSA 2.1 Chinese Remainder Theorem 2.2 Common

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

Cryptography IV: Asymmetric Ciphers

Cryptography IV: Asymmetric Ciphers Cryptography IV: Asymmetric Ciphers Computer Security Lecture 7 David Aspinall School of Informatics University of Edinburgh 31st January 2011 Outline Background RSA Diffie-Hellman ElGamal Summary Outline

More information

RSA Algorithm. Factoring, EulerPhi, Breaking RSA. Çetin Kaya Koç Spring / 14

RSA Algorithm. Factoring, EulerPhi, Breaking RSA.   Çetin Kaya Koç Spring / 14 RSA Algorithm http://koclab.org Çetin Kaya Koç Spring 2018 1 / 14 Well-Known One-Way Functions Discrete Logarithm: Given p, g, and x, computing y in y = g x (mod p) is EASY Given p, g, y, computing x in

More information

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors Math.3336: Discrete Mathematics Primes and Greatest Common Divisors Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu

More information

Introduction to Public-Key Cryptosystems:

Introduction to Public-Key Cryptosystems: Introduction to Public-Key Cryptosystems: Technical Underpinnings: RSA and Primality Testing Modes of Encryption for RSA Digital Signatures for RSA 1 RSA Block Encryption / Decryption and Signing Each

More information