Number Theory Fall 2023-2024 Lecture Notes (PDF)

Summary

These lecture notes cover various topics within number theory, including divisibility, modular arithmetic, and congruences. They detail algorithms such as the Euclidean algorithm and delve into examples to demonstrate the calculation and application of these concepts. Mathematical proofs are also included.

Full Transcript

Number Theory Fall 2023-2024 Dr. Lama Affara Last Lecture Number Theory Modular Divisibility Primes Arithmetic Congruence De...

Number Theory Fall 2023-2024 Dr. Lama Affara Last Lecture Number Theory Modular Divisibility Primes Arithmetic Congruence Definition and Modulo Relation properties Properties of Congruence GCD and LCM Modulo Arithmetic Euclidean Modulo ๐‘š Algorithm The Division Algorithm ๐‘ รท ๐‘Ž = ๐‘ž with remainder ๐‘Ÿ ๐‘ is an integer ๐‘Ž is a positive integer there exists unique integers ๐‘ž and ๐‘Ÿ, with 0 โ‰ค ๐‘Ÿ < ๐‘Ž, such that ๐‘ = ๐‘ž๐‘Ž + ๐‘Ÿ Quotient ๐‘ž = ๐‘ ๐’…๐’Š๐’— ๐‘Ž Remainder ๐‘Ÿ = ๐‘ ๐’Ž๐’๐’… ๐‘Ž 12/4/2023 Discrete Structures II 3 Divisibility b รท ๐‘Ž = ๐‘ž with remainder 0 ๐‘Ž is an integer where ๐’‚ โ‰  ๐ŸŽ ๐‘ is an integer there exists an integer ๐‘ž such that ๐‘ = ๐‘Ž๐‘ž โž” ๐‘Ž divides ๐‘ denoted as ๐‘Ž|๐‘ We write ๐‘Ž โˆค ๐‘ when a does not divide b 12/4/2023 Discrete Structures II 4 Properties of Divisibility Theorem 1 Let ๐‘Ž, ๐‘, and ๐‘ be integers, where ๐‘Ž โ‰  0 i. If ๐‘Ž | ๐‘ and ๐‘Ž | ๐‘, then ๐’‚ | (๐’ƒ + ๐’„) ii. If ๐‘Ž | ๐‘, then ๐’‚ | ๐’ƒ๐’„ for all integers ๐‘ iii. If ๐‘Ž | ๐‘ and ๐‘ | ๐‘, then ๐’‚ | ๐’„ Congruence Relation Notice (๐‘š๐‘œ๐‘‘ m) here refers to the notation of the relation ๐‘Ž โ‰ก ๐‘ (๐‘š๐‘œ๐‘‘ ๐‘š) Notice ๐’Ž๐’๐’… here refers to the modulus operator ๐‘Ž and ๐‘ are integers ๐‘Ž is congruent to ๐‘ modulo ๐‘š ๐‘š is a positive integer ๐‘Ž ๐’Ž๐’๐’… ๐‘š = ๐‘ ๐’Ž๐’๐’… ๐‘š ๐‘Ž and ๐‘ have the same remainder ๐‘š divides ๐‘Ž โ€“ ๐‘ when divided by ๐‘š If a is not congruent to b modulo m, we write ๐‘Ž โ‰ข ๐‘ (๐‘š๐‘œ๐‘‘ ๐‘š) Algebraic Manipulation of Congruences Thus, By theorem 4, ๐‘Ž + ๐‘ โ‰ก (๐‘Ž ๐’Ž๐’๐’… ๐‘š) + ๐‘ ๐’Ž๐’๐’… ๐‘š (๐‘š๐‘œ๐‘‘ ๐‘š) ๐‘Ž๐‘ โ‰ก (๐‘Ž ๐’Ž๐’๐’… ๐‘š)(๐‘ ๐’Ž๐’๐’… ๐‘š) (๐‘š๐‘œ๐‘‘ ๐‘š) Thus, (๐‘Ž + ๐‘) ๐’Ž๐’๐’… ๐‘š = ๐‘Ž ๐’Ž๐’๐’… ๐‘š + ๐‘ ๐’Ž๐’๐’… ๐‘š ๐’Ž๐’๐’… ๐‘š ๐‘Ž๐‘ ๐’Ž๐’๐’… ๐‘š = ๐‘Ž ๐’Ž๐’๐’… ๐‘š ๐‘ ๐’Ž๐’๐’… ๐‘š ๐’Ž๐’๐’… ๐‘š 12/4/2023 Discrete Structures II 7 Arithmetic Modulo m Let Zm = {0, 1,... , m โˆ’ 1} Addition modulo ๐‘š: ๐‘Ž +๐‘š ๐‘ = (๐‘Ž + ๐‘) ๐’Ž๐’๐’… ๐‘š Multiplication modulo ๐‘š: ๐‘Ž.๐‘š ๐‘ = (๐‘Ž๐‘) ๐’Ž๐’๐’… ๐‘š Finding GCD Using Prime Factorizations Suppose the prime factorizations of a and b are: where each exponent is a nonnegative integer, and where all primes occurring in either prime factorization are included in both. Then: Greatest Common Divisor The integers ๐‘Ž1 , ๐‘Ž2 , โ€ฆ , ๐‘Ž๐‘› are pairwise relatively prime if gcd(๐‘Ž๐‘– , ๐‘Ž๐‘— ) = 1 whenever 1 โ‰ค ๐‘– < ๐‘— โ‰ค ๐‘›. 77 7 11 77 Finding LCM Using Prime Factorizations Suppose the prime factorizations of a and b are: where each exponent is a nonnegative integer, and where all primes occurring in either prime factorization are included in both. Then: Euclidean Algorithm The Euclidian algorithm is an efficient method for computing the greatest common divisor of two integers. Let r = gcd(a,b) so, r|a and r|b Let c = a mod b, so r|c If a and b have a common divisor, then the remainder of their division have the same divisor Thus gcd(a,b) = gcd(b,c) = gcd(a,c) Todayโ€™s Lecture Number Theory Solving Primes congruences gcd as linear Linear combinations Congruences Extended Chinese Euclidean Remainder Algorithm Theorem Fermatโ€™s Little Theorem GCDs as Linear Combinations Bezoutโ€™s Theorem If a and b are positive integers, then there exist integers s and t such that gcd(a,b) = sa + tb. This is a linear combination with integer coefficients of a and b. s and t are called Bรฉzout coefficients of a and b. The equation gcd(a,b) = sa + tb is called Bรฉzoutโ€™s identity. Letโ€™s Solve Write the gcd of ๐‘Ž = 6 and ๐‘ = 14 using linear combination of ๐‘Ž and ๐‘ i.e. What are integers ๐‘  and ๐‘ก such that gcd(6,14) = 6(๐‘ ) + 14(๐‘ก)? gcd(6,14) = 2 = 6(โˆ’2) + 14(1) So ๐‘  = โˆ’2 and ๐‘ก = 1 12/4/2023 Discrete Structures II 15 GCDs as Linear Combinations How to compute The Bรฉzout coefficients? 1. Use the Euclidian algorithm to find the gcd 2. work backwards (by division and substitution) to express the gcd as a linear combination of the original two integers. 12/4/2023 Discrete Structures II 16 Letโ€™s Solve Write the gcd of ๐‘Ž = 252 and ๐‘ = 198 using linear combination of ๐‘Ž and ๐‘ 1. Euclidean Algorithm 2. Working Backward 252 = 198 (1) + 54 18 = 54 (1) - 36 198 = 54 (3) + 36 = 54(1) - (198 โ€“ 54(3)) = 198(-1) + 54(4) 54 = 36 (1) + 18 = 198(-1) + 4(252โ€“ 198) = 252(4) + 198(-5) 36 = 18(2) + 0 So gcd(252,198)=18 So gcd(252,198)=252(4) + 198(-5) โž” Extended Euclidean Algorithm 12/4/2023 Discrete Structures II 17 Dividing Congruences by an Integer Dividing both sides of a valid congruence by an integer does not always produce a valid congruence. But dividing by an integer relatively prime to the modulus does produce a valid congruence: Theorem Let ๐‘š be a positive integer and let ๐‘Ž, ๐‘, and ๐‘ be integers. If ๐‘Ž๐‘ โ‰ก ๐‘๐‘ (๐‘š๐‘œ๐‘‘ ๐‘š) and gcd(๐‘, ๐‘š) = 1, then ๐‘Ž โ‰ก ๐‘ (๐‘š๐‘œ๐‘‘ ๐‘š). Todayโ€™s Lecture Number Theory Solving Primes congruences gcd as linear Linear combinations Congruences Extended Chinese Euclidean Remainder Algorith Theorem Fermatโ€™s Little Theorem Linear Congruence Just as solving linear equations plays an important role in calculus and linear algebra, linear congruence is an essential task in number theory ๐‘Ž๐‘ฅ โ‰ก ๐‘ ๐‘š๐‘œ๐‘‘ ๐‘š ๐‘š is a positive integer ๐‘Ž, ๐‘ are integers ๐‘ฅ is a variable Solving Linear Congruence Solving linear congruence โž” Finding all ๐‘ฅ that satisfy below equation ๐‘Ž๐‘ฅ โ‰ก ๐‘ ๐‘š๐‘œ๐‘‘ ๐‘š Can we divide by ๐‘Ž to find ๐‘ฅ? No! Congruence is not close under division. We can multiply by a number that cancels out ๐‘Ž (if exists) โž” inverse modulo ฤ: Integer ฤ such that ฤ๐‘Ž โ‰ก 1( ๐‘š๐‘œ๐‘‘ ๐‘š) Inverse Modulo Theorem If ๐‘Ž and ๐‘š are relatively prime integers, then a unique inverse of ๐‘Ž modulo ๐‘š exists. Proof: ๐‘Ž and ๐‘š are relatively prime gcd(๐‘Ž, ๐‘š) = 1 ๐‘ ๐‘Ž + ๐‘ก๐‘š = 1 ๐‘ ๐‘Ž + ๐‘ก๐‘š โ‰ก 1 (๐‘š๐‘œ๐‘‘ ๐‘š) But, ๐‘ก๐‘š โ‰ก 0 (๐‘š๐‘œ๐‘‘ ๐‘š) Then ๐‘ ๐‘Ž โ‰ก 1 (๐‘š๐‘œ๐‘‘ ๐‘š) So ๐‘  is an inverse of ๐‘Ž modulo m 12/4/2023 Discrete Structures II 23 Letโ€™s Solve! Find the inverse of 3 modulo 7 3 5 โ‰ก 1 (๐‘š๐‘œ๐‘‘ 7) So, 5 is the inverse of 3 modulo 7 Note that every integer congruent to 5 modulo 7 is also an inverse of 3, such as โˆ’ 2,โˆ’9, 12, and so on. โž” look for a multiple of ๐’‚ that exceeds a multiple of ๐’Ž by 1 12/4/2023 Discrete Structures II 24 Letโ€™s Solve! Find the inverse of 8 modulo 15 8 2 โ‰ก 1 (๐‘š๐‘œ๐‘‘ 15) So, 2 is the inverse of 8 modulo 15 Note that every integer congruent to 2 modulo 15 is also an inverse of 8, such as -28,-13,17โ€ฆ 12/4/2023 Discrete Structures II 25 Letโ€™s Solve Find the inverse of 101 modulo 4620 101 โ‰ก 1 (๐‘š๐‘œ๐‘‘ 4620) Not straightforward!! 12/4/2023 Discrete Structures II 26 Finding Inverses The Euclidean algorithm and Bรฉzout coefficients gives us a systematic approaches to finding inverses. Using the Euclidian algorithm: 7 = 2โˆ™3 + 1. 1 as linear combination: 3(โˆ’2) + 7(1) = 1, โž” โˆ’2 and 1 are Bรฉzout coefficients of 3 and 7. So, โˆ’2 is an inverse of 3 modulo 7. Letโ€™s Solve Find an inverse of 101 modulo 4620. 1. Euclidean Algorithm 2. Working Backward 4620 = 101 (45) + 75 1 = 3 - 2(1) 101 = 75 (1) + 26 = 3- (23 โ€“ 3(7))=-23+8(3) 75 = 26 (2) + 23 = -23 + 8(26-23)=8(26)-9(23) 26 = 23(1) + 3 = 8(26)-9(75-26(2))=-9(75)+26(26) 23 = 3(7) + 2 = -9(75)+26(101-75)=26(101)-35(75) 3 = 2(1) + 1 = 26(101)-35(4620-101(45))=-35(4620)+1601(101) So gcd(4620,101)=1 So, 1601 is the inverse of 101 modulo 4620 12/4/2023 Discrete Structures II 28 Letโ€™s Solve Find the inverse of 5 modulo 15 5 โ‰ก 1 (๐‘š๐‘œ๐‘‘ 15) 5 does not have any inverse modulo 15! 12/4/2023 Discrete Structures II 29 Using Inverses to Solve Congruences Solving linear congruence โž” Finding all ๐‘ฅ that satisfy below equation ๐‘Ž๐‘ฅ โ‰ก ๐‘ ๐‘š๐‘œ๐‘‘ ๐‘š โž” inverse modulo ฤ: Integer ฤ such that ฤ๐‘Ž โ‰ก 1( ๐‘š๐‘œ๐‘‘ ๐‘š) solve the congruence ๐’‚๐’™ โ‰ก ๐’ƒ( ๐’Ž๐’๐’… ๐’Ž) by multiplying both sides by ฤ. Letโ€™s Solve! What are the solutions of the congruence 3๐‘ฅ โ‰ก 4( ๐‘š๐‘œ๐‘‘ 7) We found that โˆ’2 is an inverse of 3 modulo 7. We multiply both sides of the congruence by โˆ’2 giving โˆ’2 โˆ™ 3๐‘ฅ โ‰ก โˆ’2 โˆ™ 4(๐‘š๐‘œ๐‘‘ 7) So, if x is a solution, then ๐‘ฅ โ‰ก โˆ’8 (๐‘š๐‘œ๐‘‘ 7) But, 6 โ‰ก -8 (mod 7). So x = 6 Verify: 3x โ‰ก 3 โˆ™ 6 = 18 โ‰ก 4( mod 7) which shows that all such x satisfy the congruence. โž” The solutions are the integers x such that x โ‰ก 6 (mod 7), namely, 6,13,20 โ€ฆ and โˆ’1, โˆ’ 8, โˆ’ 15,โ€ฆ 12/4/2023 Discrete Structures II 31 System of Linear Congruences basis for a method that can be used to perform arithmetic with large integers can be found as word puzzles in the writings of ancient Chinese and Hindu mathematicians In the first century, the Chinese mathematician Sun-Tsu asked: There are certain things whose number is unknown. When divided by 3, the remainder is 2; when divided by 5, the remainder is 3; and when divided by 7, the remainder is 2. What will be the number of things? 12/4/2023 Discrete Structures II 32 The Chinese Remainder Theorem Let ๐‘š1 , ๐‘š2 , โ€ฆ , ๐‘š๐‘› be pairwise relatively prime positive integers greater than one and ๐‘Ž1 , ๐‘Ž2 , โ€ฆ , ๐‘Ž๐‘› arbitrary integers. Then the system ๐‘ฅ โ‰ก ๐‘Ž1 ( ๐‘š๐‘œ๐‘‘ ๐‘š1 ) ๐‘ฅ โ‰ก ๐‘Ž2 ( ๐‘š๐‘œ๐‘‘ ๐‘š2 ) โˆ™ โˆ™ โˆ™ ๐‘ฅ โ‰ก ๐‘Ž๐‘› ( ๐‘š๐‘œ๐‘‘ ๐‘š๐‘› ) has a unique solution modulo ๐‘š = ๐‘š1 ๐‘š2 โˆ™ โˆ™ โˆ™ ๐‘š๐‘›. The Chinese Remainder Theorem ๐‘ฅ โ‰ก ๐‘Ž1 ( ๐‘š๐‘œ๐‘‘ ๐‘š1 ) ๐‘ฅ โ‰ก ๐‘Ž2 ( ๐‘š๐‘œ๐‘‘ ๐‘š2 ) โˆ™ โˆ™ ๐‘ฅ โ‰ก ๐‘Ž๐‘› ( ๐‘š๐‘œ๐‘‘ ๐‘š๐‘› ) 1. ๐‘š = ๐‘š1 ๐‘š2 โˆ™ โˆ™ โˆ™ ๐‘š๐‘› 2. Let ๐‘€๐‘˜ = ๐‘š/๐‘š๐‘˜ 3. Find ๐‘ฆ๐‘˜ , an inverse of ๐‘€๐‘˜ modulo ๐‘š๐‘˜ , i.e. ๐‘€๐‘˜ ๐‘ฆ๐‘˜ โ‰ก 1 ( ๐‘š๐‘œ๐‘‘ ๐‘š๐‘˜ ) 4. The sum ๐‘ฅ = ๐‘Ž1 ๐‘€1 ๐‘ฆ1 + ๐‘Ž2 ๐‘€2 ๐‘ฆ2 + โˆ™ โˆ™ โˆ™ + ๐‘Ž๐‘› ๐‘€๐‘› ๐‘ฆ๐‘› Is the simultaneous solution for the system of linear congruences The Chinese Remainder Theorem 1. ๐‘š = 3 โˆ™ 5 โˆ™ 7 = 105 2. ๐‘€1 = ๐‘š/3 = 35, ๐‘€2 = ๐‘š/5 = 21, ๐‘€3 = ๐‘š/7 = 15. 3. Find ๐‘ฆ๐‘˜ , inverse of ๐‘€๐‘˜ modulo ๐‘š๐‘˜ 2 is an inverse of ๐‘€1 modulo 3 since 35 (2) โ‰ก 1 (mod 3) 1 is an inverse of ๐‘€2 modulo 5 since 21 (1) โ‰ก 1 (mod 5) 1 is an inverse of ๐‘€3 modulo 7 since 15(1) โ‰ก 1 (mod 7) 4. Hence, ๐‘ฅ = ๐‘Ž1 ๐‘€1 ๐‘ฆ1 + ๐‘Ž2 ๐‘€2 ๐‘ฆ2 + ๐‘Ž3๐‘€3 ๐‘ฆ3 = 2 โˆ™ 35 โˆ™ 2 + 3 โˆ™ 21 โˆ™ 1 + 2 โˆ™ 15 โˆ™ 1 = 233 โ‰ก 23 (๐‘š๐‘œ๐‘‘ 105) Then 23 is the smallest positive integer that is a simultaneous solution Fermatโ€™s Little Theorem If ๐‘ is prime and ๐‘Ž is an integer not divisible by ๐‘, then ๐‘Ž ๐‘โˆ’1 โ‰ก 1 (๐‘š๐‘œ๐‘‘ ๐‘) Furthermore, for every integer ๐‘Ž we have ๐‘Ž๐‘ โ‰ก ๐‘Ž (๐‘š๐‘œ๐‘‘ ๐‘) โž” Fermatโ€™s little theorem is useful in computing the remainders modulo p of large powers of integers. Letโ€™s Solve! Find 7222 mod 11. By Fermatโ€™s little theorem, we know that 710 โ‰ก 1 (mod 11), so (710 )k โ‰ก 1 (mod 11), for every positive integer k. Therefore, โˆ™ 10 + 2 7222 = 7 22 = 710 2272 โ‰ก 1 22 โˆ™ 49 โ‰ก 5 ๐‘š๐‘œ๐‘‘ 11 Hence, 7222 mod 11 = 5. Todayโ€™s Lecture Number Theory Solving Primes Cryptography congruences gcd as linear Linear Caesar Cipher combinations Congruences Extended Chinese Euclidean Remainder Shift Ciphers Algorith Theorem Fermatโ€™s Little Affine Ciphers Theorem RSA Cryptosystem Cryptography transforming information so that it cannot be easily recovered without special knowledge Number theory is the basis of many classical ciphers, first used thousands of years ago used extensively until the 20th century ciphers encrypt messages by changing each letter to a different letter, or each block of letters to a different block of letters 12/4/2023 Discrete Structures II 40 Caesar Cipher Julius Caesar created secret messages shifting each letter three letters forward in the alphabet (sending the last three letters to the first three letters.) For example, the letter B is replaced by E and the letter X is replaced by A. Caesar Cipher Replace each letter by an integer from ๐‘26 that is 0 to 25 The encryption function is ๐‘“(๐‘) = (๐‘ + 3) ๐‘š๐‘œ๐‘‘ 26 โž” replace each integer ๐‘ โˆˆ {0,1,2,โ€ฆ,25} by ๐‘“(๐‘) โˆˆ {0,1,2,โ€ฆ,25} Letโ€™s Solve Encrypt the message โ€œMEET YOU IN THE PARKโ€ using the Caesar cipher. Replace each letter by its position - 1 12 4 4 19 24 14 20 8 13 19 7 4 15 0 17 10 Now replace each of these numbers p by f(p) = (p + 3) mod 26 15 7 7 22 1 17 23 11 16 22 10 7 18 3 20 13 Translate the numbers back to letters โ€œPHHW BRX LQ WKH SDUN.โ€ Caesar Cipher The encryption function is ๐‘“(๐‘) = (๐‘ + 3) ๐‘š๐‘œ๐‘‘ 26 What is the decryption function? ๐‘“ โˆ’1 (๐‘) = (๐‘ โˆ’ 3) ๐‘š๐‘œ๐‘‘ 26 Each letter in the coded message is shifted back three letters in the alphabet, with the first three letters sent to the last three letters 12/4/2023 Discrete Structures II 44 Shift Cipher The Caesar cipher is one of a family of ciphers called shift ciphers. Letters can be shifted by an integer ๐‘˜, such as 3 The encryption function is ๐‘“(๐‘) = (๐‘ + ๐‘˜) ๐‘š๐‘œ๐‘‘ 26 and the decryption function is ๐‘“ โˆ’1 (๐‘) = (๐‘ โˆ’ ๐‘˜) ๐‘š๐‘œ๐‘‘ 26 โž” The integer ๐‘˜ is called a key. Letโ€™s Solve Encrypt the message โ€œSTOP GLOBAL WARMINGโ€ using the shift cipher with k = 11. Replace each letter with the corresponding element of ๐‘26 18 19 14 15 6 11 14 1 0 11 22 0 17 12 8 13 6 Apply the shift ๐‘“(๐‘) = (๐‘ + 11) ๐‘š๐‘œ๐‘‘ 26, yielding 3 4 25 0 17 22 25 12 11 22 7 11 2 23 19 24 17 Translate the numbers back to letters โ€œDEZA RWZMLW HLCXTYR.โ€ Letโ€™s Solve Decrypt the message โ€œLEWLYPLUJL PZ H NYLHA ALHJOLYโ€ that was encrypted using the shift cipher with k = 7. Replace each letter with the corresponding element of Z26. 11 4 22 11 24 15 11 20 9 11 15 25 7 13 24 11 7 0 0 11 7 9 14 11 24 Shift each of the numbers by โˆ’๐‘˜ = โˆ’7 ๐‘š๐‘œ๐‘‘๐‘ข๐‘™๐‘œ 26, yielding 4 23 15 4 17 8 4 13 2 4 8 18 0 6 17 4 0 19 19 4 0 2 7 4 17 Translate the numbers back to letters โ€œEXPERIENCE IS A GREAT TEACHER.โ€ Affine Ciphers Shift ciphers are a special case of affine ciphers which use functions of the form ๐‘“(๐‘) = (๐‘Ž๐‘ + ๐‘) ๐‘š๐‘œ๐‘‘ 26 where ๐‘Ž and ๐‘ are integers, chosen so that ๐‘“ is a bijection The function is a bijection if and only if gcd(๐‘Ž, 26) = 1. Letโ€™s Solve! Example: What letter replaces the letter K when the function ๐‘“(๐‘) = (7๐‘ + 3) ๐‘š๐‘œ๐‘‘ 26 is used for encryption. 10 represents K ๐‘“(10) = (7 โˆ™ 10 + 3) ๐‘š๐‘œ๐‘‘ 26 = 21 21 corresponds to V So K is replaced by V Letโ€™s Solve! To decrypt a message encrypted by an affine cipher, the congruence c โ‰ก ap + b (mod 26) needs to be solved for p. Subtract b from both sides to obtain cโˆ’ b โ‰ก ap (mod 26). Multiply both sides by the inverse of a modulo 26, which exists since gcd(a,26) = 1. ฤ(cโˆ’ b) โ‰ก ฤap (mod 26), which simplifies to ฤ(cโˆ’ b) โ‰ก p (mod 26). p โ‰ก ฤ(cโˆ’ b) (mod 26) is used to determine p in Z26. Private Key Cryptography All classical ciphers, including shift and affine ciphers, are private key cryptosystems. Knowing the encryption key allows one to quickly determine the decryption key. All parties who wish to communicate using a private key cryptosystem must share the key and keep it a secret. Public Key Cryptography In public key cryptosystems, first invented in the 1970s, knowing how to encrypt a message does not help one to decrypt the message. Therefore, everyone can have a publicly known encryption key. The only key that needs to be kept secret is the decryption key. The RSA Cryptosystem A public key cryptosystem, now known as the RSA system was introduced in 1976 by three researchers at MIT. Ronald Rivest Adi Shamir Leonard Adelman (Born 1948) (Born 1952) (Born 1945) The public encryption key is ๐‘›, ๐‘’ ๐‘› = ๐‘๐‘ž (the modulus) is the product of two large (200 digits) primes ๐‘ and ๐‘ž, exponent ๐‘’ relatively prime to (๐‘ โˆ’ 1)(๐‘ž โˆ’ 1) RSA Encryption To encrypt a message using RSA using a key (๐‘›, ๐‘’): Translate the plaintext message M into sequences of two digit integers representing the letters. Use 00 for A, 01 for B, etc. Concatenate the two digit integers into strings of digits. Divide this string into equally sized blocks of 2N digits where 2N is the largest even number 2525โ€ฆ25 with 2N digits that does not exceed n. The plaintext message M is now a sequence of integers ๐‘š1 , ๐‘š2 , โ€ฆ , ๐‘š๐‘˜. Each block (an integer) is encrypted using the function ๐ถ = ๐‘€๐‘’ ๐‘š๐‘œ๐‘‘ ๐‘›. RSA Encryption Encrypt the message STOP using the RSA cryptosystem with key(2537,13). Note that 2537 = 43โˆ™ 59, p = 43 and q = 59 are primes and gcd(13, 42โˆ™ 58) = 1. Translate the letters in STOP to their numerical equivalents 18 19 14 15. Divide into blocks of four digits (because 2525 < 2537 < 252525) to obtain 1819 1415. Encrypt each block using the mapping ๐ถ = ๐‘€13 ๐‘š๐‘œ๐‘‘ 2537. Since 181913 ๐‘š๐‘œ๐‘‘ 2537 = 2081 and 141513 ๐‘š๐‘œ๐‘‘ 2537 = 2182, the encrypted message is 2081 2182. RSA Decryption To decrypt a RSA ciphertext message, the decryption key d, an inverse of e modulo (pโˆ’1)(q โˆ’1) is needed. The inverse exists since gcd(e,(pโˆ’1)(q โˆ’1)) = gcd(13, 42โˆ™ 58) = 1. With the decryption key d, we can decrypt each block with the computation ๐‘€ = ๐ถ ๐‘‘ ๐‘š๐‘œ๐‘‘ ๐‘ โˆ™ ๐‘ž. RSA works as a public key system since the only known method of finding d is based on a factorization of n into primes. There is currently no known feasible method for factoring large numbers into primes. RSA Decryption Example: The message 0981 0461 is received. What is the decrypted message if it was encrypted using the RSA cipher from the previous example. The message was encrypted with n = 43โˆ™ 59 and exponent 13. An inverse of 13 modulo 42โˆ™ 58 = 2436 is d = 937. To decrypt a block C, ๐‘€ = ๐ถ 937 ๐‘š๐‘œ๐‘‘ 2537. Since 0981937 ๐‘š๐‘œ๐‘‘ 2537 = 0704 and 0461937 ๐‘š๐‘œ๐‘‘ 2537 = 1115, the decrypted message is 0704 1115. Translating back to English letters, the message is HELP.

Use Quizgecko on...
Browser
Browser