EE 418: Network Security and Cryptography
|
|
- Lynn Anthony
- 6 years ago
- Views:
Transcription
1 EE 418: Network Security and Cryptography Homework 3 Solutions Assigned: Wednesday, November 2, 2016, Due: Thursday, November 10, 2016 Instructor: Tamara Bonaci Department of Electrical Engineering University of Washington, Seattle Problem 1 (Stinson, Problem 5.7) Solve the following system of congruences: 13x 4 (mod 99) 15x 56 (mod 101) 1
2 The given system of congruences can be solved in two steps: Find modular multiplicative inverses of 13 (mod 99) and 15 (mod 101), to get rid of those scaling factors, and Apply the Chinese remainder theorem to solve the given system of congruences Let s start by finding the multiplicative inverses of x 1 = 13 (mod 99) and x 2 = 15 (mod 101) as follows: 13x 1 1 (mod 99) 13x 1 = 99λ + 1 = 91λ + (8λ + 1) (1) From equation (1) it follows that λ = 8. Therefore, we can write: Similarly, we can write: 13x 1 = x 1 = 61 (2) 15x 2 1 (mod 101) 15x 2 = 101µ + 1 = 90µ + (11µ + 1) (3) From equation (3) it follows that µ = 4. Therefore, we can write: 15x 2 = x 2 = 27 (4) Combining equations (2) and (4), we can redefine the system of congruences (1) as follows: x 244 (mod 99) x 46 (mod 99) x 1512 (mod 101) x 98 (mod 101) (5) System of congruences (5) can be solved using the Chinese reminder theorem, where: r = 2, a 1 = 46, a 2 = 98, m 1 = 99, m 2 = 101, M = 9999, M 1 = 101, M 2 = 99 (6) In order to find a unique solution of the system of congruences, X, we solve the following equations: y 1 M 1 1 (mod 99) 101y 1 1 (mod 99) 2y 1 = 99λ + 1 = 98λ + (1 + λ) (7) From equation (7) it follows that λ = 1. Therefore y 1 = 50. Similarly, for y 2 we can write: 99y 2 1 (mod 101) 99y 2 = 101µ y 2 = 99µ + (2µ + 1) (8) From equation (8) it follows that µ = 49. Therefore y 2 = 50. Finally, we can compute the solution of the system of congruences X as follows: X = a 1 M 1 y 1 + a 2 M 2 y 2 (mod M) = (mod 9999) = (mod 9999) = 7471 (mod 9999) (9) 2
3 Problem 2 In the RSA cryptosystem, a user s public key is given as e = 31, n = Please find the user s private key, and explain your procedure. To find the private key of the given user, e, we use the simple trick, saying that the most plausible choice for primes p, q, p q = n is: p q n (10) Using equation (10), we observe that a good guess for a pair of primes (p, q) would be (p = 59, q = 61), as n = 3599 = We therefore find: φ(n) = φ(p) φ(q) = = 3480 (11) Given a public cryptographic key K E = (b, n) = (31, 3599), we observe that gcd(b, φ(n)) = gcd(31, 3480) = 1. Therefore, there exist a unique multiplicative inverse of b (mod φ(n)), and using the key generation rules of the RSA cryptosystems: ab = 1 (mod φ(n)) we know that that modular multiplicative inverse is exactly equal to the private cryptographic key K D = (a). We find such a multiplicative inverse using Extended Euclidean Algorithm: 3480 = 112(31) = (31) 31 = 3(8) = 31 3(8) 8 = 1(7) = 8 1(7) 1 = 0(7) = (8) = 4(8) 31 = 4(3480) 448(31) 31 = 4(3480) 49(31) (12) From equation (12), we read of the private cryptographic key K D = (a, n) as K D = ( 449, 3599). Problem 3 Suppose that m > 2 users want to communicate securely and confidentially. Suppose further that each of the m users wants to be able to communicate with every other user without the remaining m 2 users being able to listen on their conversation. How many distinct keys are needed if we are using: A symmetric key cryptosystem, where two users use a shared secret key to communicate, A public key cryptosystem, where every user has a public key, K E and a private (secret) key, K D. How many keys are needed for each type of cryptosystems if m = 1000? Case 1: Classical Cryptosystem In classical cryptosystems, every user has to posses m 1 distinct encryption/decryption keys to be able to communicate with every other user. Since two communicating users share a common key, the total number of cryptographic keys is equal to: N 1 = m(m 1) 2. Therefore, for m = 1000, N 1 = distinct keys are needed when classical cryptosystem is used. Case 2: Public Cryptosystem If m users are using a public key cryptosystem, then in total N 2 = 2m distinct cryptographic keys are needed to make communication secure since every user is assigned one encryption key and one decryption key. Therefore, the total number of public key cryptographic keys K = (K E, K D ) is equal to: N 2 = 2m O(m) (13) For m = 1000, N 2 = 2000 distinct keys are needed when public key cryptosystem is used. 3
4 Problem 4 (Stinson, Problem 5.14) Prove that the RSA Cryptosystem is insecure against a chosen ciphertext attack. In particular, given a ciphertext y, describe how to choose a ciphertext ŷ y, such that knowledge of the plaintext ˆx = d K (ŷ) allows x = d K (y) to be computed. Hint: Use the multiplicative property of the RSA Cryptosystem, i.e., that: e K (x 1 )e K (x 2 ) mod n = e k (x 1 x 2 ) mod n Given a ciphertext y, encrypted using the RSA Cryptosystem, which has the following multiplicative property: e K (x 1 )e K (x 2 ) (mod n) = e K (x 1 x 2 (mod n)) (14) an attacker can choose a ciphertext ŷ as a multiplicative inverse of the original ciphertext y under modulo n as his chosen ciphertext: y ŷ = e K (x)e K (ˆx) (mod n) = 1 (15) We note that such a multiplicative inverse exists if gcd(ŷ, n) = 1. following cases are possible: 1. gcd(ŷ, n) = p, 2. gcd(ŷ, n) = q If, however, gcd(ŷ, n) 1, then the Both cases are useful to an attacker as the knowledge of either p or q enables him/her to factor n, and hence to find the decryption (private) key (a, n). We therefore only consider the case when gcd(ŷ, n) = 1, i.e., a multiplicative inverse of ŷ (mod n) exist. Using a multiplicative inverse of y (mod n) as his/her chosen ciphertext, an attacker can write: y ŷ = e K (x) e K (ˆx) (mod n) = e K (x ˆx (mod n)) = 1 (16) Given the encryption rule of the RSA Cryptosystem: e K (x) = x b (mod n), we can rewrite equation (16) as follows: (x ˆx) b 1 (mod n) (17) Based on the fact that 1 b = 1 (mod n), and that x 0, from equation (17) it follows: x ˆx 1 (mod n) (18) Equation (18) represents a congruence equation modulo n. Since n is a product of two primes, gcd(ˆx, n) = ˆx or 1. In case when gcd(ˆx, n) = ˆx, we know that ˆx = {p, q}, which again enables us to factor n and then to find x. In case when gcd(ˆx, n) = 1, there exist a unique multiplicative inverse ˆx 1 (mod n) = x, which shows that RSA Cryptosystem is insecure against chosen ciphertext attack. Problem 5 (Stinson, Problem 5.15) This exercise exhibits what is called a protocol failure. It provides an example where ciphertext can be decrypted by an opponent, without determining the key, if a cryptosystem is used in careless way. The moral is that it is not sufficient to use a secure cryptosystem in order to guarantee secure communication. Suppose Bob has an RSA Cryptosystem with a large modulus n for which the factorization cannot be found in a reasonable amount of time. Suppose Alice sends a message to Bob by representing each alphabetic character as an integer between 0 and 25 (i.e., A 0, B 1, etc.) and then encrypting each residue modulo 26 as a separate plaintext character. (a) Describe how an attacker Eve can easily decrypt a message which is encrypted in this way. 4
5 (b) Illustrate this attack by decrypting the following ciphertext, which was encrypted using an RSA Cryptosystem with n = and b = 25 without factoring the modulus: 365, 0, 4845, 14930, 2608, 2608, 0. (a) If Alice, given a plaintext x = x 1, x 2, x 2,..., x 2, takes each letter x i, 1 i n, converts it to an integer z i Z 26 : x z, z = z 1, z 2, z 2,..., z n, z i Z 26 and then encrypts every letter separately, using RSA Cryptosystem: e K (z i ) = z b i (mod n) = (x i (mod 26)) n (mod n) she actually limits the plaintext space to Z 26, cardinality of which is 26. She also limits the ciphertext space to Z 26, i.e., the set of the same cardinality, since Bob, as a valid receiver, has to be able to uniquely decrypt every letter of the ciphertext. Knowing the public key in this case is, however, sufficient for an attacker to compute a table, representing one-to-one correspondence between the plaintext and the ciphertext. Computed table enables him/her to decrypt any ciphertext, encrypted using RSA Cryptosystem in such a way. (b) In order to decrypt the ciphertext y = [365, 0, 4845, 14930, 2608, 2608, 0], we construct the decryption table 1. By inspection, we can read off letter by letter of the plaintext from the table: d K (365) = v, d K (0) = a, d K (4845) = n, d K (14930) = i, d K (2608) = l. The plaintext is vanilla. The code that decrypts the given ciphertext is listed below. Table 1: Decryption table x a b c d e f g h i j k l m y x n o p q r s t u v w x y z y function [decryption table, plaintext] = RSA decryption table(b, n, ciphertext) %RSA decryption table function takes public %INPUTS: %1. (b,n) public key of the RSA cryptosystem %2. ciphertext given ciphertext %OUTPUT: %1. decryption table corresponding decryption table %2. plaintext decrypted plaintext %% Decryption table construction for i = 0:1:25 decryption table(i + 1) = square and multiply(i, b, n); end %% Decrpytion for i = 1:1:length(ciphertext) plaintext aux(i) = find(decryption table == ciphertext(i)) 1; end plaintext = num2str(plaintext aux); 5
6 Problem 6 (Stinson, Problem 5.16) This exercise illustrates another example of a protocol failure (due to Simmons) involving the RSA Cryptosystem. Is is called the common modulus protocol failure. Suppose that Bob has an RSA cryptosystem with the modulus n and encryption exponent b, and Charlie has an RSA cryptosystem with the same modulus n and encryption exponent b 2. Suppose also that gcd(b 1, b 2 ) = 1. Now consider the situation that arises if Alice encrypts the same plaintext x to send to both Bob and Charlie. Thus, she computes y 1 = x b1 (mod n) and y 2 = x b2 (mod n), and then she sends y 1 to Bob and y 2 to Charlie. Suppose Eve intercepts y 1 and y 2, and performs the computation indicated in the following algorithm: Algorithm 5.16: RSA Common Modulud Decryption(n, b1, b2, y1, y2) c1 = inv(b1) mod(b2) c2 = (c1 b1-1)/b2 x1 = y1^(c1)inv(y2^(c2)) mod(n) return x1 (a) Prove that the value x 1, computed in given algorithm in is fact Alice s plaintext x. Thus eve can decrypt the message Alice sent, even though the cryptosystem may be secure. (b) Illustrate the attack by computing x by this method if n = 18721, b 1 = 43, b 2 = 7717, y 1 = and y 2 = (a) In order to prove that value x 1, computed using Algorithm represents the plaintext x, let s define y 1 and y 2 as follows: y 1 = e K1 (x) = x b1 (mod n) y 2 = e K2 (x) = x b2 (mod n) (19) Using definitions of c 1 and c 2, given in the Algorithm 5.16: let s analyze how the value of x 1 is calculated: c 1 = b 1 1 (mod b 2 ) c 2 = (c 1 b 1 1)/b 2 (20) x 1 = y c1 1 (yc2 2 ) 1 (mod n) = x b1c1 (x b2c2 ) 1 (mod n) (21) Using the Euler s theorem, equation (21) can be rewritten as: x 1 = x 1+λb2 (x b2(1+λb2 1)/b2 ) 1 (mod n) = x 1+λb2 (x λb2 ) 1 (mod n) = x 1 x λb2 (x λb2 ) 1 (mod n) = x (mod n) = x (22) Equation (22) proves that x 1 calculated using Algorithm represents the original plaintext x. (b) The code that decrypts the given ciphertext is listed below. Using the given algorithm, we obtain c 1 = 2692, c 2 = 15, y c1 1 (mod n) = 13145, y c2 2 = 3947, (y c2 2 ) 1 = Finally, we obtain the plaintext x = function [x] = RSA common modulus decryption(n, b1, b2, y1, y2) %RSA common modulus decryption %INPUTS: %1. (b1, n) First RSA public key pair %2. (b2, n) Second RSA public key pair (note that pairs have the same modulus) 6
7 %3. y1 ciphertext encryptred using the first key %4. y2 ciphertext encrypted using the second key %OUTPUT: %1. x plaintext %% Finding multiplicative inverse [r,s,t] = extendedeuclidean(b1, b2); c1 = s; c2 = (c1*b1 1)/b2; %(y1ˆc1)*(s); x1 = square and multiply(y1, c1, n); x2 = square and multiply(y2, c2, n); [r,s,t] = extendedeuclidean(x2, n); x = mod(x1*s, n); Problem 7 (a) Ciphertext 5859 was obtained using the RSA cryptosystem with n = and e = Using the factorization = , find the plaintext. (b) Ciphertext 75 was obtained using the RSA cryptosystem with n = 437 and e = 3. You know that the plaintext is either 8 or 9. Determine which it is without factoring n.] (a) In the RSA cryptosystem, the private key d satisfies equation: ed 1 (mod φ)(n). (23) For n = and e = 7467, we have d = 3. Hence the plaintext is equal to y d (mod n) = (mod 11413)) = (b) The encryption operation of the RSA cryptosystem satisfies y = m e (mod n). To determine the value of the plaintext, we substitute the two possible values of m (m = 8, 9), along with the known values of e and n, and determine which plaintext results in a ciphertext of c = 75. We find that the plaintext is equal to 8. Problem 8 Suppose that Alice and Bob communicate using ElGamal Cryptosystem and that, to save time, Bob uses the same random nonce k each time he encrypts a plaintext message (i.e., k is a fixed secret of Bob, and it is not randomly generated each time encryption is performed). Show how an attacker who possesses a (plaintext, ciphertext) pair x, (Y 1 ; Y 2 ) can decrypt any other ciphertext (Y 1; Y 2). 7
8 Alice Bob Key Generation: Generate prime p, integer α Generate a, compute β = α a mod p P K A = (α, β, p), SK A = a Alice publishes P K A = (α, β, p) Bob knows: P K A = (α, β, p) Encryption: Generate random integer k Compute ciphertext (Y 1, Y 2 ): Decryption: x = Y 2 (Y a 1 ) 1 mod p Y 1 = α k mod p Y 2 = xβ k mod p Y 1 = α k mod p, Y 2 = xβ k mod p Figure 1: Schematic illustration of ElGamal key generation, encryption, and decryption. A schematic illustration of ElGamal cryptosystem is given in Figure 1 above. If Bob reuses k for each encryption operation, then the ciphertext for some message x will be Y 1 = α k mod p Y 2 = xβ k mod p Given some (plaintext, ciphertext) pair (x, (Y 1, Y 2 )), Eve can compute β k as: β k = x 1 Y 2 mod p (24) Using the knowledge of β k, for any given ciphertext (Y 1, Y 2), the plaintext can be computed as: x = Y 2 ( β k ) 1 mod p. (25) Thus knowing β k is sufficient to allow us to decrypt any ElGamal-encrypted ciphertext without knowing the secret key, a. Problem 9 (Trappe, Problem ) Bob, Ted, Carol and Alice want to agree on a common key (cryptographic key, that is). They publicly choose a large prime p and a primitive root α. They privately choose numbers b, t, c, a, respectively. Describe a protocol that allows them to securely compute (in doing so, please ignore the man-in-the-middle attack): K := α btca (mod p) 8
9 The given problem is the modification of the Diffie-Hellman key exchange problem, in which two communicating parties, Alice and Bob, agree upon a shared secret key, K AB, by doing the following: Choose a large prime p and its corresponding primitive root, α, Alice chooses secret integer a and computes a message β a = α a (mod p), Similarly, Bob chooses secret integer b and computes a message β b = α b (mod p) Alice and Bob exchange message β a and β b, and Upon receiving the corresponding message, both parties can compute the shared secret key as β b a = β a b, using the secret integer available to them. When four parties are communicating, messages used to establish the shared secret key K bcta, are exchanged between the communicating parties in three iterations. In each iteration, the communicating parties are something new getting a step closer to establishing a shared secret key, K btca, by obtaining the component α needed so that in the last step each person can raise the received α something new to the secret component that they posses in order to get the whole key. The modified protocol proceeds as follows: Bob, Ted, Carol and Alice choose a large prime p and its corresponding primitive root, α. Bob chooses a secret number b, Ted a secret number t, Carol a secret number c, and Alice a secret number a. The First Iteration: Bob sends message α b (mod p) to Ted. Ted sends message α t (mod p) to Carol. Carol sends message α c (mod p) to Alice. Alice sends message α a (mod p) to Bob. The Second Iteration: Bob sends message α ba (mod p) to Ted. Ted sends message α tb (mod p) to Carol. Carol sends message α ct (mod p) to Alice. Alice sends message α ac (mod p) to Bob. The Thirs Iteration: Bob sends message α bac (mod p) to Ted. Ted sends message α tba (mod p) to Carol. Carol sends message α ctb (mod p) to Alice. Alice sends message α act (mod p) to Bob. After the third iteration of message, each person obtains the shared secret key by raising the last received message to their own secret number. 9
Data security (Cryptography) exercise book
University of Debrecen Faculty of Informatics Data security (Cryptography) exercise book 1 Contents 1 RSA 4 1.1 RSA in general.................................. 4 1.2 RSA background.................................
More informationEE 418 Network Security and Cryptography Lecture #3
EE 418 Network Security and Cryptography Lecture #3 October 6, 2016 Classical cryptosystems. Lecture notes prepared by Professor Radha Poovendran. Tamara Bonaci Department of Electrical Engineering University
More informationCryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017
Name: Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017 INSTRUCTIONS Read Carefully Time: 50 minutes There are 5 problems. Write your name legibly at the top of this page. No calculators
More informationLecture 32. Handout or Document Camera or Class Exercise. Which of the following is equal to [53] [5] 1 in Z 7? (Do not use a calculator.
Lecture 32 Instructor s Comments: This is a make up lecture. You can choose to cover many extra problems if you wish or head towards cryptography. I will probably include the square and multiply algorithm
More informationDiffie-Hellman key-exchange protocol
Diffie-Hellman key-exchange protocol This protocol allows two users to choose a common secret key, for DES or AES, say, while communicating over an insecure channel (with eavesdroppers). The two users
More informationAssignment 2. Due: Monday Oct. 15, :59pm
Introduction To Discrete Math Due: Monday Oct. 15, 2012. 11:59pm Assignment 2 Instructor: Mohamed Omar Math 6a For all problems on assignments, you are allowed to use the textbook, class notes, and other
More informationPublic Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014
7 Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 Cryptography studies techniques for secure communication in the presence of third parties. A typical
More informationDiscrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography
Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography Colin Stirling Informatics Some slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete
More informationThe number theory behind cryptography
The University of Vermont May 16, 2017 What is cryptography? Cryptography is the practice and study of techniques for secure communication in the presence of adverse third parties. What is cryptography?
More informationPrimitive Roots. Chapter Orders and Primitive Roots
Chapter 5 Primitive Roots The name primitive root applies to a number a whose powers can be used to represent a reduced residue system modulo n. Primitive roots are therefore generators in that sense,
More informationLinear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence.
Section 4.4 Linear Congruences Definition: A congruence of the form ax b (mod m), where m is a positive integer, a and b are integers, and x is a variable, is called a linear congruence. The solutions
More informationMathematics Explorers Club Fall 2012 Number Theory and Cryptography
Mathematics Explorers Club Fall 2012 Number Theory and Cryptography Chapter 0: Introduction Number Theory enjoys a very long history in short, number theory is a study of integers. Mathematicians over
More informationCryptography, Number Theory, and RSA
Cryptography, Number Theory, and RSA Joan Boyar, IMADA, University of Southern Denmark November 2015 Outline Symmetric key cryptography Public key cryptography Introduction to number theory RSA Modular
More informationNumber Theory and Public Key Cryptography Kathryn Sommers
Page!1 Math 409H Fall 2016 Texas A&M University Professor: David Larson Introduction Number Theory and Public Key Cryptography Kathryn Sommers Number theory is a very broad and encompassing subject. At
More informationDUBLIN CITY UNIVERSITY
DUBLIN CITY UNIVERSITY SEMESTER ONE EXAMINATIONS 2013 MODULE: (Title & Code) CA642 Cryptography and Number Theory COURSE: M.Sc. in Security and Forensic Computing YEAR: 1 EXAMINERS: (Including Telephone
More informationCalculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.
Midterm #2: practice MATH 311 Intro to Number Theory midterm: Thursday, Oct 20 Please print your name: Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating
More informationCHAPTER 2. Modular Arithmetic
CHAPTER 2 Modular Arithmetic In studying the integers we have seen that is useful to write a = qb + r. Often we can solve problems by considering only the remainder, r. This throws away some of the information,
More informationMA 111, Topic 2: Cryptography
MA 111, Topic 2: Cryptography Our next topic is something called Cryptography, the mathematics of making and breaking Codes! In the most general sense, Cryptography is the mathematical ideas behind changing
More informationClassical Cryptography
Classical Cryptography CS 6750 Lecture 1 September 10, 2009 Riccardo Pucella Goals of Classical Cryptography Alice wants to send message X to Bob Oscar is on the wire, listening to all communications Alice
More informationCryptography CS 555. Topic 20: Other Public Key Encryption Schemes. CS555 Topic 20 1
Cryptography CS 555 Topic 20: Other Public Key Encryption Schemes Topic 20 1 Outline and Readings Outline Quadratic Residue Rabin encryption Goldwasser-Micali Commutative encryption Homomorphic encryption
More information6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method
Exercises Exercises 1. Show that 15 is an inverse of 7 modulo 26. 2. Show that 937 is an inverse of 13 modulo 2436. 3. By inspection (as discussed prior to Example 1), find an inverse of 4 modulo 9. 4.
More informationPublic Key Encryption
Math 210 Jerry L. Kazdan Public Key Encryption The essence of this procedure is that as far as we currently know, it is difficult to factor a number that is the product of two primes each having many,
More informationPublic-key Cryptography: Theory and Practice
Public-key Cryptography Theory and Practice Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Chapter 5: Cryptographic Algorithms Common Encryption Algorithms RSA
More informationSolutions for the Practice Final
Solutions for the Practice Final 1. Ian and Nai play the game of todo, where at each stage one of them flips a coin and then rolls a die. The person who played gets as many points as the number rolled
More informationAlgorithmic Number Theory and Cryptography (CS 303)
Algorithmic Number Theory and Cryptography (CS 303) Modular Arithmetic and the RSA Public Key Cryptosystem Jeremy R. Johnson 1 Introduction Objective: To understand what a public key cryptosystem is and
More informationIntroduction. and Z r1 Z rn. This lecture aims to provide techniques. CRT during the decription process in RSA is explained.
THE CHINESE REMAINDER THEOREM INTRODUCED IN A GENERAL KONTEXT Introduction The rst Chinese problem in indeterminate analysis is encountered in a book written by the Chinese mathematician Sun Tzi. The problem
More informationProblem Set 6 Solutions Math 158, Fall 2016
All exercise numbers from the textbook refer to the second edition. 1. (a) Textbook exercise 3.3 (this shows, as we mentioned in class, that RSA decryption always works when the modulus is a product of
More informationElGamal Public-Key Encryption and Signature
ElGamal Public-Key Encryption and Signature Çetin Kaya Koç koc@cs.ucsb.edu Çetin Kaya Koç http://koclab.org Winter 2017 1 / 10 ElGamal Cryptosystem and Signature Scheme Taher ElGamal, originally from Egypt,
More informationp 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m.
Great Theoretical Ideas In Computer Science Steven Rudich CS - Spring Lecture Feb, Carnegie Mellon University Modular Arithmetic and the RSA Cryptosystem p- p MAX(a,b) + MIN(a,b) = a+b n m means that m
More informationNumber Theory/Cryptography (part 1 of CSC 282)
Number Theory/Cryptography (part 1 of CSC 282) http://www.cs.rochester.edu/~stefanko/teaching/11cs282 1 Schedule The homework is due Sep 8 Graded homework will be available at noon Sep 9, noon. EXAM #1
More informationMath 319 Problem Set #7 Solution 18 April 2002
Math 319 Problem Set #7 Solution 18 April 2002 1. ( 2.4, problem 9) Show that if x 2 1 (mod m) and x / ±1 (mod m) then 1 < (x 1, m) < m and 1 < (x + 1, m) < m. Proof: From x 2 1 (mod m) we get m (x 2 1).
More informationNUMBER THEORY AMIN WITNO
NUMBER THEORY AMIN WITNO.. w w w. w i t n o. c o m Number Theory Outlines and Problem Sets Amin Witno Preface These notes are mere outlines for the course Math 313 given at Philadelphia
More informationSolution: Alice tosses a coin and conveys the result to Bob. Problem: Alice can choose any result.
Example - Coin Toss Coin Toss: Alice and Bob want to toss a coin. Easy to do when they are in the same room. How can they toss a coin over the phone? Mutual Commitments Solution: Alice tosses a coin and
More informationDegree project NUMBER OF PERIODIC POINTS OF CONGRUENTIAL MONOMIAL DYNAMICAL SYSTEMS
Degree project NUMBER OF PERIODIC POINTS OF CONGRUENTIAL MONOMIAL DYNAMICAL SYSTEMS Author: MD.HASIRUL ISLAM NAZIR BASHIR Supervisor: MARCUS NILSSON Date: 2012-06-15 Subject: Mathematics and Modeling Level:
More informationPublic-Key Cryptosystem Based on Composite Degree Residuosity Classes. Paillier Cryptosystem. Harmeet Singh
Public-Key Cryptosystem Based on Composite Degree Residuosity Classes aka Paillier Cryptosystem Harmeet Singh Harmeet Singh Winter 2018 1 / 26 Background s Background Foundation of public-key encryption
More informationThe Chinese Remainder Theorem
The Chinese Remainder Theorem Theorem. Let m and n be two relatively prime positive integers. Let a and b be any two integers. Then the two congruences x a (mod m) x b (mod n) have common solutions. Any
More informationSOLUTIONS TO PROBLEM SET 5. Section 9.1
SOLUTIONS TO PROBLEM SET 5 Section 9.1 Exercise 2. Recall that for (a, m) = 1 we have ord m a divides φ(m). a) We have φ(11) = 10 thus ord 11 3 {1, 2, 5, 10}. We check 3 1 3 (mod 11), 3 2 9 (mod 11), 3
More informationSheet 1: Introduction to prime numbers.
Option A Hand in at least one question from at least three sheets Sheet 1: Introduction to prime numbers. [provisional date for handing in: class 2.] 1. Use Sieve of Eratosthenes to find all prime numbers
More informationDrill Time: Remainders from Long Division
Drill Time: Remainders from Long Division Example (Drill Time: Remainders from Long Division) Get some practice finding remainders. Use your calculator (if you want) then check your answers with a neighbor.
More informationThe Chinese Remainder Theorem
The Chinese Remainder Theorem Theorem. Let n 1,..., n r be r positive integers relatively prime in pairs. (That is, gcd(n i, n j ) = 1 whenever 1 i < j r.) Let a 1,..., a r be any r integers. Then the
More informationSolutions to Problem Set 6 - Fall 2008 Due Tuesday, Oct. 21 at 1:00
18.781 Solutions to Problem Set 6 - Fall 008 Due Tuesday, Oct. 1 at 1:00 1. (Niven.8.7) If p 3 is prime, how many solutions are there to x p 1 1 (mod p)? How many solutions are there to x p 1 (mod p)?
More informationIntroduction to Modular Arithmetic
1 Integers modulo n 1.1 Preliminaries Introduction to Modular Arithmetic Definition 1.1.1 (Equivalence relation). Let R be a relation on the set A. Recall that a relation R is a subset of the cartesian
More informationCryptography. Module in Autumn Term 2016 University of Birmingham. Lecturers: Mark D. Ryan and David Galindo
Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 1 Cryptography Module in Autumn Term 2016 University of Birmingham Lecturers: Mark D. Ryan and David Galindo Slides originally written
More informationFermat s little theorem. RSA.
.. Computing large numbers modulo n (a) In modulo arithmetic, you can always reduce a large number to its remainder a a rem n (mod n). (b) Addition, subtraction, and multiplication preserve congruence:
More informationWilson s Theorem and Fermat s Theorem
Wilson s Theorem and Fermat s Theorem 7-27-2006 Wilson s theorem says that p is prime if and only if (p 1)! = 1 (mod p). Fermat s theorem says that if p is prime and p a, then a p 1 = 1 (mod p). Wilson
More informationDUBLIN CITY UNIVERSITY
DUBLIN CITY UNIVERSITY SEMESTER ONE EXAMINATIONS 2013/2014 MODULE: CA642/A Cryptography and Number Theory PROGRAMME(S): MSSF MCM ECSA ECSAO MSc in Security & Forensic Computing M.Sc. in Computing Study
More informationL29&30 - RSA Cryptography
L29&30 - RSA Cryptography CSci/Math 2112 20&22 July 2015 1 / 13 Notation We write a mod n for the integer b such that 0 b < n and a b (mod n). 2 / 13 Calculating Large Powers Modulo n Example 1 What is
More information1 Introduction to Cryptology
U R a Scientist (CWSF-ESPC 2017) Mathematics and Cryptology Patrick Maidorn and Michael Kozdron (Department of Mathematics & Statistics) 1 Introduction to Cryptology While the phrase making and breaking
More informationExample Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext
Cryptography Codes Lecture 4: The Times Cipher, Factors, Zero Divisors, and Multiplicative Inverses Spring 2014 Morgan Schreffler Office: POT 902 http://www.ms.uky.edu/~mschreffler New Cipher Times Enemy
More informationApplication: Public Key Cryptography. Public Key Cryptography
Application: Public Key Cryptography Suppose I wanted people to send me secret messages by snail mail Method 0. I send a padlock, that only I have the key to, to everyone who might want to send me a message.
More informationCryptography. 2. decoding is extremely difficult (for protection against eavesdroppers);
18.310 lecture notes September 2, 2013 Cryptography Lecturer: Michel Goemans 1 Public Key Cryptosystems In these notes, we will be concerned with constructing secret codes. A sender would like to encrypt
More informationCMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 24 February 2012
CMPSCI 250: Introduction to Computation Lecture #14: The Chinese Remainder Theorem David Mix Barrington 24 February 2012 The Chinese Remainder Theorem Infinitely Many Primes Reviewing Inverses and the
More informationDiscrete Square Root. Çetin Kaya Koç Winter / 11
Discrete Square Root Çetin Kaya Koç koc@cs.ucsb.edu Çetin Kaya Koç http://koclab.cs.ucsb.edu Winter 2017 1 / 11 Discrete Square Root Problem The discrete square root problem is defined as the computation
More informationSolutions for the Practice Questions
Solutions for the Practice Questions Question 1. Find all solutions to the congruence 13x 12 (mod 35). Also, answer the following questions about the solutions to the above congruence. Are there solutions
More informationb) Find all positive integers smaller than 200 which leave remainder 1, 3, 4 upon division by 3, 5, 7 respectively.
Solutions to Exam 1 Problem 1. a) State Fermat s Little Theorem and Euler s Theorem. b) Let m, n be relatively prime positive integers. Prove that m φ(n) + n φ(m) 1 (mod mn). Solution: a) Fermat s Little
More informationB. Substitution Ciphers, continued. 3. Polyalphabetic: Use multiple maps from the plaintext alphabet to the ciphertext alphabet.
B. Substitution Ciphers, continued 3. Polyalphabetic: Use multiple maps from the plaintext alphabet to the ciphertext alphabet. Non-periodic case: Running key substitution ciphers use a known text (in
More informationFinal exam. Question Points Score. Total: 150
MATH 11200/20 Final exam DECEMBER 9, 2016 ALAN CHANG Please present your solutions clearly and in an organized way Answer the questions in the space provided on the question sheets If you run out of room
More informationFoundations of Cryptography
Foundations of Cryptography Ville Junnila viljun@utu.fi Department of Mathematics and Statistics University of Turku 2015 Ville Junnila viljun@utu.fi Lecture 10 1 of 17 The order of a number (mod n) Definition
More informationCollection of rules, techniques and theorems for solving polynomial congruences 11 April 2012 at 22:02
Collection of rules, techniques and theorems for solving polynomial congruences 11 April 2012 at 22:02 Public Polynomial congruences come up constantly, even when one is dealing with much deeper problems
More informationMAT 302: ALGEBRAIC CRYPTOGRAPHY. Department of Mathematical and Computational Sciences University of Toronto, Mississauga.
MAT 302: ALGEBRAIC CRYPTOGRAPHY Department of Mathematical and Computational Sciences University of Toronto, Mississauga February 27, 2013 Mid-term Exam INSTRUCTIONS: The duration of the exam is 100 minutes.
More informationMath 127: Equivalence Relations
Math 127: Equivalence Relations Mary Radcliffe 1 Equivalence Relations Relations can take many forms in mathematics. In these notes, we focus especially on equivalence relations, but there are many other
More informationSolutions to Exam 1. Problem 1. a) State Fermat s Little Theorem and Euler s Theorem. b) Let m, n be relatively prime positive integers.
Solutions to Exam 1 Problem 1. a) State Fermat s Little Theorem and Euler s Theorem. b) Let m, n be relatively rime ositive integers. Prove that m φ(n) + n φ(m) 1 (mod mn). c) Find the remainder of 1 008
More informationNumber Theory - Divisibility Number Theory - Congruences. Number Theory. June 23, Number Theory
- Divisibility - Congruences June 23, 2014 Primes - Divisibility - Congruences Definition A positive integer p is prime if p 2 and its only positive factors are itself and 1. Otherwise, if p 2, then p
More informationExample Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext
Cryptography Codes Lecture 3: The Times Cipher, Factors, Zero Divisors, and Multiplicative Inverses Spring 2015 Morgan Schreffler Office: POT 902 http://www.ms.uky.edu/~mschreffler New Cipher Times Enemy
More informationTMA4155 Cryptography, Intro
Trondheim, December 12, 2006. TMA4155 Cryptography, Intro 2006-12-02 Problem 1 a. We need to find an inverse of 403 modulo (19 1)(31 1) = 540: 540 = 1 403 + 137 = 17 403 50 540 + 50 403 = 67 403 50 540
More informationMA/CSSE 473 Day 9. The algorithm (modified) N 1
MA/CSSE 473 Day 9 Primality Testing Encryption Intro The algorithm (modified) To test N for primality Pick positive integers a 1, a 2,, a k < N at random For each a i, check for a N 1 i 1 (mod N) Use the
More informationCMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 4 October 2013
CMPSCI 250: Introduction to Computation Lecture #14: The Chinese Remainder Theorem David Mix Barrington 4 October 2013 The Chinese Remainder Theorem Infinitely Many Primes Reviewing Inverses and the Inverse
More informationNumber Theory and Security in the Digital Age
Number Theory and Security in the Digital Age Lola Thompson Ross Program July 21, 2010 Lola Thompson (Ross Program) Number Theory and Security in the Digital Age July 21, 2010 1 / 37 Introduction I have
More informationUniversity of British Columbia. Math 312, Midterm, 6th of June 2017
University of British Columbia Math 312, Midterm, 6th of June 2017 Name (please be legible) Signature Student number Duration: 90 minutes INSTRUCTIONS This test has 7 problems for a total of 100 points.
More informationApplications of Fermat s Little Theorem and Congruences
Applications of Fermat s Little Theorem and Congruences Definition: Let m be a positive integer. Then integers a and b are congruent modulo m, denoted by a b mod m, if m (a b). Example: 3 1 mod 2, 6 4
More informationUNIVERSITY OF MANITOBA DATE: December 7, FINAL EXAMINATION TITLE PAGE TIME: 3 hours EXAMINER: M. Davidson
TITLE PAGE FAMILY NAME: (Print in ink) GIVEN NAME(S): (Print in ink) STUDENT NUMBER: SEAT NUMBER: SIGNATURE: (in ink) (I understand that cheating is a serious offense) INSTRUCTIONS TO STUDENTS: This is
More informationIntroduction to Cryptography CS 355
Introduction to Cryptography CS 355 Lecture 25 Mental Poker And Semantic Security CS 355 Fall 2005 / Lecture 25 1 Lecture Outline Review of number theory The Mental Poker Protocol Semantic security Semantic
More informationRSA hybrid encryption schemes
RSA hybrid encryption schemes Louis Granboulan École Normale Supérieure Louis.Granboulan@ens.fr Abstract. This document compares the two published RSA-based hybrid encryption schemes having linear reduction
More informationCalculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.
Midterm #: practice MATH Intro to Number Theory midterm: Thursday, Nov 7 Please print your name: Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating
More informationCMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall
CMath 55 PROFESSOR KENNETH A. RIBET Final Examination May 11, 015 11:30AM :30PM, 100 Lewis Hall Please put away all books, calculators, cell phones and other devices. You may consult a single two-sided
More informationOverview. The Big Picture... CSC 580 Cryptography and Computer Security. January 25, Math Basics for Cryptography
CSC 580 Cryptography and Computer Security Math Basics for Cryptography January 25, 2018 Overview Today: Math basics (Sections 2.1-2.3) To do before Tuesday: Complete HW1 problems Read Sections 3.1, 3.2
More informationThe congruence relation has many similarities to equality. The following theorem says that congruence, like equality, is an equivalence relation.
Congruences A congruence is a statement about divisibility. It is a notation that simplifies reasoning about divisibility. It suggests proofs by its analogy to equations. Congruences are familiar to us
More informationON THE EQUATION a x x (mod b) Jam Germain
ON THE EQUATION a (mod b) Jam Germain Abstract. Recently Jimenez and Yebra [3] constructed, for any given a and b, solutions to the title equation. Moreover they showed how these can be lifted to higher
More informationXor. Isomorphisms. CS70: Lecture 9. Outline. Is public key crypto possible? Cryptography... Public key crypography.
CS70: Lecture 9. Outline. 1. Public Key Cryptography 2. RSA system 2.1 Efficiency: Repeated Squaring. 2.2 Correctness: Fermat s Theorem. 2.3 Construction. 3. Warnings. Cryptography... m = D(E(m,s),s) Alice
More informationNumber Theory. Konkreetne Matemaatika
ITT9131 Number Theory Konkreetne Matemaatika Chapter Four Divisibility Primes Prime examples Factorial Factors Relative primality `MOD': the Congruence Relation Independent Residues Additional Applications
More informationMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005
MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005 Deartment of Mathematical and Statistical Sciences University of Alberta Question 1. Find integers
More informationMath 1111 Math Exam Study Guide
Math 1111 Math Exam Study Guide The math exam will cover the mathematical concepts and techniques we ve explored this semester. The exam will not involve any codebreaking, although some questions on the
More informationRSA hybrid encryption schemes
RSA hybrid encryption schemes Louis Granboulan École Normale Supérieure Louis.Granboulan@ens.fr Abstract. This document compares the two published RSA-based hybrid encryption schemes having linear reduction
More informationAlgorithmic Number Theory and Cryptography (CS 303)
Algorithmic Number Theory and Cryptography (CS 303) Modular Arithmetic Jeremy R. Johnson 1 Introduction Objective: To become familiar with modular arithmetic and some key algorithmic constructions that
More informationSymmetric-key encryption scheme based on the strong generating sets of permutation groups
Symmetric-key encryption scheme based on the strong generating sets of permutation groups Ara Alexanyan Faculty of Informatics and Applied Mathematics Yerevan State University Yerevan, Armenia Hakob Aslanyan
More informationMAT Modular arithmetic and number theory. Modular arithmetic
Modular arithmetic 1 Modular arithmetic may seem like a new and strange concept at first The aim of these notes is to describe it in several different ways, in the hope that you will find at least one
More informationDistribution of Primes
Distribution of Primes Definition. For positive real numbers x, let π(x) be the number of prime numbers less than or equal to x. For example, π(1) = 0, π(10) = 4 and π(100) = 25. To use some ciphers, we
More informationCS70: Lecture 8. Outline.
CS70: Lecture 8. Outline. 1. Finish Up Extended Euclid. 2. Cryptography 3. Public Key Cryptography 4. RSA system 4.1 Efficiency: Repeated Squaring. 4.2 Correctness: Fermat s Theorem. 4.3 Construction.
More informationConstructions of Coverings of the Integers: Exploring an Erdős Problem
Constructions of Coverings of the Integers: Exploring an Erdős Problem Kelly Bickel, Michael Firrisa, Juan Ortiz, and Kristen Pueschel August 20, 2008 Abstract In this paper, we study necessary conditions
More informationDiscrete Math Class 4 ( )
Discrete Math 37110 - Class 4 (2016-10-06) 41 Division vs congruences Instructor: László Babai Notes taken by Jacob Burroughs Revised by instructor DO 41 If m ab and gcd(a, m) = 1, then m b DO 42 If gcd(a,
More informationLECTURE 3: CONGRUENCES. 1. Basic properties of congruences We begin by introducing some definitions and elementary properties.
LECTURE 3: CONGRUENCES 1. Basic properties of congruences We begin by introducing some definitions and elementary properties. Definition 1.1. Suppose that a, b Z and m N. We say that a is congruent to
More informationSuccessful Implementation of the Hill and Magic Square Ciphers: A New Direction
Successful Implementation of the Hill and Magic Square Ciphers: A New Direction ISSN:319-7900 Tomba I. : Dept. of Mathematics, Manipur University, Imphal, Manipur (INDIA) Shibiraj N, : Research Scholar
More informationMath 412: Number Theory Lecture 6: congruence system and
Math 412: Number Theory Lecture 6: congruence system and classes Gexin Yu gyu@wm.edu College of William and Mary Chinese Remainder Theorem Chinese Remainder Theorem: let m 1, m 2,..., m k be pairwise coprimes.
More informationModular Arithmetic. claserken. July 2016
Modular Arithmetic claserken July 2016 Contents 1 Introduction 2 2 Modular Arithmetic 2 2.1 Modular Arithmetic Terminology.................. 2 2.2 Properties of Modular Arithmetic.................. 2 2.3
More informationIntroduction to Cryptography
Introduction to Cryptography Brian Veitch July 2, 2013 Contents 1 Introduction 3 1.1 Alice, Bob, and Eve........................... 3 1.2 Basic Terminology........................... 4 1.3 Brief History
More informationRelated Ideas: DHM Key Mechanics
Related Ideas: DHM Key Mechanics Example (DHM Key Mechanics) Two parties, Alice and Bob, calculate a key that a third person Carl will never know, even if Carl intercepts all communication between Alice
More informationBlock Ciphers Security of block ciphers. Symmetric Ciphers
Lecturers: Mark D. Ryan and David Galindo. Cryptography 2016. Slide: 26 Assume encryption and decryption use the same key. Will discuss how to distribute key to all parties later Symmetric ciphers unusable
More informationYale University Department of Computer Science
LUX ETVERITAS Yale University Department of Computer Science Secret Bit Transmission Using a Random Deal of Cards Michael J. Fischer Michael S. Paterson Charles Rackoff YALEU/DCS/TR-792 May 1990 This work
More informationDTTF/NB479: Dszquphsbqiz Day 30
DTTF/NB479: Dszquphsbqiz Day 30 Announcements: Questions? This week: Digital signatures, DSA Coin flipping over the phone RSA Signatures allow you to recover the message from the signature; ElGamal signatures
More informationExam 1 7 = = 49 2 ( ) = = 7 ( ) =
Exam 1 Problem 1. a) Define gcd(a, b). Using Euclid s algorithm comute gcd(889, 168). Then find x, y Z such that gcd(889, 168) = x 889 + y 168 (check your answer!). b) Let a be an integer. Prove that gcd(3a
More information