Chinese Remainder. Discrete Mathematics Andrei Bulatov

Similar documents
Fermat s little theorem. RSA.

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Secure Transmission of Sensitive data using multiple channels

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.

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

L29&30 - RSA Cryptography

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

Data security (Cryptography) exercise book

CHAPTER 2. Modular Arithmetic

Algorithmic Number Theory and Cryptography (CS 303)

Review: Our Approach 2. CSC310 Information Theory

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

Cryptography, Number Theory, and RSA

Number Theory/Cryptography (part 1 of CSC 282)

Applications of Fermat s Little Theorem and Congruences

Final exam. Question Points Score. Total: 150

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

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

Efficient Large Integers Arithmetic by Adopting Squaring and Complement Recoding Techniques

Public Key Encryption

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

Introduction to Modular Arithmetic

SOLUTIONS TO PROBLEM SET 5. Section 9.1

A Lower Bound for τ(n) of Any k-perfect Numbers

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

Solutions for the Practice Final

DUBLIN CITY UNIVERSITY

The number theory behind cryptography

Math 319 Problem Set #7 Solution 18 April 2002

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

Test 2. ECON3161, Game Theory. Tuesday, November 6 th

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

On a remark of Makowski about perfect numbers

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

EE 418 Network Security and Cryptography Lecture #3

NUMBER THEORY AMIN WITNO

EE 418: Network Security and Cryptography

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

Wilson s Theorem and Fermat s Theorem

problems palette of David Rock and Mary K. Porter 6. A local musician comes to your school to give a performance

Understanding the Spike Algorithm

EE 508 Lecture 6. Degrees of Freedom The Approximation Problem

Number Theory. Konkreetne Matemaatika

Primitive Roots. Chapter Orders and Primitive Roots

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

Diffie-Hellman key-exchange protocol

Application: Public Key Cryptography. Public Key Cryptography

1 Introduction to Cryptology

A Digital Content Distribution Using a Group-Key and Multi-layered Structure Based on Web

Math 127: Equivalence Relations

29. Network Functions for Circuits Containing Op Amps

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

Number Theory and Security in the Digital Age

DUBLIN CITY UNIVERSITY

MAT Modular arithmetic and number theory. Modular arithmetic

Walsh Function Based Synthesis Method of PWM Pattern for Full-Bridge Inverter

Algorithms Airline Scheduling. Airline Scheduling. Design and Analysis of Algorithms Andrei Bulatov

communications are increasingly used in a way that they are scrambling and the combination of scrambling frequency and time domain.

Target Response Adaptation for Correlation Filter Tracking

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

Xor. Isomorphisms. CS70: Lecture 9. Outline. Is public key crypto possible? Cryptography... Public key crypography.

Secure Power Scheduling Auction for Smart Grids Using Homomorphic Encryption

Foundations of Cryptography

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

A Comparison of Two Equivalent Real Formulations for Complex-Valued Linear Systems Part 2: Results

MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005

To: Professor Avitabile Date: February 4, 2003 From: Mechanical Student Subject: Experiment #1 Numerical Methods Using Excel

Dynamic Optimization. Assignment 1. Sasanka Nagavalli January 29, 2013 Robotics Institute Carnegie Mellon University

Problem Set 6 Solutions Math 158, Fall 2016

Revision of Lecture Twenty-One

CS70: Lecture 8. Outline.

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

Practice Midterm 2 Solutions

Shunt Active Filters (SAF)

Algorithmic Number Theory and Cryptography (CS 303)

Public-Key Cryptosystem Based on Composite Degree Residuosity Classes. Paillier Cryptosystem. Harmeet Singh

Implementation Complexity of Bit Permutation Instructions

MATH 13150: Freshman Seminar Unit 15

ECE315 / ECE515 Lecture 5 Date:

Number Theory and Public Key Cryptography Kathryn Sommers

Fall 2018 #11 Games and Nimbers. A. Game. 0.5 seconds, 64 megabytes

MA 111, Topic 2: Cryptography

Public-key Cryptography: Theory and Practice

1 GSW Multipath Channel Models

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.

SOLUTIONS FOR PROBLEM SET 4

