Tuesday, 27 April Number-Theoretic Algorithms Chapter 31

Slides:



Advertisements
Similar presentations
Number Theory Algorithms and Cryptography Algorithms Prepared by John Reif, Ph.D. Analysis of Algorithms.
Advertisements

COMP 170 L2 Page 1 L06: The RSA Algorithm l Objective: n Present the RSA Cryptosystem n Prove its correctness n Discuss related issues.
Cryptography and Network Security
Chapter 8 – Introduction to Number Theory. Prime Numbers prime numbers only have divisors of 1 and self –they cannot be written as a product of other.
Section 4.1: Primes, Factorization, and the Euclidean Algorithm Practice HW (not to hand in) From Barr Text p. 160 # 6, 7, 8, 11, 12, 13.
Primality Testing Patrick Lee 12 July 2003 (updated on 13 July 2003)
22C:19 Discrete Structures Integers and Modular Arithmetic
Chapter 8 More Number Theory. Prime Numbers Prime numbers only have divisors of 1 and itself They cannot be written as a product of other numbers Prime.
Number Theory Presented by Shrividya Shivkumar and George Frederick.
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2009 Tuesday, 28 April Number-Theoretic Algorithms Chapter 31.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 8 Tuesday, 11/13/01 String Matching Algorithms Chapter.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Tuesday, 26 November Number-Theoretic Algorithms Chapter 31.
6/20/2015 5:05 AMNumerical Algorithms1 x x1x
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
Theory I Algorithm Design and Analysis (9 – Randomized algorithms) Prof. Dr. Th. Ottmann.
Lecture 3.2: Public Key Cryptography II CS 436/636/736 Spring 2012 Nitesh Saxena.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 7 Tuesday, 11/6/01 Number-Theoretic Algorithms Chapter.
CSE 321 Discrete Structures Winter 2008 Lecture 10 Number Theory: Primality.
CSE 311 Foundations of Computing I Lecture 12 Primes, GCD, Modular Inverse Spring
Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright © The McGraw-Hill Companies, Inc. Permission required.
Software Security Seminar - 1 Chapter 11. Mathematical Background 발표자 : 안병희 Applied Cryptography.

Module :MA3036NI Cryptography and Number Theory Lecture Week 7
Section 4.3: Fermat’s Little Theorem Practice HW (not to hand in) From Barr Text p. 284 # 1, 2.
Introduction to Algorithms Second Edition by Cormen, Leiserson, Rivest & Stein Chapter 31.
YSLInformation Security -- Public-Key Cryptography1 Prime and Relatively Prime Numbers Divisors: We say that b  0 divides a if a = mb for some m, where.
CSE 311: Foundations of Computing Fall 2014 Lecture 12: Primes, GCD.
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
9/22/15UB Fall 2015 CSE565: S. Upadhyaya Lec 7.1 CSE565: Computer Security Lecture 7 Number Theory Concepts Shambhu Upadhyaya Computer Science & Eng. University.
Ch1 - Algorithms with numbers Basic arithmetic Basic arithmetic Addition Addition Multiplication Multiplication Division Division Modular arithmetic Modular.
Week 4 - Wednesday.  What did we talk about last time?  Finished DES  AES.
Lecture 3.1: Public Key Cryptography I CS 436/636/736 Spring 2015 Nitesh Saxena.
9.1 Primes and Related Congruence Equations 23 Sep 2013.
CSE 311: Foundations of Computing Fall 2013 Lecture 12: Primes, GCD, modular inverse.
Lecture 2-3 Basic Number Theory and Algebra. In modern cryptographic systems, the messages are represented by numerical values prior to being encrypted.
CS480 Cryptography and Information Security
Revision. Cryptography depends on some properties of prime numbers. One of these is that it is rather easy to generate large prime numbers, but much harder.
Number-Theoretic Algorithms
RSA cryptosystem with large key length
Mathematical Background for Cryptography: Modular arithmetic and gcd
Public Key Encryption Major topics The RSA scheme was devised in 1978
B504/I538: Introduction to Cryptography
Mathematics of Cryptography
Chapter Applications of Number Theory Some Useful Results
CSE565: Computer Security Lecture 7 Number Theory Concepts
CS 2210:0001Discrete Structures Modular Arithmetic and Cryptography
Lecture 3.2: Public Key Cryptography II
RSA Preliminaries.
ALGORITHM NUMBER THEORY
Number-Theoretic Algorithms (UNIT-4)
Cryptology Design Fundamentals
Cryptology Design Fundamentals
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Number Theory (Chapter 7)
Mathematical Background: Prime Numbers
Prime and Relatively Prime Numbers
Discrete Math for CS CMPSC 360 LECTURE 12 Last time: Stable matching
Introduction to Cryptography
Analysis of the RSA Encryption Algorithm
CSE 321 Discrete Structures
Lecture 3.1: Public Key Cryptography I
Introduction to Algorithms Second Edition by
Patrick Lee 12 July 2003 (updated on 13 July 2003)
Cryptology Design Fundamentals
Lecture 2-3 Basic Number Theory and Algebra
Mathematical Background : A quick approach to Group and Field Theory
Presentation transcript:

