Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017

Similar documents
Data security (Cryptography) exercise book

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014

The number theory behind cryptography

Assignment 2. Due: Monday Oct. 15, :59pm

ElGamal Public-Key Encryption and Signature

Applications of Fermat s Little Theorem and Congruences

Lecture 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.

EE 418: Network Security and Cryptography

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

University of British Columbia. Math 312, Midterm, 6th of June 2017

Public Key Encryption

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Diffie-Hellman key-exchange protocol

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence.

MAT 302: ALGEBRAIC CRYPTOGRAPHY. Department of Mathematical and Computational Sciences University of Toronto, Mississauga.

6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method

b) Find all positive integers smaller than 200 which leave remainder 1, 3, 4 upon division by 3, 5, 7 respectively.

Number Theory/Cryptography (part 1 of CSC 282)

Solutions for the Practice Questions

Primitive Roots. Chapter Orders and Primitive Roots

1.6 Congruence Modulo m

Carmen s Core Concepts (Math 135)

CHAPTER 2. Modular Arithmetic

NUMBER THEORY AMIN WITNO

Cryptography. 2. decoding is extremely difficult (for protection against eavesdroppers);

SOLUTIONS FOR PROBLEM SET 4

Solutions to Problem Set 6 - Fall 2008 Due Tuesday, Oct. 21 at 1:00

Solutions for the Practice Final

Modular arithmetic Math 2320

The congruence relation has many similarities to equality. The following theorem says that congruence, like equality, is an equivalence relation.

An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g.,

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

Number Theory and Public Key Cryptography Kathryn Sommers

Collection of rules, techniques and theorems for solving polynomial congruences 11 April 2012 at 22:02

Cryptography CS 555. Topic 20: Other Public Key Encryption Schemes. CS555 Topic 20 1

Foundations of Cryptography

Sheet 1: Introduction to prime numbers.

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

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.

L29&30 - RSA Cryptography

MAT Modular arithmetic and number theory. Modular arithmetic

Classical Cryptography

Final exam. Question Points Score. Total: 150

LECTURE 3: CONGRUENCES. 1. Basic properties of congruences We begin by introducing some definitions and elementary properties.

Public-key Cryptography: Theory and Practice

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

SOLUTIONS TO PROBLEM SET 5. Section 9.1

Modular Arithmetic. claserken. July 2016

Math 1111 Math Exam Study Guide

MA/CSSE 473 Day 9. The algorithm (modified) N 1

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

Number Theory - Divisibility Number Theory - Congruences. Number Theory. June 23, Number Theory

The Chinese Remainder Theorem

Congruence. Solving linear congruences. A linear congruence is an expression in the form. ax b (modm)

TMA4155 Cryptography, Intro

Math 255 Spring 2017 Solving x 2 a (mod n)

DUBLIN CITY UNIVERSITY

Exam 1 7 = = 49 2 ( ) = = 7 ( ) =

CMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall

Distribution of Primes

ALGEBRA: Chapter I: QUESTION BANK

1 Introduction to Cryptology

The Chinese Remainder Theorem

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 4 October 2013

Math 319 Problem Set #7 Solution 18 April 2002

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 24 February 2012

Cryptography, Number Theory, and RSA

Power = 36² mod 99 Power = 9 5 a 5 = 0 x = 81 Power = 9² mod 99 Power = 81 6 a 6 = 1 x = 81 x 81 mod 99 x = 27 7 a 7 = 1 x = 27 x 27 mod 99 x = 36

MA 111, Topic 2: Cryptography

Discrete Math Class 4 ( )

Related Ideas: DHM Key Mechanics

Introduction. and Z r1 Z rn. This lecture aims to provide techniques. CRT during the decription process in RSA is explained.

Problem Set 6 Solutions Math 158, Fall 2016

DUBLIN CITY UNIVERSITY

UNIVERSITY OF MANITOBA DATE: December 7, FINAL EXAMINATION TITLE PAGE TIME: 3 hours EXAMINER: M. Davidson

PT. Primarity Tests Given an natural number n, we want to determine if n is a prime number.

