1: Please compute the Jacobi symbol ( 99

Size: px
Start display at page:

Download "1: Please compute the Jacobi symbol ( 99"

Transcription

1 SCORE/xx: Math 470 Communications Cryptography NAME: PRACTICE FINAL Please show your work write only in pen. Notes are forbidden. Calculators, all other electronic devices, are forbidden. Brains are encouraged, but at most one (your own!) may be used per exam. 1: Please compute the Jacobi symbol ( ). The key trick to remember with Jacobi symbols is to repeatedly factor out 2-parts flip (via quadratic reciprocity) until the numbers get small enough to be trivial. Following the Theorem from Page 91 of our book (which will be reproduced for you on a cheat sheet), we proceed as follows: ( ) ( ) = (By Assertion (5), since 99=1003=3 mod 4.) ( ) 13 = (By Assertion (1), since 1003 = ) 99 ( ) 99 = (By Assertion (5), since 13=1 mod 4.) 13 ( ) 8 = (By Assertion (1), since 99= mod 13.) 13 ( ) 2 = (Since 8=2 2 2 has a square root mod 13 if only if 13 2 has a square root mod 13.) = ( 1) (By Assertion (4), since 13=5 mod 8.) 2 So the answer is 1. mod n. Instructor: J. Maurice Rojas 1 My edition of our book appears to have a typo in Assertion (4): the congruence should be mod 8, not

2 2: Suppose (p,α,β) = (43933,2,3) is the public part of an instance of the El Gamal digital signature scheme, you would like to break this instance, i.e., you would like to find the unique a {2,...,43931} such that α a =β, so you can start forging signatures on messages. (a): Please find a mod 3. (b): Please find a mod 7. (c): Suppose a friend tells you that a mod 2092 is 186. Find a. The Pohlig-Hellman Method (covered in class) tells us that, for small q, we can efficiently recover the last base-q digit, a 0, of a. This boils down to computing α 0 :=α p 1 q β 0 :=β p 1 q, then a (small) brute-force search find which a0 {0,...,q 1} satisfies α a 0 0 β 0 mod p. It will thus behoove us to find the binary expansions of : they are respectively = = The squares mod needed to get us started are then the following: 2 2 = 4, 2 22 = 16, 2 23 = 256, 2 24 = 21603, 2 25 = 33283, 2 26 = 31427, 2 27 = 42489, 2 28 =20285, 2 29 =4747, =40313, =12366, =31116, = = 9, 3 22 = 81, 3 23 = 6561, 3 24 = 36314, 3 25 = 13668, 3 26 = 11108, 3 27 = 23800, 3 28 =11831, 3 29 =2023, =6760, =7280, =15202, = Part (a): Using our preliminary computations, we obtain α 0 = = =34108 mod β 0 = = =34108 mod So then, it is clear straightaway that α 1 0=β 0 thus a mod 3 is exactly 1. Part (b): Similar to Part (a), we obtain that α 0 = = = =15760 mod β 0 = = = =24351 mod So now we start our brute-force search: α 2 0 = mod 43933, so we need not go any further. a mod 7 is thus clearly 2. Part (c): One could proceed directly from a 3 modulus version of the Chinese Remainder Theorem (CRT). However, it is easier here to simply find a mod 21 then use the simpler version of the CRT we saw in class. In particular, enumerating elements of the arithmetic progression 7j+2 we obtain {9,16,23,...} it is then clear that 16 1 mod 3. So a 16 mod 21. Since =43932 a {0,...,43931}, it is then clear that the CRT applied to the moduli will gives us a. A simple Extended Euclidean Algorithm calculation gives us ( 8) 2092=1. In other words, a mod should be ( 8) = mod So a = Note: The numbers you d encounter in an actual final would be a lot smaller. : )

3 3: Please review your midterm (particularly correcting any errors you may have made) your earlier homeworks quizzes.

4 4:ConsiderF 343 realizedasf 7 [t]/ t 3 +t+1. Pleaseexpress 1 t, 1 t+1, 1 t 2 aspolynomials in t of degree no more than 2. This problem was done in class. However, for the sake of checking answers, here is what Maple says: 1 t = 6t2 +6 (or t 2 1) 1 t+1 = t2 +6t+2 (or t 2 t+2) 1 t = 2 t2 +6t+1 (or t 2 t+1) Do please remember that while one can try to be clever with various algebraic identities, the safest fall-back to compute such inverses is the good old Extended Euclidean Algorithm.