Tuesday, 27 April Number-Theoretic Algorithms Chapter 31 UMass Lowell Computer Science 91.503 Analysis of Algorithms Prof. Karen Daniels Spring, 2010 Tuesday, 27 April Number-Theoretic Algorithms Chapter 31

Chapter Dependencies Math: Number Theory Ch 31 Number-Theoretic Algorithms RSA You’re responsible for material in this chapter that we discuss in lecture. (Note that this does not include sections 31.8 or 31.9.)

Overview Motivation: RSA Basics Euclid’s GCD Algorithm Chinese Remainder Theorem Powers of an Element RSA Details

Motivation: RSA

RSA Encryption 31.5 source: 91.503 textbook Cormen et al.

RSA Digital Signature 31.6 ? assume Alice also sends her name so Bob knows whose public key to use source: 91.503 textbook Cormen et al.

RSA Cryptosystem + EXAMPLE encode decode to be explained later…. (31.19)* (31.26) source: 91.503 textbook Cormen et al., 3rd edition to be explained later…. (31.20) (31.35) Assume M < n (31.36) encode need efficient ways to compute P(M), S(C) decode + EXAMPLE

RSA Dependence Correctness: Efficiency: Security: Euler’s f Function Fermat’s Theorem Chinese Remainder Theorem Efficiency: Modular Exponentiation Primality Testing Security: Difficulty of Factoring Large Integers Need to show: see chart of result dependencies on next slide (courtesy of Mark Micire)

with thanks to Mark Micire EUCLID GCD EXTENDED-EUCLID (Eqn. 31.20) 2002 with thanks to Mark Micire

Notes on Primality Testing Efficient primality testing has been goal for > 2,000 years. Early attempts required exponential time. Miller-Rabin (Section 31.8) primality test is a randomized polynomial-time algorithm (1980’s). Agrawal, Kayal, Saxena provided a deterministic polynomial-time algorithm (2002).

Basic Concepts * Indicates that result is on chart of result dependencies

Division & Remainders + EXAMPLE * 31.1 (3.8) source: 91.503 textbook Cormen et al.

Equivalence Class Modulo n (31.1) (31.2) + EXAMPLE source: 91.503 textbook Cormen et al.

Common Divisors + EXAMPLE * * (31.3) (31.4) (31.5) source: 91.503 textbook Cormen et al.

Greatest Common Divisor (31.6) (31.7) (31.8) (31.9) * (31.10) * 31.2 (3.8) + EXAMPLE (31.4) source: 91.503 textbook Cormen et al.

Greatest Common Divisor 31.3 * (31.4) 31.2 31.4 + EXAMPLE source: 91.503 textbook Cormen et al.

