Chapter 12: Cryptography MAT 320 Spring 2008. Cryptography: Basic Ideas We want to encode information so that no one other than the intended recipient.

Slides:



Advertisements
Similar presentations
RSA.
Advertisements

Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Public Key Cryptosystems - RSA Receiver Sender Eavesdroppe r p q p q p q p and q prime.
Data encryption with big prime numbers
22C:19 Discrete Structures Integers and Modular Arithmetic
Section 3.8: More Modular Arithmetic and Public-Key Cryptography
BY : Darshana Chaturvedi.  INTRODUCTION  RSA ALGORITHM  EXAMPLES  RSA IS EFFECTIVE  FERMAT’S LITTLE THEOREM  EUCLID’S ALGORITHM  REFERENCES.
 Caesar used to encrypt his messages using a very simple algorithm, which could be easily decrypted if you know the key.  He would take each letter.
What is Elliptic Curve Cryptography?
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Authentication and Digital Signatures CSCI 5857: Encoding and Encryption.
1 The RSA Algorithm Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
Great Theoretical Ideas in Computer Science.
ELECTRONIC PAYMENT SYSTEMSFALL 2002COPYRIGHT © 2002 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
OOP/Java1 Public Key Crytography From: Introduction to Algorithms Cormen, Leiserson and Rivest.
Attacks on Digital Signature Algorithm: RSA
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS Cryptographic Security.
Public Key Crytography1 From: Introduction to Algorithms Cormen, Leiserson and Rivest.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Distributed Systems1 Lecture 12: RSA Distributed Systems2 Plan for today: Introduce RSA and a toy example using small numbers. This is.
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
1 Lecture #10 Public Key Algorithms HAIT Summer 2005 Shimrit Tzur-David.
RSA Exponentiation cipher
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
Codes, Ciphers, and Cryptography-RSA Encryption
Lecture 6: Public Key Cryptography
Public Key Model 8. Cryptography part 2.
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
10.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 10 Symmetric-Key Cryptography.
Copyright © Cengage Learning. All rights reserved.
RSA Implementation. What is Encryption ? Encryption is the transformation of data into a form that is as close to impossible as possible to read without.
Great Theoretical Ideas in Computer Science.
Cryptography: RSA & DES Marcia Noel Ken Roe Jaime Buccheri.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Encryption Coursepak little bit in chap 10 of reed.
Cryptography Dec 29. This Lecture In this last lecture for number theory, we will see probably the most important application of number theory in computer.
Public-Key Cryptography CS110 Fall Conventional Encryption.
MA/CSSE 473 Day 11 Primality testing summary Data Encryption RSA.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
Section 4.4: The RSA Cryptosystem Practice HW Handwritten and Maple Exercises p at end of class notes.
RSA Public Key Crypto System. About RSA Announced in 1977 by Ronald Rivest, Adi Shamir, and Leonard Adleman Relies on the relative ease of finding large.
RSA Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013.
MA/CSSE 473 Day 10 Primality testing summary Data Encryption RSA.
Algebra of RSA codes Yinduo Ma Tong Li. Ron Rivest, Adi Shamir and Leonard Adleman.
IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
CRYPTOGRAPHY. WHAT IS PUBLIC-KEY ENCRYPTION? Encryption is the key to information security The main idea- by using only public information, a sender can.
A A E E D D C C B B # Symmetric Keys = n*(n-1)/2 F F
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
What use are prime numbers? ?. o All the primes, apart from 2, are odd numbers. o 1 is not a prime number. Why? o There are infinitely many prime numbers!
Introduction to Cryptography Lecture 9. Public – Key Cryptosystems Each participant has a public key and a private key. It should be infeasible to determine.
Great Theoretical Ideas in Computer Science for Some.
Public Key Cryptography 2 RSA. Lemma 1 Let s and t be relatively prime. Then Proof: Let be given by First we show that  actually maps Then we show 
Week 4 - Wednesday.  What did we talk about last time?  Finished DES  AES.
1 Cryptography Troy Latchman Byungchil Kim. 2 Fundamentals We know that the medium we use to transmit data is insecure, e.g. can be sniffed. We know that.
Great Theoretical Ideas in Computer Science.
Cryptography Cryptography is the use of mathematics to encode messages and prevent them from being read by anyone who doesn’t know the code. One way that.
Data encryption with big prime numbers DANIEL FREEMAN, SLU.
RSA Cryptosystem Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 8Feb. 09, 2006Carnegie Mellon University.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Intro to Cryptography ICS 6D Sandy Irani. Cryptography Intro Alice wants to send a message to Bob so that even if Eve can see the transmitted information,
MA/CSSE 473 Day 9 Primality Testing Encryption Intro.
CS480 Cryptography and Information Security
Public-key Cryptography
Symmetric-Key Cryptography
Symmetric-Key Cryptography
Presentation transcript:

Chapter 12: Cryptography MAT 320 Spring 2008

Cryptography: Basic Ideas We want to encode information so that no one other than the intended recipient can decode it. Essentially we have two functions: an encoding function E, and a decoding function, D.

Two Functions If x is a message (and it’s not hard to express messages as numbers), then E(x) should be the encoded message Once the message is received, D(E(x)) is the original message x So E and D are inverse functions

Options One option is to keep both functions secret The advantage of this method is that if unintended recipients do not know your functions, they should be unable to decode your message The disadvantage of this method is that the more people who know your functions, the less able you will be to keep them secret

Personal Keys In a more advanced system, each person has their own functions. Anne has her functions E Anne and D Anne Bob has his functions E Bob and D Bob The problem with this method is that so far, Anne and Bob can only send messages to themselves, not to each other

Public Keys To fix this problem, we make everyone’s E function public. So anyone can encode a message using anyone else’s key. However, we need to keep the D functions private, or else our information could be stolen.

How It Works Anne wants to send a message to Bob. Anne knows E Bob, so she sends E Bob (message) to Bob Only Bob knows D Bob, so only Bob can compute D Bob (E Bob (message)) = message

Signatures Another advantage of a public-key is the ability to “sign” messages. Suppose that the bank receives an encoded message claiming to be from Anne. Anyone can send E Bank (message) to the Bank. But only Anne can send E Bank (D Anne (message)) The bank knows D Bank and E Anne, so they can decode the message by applying these functions

Troubles The main problem that comes up with public-key cryptography is that we need to make sure that it’s very difficult to figure out how the D function works from knowing how the E function works. One method that accomplishes this is RSA cryptography.

Intermission Lemma 12.1 (Limited Cancelling) Lemma 12.2 (Fermat’s Little Theorem)

How RSA Works Let p and q be distinct primes. Let n = pq. In practice, we let p and q be quite large, with hundreds of digits. It is difficult to factor large numbers, even by computer, and if someone were able to factor n, they would be able to break our code. Go ahead and choose primes now. For purposes that will become clear soon, make sure that n is at least 270,000. Again, in practice, n is much, much larger.

How RSA Works, continued Let k = (p – 1)(q – 1), and choose d so that (d, k) = 1. Using Bezout’s Theorem, find e so that de  1 (mod k) The numbers e and n are made public, and the number d is kept private. The encoding function is E(x) = x e mod n The decoding function is D(x) = x d mod n

Let’s Try It Following the example on your handout, enter your numbers p, q, n, and k into Mathematica. Choose a number d so that (d, k) = 1. You may have to try a few times to get a d that works. Once you find a value of d, use the ExtendedGCD command to find e so that ed  1 (mod k). If Mathematica gives you a negative value of e, add k to it (since we’re working mod k, this will be congruent)

Sending Messages First we need to convert our message to numbers. Converting the entire message to a single number would make our calculations difficult, so instead we break it up into blocks. Using A = 01, B = 02, …, Z = 26, break your message into 3-letter blocks and convert them to numbers. Now you see why we needed to have n be at least 270,000. Add extra zeros to the end of your message if it doesn’t break up evenly into three-letter blocks.

Encoding Now we are ready to plug these numbers into our encoding function. When x and d are large, computing x d, dividing it by n, and computing the remainder is very time consuming. However, there are many computational shortcuts Mathematica can use, including the PowerMod command. PowerMod[x,d,n] computes x d mod n

One More Proof In order to convince ourselves that RSA always works, we need to prove this theorem: Theorem 12.3 (RSA Works!) Let p and q be distinct primes, and let n = pq and k = (p – 1)(q – 1). If d and e are chosen so that (d, k) = 1 and ed  1 (mod k), then for all integers x, x ed  x (mod n).