Math 1111 Math Exam Study Guide

Rational Points On Elliptic Curves - Solutions. (i) Throughout, we ve been looking at elliptic curves in the general form. y 2 = x 3 + Ax + B

Application: Public Key Cryptography. Public Key Cryptography

EE 418 Network Security and Cryptography Lecture #3

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = =

Discrete Mathematics and Probability Theory Spring 2018 Ayazifar and Rao Midterm 2 Solutions

Fermat s little theorem. RSA.

MATH 13150: Freshman Seminar Unit 15

MATH 135 Algebra, Solutions to Assignment 7

SESAME Modular Arithmetic. MurphyKate Montee. March 2018 IN,Z, We think numbers should satisfy certain rules, which we call axioms:

Math 412: Number Theory Lecture 6: congruence system and

Practice Midterm 2 Solutions

Discrete Square Root. Çetin Kaya Koç Winter / 11

Algorithmic Number Theory and Cryptography (CS 303)

Cryptography Lecture 1: Remainders and Modular Arithmetic Spring 2014 Morgan Schreffler Office: POT 902

Cryptography. Module in Autumn Term 2016 University of Birmingham. Lecturers: Mark D. Ryan and David Galindo

Numbers (8A) Young Won Lim 5/22/17

Symmetric-key encryption scheme based on the strong generating sets of permutation groups

The Four Numbers Game

Introduction to Modular Arithmetic

Numbers (8A) Young Won Lim 6/21/17

A REMARK ON A PAPER OF LUCA AND WALSH 1. Zhao-Jun Li Department of Mathematics, Anhui Normal University, Wuhu, China. Min Tang 2.

Numbers (8A) Young Won Lim 5/24/17

Degree project NUMBER OF PERIODIC POINTS OF CONGRUENTIAL MONOMIAL DYNAMICAL SYSTEMS

Transcription:

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 or other electronic devices are allowed. (You won t need them.) When a box is provided, please put your answer in the box. Show all your work. Partial credit will be given for substantial progress towards the solution. No credit will be given for answers with no explanation. Problem Value Points 1 20 2 15 3 20 4 20 5 15 Total 90

Math 1580 Solutions for First Hour Exam Page 1 Problem 1. (20 points) (a) Let a, b, c, d, m be integers with m 1, and suppose that Prove that a b (mod m) and c d ac bd (b) Let a and b be integers with gcd(a, b) = 14, and suppose that you are told that 2 a 1 (mod m), and 2 b 1 What are all of the possible values for 2 14 (mod m)? Be sure to explain your answer. 2 14 Solution. (a) By definition of congruence we know that a = b + mi and c = d + mj for some integers i and j. Then ac = (b + mi)(d + mj) = bd + mid + mjb + m 2 ij = bd + m(id + jb + mij). Thus ac bd is a multiple of m, so by definition of congruence, ac bd (b) We know that we can find integers u and v so that au + bv = gcd(a, b) = 14. Then we can compute 2 14 2 au+bv (2 a ) u (2 b ) v ( 1) u ( 1) v ( 1) u+v So we get 2 14 1 (mod m) if u + v is even, and we get 2 14 1 (mod m) if u + v is odd, so 2 14 ±1 However, since 14 = gcd(a, b), we know that 14 a, say a = 14k. Hence if 2 14 1 (mod m), then 1 2 a = (2 14 ) k 1 k 1 This shows that we cannot have 2 14 1 (mod m), and thus the only possible value is 2 14 1 (mod m). Problem 2. (15 points) (a) State the Discrete Logarithm Problem for F p. (b) State the Diffie-Hellman Problem for F p. (c) What is the definition of a One-Way Trapdoor Function.