Relatively Prime Integers * 31.6 31.2 31.2 + EXAMPLE source: 91.503 textbook Cormen et al.

Relatively Prime Integers 31.7 31.6 * 31.1-6 + EXAMPLE source: 91.503 textbook Cormen et al.

Greatest Common Divisor * 31.9 (31.5) (3.8) (31.4) (31.3) (31.14) (31.15) + EXAMPLE source: 91.503 textbook Cormen et al.

Euclid’s GCD Algorithm

Euclid’s GCD Algorithm * + EXAMPLE Also see Java code on course web site source: 91.503 textbook Cormen et al.

Extended Euclid + EXAMPLE * * (31.16) source: 91.503 textbook Cormen et al.

Chinese Remainder Theorem

Modular Arithmetic source: 91.503 textbook Cormen et al.

Finite Groups Additive group mod 6 Multiplicative group mod 15 31.2 size of this group is 6 size of this group is 8 source: 91.503 textbook Cormen et al. elements relatively prime to n

Finite Groups 31.12 source: 91.503 textbook Cormen et al.

Finite Groups 31.13 31.6 31.12 31.26 source: 91.503 textbook Cormen et al.

Euler’s Phi Function + EXAMPLE * (31.19) source: 91.503 textbook Cormen et al.

Lagrange’s Theorem + EXAMPLE * 31.15 source: 91.503 textbook Cormen et al.

Finite Groups + EXAMPLE * * additive subgroup generated by a 31.17 source: 91.503 textbook Cormen et al. 31.18 31.19 * where k + EXAMPLE

Solving Modular Linear Eq * 31.20 + EXAMPLE (31.4) source: 91.503 textbook Cormen et al.

Solving Modular Linear Eq source: 91.503 textbook Cormen et al. 31.22 31.18 31.24 * + EXAMPLE

Solving Modular Linear Eq * + EXAMPLE 31.26 * source: 91.503 textbook Cormen et al.

Chinese Remainder Theorem 31.27 * (31.23) + EXAMPLE (31.23) (31.24) (31.25) (31.26) source: 91.503 textbook Cormen et al.

Chinese Remainder Theorem Corollary 31.28. If n1, n2, …, nk are pairwise relatively prime and n = n1n2…nk, then, for any integers a1, a2, …, ak, the set of simultaneous equations for i = 1, 2, …, k, has a unique solution modulo n for the unknown x. 31.29 * source: 91.503 textbook Cormen et al.

NumTheory Example. Given the two equations what is a mod 65? Note that 65 = 5•13. The table of moduli wrt 5 and 13 for all integers in Z65. source: 91.503 textbook Cormen et al. & Prof. Pecelli Table can be generated diagonally. 1/1/2019

NumTheory Knowing that find a mod 65. We have source: 91.503 textbook Cormen et al. & Prof. Pecelli Knowing that find a mod 65. We have a1 = 2, n1 = 5 , m1 = n/n1 = 13, a2 = 3, n2 = 13, m2 = n/n2 = 5. We can compute: 1/1/2019

Powers of an Element

Theorems of Euler & Fermat 31.30 * 31.31 * 31.20 source: 91.503 textbook Cormen et al.

Modular Exponentiation * + EXAMPLE Also see Java code on course web site source: 91.503 textbook Cormen et al.

RSA Details

RSA Encryption 31.5 source: 91.503 textbook Cormen et al.

RSA Digital Signature 31.6 ? assume Alice also sends her name so Bob knows whose public key to use source: 91.503 textbook Cormen et al.

RSA Cryptosystem encode decode (31.19) (31.26) source: 91.503 textbook Cormen et al., 3rd edition (31.20) (31.35) (31.36) encode decode need efficient ways to compute P(M), S(C)

RSA Correctness p q by Thm 31.31 (Fermat) (31.37) (31.38) 31.31) p by Thm 31.31 (Fermat) q 31.29 source: 91.503 textbook Cormen et al. 3rd edition