Applied Cryptography and Network Security
|
|
- Crystal Gibbs
- 5 years ago
- Views:
Transcription
1 Applied Cryptography and Network Security William Garrison 6311 Sennott Square Lecture #8: RSA
2 Didn t we learn about RSA last time? During the last lecture, we saw what RSA does and learned a little bit about how we can use those features Our goal today will be to explore Why RSA actually works Why RSA is efficient* to use Why it is reasonably safe to use RSA In short, it's a details day Note: Efficiency is a relative term J
3 RSA Overview / Roadmap How do we choose large, pseudo-random primes?! Key generation: Choose two large prime numbers! and ", compute # =!" Compute %(#) = (! 1)(" 1) Choose an integer * such that gcd *, % # = 1 Calculate d such that */ 1 (mod %(#)) Public key: #, * Private key:!, ", / This seems tricky, too Why is %(#) = (! 1)(" 1) How can we do this? Usage: Encryption: 3 * (mod #) Isn t this expensive? Decryption: 4 / mod # = 3 56 (mod #) = :; (mod #) = 3 1 (mod #) = 3 Why does this work?
4 Before we can do anything, we need a few large, pseudo-random primes If our numbers are small, primality testing is pretty easy Try to divide n by all numbers less than! The Sieve of Eratosthenes is a general extension of this principle RSA requires big primes, so brute force testing is not an option (Why?) To choose the types of numbers that RSA needs, we instead use a probabilistic primality testing method test : Z Z {T, F} test(n, a) = F means that n is composite based on the witness a test(n, a) = T means that n is probably prime based on the witness a To test a number n for primality: 1. Randomly choose a witness a Often with probability 1/2 2. if test(n, a) = F, n is composite 3. if test(n, a) = T, loop until we're reasonably certain that n is prime k repetitions means P[n composite] = 2 -k
5 Fermat s little theorem can help us! Fermat's little theorem: Given a prime number! and a natural number " such that 1 " <!, then a '() 1 mod! How does this help with primality testing? If a '() 1 mod!, then! is definitely composite If a '() 1 mod!, then! is probably prime Note: Some composite numbers will always pass this test (Yikes!) These are called Carmichael numbers Carmichael numbers are rare, but may still be found Other primality tests (e.g., Miller-Rabin) avoid detecting these numbers This helps us test whether some number is prime. But how exactly does this help us generate RSA keys?
6 Putting it all together foundprime = false while (!foundprime) return r let r = some large, odd, random number foundprime = true for (iters = 0; iters < k; iters++) let a = random number less than r if (a r-1 1 mod r) foundprime = false break The prime number theorem tells us that, on average, the number of primes less than n is approximately n/ln(n) That is, P[n prime] 1/ln(n) Searching for a prime is hard, but not ridiculously so
7 RSA Overview / Roadmap How do we choose large, pseudo-random primes?! Key generation: Choose two large prime numbers! and ", compute # =!" Compute %(#) = (! 1)(" 1) Choose an integer * such that gcd *, % # = 1 Calculate d such that */ 1 (mod %(#)) Public key: #, * Private key:!, ", / Usage: Encryption: 3 * (mod #) This seems tricky, too Isn t this expensive? Why is %(#) = (! 1)(" 1) How can we do this? Decryption: 4 / mod # = 3 56 (mod #) = :; (mod #) = 3 1 (mod #) = 3 Why does this work?
8 !(#) is called Euler's totient function Definition: The totient function,!(#), counts the number of elements less than n that are relatively prime to n For an RSA modulus # = &', calculating!(#) is actually pretty simple Consider each of the &' numbers # All multiples of & share a common factor with # There are ' such numbers {&, 2&, 3&,, '&} Similarly, all multiples of ' share a common factor with # There are & such numbers {', 2', 3',, &'} So, we have that! # = &' & ' + 1 As a result,! # = &' & ' + 1 = (& 1)(' 1) The +1 controls for subtracting pq twice Note: Calculating!(#) is easy because we know how to factor #!
9 RSA Overview / Roadmap Key generation: Choose two large prime numbers! and ", compute # =!" Compute %(#) = (! 1)(" 1) Choose an integer * such that gcd *, % # = 1 Calculate d such that */ 1 (mod %(#)) Public key: #, * Private key:!, ", / Usage: Encryption: 3 * (mod #) This seems tricky, too Isn t this expensive? Why is %(#) = (! 1)(" 1) How can we do this? Decryption: 4 / mod # = 3 56 (mod #) = :; (mod #) = 3 1 (mod #) = 3 Why does this work?
10 Review of greatest common divisors Definition: Let! and " be integers, not both zero. The largest integer # such that d! and # " is called the greatest common divisor of! and ", and is denoted by gcd(!, ") Note: We can (naively) find GCDs by comparing the common divisors of two numbers. Example: What is the GCD of 24 and 36? Factors of 24: 1, 2, 3, 4, 6, 12 Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18 gcd(24, 36) = 12 Wait. Aren't we dealing with numbers that are hard to factor?
11 Luckily, computing GCDs is not all that hard Intuition: Rather than computing the GCD of two big numbers, we can instead compute the GCD of smaller numbers that have the same GCD! Interesting observation: gcd(%, ') is the same as gcd % ', ' Wait, what? Divides First, we must show that * % * ' * (% ') If * % and * ', then % = /* and ' = 0* Then % ' = /* 0* = / 0 * So, * % * ' * (% ') Ok, so * is a divisor of (% '), but is it the greatest divisor? The divisors of (% ') are a subset of of the divisors of % and the divisors of ' Since * = gcd(%, '), it is the greatest of the remaining divisors
12 Euclid s algorithm optimizes this process! Euclid's algorithm finds gcd(%, ') as follows: Set ) *+ = %, ) *- = ',. = 0 While ) 0*+ 0 divide ) 0*- by ) 0*+ to find 2 0 and ) 0 such that ) 0*- = 2 0 ) 0*+ + ) 0. =. + 1 gcd %, ' = ) 0*- Example: Computing gcd(414, 662)
13 That's all fine and good, but how does this help us compute! 1 mod '())? Method 1: Use Euclid s algorithm Choose a random! Use Euclid s algorithm to determine whether gcd!,. ) = 1 Repeat as needed Method 2: We can just choose a large prime number, 0 > max(4, 5) Why does method 2 work? 0 is a prime number, so it has no divisors other than itself and 1 0 is larger than 4 and 5, so 0 4 and 0 5
14 RSA Overview / Roadmap Key generation: Choose two large prime numbers! and ", compute # =!" Compute %(#) = (! 1)(" 1) Choose an integer * such that gcd *, % # = 1 Calculate d such that */ 1 (mod %(#)) Public key: #, * Private key:!, ", / Usage: Encryption: 3 * (mod #) This seems tricky, too How can we do this? Isn t this expensive? Decryption: 4 / mod # = 3 56 (mod #) = :; (mod #) = 3 1 (mod #) = 3 Why does this work?
15 It turns out that Euclid s algorithm can help us compute! # $%, too If we maintain a little extra state, we can figure out numbers & ' and ( ' such that ) ' = & ' + + ( ' - when calculating gcd(+, -) If + and - are relatively prime, this will allow us to calculate + $% 1 = & ' + + ( ' - // If + and - are relatively prime, ) 5 = 1 & ' + = 1 ( ' - // Subtract ( 5 - from both sides & ' + 1 mod - // Definition of congruence So & ' = + $% // Definition of inverse The extended Euclid's algorithm works as follows: Set ) $% = -, ) $9 = +, 5 = 0, & $9 = 1, ( $9 = 0, & $% = 0, ( $% = 1 While ) '$% 0 divide ) '$9 by ) '$% to find < ' and ) ' such that ) '$9 = < ' ) '$% + ) ' & ' = & '$9 < ' & '$% ( ' = ( '$9 < ' ( '$% 5 = gcd +, - = ) '$9 = & '$9 + + ( '$9 - This makes ) ' = & ' + + ( ' - for 5 = 1 and 5 = 2
16 How about an example? Example: Find the inverse of 797 mod 1047 " # " $ " % " & " So, 1 = -490* * *797 = 1 + (-373) *797 1 mod 1047 In other words, -490 is the inverse of 797 mod 1047
17 RSA Overview / Roadmap Key generation: Choose two large prime numbers! and ", compute # =!" Compute %(#) = (! 1)(" 1) Choose an integer * such that gcd *, % # = 1 Calculate d such that */ 1 (mod %(#)) Public key: #, * Private key:!, ", / Usage: Encryption: 3 * (mod #) This seems tricky, too Isn t this expensive? Decryption: 4 / mod # = 3 56 (mod #) = :; (mod #) = 3 1 (mod #) = 3 Why does this work?
18 Isn't exponentiation really expensive? Exponentiation can be sped up using a trick called successive squaring int pow(int m, int e) if(e is even) return pow(m*m, e/2) else return m * pow(m, e 1) For example, consider computing 2 15 Naive method: 2 * 2 * 2 * * 2 = 32,768 Fast method: 2 15 = 2 * 4 7 = 2 * 4 * 16 3 = 2 * 4 * 16 * 16 2 = 2 * 4 * 16 * 256 = 32,768 = 2 * 4 * 4 6 O(e) multiplications O(log(e)) multiplications This only gets us partway there. Various other algorithmic tricks enable modulo exponentiation to be efficient!
19 RSA Overview / Roadmap Key generation: Usage: Choose two large prime numbers! and ", compute # =!" Compute %(#) = (! 1)(" 1) Choose an integer * such that gcd *, % # = 1 Calculate d such that */ 1 (mod %(#)) Public key: #, * Private key:!, ", / Encryption: 3 * (mod #) Isn t this expensive? Decryption: 4 / mod # = 3 56 (mod #) = :; (mod #) = 3 1 (mod #) = 3 Why does this work?
20 Why does decryption work? Note: Decryption will work if and only if! " mod & = (! " mod & = ( )" mod & //! = ( ) mod & = ( *+, -. mod &// /0 1 mod 3(&), so /0 = 63 & + 1 = (. mod & //?!? = ( mod & // (. = ( The only hitch in showing the correctness of the decryption process is proving that ( *+, -. mod & = (. mod & Fortunately, two smart guys can help us out with this Pierre de Fermat 160? Leonhard Euler
21 First, we need to learn about the set! " Definition:! " is the set of all integers relatively prime to n Example:! $% Interesting note: ', )! " : ')! " ' relatively prime to, means that. $, / $ :. $ ' + / $, = 1 ) relatively prime to n means that. 3, / 3 :. 3 ) + / 3, = 1 Multiplying gives us. $. 3 ') +. $ / 3 ' + / $. 3 ) + / $ / 3,, = 1 The above states that! " is closed under multiplication
22 This leads us to something called Euler's theorem Theorem: " $ % : " ( % 1 mod. Proof: Multiply all /. elements of $ % together, calling the product 0 Note that 0 $ %, and has an inverse 0 12 Now, multiply each element of $ % by " and multiply each of the resulting elements together. This will give us " ( % 0 Multiplying each element of $ % actually just rearranges these elements. As a result, we have that " ( % 0 = 0 If we divide both sides of the equation by 0, we get that " ( % = 1 Ok, so what does Euler s theorem have to do with RSA?
23 We can restate Euler's theorem so that it more clearly connects to RSA math Theorem: " $ %, ( $ ) : " +, % )- " mod 2 Proof: " +, % )- = " +, % " = ", % + " = 1 + " = " From Euler s theorem! Now, in RSA All of our math is done mod 2 Our message space is chosen from elements of $ % 56 1 mod 7 2, so 56 = ( for some ( : ;< mod 2 = : +, % )- mod 2 = : - mod 2 = : Decryption works!
24 RSA Overview / Roadmap Key generation: Usage: Choose two large prime numbers! and ", compute # =!" Compute %(#) = (! 1)(" 1) Choose an integer * such that gcd *, % # = 1 Calculate d such that */ 1 (mod %(#)) Public key: #, * Private key:!, ", / Encryption: 3 * (mod #) Decryption: 4 / mod # = 3 56 (mod #) = :; (mod #) = 3 1 (mod #) = 3 But why is RSA safe Why does to this use? work?
25 Now, why exactly is RSA safe to use? In the original RSA paper*, the authors identify four avenues for attacking the mathematics behind RSA 1.Factoring! to find " and # 2.Determining $! without factoring! 3.Determining % without factoring! or learning $! 4.Learning to take & '( roots modulo! As it turns out, all of these attacks are thought to be hard to do But you shouldn't take my word for it Let s see why! *R.L. Rivest, A. Shamir, and L. Adleman, A Method for Obtaining Digital Signatures and Public-Key Cryptosystems, Communications of the ACM 21(2): , Feb
26 It turns out that factoring is a hard* problem First of all, why is factoring an issue?! is the public modulus of the RSA algorithm If we can factor! to find " and #, we can compute $(!) Given $(!) and ', we can easily compute the decryption exponent ( Fortunately, mathematicians believe that factoring numbers is a very difficult problem. History backs up this belief. The fastest general-purpose algorithm for integer factorization is called the general number field sieve. This algorithm has running time: O(e (c+o(1))(log n) 1 3 (log log n) 2 3 ) Note: This running time is sub-exponential i.e., Factoring can be done faster than brute force This explains why RSA keys are larger than AES keys RSA: Typically bits AES: Typically 128 bits
27 What about computing!(#) without factoring? Question: Why would the ability to compute! # be a bad thing? It would allow us to easily compute %, since &% 1 mod!(#) Good news: If we can compute! #, it will allow us to factor n Note 1:! # = #. / + 1 = #. + / + 1 Rewriting gives us. + / = #! # + 1 Note 2:. / =. + / 1 4# Note 3:. + /. / = 2/ Finally, given / and #, we can easily compute # = / + / 1 4# = / + / 1 4./ =. 1 2./ + / 1 =. / 1 What does this mean? If factoring is actually hard, then so is computing! # without factoring (Recall the concept of reduction)
28 What about computing! without factoring " or knowing # "? As it turns out, if we can figure out! without knowing #(") and without factoring ",! can be used to help us factor " Given!, we can compute &! 1, since we know & Note: &! 1 is a multiple of #(") &! 1 mod #(") &! = 1 + /#(") &! 1 = /#(") It has been shown that " can be efficiently factored using any multiple of #("). As such, if we know & and!, we can efficiently factor ".
29 Are there any other attacks that we need to worry about? Recall:! = # $ mod ( ) is part of the public key, so the adversary knows this If we could compute ) *+ roots mod (, we could decrypt without, It is not known whether breaking RSA yields an efficient factoring algorithm, but the inventors conjecture that this is the case This conjecture was made in 1978 To date, it has either been proved or disproved Conclusion: Odds are that breaking RSA efficiently implies that factoring can be done efficiently. Since factoring is hard, RSA is probably safe to use.
30 RSA Wrap Up Hopefully you now have a better understanding of RSA How each step of the process works How these steps can be made reasonably efficient Why RSA is safe to use Unfortunately, this is not the end of the story Although theoretically secure, implementations can be broken We ll revisit this in a later lecture Next time: Secret sharing and threshold cryptography
Public Key Algorithms
Public Key Algorithms CS 472 Spring 13 Lecture 6 Mohammad Almalag 2/19/2013 Public Key Algorithms - Introduction Public key algorithms are a motley crew, how? All hash algorithms do the same thing: Take
More information! Addition! Multiplication! Bigger Example - RSA cryptography
! Addition! Multiplication! Bigger Example - RSA cryptography Modular Arithmetic Modular Exponentiation Primality Testing (Fermat s little theorem) Probabilistic algorithm Euclid s Algorithm for gcd (greatest
More informationRSA (Rivest Shamir Adleman) public key cryptosystem: Key generation: Pick two large prime Ô Õ ¾ numbers È.
RSA (Rivest Shamir Adleman) public key cryptosystem: Key generation: Pick two large prime Ô Õ ¾ numbers È. Let Ò Ô Õ. Pick ¾ ½ ³ Òµ ½ so, that ³ Òµµ ½. Let ½ ÑÓ ³ Òµµ. Public key: Ò µ. Secret key Ò µ.
More informationOverview. Public Key Algorithms I
Public Key Algorithms I Dr. Arjan Durresi Louisiana State University Baton Rouge, LA 70810 Durresi@csc.lsu.Edu These slides are available at: http://www.csc.lsu.edu/~durresi/csc4601-04/ Louisiana State
More informationRSA (Rivest Shamir Adleman) public key cryptosystem: Key generation: Pick two large prime Ô Õ ¾ numbers È.
RSA (Rivest Shamir Adleman) public key cryptosystem: Key generation: Pick two large prime Ô Õ ¾ numbers È. Let Ò Ô Õ. Pick ¾ ½ ³ Òµ ½ so, that ³ Òµµ ½. Let ½ ÑÓ ³ Òµµ. Public key: Ò µ. Secret key Ò µ.
More informationCS669 Network Security
UNIT II PUBLIC KEY ENCRYPTION Uniqueness Number Theory concepts Primality Modular Arithmetic Fermet & Euler Theorem Euclid Algorithm RSA Elliptic Curve Cryptography Diffie Hellman Key Exchange Uniqueness
More informationApplied Cryptography and Computer Security CSE 664 Spring 2018
Applied Cryptography and Computer Security Lecture 13: Public-Key Cryptography and RSA Department of Computer Science and Engineering University at Buffalo 1 Public-Key Cryptography What we already know
More informationChapter 3 Public Key Cryptography
Cryptography and Network Security Chapter 3 Public Key Cryptography Lectured by Nguyễn Đức Thái Outline Number theory overview Public key cryptography RSA algorithm 2 Prime Numbers A prime number is an
More informationCPSC 467b: Cryptography and Computer Security
CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 7 January 30, 2012 CPSC 467b, Lecture 7 1/44 Public-key cryptography RSA Factoring Assumption Computing with Big Numbers Fast Exponentiation
More informationRSA (material drawn from Avi Kak Lecture 12, Lecture Notes on "Computer and Network Security" Used in asymmetric crypto.
RSA (material drawn from Avi Kak (kak@purdue.edu) Lecture 12, Lecture Notes on "Computer and Network Security" Used in asymmetric crypto. protocols The RSA algorithm is based on the following property
More informationASYMMETRIC CRYPTOGRAPHY
ASYMMETRIC CRYPTOGRAPHY CONTENT: 1. Number Theory 2. One Way Function 3. Hash Function 4. Digital Signature 5. RSA (Rivest-Shamir Adleman) References: 1. Applied Cryptography, Bruce Schneier 2. Cryptography
More informationUCT Algorithm Circle: Number Theory
UCT Algorithm Circle: 7 April 2011 Outline Primes and Prime Factorisation 1 Primes and Prime Factorisation 2 3 4 Some revision (hopefully) What is a prime number? An integer greater than 1 whose only factors
More informationCS Network Security. Nasir Memon Polytechnic University Module 7 Public Key Cryptography. RSA.
CS 393 - Network Security Nasir Memon Polytechnic University Module 7 Public Key Cryptography. RSA. Course Logistics Homework 2 revised. Due next Tuesday midnight. 2/26,28/02 Module 7 - Pubic Key Crypto
More informationLecture Notes, CSE 232, Fall 2014 Semester
Lecture Notes, CSE 232, Fall 2014 Semester Dr. Brett Olsen Week 11 - Number Theory Number theory is the study of the integers. The most basic concept in number theory is divisibility. We say that b divides
More informationIntroduction to Cryptography and Security Mechanisms. Abdul Hameed
Introduction to Cryptography and Security Mechanisms Abdul Hameed http://informationtechnology.pk Before we start 3 Quiz 1 From a security perspective, rather than an efficiency perspective, which of the
More informationGreat Theoretical Ideas in Computer Science. Lecture 27: Cryptography
15-251 Great Theoretical Ideas in Computer Science Lecture 27: Cryptography What is cryptography about? Adversary Eavesdropper I will cut his throat I will cut his throat What is cryptography about? loru23n8uladjkfb!#@
More informationAlgorithms (III) Yijia Chen Shanghai Jiaotong University
Algorithms (III) Yijia Chen Shanghai Jiaotong University Review of the Previous Lecture Factoring: Given a number N, express it as a product of its prime factors. Many security protocols are based on the
More informationIntroduction to Cryptography and Security Mechanisms: Unit 5. Public-Key Encryption
Introduction to Cryptography and Security Mechanisms: Unit 5 Public-Key Encryption Learning Outcomes Explain the basic principles behind public-key cryptography Recognise the fundamental problems that
More informationLecture 3 Algorithms with numbers (cont.)
Advanced Algorithms Floriano Zini Free University of Bozen-Bolzano Faculty of Computer Science Academic Year 2013-2014 Lecture 3 Algorithms with numbers (cont.) 1 Modular arithmetic For cryptography it
More informationDr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010
CS 494/594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010 1 Public Key Cryptography Modular Arithmetic RSA
More informationAlgorithms (III) Yijia Chen Shanghai Jiaotong University
Algorithms (III) Yijia Chen Shanghai Jiaotong University Review of the Previous Lecture Factoring: Given a number N, express it as a product of its prime factors. Many security protocols are based on the
More informationCS/COE 1501 cs.pitt.edu/~bill/1501/ More Math
CS/COE 1501 cs.pitt.edu/~bill/1501/ More Math Exponentiation x y Can easily compute with a simple algorithm: Runtime? ans = 1 i = y while i > 0: ans = ans * x i-- 2 Just like with multiplication, let s
More informationAlgorithms (III) Yu Yu. Shanghai Jiaotong University
Algorithms (III) Yu Yu Shanghai Jiaotong University Review of the Previous Lecture Factoring: Given a number N, express it as a product of its prime factors. Many security protocols are based on the assumed
More informationCOP 4516: Math for Programming Contest Notes
COP 4516: Math for Programming Contest Notes Euclid's Algorithm Euclid's Algorithm is the efficient way to determine the greatest common divisor between two integers. Given two positive integers a and
More informationLecture 6: Overview of Public-Key Cryptography and RSA
1 Lecture 6: Overview of Public-Key Cryptography and RSA Yuan Xue In this lecture, we give an overview to the public-key cryptography, which is also referred to as asymmetric cryptography. We will first
More informationRSA System setup and test
RSA System setup and test Project 1, EITF55 Security, 2018 Ben Smeets Dept. of Electrical and Information Technology, Lund University, Sweden Last revised by Ben Smeets on 2018 01 12 at 01:06 What you
More informationPublic Key Encryption. Modified by: Dr. Ramzi Saifan
Public Key Encryption Modified by: Dr. Ramzi Saifan Prime Numbers Prime numbers only have divisors of 1 and itself They cannot be written as a product of other numbers Prime numbers are central to number
More informationDavenport University ITS Lunch and Learn February 2, 2012 Sneden Center Meeting Hall Presented by: Scott Radtke
Davenport University ITS Lunch and Learn February 2, 2012 Sneden Center Meeting Hall Presented by: Scott Radtke A discussion on the mathematics behind coding and decoding using RSA Public-Key Cryptography.
More information- 0 - CryptoLib: Cryptography in Software John B. Lacy 1 Donald P. Mitchell 2 William M. Schell 3 AT&T Bell Laboratories ABSTRACT
- 0 - CryptoLib: Cryptography in Software John B. Lacy 1 Donald P. Mitchell 2 William M. Schell 3 AT&T Bell Laboratories ABSTRACT With the capacity of communications channels increasing at the current
More informationRSA. Public Key CryptoSystem
RSA Public Key CryptoSystem DIFFIE AND HELLMAN (76) NEW DIRECTIONS IN CRYPTOGRAPHY Split the Bob s secret key K to two parts: K E, to be used for encrypting messages to Bob. K D, to be used for decrypting
More informationLecture 2 Applied Cryptography (Part 2)
Lecture 2 Applied Cryptography (Part 2) Patrick P. C. Lee Tsinghua Summer Course 2010 2-1 Roadmap Number theory Public key cryptography RSA Diffie-Hellman DSA Certificates Tsinghua Summer Course 2010 2-2
More informationAdmin ENCRYPTION. Admin. Encryption 10/29/15. Assignment 6. 4 more assignments: Midterm next Thursday. What is it and why do we need it?
Admin Assignment 6 4 more assignments:! Assignment 7, due 11/13 5pm! Assignment 8, due 11/20 5pm! Assignments 9 & 10, due 12/9 11:59pm ENCRYPTION David Kauchak CS52 Spring 2015 Admin Midterm next Thursday!
More informationActivity Guide - Public Key Cryptography
Unit 2 Lesson 19 Name(s) Period Date Activity Guide - Public Key Cryptography Introduction This activity is similar to the cups and beans encryption we did in a previous lesson. However, instead of using
More informationWhat did we talk about last time? Public key cryptography A little number theory
Week 4 - Friday What did we talk about last time? Public key cryptography A little number theory If p is prime and a is a positive integer not divisible by p, then: a p 1 1 (mod p) Assume a is positive
More informationCS 161 Computer Security
Paxson Spring 2013 CS 161 Computer Security 3/14 Asymmetric cryptography Previously we saw symmetric-key cryptography, where Alice and Bob share a secret key K. However, symmetric-key cryptography can
More informationPublic Key Cryptography and the RSA Cryptosystem
Public Key Cryptography and the RSA Cryptosystem Two people, say Alice and Bob, would like to exchange secret messages; however, Eve is eavesdropping: One technique would be to use an encryption technique
More information4 PKI Public Key Infrastructure
67 PKI 4.1 PKI history 4 PKI Public Key Infrastructure 4.1 PKI history Classical cryptography Example form II WW: Enigma dates back thousands of years symmetric key 68 PKI 4.1 PKI history Symmetric key
More informationRSA (algorithm) History
RSA (algorithm) RSA is an algorithm for public-key cryptography that is based on the presumed difficulty of factoring large integers, the factoring problem. RSA stands for Ron Rivest, Adi Shamir and Leonard
More informationPublic Key Algorithms
Public Key Algorithms 1 Public Key Algorithms It is necessary to know some number theory to really understand how and why public key algorithms work Most of the public key algorithms are based on modular
More information31.6 Powers of an element
31.6 Powers of an element Just as we often consider the multiples of a given element, modulo, we consider the sequence of powers of, modulo, where :,,,,. modulo Indexing from 0, the 0th value in this sequence
More informationA SIGNATURE ALGORITHM BASED ON DLP AND COMPUTING SQUARE ROOTS
A SIGNATURE ALGORITHM BASED ON DLP AND COMPUTING SQUARE ROOTS Ounasser Abid 1 and Omar Khadir 2 1, 2 Laboratory of Mathematics, Cryptography and Mechanics, FSTM University Hassan II of Casablanca, Morocco
More informationSide-Channel Attacks on RSA with CRT. Weakness of RSA Alexander Kozak Jared Vanderbeck
Side-Channel Attacks on RSA with CRT Weakness of RSA Alexander Kozak Jared Vanderbeck What is RSA? As we all know, RSA (Rivest Shamir Adleman) is a really secure algorithm for public-key cryptography.
More information1 Extended Euclidean Algorithm
CS 124 Section #8 RSA, Random Walks, Linear Programming 3/27/17 1 Extended Euclidean Algorithm Given a, b, find x, y such that ax + by = d where d is the GCD of a, b. This will be necessary in implementing
More informationStudy Guide to Mideterm Exam
YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE CPSC 467b: Cryptography and Computer Security Handout #7 Professor M. J. Fischer February 20, 2012 Study Guide to Mideterm Exam For the exam, you are responsible
More information1 Elementary number theory
Math 215 - Introduction to Advanced Mathematics Spring 2019 1 Elementary number theory We assume the existence of the natural numbers and the integers N = {1, 2, 3,...} Z = {..., 3, 2, 1, 0, 1, 2, 3,...},
More informationRSA Public Key Encryption 1. Ivor Page 2
RSA Public Key Encryption 1 RSA Public Key Encryption 1 Ivor Page 2 One of the most important methods of providing secrecy and authentication is encryption. Secrecy means the secure transmission of data
More informationCryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL
Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL Transpositional Ciphers-A Review Decryption 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 Encryption 1 2 3 4 5 6 7 8 A G O O D F R I E N D I S A T R E
More informationAssignment 9 / Cryptography
Assignment 9 / Cryptography Michael Hauser March 2002 Tutor: Mr. Schmidt Course: M.Sc Distributed Systems Engineering Lecturer: Mr. Owens CONTENTS Contents 1 Introduction 3 2 Simple Ciphers 3 2.1 Vignère
More informationPublic Key Cryptography and RSA
Public Key Cryptography and RSA Major topics Principles of public key cryptosystems The RSA algorithm The Security of RSA Motivations A public key system is asymmetric, there does not have to be an exchange
More informationChannel Coding and Cryptography Part II: Introduction to Cryptography
Channel Coding and Cryptography Part II: Introduction to Cryptography Prof. Dr.-Ing. habil. Andreas Ahrens Communications Signal Processing Group, University of Technology, Business and Design Email: andreas.ahrens@hs-wismar.de
More information3/22/17. Admin. Assignment 6 ENCRYPTION. David Kauchak CS52 Spring Survey: How is the class going? Survey: respondents. 24 total respondents
Admin Assignment 6 ENCRYPTION David Kauchak CS52 Spring 2016 Survey: respondents Survey: How is the class going? 24 total respondents 1 Survey: How is the difficulty of the class? Survey: time spent per
More informationCryptography and Network Security
Cryptography and Network Security CRYPTOGRAPHY AND NETWORK SECURITY PRAKASH C. GUPTA Former Head Department of Information Technology Maharashtra Institute of Technology Pune Delhi-110092 2015 CRYPTOGRAPHY
More informationCryptography: More Primitives
Design and Analysis of Algorithms May 8, 2015 Massachusetts Institute of Technology 6.046J/18.410J Profs. Erik Demaine, Srini Devadas and Nancy Lynch Recitation 11 Cryptography: More Primitives 1 Digital
More informationChapter 9 Public Key Cryptography. WANG YANG
Chapter 9 Public Key Cryptography WANG YANG wyang@njnet.edu.cn Content Introduction RSA Diffie-Hellman Key Exchange Introduction Public Key Cryptography plaintext encryption ciphertext decryption plaintext
More informationCSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography
CSCI 454/554 Computer and Network Security Topic 5.2 Public Key Cryptography Outline 1. Introduction 2. RSA 3. Diffie-Hellman Key Exchange 4. Digital Signature Standard 2 Introduction Public Key Cryptography
More informationChapter 9. Public Key Cryptography, RSA And Key Management
Chapter 9 Public Key Cryptography, RSA And Key Management RSA by Rivest, Shamir & Adleman of MIT in 1977 The most widely used public-key cryptosystem is RSA. The difficulty of attacking RSA is based on
More informationCPSC 467: Cryptography and Computer Security
CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 8 September 28, 2015 CPSC 467, Lecture 8 1/44 Chaining Modes Block chaining modes Extending chaining modes to bytes Public-key Cryptography
More informationOutline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA
CSCI 454/554 Computer and Network Security Topic 5.2 Public Key Cryptography 1. Introduction 2. RSA Outline 3. Diffie-Hellman Key Exchange 4. Digital Signature Standard 2 Introduction Public Key Cryptography
More informationEuclid's Algorithm. MA/CSSE 473 Day 06. Student Questions Odd Pie Fight Euclid's algorithm (if there is time) extended Euclid's algorithm
MA/CSSE 473 Day 06 Euclid's Algorithm MA/CSSE 473 Day 06 Student Questions Odd Pie Fight Euclid's algorithm (if there is time) extended Euclid's algorithm 1 Quick look at review topics in textbook REVIEW
More informationCPSC 467: Cryptography and Computer Security
CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 8 September 22, 2014 CPSC 467, Lecture 8 1/59 Chaining Modes Block chaining modes Extending chaining modes to bytes Public-key Cryptography
More informationOutline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)
Outline AIT 682: Network and Systems Security 1. Introduction 2. RSA 3. Diffie-Hellman Key Exchange 4. Digital Signature Standard Topic 5.2 Public Key Cryptography Instructor: Dr. Kun Sun 2 Public Key
More informationPrimitive Elements. Samuel Slocum, Evan Wall April 27, a p 1 1(modp)
Primitive Elements Samuel Slocum, Evan Wall April 27, 2015 1 Introduction A Primitive element is a number a Z p given a prime p such that it has order p 1 and therefore the following equation holds. a
More informationCOMPSCI 230 Discrete Math Prime Numbers January 24, / 15
COMPSCI 230 Discrete Math January 24, 2017 COMPSCI 230 Discrete Math Prime Numbers January 24, 2017 1 / 15 Outline 1 Prime Numbers The Sieve of Eratosthenes Python Implementations GCD and Co-Primes COMPSCI
More informationAlgorithmic number theory Cryptographic hardness assumptions. Table of contents
Algorithmic number theory Cryptographic hardness assumptions Foundations of Cryptography Computer Science Department Wellesley College Fall 2016 Table of contents Introduction Primes and Divisibility Modular
More informationPublic Key Cryptography
Public Key Cryptography Giuseppe F. Italiano Universita` di Roma Tor Vergata italiano@disp.uniroma2.it Motivation Until early 70s, cryptography was mostly owned by government and military Symmetric cryptography
More informationPublic-key encipherment concept
Date: onday, October 21, 2002 Prof.: Dr Jean-Yves Chouinard Design of Secure Computer Systems CSI4138/CEG4394 Notes on Public Key Cryptography Public-key encipherment concept Each user in a secure communication
More informationPublic Key Encryption
Public Key Encryption A case study THE RSA CRYPTOSYSTEM Public 31/05/14 Key Encryption 2 Rivest Shamir Adleman (1978) Key generation 1. Generate two large, distinct primes p, q (100 200 decimal digits)
More informationCryptography and Network Security. Sixth Edition by William Stallings
Cryptography and Network Security Sixth Edition by William Stallings Chapter 9 Public Key Cryptography and RSA Misconceptions Concerning Public-Key Encryption Public-key encryption is more secure from
More informationPrimality Testing! 1
Primality Testing! 1 Goals of Assignment! Writing software as part of a large team" Living and breathing what COS 217 is about" Abstraction, separation of interfaces and implementations, modularity" Also,
More information1 Extended Euclidean Algorithm
CS 124 Section #8 RSA, Random Walks, Linear Programming 3/27/17 1 Extended Euclidean Algorithm Given a, b, find x, y such that ax + by = d where d is the GCD of a, b. This will be necessary in implementing
More informationParallel Quadratic Number Field Sieve
Parallel Quadratic Number Field Sieve Daniel Ron December 20, 2011 Abstract The Quadratic Number Field Sieve (QS) provides a fast and easy to implement method to factor a number. QS works by setting up
More informationRSA: PUBLIC KEY ALGORITHMS
Fernando Rosendo [fernando.rosendo@iweb.com.br] i.web Labs Brazil Theory and Implementation Public Key Algorithms based on mathematical properties which allow the cryptographic process (encryption) using
More informationISA 662 Internet Security Protocols. Outline. Prime Numbers (I) Beauty of Mathematics. Division (II) Division (I)
Outline ISA 662 Internet Security Protocols Some Math Essentials & History Asymmetric signatures and key exchange Asymmetric encryption Symmetric MACs Lecture 2 ISA 662 1 2 Beauty of Mathematics Demonstration
More informationMath From Scratch Lesson 22: The RSA Encryption Algorithm
Math From Scratch Lesson 22: The RSA Encryption Algorithm W. Blaine Dowler January 2, 2012 Contents 1 What Is Encryption? 1 2 What Is RSA Encryption? 2 2.1 Key Generation............................ 2
More informationUnderstanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 6 Introduction to Public-Key Cryptography
Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl www.crypto-textbook.com Chapter 6 Introduction to Public-Key Cryptography ver. November 18, 2010 These
More informationProvable Partial Key Escrow
Provable Partial Key Escrow Kooshiar Azimian Electronic Research Center, Sharif University of Technology, and Computer Engineering Department, Sharif University of Technology Tehran, Iran Email: Azimian@ce.sharif.edu
More informationWhat we still don t know about addition and multiplication
What we still don t know about addition and multiplication Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA Michigan State University, October 11, 2016 You would think that all of the issues
More informationVHDL for RSA Public Key System
VHDL for RSA Public Key System Rui He, Jie Gu, Liang Zhang, Cheng Li Engineering and Applied Science Memorial University of Newfoundland St. John s, NL, Canada, A1B3X5 E-mail: {ruihe, jiegu, lzhang, licheng}@engr.mun.ca
More informationCongruence Arithmetic
Module 4 Congruence Arithmetic Popper 4 Introduction to what is like Modulus choices Partitions by modulus Mod 5 Mod 7 Mod 30 Modular Arithmetic Addition Subtraction Multiplication INTEGERS! Mod 12 Cayley
More informationNumber Theory and RSA Public-Key Encryption
Number Theory and RSA Public-Key Encryption Dr. Natarajan Meghanathan Associate Professor of Computer Science Jackson State University E-mail: natarajan.meghanathan@jsums.edu CIA Triad: Three Fundamental
More informationIntroduction to Cryptography Lecture 7
Introduction to Cryptography Lecture 7 El Gamal Encryption RSA Encryption Benny Pinkas page 1 1 Public key encryption Alice publishes a public key PK Alice. Alice has a secret key SK Alice. Anyone knowing
More informationModular Arithmetic. Marizza Bailey. December 14, 2015
Modular Arithmetic Marizza Bailey December 14, 2015 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 a quicker
More informationGoals for Today. Substitution Permutation Ciphers. Substitution Permutation stages. Encryption Details 8/24/2010
Encryption Details COMP620 Goals for Today Understand how some of the most common encryption algorithms operate Learn about some new potential encryption systems Substitution Permutation Ciphers A Substitution
More informationSide-Channel Attack against RSA Key Generation Algorithms
Side-Channel Attack against RSA Key Generation Algorithms CHES 2014 Aurélie Bauer, Eliane Jaulmes, Victor Lomné, Emmanuel Prouff and Thomas Roche Agence Nationale de la Sécurité des Systèmes d Information
More informationPublic Key Cryptography
graphy CSS322: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 29 December 2011 CSS322Y11S2L07, Steve/Courses/2011/S2/CSS322/Lectures/rsa.tex,
More informationDiscrete Math in CS Problem Set 3 CS 280 Fall 2005 Due September 23, 2005
Discrete Math in CS Problem Set 3 CS 280 Fall 2005 Due September 23, 2005 Reading: Rosen, Sections 2.4-2.6. As in previous problem sets, some of the questions present claims, and ask you to decide whether
More informationSenior Math Circles Cryptography and Number Theory Week 1
Senior Math Circles Cryptography and Number Theory Week 1 Dale Brydon Feb. 2, 2014 1 One-Time Pads Cryptography deals with the problem of encoding a message in such a way that only the intended recipient
More informationLECTURE NOTES ON PUBLIC- KEY CRYPTOGRAPHY. (One-Way Functions and ElGamal System)
Department of Software The University of Babylon LECTURE NOTES ON PUBLIC- KEY CRYPTOGRAPHY (One-Way Functions and ElGamal System) By College of Information Technology, University of Babylon, Iraq Samaher@itnet.uobabylon.edu.iq
More informationECE 646 Fall 2009 Final Exam December 15, Multiple-choice test
ECE 646 Fall 2009 Final Exam December 15, 2009 Multiple-choice test 1. (1 pt) Parallel processing can be used to speed up the following cryptographic transformations (please note that multiple answers
More informationMidterm Exam. CS381-Cryptography. October 30, 2014
Midterm Exam CS381-Cryptography October 30, 2014 Useful Items denotes exclusive-or, applied either to individual bits or to sequences of bits. The same operation in Python is denoted ˆ. 2 10 10 3 = 1000,
More informationA Tour of Classical and Modern Cryptography
A Tour of Classical and Modern Cryptography Evan P. Dummit University of Rochester May 25, 2016 Outline Contents of this talk: Overview of cryptography (what cryptography is) Historical cryptography (how
More information10.1 Introduction 10.2 Asymmetric-Key Cryptography Asymmetric-Key Cryptography 10.3 RSA Cryptosystem
[Part 2] Asymmetric-Key Encipherment Asymmetric-Key Cryptography To distinguish between two cryptosystems: symmetric-key and asymmetric-key; To discuss the RSA cryptosystem; To introduce the usage of asymmetric-key
More informationPublic Key Cryptography 2. c Eli Biham - December 19, Public Key Cryptography 2
Public Key Cryptography 2 c Eli Biham - December 19, 2012 346 Public Key Cryptography 2 RSA Reference: Rivest, Shamir, Adleman, A Method for Obtaining Digital Signatures and Public Key Cryptosystems, CACM,
More informationChapter 4. Number Theory. 4.1 Factors and multiples
Chapter 4 Number Theory We ve now covered most of the basic techniques for writing proofs. So we re going to start applying them to specific topics in mathematics, starting with number theory. Number theory
More informationAn effective Method for Attack RSA Strategy
Int. J. Advanced Networking and Applications 136 Volume: 03, Issue: 05, Pages: 136-1366 (01) An effective Method for Attack RSA Strategy Vibhor Mehrotra Assistant Professor Department of Computer Science,
More informationCPSC 467b: Cryptography and Computer Security
CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 7 February 5, 2013 CPSC 467b, Lecture 7 1/45 Stream cipher from block cipher Review of OFB and CFB chaining modes Extending chaining
More informationPublic-Key Cryptanalysis
http://www.di.ens.fr/ pnguyen INRIA and École normale supérieure, Paris, France MPRI, 2010 Outline 1 Introduction Asymmetric Cryptology Course Overview 2 Textbook RSA 3 Euclid s Algorithm Applications
More informationApplications of The Montgomery Exponent
Applications of The Montgomery Exponent Shay Gueron 1,3 1 Dept. of Mathematics, University of Haifa, Israel (shay@math.haifa.ac.il) Or Zuk 2,3 2 Dept. of Physics of Complex Systems, Weizmann Institute
More informationWhat we still don t know about addition and multiplication
What we still don t know about addition and multiplication Trjitzinsky Memorial Lectures I, University of Illinois Urbana Champaign, November 27, 2018 Carl Pomerance Dartmouth College (emeritus) University
More informationLab 1: Cipher Fundamentals
Lab 1: Cipher Fundamentals Objective: The key objective of this lab is to be introduced to some of the fundamental principles involved in cryptography, including the usage of Base-64, hexadecimal, the
More information