A TABLE OF PISANO PERIOD LENGTHS

ALICE AND BOB GO TO DINNER: A VARIATION ON MÉNAGE

Carmen s Core Concepts (Math 135)

Security Enhancement and Speed Monitoring of RSA Algorithm

Classical Cryptography

Sheet 1: Introduction to prime numbers.

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

MULTICORE IMPLEMENTATION OF THE AES ALGORITHM IN THE MEASUREMENT SYSTEM

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

MTBF PREDICTION REPORT

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

4.3- Modeling the Diode Forward Characteristic

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

Rejection of PSK Interference in DS-SS/PSK System Using Adaptive Transversal Filter with Conditional Response Recalculation

Transcription:

Chnese Remander Introducton Theorem Dscrete Mathematcs Andre Bulatov

Dscrete Mathematcs Chnese Remander Theorem 34-2 Prevous Lecture Resdues and arthmetc operatons Caesar cpher Pseudorandom generators Inverse resdue Dvsors of 0

Dscrete Mathematcs Modular Arthmetc II 33-3 Lnear Congruences A congruence of the form ax b (mod m) where m s a postve nteger, a and b are ntegers, and x s a varable, s called a lnear congruence. We wll solve lnear congruences If a s relatvely prme wth m, then t has the nverse. Then 1 a a 1 1 a ax b (mod m) x b (mod m) Fnd the nverse of 3 modulo 7 Solve the lnear congruence 3x 4 (mod 7) a 1

Dscrete Mathematcs Chnese Remander Theorem 34-4 The Chnese Remander Theorem A lnear congruence s smlar to a sngle lnear equaton. What about systems of equatons (Sun Tzu s puzzle, 400 460 BC): There are certan thngs whose number s unknown. When dvded by 3, the remander s 2; when dvded by 5, the remander s 3; and when dvded by 7, the remander s 2. What wll be the number of thngs? Ths can be translated nto the followng queston: What are the solutons of the system of congruences x 2 (mod 3) x 3 (mod 5) x 2 (mod 7)

Dscrete Mathematcs Chnese Remander Theorem 34-5 The Chnese Remander Theorem (cntd) Theorem Let m1,m2, K, mk be parwse relatvely prme postve ntegers and a,a, K, arbtrary ntegers. Then the system 1 2 ak x a1 x a2 M x a k (mod m 1) (mod m ) (mod m has a unque soluton modulo m = m1 m2 K mk. (That s, there s a soluton x wth 0 x < m, and all other solutons are congruent modulo m to ths soluton.) 2 k )

Dscrete Mathematcs Chnese Remander Theorem 34-6 The Chnese Remander Theorem (cntd) Proof. We construct a soluton to ths system Set M = m for = 1,2,,k. Thus M s the product of all the m modul except for Snce m and m are relatvely prme when j, Therefore M has the nverse modulo m, that s y such that Let us set m j M y 1(mod Note that M j 0 (mod m ) whenever j, all terms except for the th term n ths sum are congruent to 0 modulo m. As My 1(mod m) we have x a M y a (mod m ) m ) 1M1y 1 + a2m2y2 + akmkyk x = a L+ gcd ( M,m ) 1 =

Dscrete Mathematcs Chnese Remander Theorem 34-7 Sun Tzu s Puzzle x 2 (mod 3) x 3 (mod 5) x 2 (mod 7)

Dscrete Mathematcs Chnese Remander Theorem 34-8 Fermat s Theorem Fermat s Great (Last) Theorem. n n For any n > 2, the equaton x + y = does not have nteger solutons x,y,z > 0 z n It had remaned unproven for 358 years (posed n 1637, proved n 1995) Andrew Wles proved t n 1995

Dscrete Mathematcs Chnese Remander Theorem 34-9 Fermat s Lttle Theorem Fermat s Lttle Theorem. If p s prme and a s an nteger not dvsble by p, then a p 1 1 (mod p) Clearly, t suffces to consder only resdues modulo p. Z 5 0 1 2 3 4 0 1 2 3 4 0 0 0 0 0 0 1 2 3 4 0 2 4 1 3 0 3 1 4 2 0 4 3 2 1