Math 1580 Solutions for First Hour Exam Page 2 Solution. (a) Given the values of g and h, the Discrete Logarithm Problem asks for the value of x that solves the equation g x = h in F p. Equivalently, given the values of g and g a, find the value of a. (b) Given the values of g, g a, and g b in F p, the Diffie-Hellman Problem asks for the value g ab mod p. (c) A One-Way Trapdoor Function is a one-to-one function f with three properties: (1) f is easy to compute. (2) f 1 is hard to compute. (3) If one knows an extra piece of information, then f 1 is easy to compute. Problem 3. (20 points) (a) The following table gives names to various powers of a modulo m. What is the value of a 646 modulo m? Write your answer in terms of A, B, C,..., J. a A (mod m) a 25 F (mod m) a 2 B (mod m) a 26 G (mod m) a 22 C (mod m) a 27 H (mod m) a 23 D (mod m) a 28 I (mod m) a 24 E (mod m) a 29 J (mod m) a 646 (b) Here are some values of powers of b modulo 101. b 2 6 (mod 101), b 16 87 (mod 101), b 58 17 (mod 101). Using these values, compute the value of b 10000004 modulo 101. You may use the fact that 101 is prime. Explain how you arrived at your answer. b 10000004 (mod 101). (Hint. You should be able to do part (b) of this problem very quickly.) Solution. (a) The binary expansion of 646 is Hence 646 = 512 + 128 + 4 + 2 a 646 = a 512 a 128 a 4 a 2 = a a9 a 27 a 22 a 21 = J H C B

Math 1580 Solutions for First Hour Exam Page 3 (b) Since p = 101 is prime, Fermat s Little Theorem says that b 100 1 (mod 101). (This is true unless 101 divides b, but we can t have 101 b, since then b 2 would be 0 modulo 101, and we re told that it s 6.) So raising both sides of the congruence to the 100000 th power gives b 100 1 (mod 101) b 10000000 1 (mod 101). Finally, multiplying this last congruence by b 4 and using the given value of b 2, we find that b 10000004 b 10000000 b 4 1 b 4 (b 2 ) 2 6 2 36 (mod 101). Problem 4. (20 points) Bob and Alice agree to use the prime p and the number g modulo p. (a) Bob and Alice decide to exchange a key using Diffie-Hellman Key Exchange. Bob chooses the secret value b. He receives the value A from Alice. What value should Bob send to Alice? Bob sends Alice the number What should Bob compute to get the secret shared value that he and Alice both know? Bob computes the value (b) Bob and Alice decide to communicate using ElGamal Public Key Encryption. Alice s public key is the number A. Bob wants to send Alice the plaintext m. What is the ciphertext that Bob sends to Alice? Bob sends Alice the ciphertext Alice receives a ciphertext from Bob. Her secret exponent is a. What does Alice compute to recover Bob s plaintext? Alice computes

Math 1580 Solutions for First Hour Exam Page 4 Solution. (a) Bob sends Alice the value g b (mod p). Bob and Alice s shared secret value is A b (mod p). (b) Bob sends Alice the pair of values c 1 g k (mod p) and c 2 ma k (mod p), where k is a number that Bob chooses randomly. Alice computes (c 1 1 ) a c 2 (mod p) to recover Bob s plaintext m. Problem 5. (15 points) Use Shank s Babystep-Giantstep Algorithm to solve the Discrete Logarithm Problem g x h (mod p) with p = 3571, g = 79, and h = 2421. Here is some information that you can use. g N 1 (mod p) with N = 714, so we set The number g satisfies n = N + 1 = 27 and compute b g n 1642 (mod p). And here is a table with values of g k mod p and h b k mod p. k g k h b k k g k h b k 1 79 759 9 2772 2209 2 2670 3570 10 1157 2613 3 241 1929 11 2128 1775 4 1184 3512 12 275 614 5 690 3110 13 299 1166 6 945 90 14 2195 516 7 3235 1369 15 1997 945 8 2024 1739 16 639 1876 Using this information, find a value of x that solves (Be sure to show your work.) 79 x 2421 (mod 3571). x =. Solution. Looking at the table, we find that 945 appears in both the g k column and the h b k column. More precisely, we have g 6 945 (mod p) and h b 15 945 (mod p), and thus g 6 h b 15 (mod p). Since b g n g 27 (mod p),

Math 1580 Solutions for First Hour Exam Page 5 this gives g 6 h g 27 15 h g 405 (mod p). Multiplying both sides by g 405 gives g 411 h (mod p), so x = 411.