5 5: Find the sum of the points (1,5) (9,3) on the elliptic curve C defined by y 2 =x 3 +2x+3 over F 19. Applying the elliptic curve addition law specifically to our curve C, we obtain that the group sum of (x 1,y 1 ) (x 2,y 2 ) is (x 3,y 3 ) where x 3 :=m 2 x 1 x 2, y 3 :=m(x 1 x 3 ) y 1, m is 3x y 1 or y 2 y 1 x 2 x 1, according as (x 1,y 1 )=(x 2,y 2 ) or not. (One should of course also remember that (x 3,y 3 ) is the point at infinity, in the event of an infinite slope.) So for the points at h, we simply get m= 3 5= = 1 = 5=14 mod 19 4 thus x 3 = =( 5) 2 1 9=25 1 9=15 mod 19 y 3 =14(1 15) 5= 5( 14) 5= 5 5 5= 30=8 mod 19. So our answer is (15,8).

6 6: Suppose A is a 3 digit integer of the form 21a where a is unknown. Please find a value for a such that there is a point on the elliptic curve defined by y 2 =x 3 +7x+15 (over F 593 ) with x-coordinate A. Note: This kind of calculation, over much larger fields, is basic in converting plain-text to points on elliptic curves over finite fields. This question is merely a Jacobi symbol question in disguise. In particular, once one tabulates the values of x 3 +7x+15 mod 593 as x ranges over {210+0,210+1,...,210+9}, it is clear that there is a y F 593 with (x,y) lying on our curve if only if x 3 +7x+15 has a square root mod 593. So after some work, our first table is as follows: x x 3 +7x+15 mod So after some work, our first table So now we merely compute Jacobi symbols. The resulting table is then the following: x ( x 3 +7x ) So we see that any a {5, 6, 8} would work

7 7: The Kraitchik-Lehmer Theorem gives a quick way to certify that an integer N is prime: exhibit a (k +1)-tuple of integers (a;p 1,...,p k ) such that (1) a N 1 1 mod N, (2) p 1,...,p k are all the prime divisors of N 1, (3) a (N 1)/pi 1 mod N for all p i. Verifying properties (1) (3) is then doable in time polynomial in log N. Note: The Kraitchik-Lehmer Theorem is recursive in the sense that the primality of each p i (if not obvious) must be certified by it s own k i -tuple, involving smaller primes which may also have to be certified by their own certificates, so on. Verify that the primality of 5521 is certified by the 5-tuple (11;2,3,5,23). In other words, do all the necessary computations implied by the Kraitchik-Lehmer Theorem. Verifying Property (1) is simple: a direct computation, employing the binary expansion of 5520 as recursive squaring, gives us that =1 mod (Note in particular that one must compute 11 2, =(11 2 ) 2, = ( ) 2,..., = ( ) 2 mod 5521 along the way.) Verifying Property (2) is also easy, taking appropriate care with what is meant. In particular, we are merely given that 2, 3, 5, 23 are the prime divisors of =5520, but we don t know their corresponding powers in the factorization of (Note that we should also check that 2, 3, 5, 23 are prime, but these numbers are small enough to be known primes. In the case of a certificate involving larger primes, we would have needed certificates for the subsidiary p i.) Figuring out the powers of 2, 3, 5, 23 dividing 5520 exactly is easy. First, 5520 is even, so Squaring to obtain higher powers of 2, we also see that , , but So we also easily see that So the 2-part of 5520 is 2 4, we can proceed with 5520= The 3-part of 345 is easier to obtain: we immediately see that but So the 3-part of 345 is just 3 we can proceed with 345 = 115. The 5-part 3 of 115 is just 5 then we are left with 115 =23. So = , we have thus verified Property (2). To verify Property (3) we merely compute /2, /3, /5, /23 mod 5521 via recursive squaring. In particular, the respective values are 5520, 5180, 1374, 485, none of which is 1. So we are done. Note: Clearly, this seems like an awful lot of effort to prove that 5521 is prime. However, for much larger numbers (e.g., with hundreds of digits beyond), the certificates from the Kraitchik-Lehmer Theorem are much easier to verify than running any factorization algorithm. Also, the historical importance is that Pratt was able to prove around 1975 that the Kraitchik-Lehmer Theorem implies that primality detection lies in NP.

8 8: In class, you ve learned that computing square roots mod N appears to be computationally difficult. In particular, one can factor large integers in probabilistic polynomial-time if computing square roots mod N is doable in polynomial-time. Given that N := , the following (shortened) list of square roots mod , show how to factor N. x x {±1,±661670,} {±2,± } {±3,± } {±4,± } {±5,±663663} {±6,±1993} You may recall from class that some classical factoring algorithms are based on computing gcd(n,x 2 y 2 ) for rom x y. The list above helps you avoid the work of making lots of rom choices. In particular, observing that x 2 y 2 =(x y)(x+y), observing that 36 has the smallest square roots in the list above, it appears that picking x = 1993 y = 6 may be promising. Indeed, since x 2 = y 2 mod N, we must have that N divides (x y)(x + y) = Since 0 < < = 4,000,000, we must then have that N= (One could also just multiply out but it saves time to use the preceding inequalities.) Checking divisibility by the primes no greater than 1999 =44, we then see that are prime we have found the complete factorization of N.