Dscrete Mathematcs Chnese Remander Theorem 34-10 Fermat s Lttle Theorem (cntd) Fermat s Lttle Theorem was mproved by Euler Fermat s Lttle Theorem mproved For any ntegers m and a such that they are relatvely prme ϕ a (m) 1 (mod m) where φ(m) denotes the Euler totent functon, the number of numbers 0 < k < m relatvely prme wth m Example: Z 8

Dscrete Mathematcs Publc Key Cryptography 35-11 Publc Key Cryptography Earler we consdered Caesar cpher. To encrypt and decrypt messages usng ths cpher one needs to know the key Caesar cpher uses the same key for encrypton and decrypton; t s secret, and f one knows the key he knows everythng. Publc key cryptosystems use a dfferent approach Such a system uses dfferent keys for encrypton and decrypton: Every person has a key for encrypton, and can wrte an encrypted message But ths does not help to decrypt the message

Dscrete Mathematcs Publc Key Cryptography 35-12 RSA Cryptosystem RSA stands for the names of the nventors: Rvest, Shamr, Adleman From left to rght: Ron Rvest Ad Shamr Len Adleman RSA key: a modulus n = pq, where p and q are large prme numbers (current standards are 128, 256, or 512 dgts each), n s publc whle p and q are secret, and an exponent e relatvely prme wth (p 1)(q 1)

Dscrete Mathematcs Publc Key Cryptography 35-13 RSA Encrypton In the RSA method, messages are translated nto an nteger (a short message) or a sequence of ntegers Let M be the plantext (the orgnal message). Then the cphertext s the resdue e C M (mod n) Example. Encrypt the message STOP usng the RSA cryptosystem wth p = 43 and q = 59, so that n = 43 59 = 2537, and wth e = 13. Note that gcd(e, (p 1)(q 1)) = gcd(13, 42 58) = 1 Soluton. Translate the letters of STOP nto ther numercal equvalents and group them nto groups of four: 1819 1415 13 Encrypt them usng C M (mod 2537). We get 13 13 1819 2081 (mod 2537) and 1415 2182(mod 2537) Thus, the encrypted message s 2081 2182

Dscrete Mathematcs Publc Key Cryptography 35-14 RSA Decrypton The decrypton key d s the nverse of e modulo (p 1)(q 1). It s secret! Snce gcd(e, (p 1)(q 1)) = 1, the nverse exsts. Indeed, de 1 (mod (p 1)(q 1)), therefore there s k such that de = 1 + k(p 1)(q 1). Hence d e d de 1+ k(p 1)(q 1) C (M ) M M (mod n) Note that φ(n) = n 1 1 1 1 = (p 1)(q 1) p q k(p 1)(q 1) ϕ(n) k By Fermat s Lttle Theorem, M = (M ) 1 (mod n) Hence, C M M Thus C d M (mod d k(p 1)(q 1) n) M (mod n)

Dscrete Mathematcs Publc Key Cryptography 35-15 Example We receve the encrypted message 0981 0461. What s the plantext f t was encrypted usng the RSA cpher from the prevous example. Soluton The encrypton keys were n = 43 59 and e = 13. It s not hard to see that d = 937 s the nverse of 13 modulo 42 58 = 2436. Therefore to decrypt a cpher block C, we compute 937 P C (mod n) In our case we have 937 0981 0704 (mod 2537) and 0461 937 1115 Thus the plantext s 0704 1115, that s HELP (mod 2537)

Dscrete Mathematcs Publc Key Cryptography 35-16 Why RSA Works The secrecy comes from the fact that t s ncredbly dffcult to fnd an nverse modulo a bg number f we do not know t. And we do not know (p 1)(q 1), as we do not know the prme decomposton of n = pq. However, t s also very dffcult to fnd a prme decomposton of a number f ts prme factors are bg. The most effcent factorzaton method known requres bllons of years of work of the fastest computers to factorze a 400-dgt number. We need n to be the product of 2 prme numbers, because the method works only f the message s relatvely prme wth n. Thus n needs to have very few dvsors.

Dscrete Mathematcs Chnese Remander Theorem 34-17 Homework Exercses from the Book: No. 1, 5, 9, 12, 20, 23 (page 696)