9 9: We ve discussed O-bounds for the complexity of some basic arithmetic operations but one can be more precise: Via a 2008 paper of D. J. Bernstein ( Fast multiplication its applications, downloadable from one can derive the following more explicit complexity upper bounds: Bound #1. Multiplying two integers, each with at most n digits, takes no more than 10n lg(n) lg(lg(n)) bit operations. Bound #2. Division with remainder, applied to two integers having no more than n digits each, takes no more than 17n lg(n) lg(lg(n)) bit operations. Bound #3. The Jacobi symbol ( a N), assuming a N have no more than n digits, can be computed within 20n 2 bit operations. When N is prime a is an integer relatively prime to N, one can then easily prove that a is a square if only if a (N 1)/2 1 mod N. So you can prove that a given N is composite (without factoring) by exhibiting an a that is a non-square mod N with a (N 1)/2 1 mod N. The Solovay-Strassen Theorem, combined with the Jacobi symbol ( a N), gives a fast romized compositeness test based on these ideas: when N is odd composite, at least half of the a (Z/nZ) satisfy ( a N) a (N 1)/2 mod N. Please estimate the number of bit operations you need to prove that is composite (if it really is composite) with probability at least Let N denote the large number stated above. As discussed in class, the Solovay-Strassen Theorem implies that we can pick 10 rom a in (Z/NZ) check the values of ( a N) a (N 1)/2 mod N to verify compositeness. So then, if N really is composite, the probability that we keep finding ( ) a N =a (N 1)/2 mod N is at most 1. Put another way, with probability at least 1023, we will actually ( find a certificate for the compositeness of N: an a (Z/NZ) with a ) a (N 1)/2 mod N. N So now we merely need to estimate the number of bit operations to compute ( a N a (N 1)/2 mod N, for a potentially having as many digits as N, ten times. Let lg(x) denote the base-2 log of x recall that lg(10)< At this point, we need to make 3 hypotheses clear. Note: On an actual complexity question on the final, I would certainly make these hypotheses clearly known on a cheat sheet. We now start counting bit operations. Counting digits, we see that our stated N above (along with (N 1)/2) has exactly 69 digits. So by Hypothesis 2, each computation of ( a N) will take no more than = bit operations. Counting bit operations for computing a (N 1)/2 is only slightly more involved. First, there is the computation of the binary expansion of (N 1)/2: this can be accomplished simply by converting digits, from low order to high order, successively adding bits in groups of 4. (This is because 0-9 involve at most 4 bits.) So converting (N 1)/2 takes no more than (4+5) 69=621 bit operations. (4 bit operations for the conversion of a digit to binary, +5 to add each new binary number to the current bit string.) One then needs to compute a 2, a 4 = (a 2 ) 2, a 8 = (a 4 ) 2,..., a 2229 mod N. This is because N has no more than 69 lg(10) =230 bits as a binary number. (The true number of bits is in fact 229 so we re not too far off!) Thanks to Hypothesis 1, each squaring mod N takes no more than (10+17) 69lg(69)lg(lg(69))< < bit operations. So we need no more than = bit operations to compute our dyadic powers of a mod N. To at last compute a (N 1)/2 )

10 mod N, we then observe that there are no more than 230 1s in the binary expansion of (N 1)/2. (There are actually 99.) So we need no more than 229 additional multiplications mod N to at last compute a (N 1)/2 mod N. This means no worse than an additional lg(69)lg(lg(69))< bit operations. In summary, computing a (N 1)/2 mod N takes no more than = bit operations. To conclude, our total bit operation count is thus no worse than 10( ) = 137, 079, 830. On most modern microprocessors, this means less than 0.1 seconds. However, this does not take into account cache usage, which makes the true time spent depend strongly on the underlying software implementation ( the skill diligence of the programmer). Indeed, if one is truly serious about understing the practical complexity of large integer calculations, one must also take into account the usage of memory.

MATH 25 CLASS 21 NOTES, NOV Contents. 2. Subgroups 2 3. Isomorphisms 4

MATH 25 CLASS 21 NOTES, NOV Contents. 2. Subgroups 2 3. Isomorphisms 4 MATH 25 CLASS 21 NOTES, NOV 7 2011 Contents 1. Groups: definition 1 2. Subgroups 2 3. Isomorphisms 4 1. Groups: definition Even though we have been learning number theory without using any other parts

More information

Cryptography CS 555. Topic 18: RSA Implementation and Security. CS555 Topic 18 1

Cryptography CS 555. Topic 18: RSA Implementation and Security. CS555 Topic 18 1 Cryptography CS 555 Topic 18: RSA Implementation and Security Topic 18 1 Outline and Readings Outline RSA implementation issues Factoring large numbers Knowing (e,d) enables factoring Prime testing Readings:

More information

Continuing discussion of CRC s, especially looking at two-bit errors

Continuing discussion of CRC s, especially looking at two-bit errors Continuing discussion of CRC s, especially looking at two-bit errors The definition of primitive binary polynomials Brute force checking for primitivity A theorem giving a better test for primitivity Fast

More information

Factorization & Primality Testing

Factorization & Primality Testing Factorization & Primality Testing C etin Kaya Koc http://cs.ucsb.edu/~koc koc@cs.ucsb.edu Koc (http://cs.ucsb.edu/~ koc) ucsb ccs 130h explore crypto fall 2014 1/1 Primes Natural (counting) numbers: N

More information

Math/Mthe 418/818. Review Questions

Math/Mthe 418/818. Review Questions Math/Mthe 418/818 Review Questions 1. Show that the number N of bit operations required to compute the product mn of two integers m, n > 1 satisfies N = O(log(m) log(n)). 2. Can φ(n) be computed in polynomial

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

IRREDUCIBILITY TESTS IN F p [T ]

IRREDUCIBILITY TESTS IN F p [T ] IRREDUCIBILITY TESTS IN F p [T ] KEITH CONRAD 1. Introduction Let F p = Z/(p) be a field of prime order. We will discuss a few methods of checking if a polynomial f(t ) F p [T ] is irreducible that are

More information

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2:

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: 03 17 08 3 All about lines 3.1 The Rectangular Coordinate System Know how to plot points in the rectangular coordinate system. Know the

More information

THE SOLOVAY STRASSEN TEST

THE SOLOVAY STRASSEN TEST THE SOLOVAY STRASSEN TEST KEITH CONRAD 1. Introduction The Jacobi symbol satisfies many formulas that the Legendre symbol does, such as these: for a, b Z and odd m, n Z +, (1) a b mod n ( a n ) = ( b n

More information

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer? Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative

More information

SQUARE PATTERNS AND INFINITUDE OF PRIMES

SQUARE PATTERNS AND INFINITUDE OF PRIMES SQUARE PATTERNS AND INFINITUDE OF PRIMES KEITH CONRAD 1. Introduction Numerical data suggest the following patterns for prime numbers p: 1 mod p p = 2 or p 1 mod 4, 2 mod p p = 2 or p 1, 7 mod 8, 2 mod

More information

A Few Primality Testing Algorithms

A Few Primality Testing Algorithms A Few Primality Testing Algorithms Donald Brower April 2, 2006 0.1 Introduction These notes will cover a few primality testing algorithms. There are many such, some prove that a number is prime, others

More information

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. 2 Arithmetic This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. (See [Houston, Chapters 27 & 28]) 2.1 Greatest common divisors Definition 2.16. If a, b are integers, we say

More information

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic 11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic Bezout s Lemma Let's look at the values of 4x + 6y when x and y are integers. If x is -6 and y is 4 we

More information

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today?

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today? 2 Mod math Modular arithmetic is the math you do when you talk about time on a clock. For example, if it s 9 o clock right now, then it ll be 1 o clock in 4 hours. Clearly, 9 + 4 1 in general. But on a

More information

LARGE PRIME NUMBERS (32, 42; 4) (32, 24; 2) (32, 20; 1) ( 105, 20; 0).

LARGE PRIME NUMBERS (32, 42; 4) (32, 24; 2) (32, 20; 1) ( 105, 20; 0). LARGE PRIME NUMBERS 1. Fast Modular Exponentiation Given positive integers a, e, and n, the following algorithm quickly computes the reduced power a e % n. (Here x % n denotes the element of {0,, n 1}

More information

Commutative Rings and Fields

Commutative Rings and Fields Commutative Rings and Fields 1-22-2017 Different algebraic systems are used in linear algebra. The most important are commutative rings with identity and fields. Definition. A ring is a set R with two

More information

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Homework 5. This homework is due October 6, 2014, at 12:00 noon.

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Homework 5. This homework is due October 6, 2014, at 12:00 noon. EECS 70 Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Homework 5 This homework is due October 6, 2014, at 12:00 noon. 1. Modular Arithmetic Lab (continue) Oystein Ore described a puzzle

More information

The Chinese Remainder Theorem

The Chinese Remainder Theorem The Chinese Remainder Theorem R. C. Daileda February 19, 2018 1 The Chinese Remainder Theorem We begin with an example. Example 1. Consider the system of simultaneous congruences x 3 (mod 5), x 2 (mod

More information

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6 Math 131 notes Jason Riedy 6 October, 2008 Contents 1 Modular arithmetic 2 2 Divisibility rules 3 3 Greatest common divisor 4 4 Least common multiple 4 5 Euclidean GCD algorithm 5 6 Linear Diophantine

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

Introduction to Number Theory

Introduction to Number Theory INTRODUCTION Definition: Natural Numbers, Integers Natural numbers: N={0,1,, }. Integers: Z={0,±1,±, }. Definition: Divisor If a Z can be writeen as a=bc where b, c Z, then we say a is divisible by b or,

More information

Lecture 6: Introducing Complexity

Lecture 6: Introducing Complexity COMP26120: Algorithms and Imperative Programming Lecture 6: Introducing Complexity Ian Pratt-Hartmann Room KB2.38: email: ipratt@cs.man.ac.uk 2015 16 You need this book: Make sure you use the up-to-date

More information

Number Theory Math 420 Silverman Exam #1 February 27, 2018

Number Theory Math 420 Silverman Exam #1 February 27, 2018 Name: Number Theory Math 420 Silverman Exam #1 February 27, 2018 INSTRUCTIONS Read Carefully Time: 50 minutes There are 5 problems. Write your name neatly at the top of this page. Write your final answer

More information

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is LARGE PRIME NUMBERS 1. Fermat Pseudoprimes Fermat s Little Theorem states that for any positive integer n, if n is prime then b n % n = b for b = 1,..., n 1. In the other direction, all we can say is that

More information

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2 8. p-adic numbers 8.1. Motivation: Solving x 2 a (mod p n ). Take an odd prime p, and ( an) integer a coprime to p. Then, as we know, x 2 a (mod p) has a solution x Z iff = 1. In this case we can suppose

More information

Fall 2017 Test II review problems

Fall 2017 Test II review problems Fall 2017 Test II review problems Dr. Holmes October 18, 2017 This is a quite miscellaneous grab bag of relevant problems from old tests. Some are certainly repeated. 1. Give the complete addition and

More information

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases Lecture 2. The Euclidean Algorithm and Numbers in Other Bases At the end of Lecture 1, we gave formulas for the greatest common divisor GCD (a, b), and the least common multiple LCM (a, b) of two integers

More information

B. Maddah ENMG 622 Simulation 11/11/08

B. Maddah ENMG 622 Simulation 11/11/08 B. Maddah ENMG 622 Simulation 11/11/08 Random-Number Generators (Chapter 7, Law) Overview All stochastic simulations need to generate IID uniformly distributed on (0,1), U(0,1), random numbers. 1 f X (

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

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer? Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative

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

Fermat s Little Theorem. Fermat s little theorem is a statement about primes that nearly characterizes them.

Fermat s Little Theorem. Fermat s little theorem is a statement about primes that nearly characterizes them. Fermat s Little Theorem Fermat s little theorem is a statement about primes that nearly characterizes them. Theorem: Let p be prime and a be an integer that is not a multiple of p. Then a p 1 1 (mod p).

More information

THESIS. Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University

THESIS. Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University The Hasse-Minkowski Theorem in Two and Three Variables THESIS Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University By

More information

COMP424 Computer Security

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

More information

CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS

CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS JEREMY BOOHER Continued fractions usually get short-changed at PROMYS, but they are interesting in their own right and useful in other areas

More information

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number Topic Contents Factoring Methods Unit 3 The smallest divisor of an integer The GCD of two numbers Generating prime numbers Computing prime factors of an integer Generating pseudo random numbers Raising

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

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

Numbers, Groups and Cryptography. Gordan Savin

Numbers, Groups and Cryptography. Gordan Savin Numbers, Groups and Cryptography Gordan Savin Contents Chapter 1. Euclidean Algorithm 5 1. Euclidean Algorithm 5 2. Fundamental Theorem of Arithmetic 9 3. Uniqueness of Factorization 14 4. Efficiency

More information

Exam 2 Solutions. In class questions

Exam 2 Solutions. In class questions Math 5330 Spring 2018 Exam 2 Solutions In class questions 1. (15 points) Solve the following congruences. Put your answer in the form of a congruence. I usually find it easier to go from largest to smallest

More information

A Proof of the Lucas-Lehmer Test and its Variations by Using a Singular Cubic Curve

A Proof of the Lucas-Lehmer Test and its Variations by Using a Singular Cubic Curve 1 47 6 11 Journal of Integer Sequences, Vol. 1 (018), Article 18.6. A Proof of the Lucas-Lehmer Test and its Variations by Using a Singular Cubic Curve Ömer Küçüksakallı Mathematics Department Middle East

More information

Math Review. for the Quantitative Reasoning measure of the GRE General Test

Math Review. for the Quantitative Reasoning measure of the GRE General Test Math Review for the Quantitative Reasoning measure of the GRE General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important for solving

More information

Executive Assessment. Executive Assessment Math Review. Section 1.0, Arithmetic, includes the following topics:

Executive Assessment. Executive Assessment Math Review. Section 1.0, Arithmetic, includes the following topics: Executive Assessment Math Review Although the following provides a review of some of the mathematical concepts of arithmetic and algebra, it is not intended to be a textbook. You should use this chapter

More information

Introduction to Elliptic Curve Cryptography. Anupam Datta

Introduction to Elliptic Curve Cryptography. Anupam Datta Introduction to Elliptic Curve Cryptography Anupam Datta 18-733 Elliptic Curve Cryptography Public Key Cryptosystem Duality between Elliptic Curve Cryptography and Discrete Log Based Cryptography Groups

More information

Modular Arithmetic Instructor: Marizza Bailey Name:

Modular Arithmetic Instructor: Marizza Bailey Name: Modular Arithmetic Instructor: Marizza Bailey Name: 1. Introduction to Modular Arithmetic If someone asks you what day it is 145 days from now, what would you answer? Would you count 145 days, or find

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

FERMAT S TEST KEITH CONRAD

FERMAT S TEST KEITH CONRAD FERMAT S TEST KEITH CONRAD 1. Introduction Fermat s little theorem says for prime p that a p 1 1 mod p for all a 0 mod p. A naive extension of this to a composite modulus n 2 would be: for all a 0 mod

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

Grade 11/12 Math Circles Rational Points on an Elliptic Curves Dr. Carmen Bruni November 11, Lest We Forget

Grade 11/12 Math Circles Rational Points on an Elliptic Curves Dr. Carmen Bruni November 11, Lest We Forget Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 11/12 Math Circles Rational Points on an Elliptic Curves Dr. Carmen Bruni November 11, 2015 - Lest

More information

Some Review Problems for Exam 1: Solutions

Some Review Problems for Exam 1: Solutions Math 3355 Fall 2018 Some Review Problems for Exam 1: Solutions Here is my quick review of proof techniques. I will focus exclusively on propositions of the form p q, or more properly, x P (x) Q(x) or x

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

The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem.

The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem. CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 10 The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem.

More information

Corollary 4.2 (Pepin s Test, 1877). Let F k = 2 2k + 1, the kth Fermat number, where k 1. Then F k is prime iff 3 F k 1

Corollary 4.2 (Pepin s Test, 1877). Let F k = 2 2k + 1, the kth Fermat number, where k 1. Then F k is prime iff 3 F k 1 4. Primality testing 4.1. Introduction. Factorisation is concerned with the problem of developing efficient algorithms to express a given positive integer n > 1 as a product of powers of distinct primes.

More information

MATH 115, SUMMER 2012 LECTURE 12

MATH 115, SUMMER 2012 LECTURE 12 MATH 115, SUMMER 2012 LECTURE 12 JAMES MCIVOR - last time - we used hensel s lemma to go from roots of polynomial equations mod p to roots mod p 2, mod p 3, etc. - from there we can use CRT to construct

More information

4 Number Theory and Cryptography

4 Number Theory and Cryptography 4 Number Theory and Cryptography 4.1 Divisibility and Modular Arithmetic This section introduces the basics of number theory number theory is the part of mathematics involving integers and their properties.

More information

Lecture Prelude: Agarwal-Biswas Probabilistic Testing

Lecture Prelude: Agarwal-Biswas Probabilistic Testing 6.S897 Algebra and Computation March 19, 2012 Lecture 12 Lecturer: Madhu Sudan Scribe: Zeyuan Allen Zhu 1 Today s Problem: Primality Testing Given an n-bit integer N, output YES if n is prime and NO otherwise.

More information

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test Introduction to Algorithms (CS 482) Cornell University Instructor: Bobby Kleinberg Lecture Notes, 25 April 2008 The Miller-Rabin Randomized Primality Test 1 Introduction Primality testing is an important

More information

Finding Prime Factors

Finding Prime Factors Section 3.2 PRE-ACTIVITY PREPARATION Finding Prime Factors Note: While this section on fi nding prime factors does not include fraction notation, it does address an intermediate and necessary concept to

More information

Math 430 Midterm II Review Packet Spring 2018 SOLUTIONS TO PRACTICE PROBLEMS

Math 430 Midterm II Review Packet Spring 2018 SOLUTIONS TO PRACTICE PROBLEMS Math 40 Midterm II Review Packet Spring 2018 SOLUTIONS TO PRACTICE PROBLEMS WARNING: Remember, it s best to rely as little as possible on my solutions. Therefore, I urge you to try the problems on your

More information

Introduction to Cybersecurity Cryptography (Part 5)

Introduction to Cybersecurity Cryptography (Part 5) Introduction to Cybersecurity Cryptography (Part 5) Prof. Dr. Michael Backes 13.01.2017 February 17 th Special Lecture! 45 Minutes Your Choice 1. Automotive Security 2. Smartphone Security 3. Side Channel

More information

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some

More information

HOMEWORK 11 MATH 4753

HOMEWORK 11 MATH 4753 HOMEWORK 11 MATH 4753 Recall that R = Z[x]/(x N 1) where N > 1. For p > 1 any modulus (not necessarily prime), R p = (Z/pZ)[x]/(x N 1). We do not assume p, q are prime below unless otherwise stated. Question

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

One can use elliptic curves to factor integers, although probably not RSA moduli.

One can use elliptic curves to factor integers, although probably not RSA moduli. Elliptic Curves Elliptic curves are groups created by defining a binary operation (addition) on the points of the graph of certain polynomial equations in two variables. These groups have several properties

More information

Applied Cryptography and Computer Security CSE 664 Spring 2017

Applied Cryptography and Computer Security CSE 664 Spring 2017 Applied Cryptography and Computer Security Lecture 11: Introduction to Number Theory Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline What we ve covered so far: symmetric

More information

LAMC Intermediate I & II October 12, Oleg Gleizer. Warm-up

LAMC Intermediate I & II October 12, Oleg Gleizer. Warm-up LAMC Intermediate I & II October 2, 204 Oleg Gleizer prof40g@math.ucla.edu Warm-up Problem A student was asked to divide some number by two and to add three to the result. By mistake, the student multiplied

More information

CSC 373: Algorithm Design and Analysis Lecture 30

CSC 373: Algorithm Design and Analysis Lecture 30 CSC 373: Algorithm Design and Analysis Lecture 30 Allan Borodin April 5, 2013 1 / 12 Announcements and Outline Announcements Two misstated questions on term test Grading scheme for term test 3: 1 Test

More information

A First Look at the Complex Modulus

A First Look at the Complex Modulus A First Look at the Complex Modulus After expanding the field of arithmetic by introducing complex numbers, and also defining their properties, Gauss introduces the complex modulus. We have treated the

More information

Cryptography. Number Theory with AN INTRODUCTION TO. James S. Kraft. Lawrence C. Washington. CRC Press

Cryptography. Number Theory with AN INTRODUCTION TO. James S. Kraft. Lawrence C. Washington. CRC Press AN INTRODUCTION TO Number Theory with Cryptography James S Kraft Gilman School Baltimore, Maryland, USA Lawrence C Washington University of Maryland College Park, Maryland, USA CRC Press Taylor & Francis

More information

Lecture 4: Constructing the Integers, Rationals and Reals

Lecture 4: Constructing the Integers, Rationals and Reals Math/CS 20: Intro. to Math Professor: Padraic Bartlett Lecture 4: Constructing the Integers, Rationals and Reals Week 5 UCSB 204 The Integers Normally, using the natural numbers, you can easily define

More information

ABE Math Review Package

ABE Math Review Package P a g e ABE Math Review Package This material is intended as a review of skills you once learned and wish to review before your assessment. Before studying Algebra, you should be familiar with all of the

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

Notes: Pythagorean Triples

Notes: Pythagorean Triples Math 5330 Spring 2018 Notes: Pythagorean Triples Many people know that 3 2 + 4 2 = 5 2. Less commonly known are 5 2 + 12 2 = 13 2 and 7 2 + 24 2 = 25 2. Such a set of integers is called a Pythagorean Triple.

More information

Practical Algebra. A Step-by-step Approach. Brought to you by Softmath, producers of Algebrator Software

Practical Algebra. A Step-by-step Approach. Brought to you by Softmath, producers of Algebrator Software Practical Algebra A Step-by-step Approach Brought to you by Softmath, producers of Algebrator Software 2 Algebra e-book Table of Contents Chapter 1 Algebraic expressions 5 1 Collecting... like terms 5

More information

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime. PUTNAM TRAINING NUMBER THEORY (Last updated: December 11, 2017) Remark. This is a list of exercises on Number Theory. Miguel A. Lerma Exercises 1. Show that the sum of two consecutive primes is never twice

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

Table of Contents. 2013, Pearson Education, Inc.

Table of Contents. 2013, Pearson Education, Inc. Table of Contents Chapter 1 What is Number Theory? 1 Chapter Pythagorean Triples 5 Chapter 3 Pythagorean Triples and the Unit Circle 11 Chapter 4 Sums of Higher Powers and Fermat s Last Theorem 16 Chapter

More information

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5

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

More information

IEEE P1363 / D13 (Draft Version 13). Standard Specifications for Public Key Cryptography

IEEE P1363 / D13 (Draft Version 13). Standard Specifications for Public Key Cryptography IEEE P1363 / D13 (Draft Version 13). Standard Specifications for Public Key Cryptography Annex A (Informative). Number-Theoretic Background. Copyright 1999 by the Institute of Electrical and Electronics

More information

Projective space. There are some situations when this approach seems to break down; for example with an equation like f(x; y) =y 2 (x 3 5x +3) the lin

Projective space. There are some situations when this approach seems to break down; for example with an equation like f(x; y) =y 2 (x 3 5x +3) the lin Math 445 Handy facts since the second exam Don't forget the handy facts from the first two exams! Rational points on curves For more general curves, defined by polynomials f(x; y) = 0 of higher degree,

More information

Winter Camp 2009 Number Theory Tips and Tricks

Winter Camp 2009 Number Theory Tips and Tricks Winter Camp 2009 Number Theory Tips and Tricks David Arthur darthur@gmail.com 1 Introduction This handout is about some of the key techniques for solving number theory problems, especially Diophantine

More information

ABOUT THE CLASS AND NOTES ON SET THEORY

ABOUT THE CLASS AND NOTES ON SET THEORY ABOUT THE CLASS AND NOTES ON SET THEORY About the Class Evaluation. Final grade will be based 25%, 25%, 25%, 25%, on homework, midterm 1, midterm 2, final exam. Exam dates. Midterm 1: Oct 4. Midterm 2:

More information

10 Concrete candidates for public key crypto

10 Concrete candidates for public key crypto 10 Concrete candidates for public key crypto In the previous lecture we talked about public key cryptography and saw the Diffie Hellman system and the DSA signature scheme. In this lecture, we will see

More information

9 Knapsack Cryptography

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

More information

Chapter 5. Number Theory. 5.1 Base b representations

Chapter 5. Number Theory. 5.1 Base b representations Chapter 5 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,

More information

IEEE P1363 / D9 (Draft Version 9). Standard Specifications for Public Key Cryptography

IEEE P1363 / D9 (Draft Version 9). Standard Specifications for Public Key Cryptography IEEE P1363 / D9 (Draft Version 9) Standard Specifications for Public Key Cryptography Annex A (informative) Number-Theoretic Background Copyright 1997,1998,1999 by the Institute of Electrical and Electronics

More information

Sums of Squares. Bianca Homberg and Minna Liu

Sums of Squares. Bianca Homberg and Minna Liu Sums of Squares Bianca Homberg and Minna Liu June 24, 2010 Abstract For our exploration topic, we researched the sums of squares. Certain properties of numbers that can be written as the sum of two squares

More information

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST JAMES MCIVOR Today we enter Chapter 2, which is the heart of this subject. Before starting, recall that last time we saw the integers have unique factorization

More information

Class Note #14. In this class, we studied an algorithm for integer multiplication, which. 2 ) to θ(n

Class Note #14. In this class, we studied an algorithm for integer multiplication, which. 2 ) to θ(n Class Note #14 Date: 03/01/2006 [Overall Information] In this class, we studied an algorithm for integer multiplication, which improved the running time from θ(n 2 ) to θ(n 1.59 ). We then used some of

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 6, 2012 CPSC 467b, Lecture 9 1/53 Euler s Theorem Generating RSA Modulus Finding primes by guess and check Density of

More information

Algebra Exam. Solutions and Grading Guide

Algebra Exam. Solutions and Grading Guide Algebra Exam Solutions and Grading Guide You should use this grading guide to carefully grade your own exam, trying to be as objective as possible about what score the TAs would give your responses. Full

More information

CHAPTER 1. REVIEW: NUMBERS

CHAPTER 1. REVIEW: NUMBERS CHAPTER. REVIEW: NUMBERS Yes, mathematics deals with numbers. But doing math is not number crunching! Rather, it is a very complicated psychological process of learning and inventing. Just like listing

More information

3 The fundamentals: Algorithms, the integers, and matrices

3 The fundamentals: Algorithms, the integers, and matrices 3 The fundamentals: Algorithms, the integers, and matrices 3.4 The integers and division This section introduces the basics of number theory number theory is the part of mathematics involving integers

More information

Security Level of Cryptography Integer Factoring Problem (Factoring N = p 2 q) December Summary 2

Security Level of Cryptography Integer Factoring Problem (Factoring N = p 2 q) December Summary 2 Security Level of Cryptography Integer Factoring Problem (Factoring N = p 2 ) December 2001 Contents Summary 2 Detailed Evaluation 3 1 The Elliptic Curve Method 3 1.1 The ECM applied to N = p d............................

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

TESTCRACKER CAT TOPPER s PROGRAM: QUANT. Factorial

TESTCRACKER CAT TOPPER s PROGRAM: QUANT. Factorial TESTCRACKER CAT TOPPER s PROGRAM: QUANT Factorial The product of n consecutive natural numbers starting from 1 to n is called as the factorial n. n! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x x (n 2) x (n 1) x n e.g.

More information

Algebra for error control codes

Algebra for error control codes Algebra for error control codes EE 387, Notes 5, Handout #7 EE 387 concentrates on block codes that are linear: Codewords components are linear combinations of message symbols. g 11 g 12 g 1n g 21 g 22

More information

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

CHAPTER 6. Prime Numbers. Definition and Fundamental Results CHAPTER 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results 6.1. Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and the only positive divisors of p are 1 and p. If n

More information