Section 3.8: More Modular Arithmetic and Public-Key Cryptography

Slides:



Advertisements
Similar presentations
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesThe Mighty Mod.
Advertisements

RSA.
Math for Liberal Studies.  When we studied ID numbers, we found that many of these systems use remainders to compute the check digits  Remainders have.
Digital Signatures. Anononymity and the Internet.
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.
22C:19 Discrete Structures Integers and Modular Arithmetic
9/21/12. I can identify which factors are prime numbers. LEARNING TARGET.
 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.
Creating Secret Messages. 2 Why do we need to keep things secret? Historically, secret messages were used in wars and battles For example, the Enigma.
Cryptography 101 How is data actually secured. RSA Public Key Encryption RSA – names after the inventors –Rivest, Shamir, and Adleman Basic Idea: Your.
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
CC3.12 Erdal KOSE Privacy & Digital Security Encryption.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
1 Lecture #10 Public Key Algorithms HAIT Summer 2005 Shimrit Tzur-David.
RSA Exponentiation cipher
By Jennifer Adams. The traditional approach (or algorithm) for large number division is the most abstract and difficult approach to division. Yet many.
Factors Terminology: 3  4 =12
Encryption Methods By: Michael A. Scott
Encryption. Introduction Computer security is the prevention of or protection against –access to information by unauthorized recipients –intentional but.
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
Chapter 12 Cryptography (slides edited by Erin Chambers)
Fmdszqujpo! Encryption!. Encryption  Group Activity 1:  Take the message you were given, and create your own encryption.  You can encrypt it anyway.
Section 3.6: An Introduction to Cryptography
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
The RSA Algorithm Rocky K. C. Chang, March
Encryption Encryption encodes information to hide it from everyone else … maintaining your privacy.
MATH 224 – Discrete Mathematics
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
Mathematics Numbers: Factors
Welcome back! It’s spring…or supposed to be MAT199: Math Alive Cryptography Ian Griffiths Mathematical Institute, University of Oxford, Department of.
MAT 1000 Mathematics in Today's World Winter 2015.
CS110: Computers and the Internet Encryption and Certificates.
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.
Section 2.1: Shift Ciphers and Modular Arithmetic The purpose of this section is to learn about modular arithmetic, which is one of the fundamental mathematical.
Encryption Coursepak little bit in chap 10 of reed.
Systems of Equations as Matrices and Hill Cipher.
Public-Key Cryptography CS110 Fall Conventional Encryption.
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Section 2.1: Shift Ciphers and Modular Arithmetic Practice HW from Barr Textbook (not to hand in) p.66 # 1, 2, 3-6, 9-12, 13, 15.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
Click mouse. EQUATIONS The important thing to remember about equations is that both sides must balance (both sides must equal each other). This means.
Section 4.4: The RSA Cryptosystem Practice HW Handwritten and Maple Exercises p at end of class notes.
MA/CSSE 473 Day 10 Primality testing summary Data Encryption RSA.
1 Simple and Unbreakable: The Mathematics of Internet Security Dr. Monica Nevins Department of Mathematics and Statistics University of Ottawa University.
CSCI 391: Practical Cryptology Substitution Monoalphabetic Ciphers.
Network Security – Special Topic on Skype Security.
CRYPTOGRAPHY. WHAT IS PUBLIC-KEY ENCRYPTION? Encryption is the key to information security The main idea- by using only public information, a sender can.
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
Encryption. Introduction The incredible growth of the Internet has excited businesses and consumers alike with its promise of changing the way we live.
James C. Bradas, Ph.D. Engineering & Analysis Operation 18 June 2009 Public Key Encryption.
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!
Encryption CS110: Computer Science and the Internet.
Adding and Subtracting Decimals © Math As A Second Language All Rights Reserved next #8 Taking the Fear out of Math 8.25 – 3.5.
Chapter 12: Cryptography MAT 320 Spring Cryptography: Basic Ideas We want to encode information so that no one other than the intended recipient.
RSA Encryption © 2014 Project Lead The Way, Inc.Computer Science and Software Engineering.
Week 4 - Wednesday.  What did we talk about last time?  Finished DES  AES.
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.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Digital Signatures.
Public Key Encryption Major topics The RSA scheme was devised in 1978
Polynomial Division.
Public Key Cryptography
National Cipher Challenge
Fundamentals of Data Representation
Public – Private Key Cryptography
Presentation transcript:

Section 3.8: More Modular Arithmetic and Public-Key Cryptography Math for Liberal Studies Section 3.8: More Modular Arithmetic and Public-Key Cryptography

Modular Multiplication The modular arithmetic ciphers we have seen use addition and subtraction For example, the Caesar cipher rule is to add 3 to every letter in the message What about multiplication?

Modular Multiplication In an affine cipher, we multiply by a constant number and then add a (possibly different) number In a multiplicative cipher, we just multiply

Modular Multiplication For example, let’s encode the message “Attack at daybreak” using an affine cipher where we multiply by 3 and then add 5

Modular Multiplication For example, let’s encode the message “Attack at daybreak” using an affine cipher where we multiply by 3 and then add 5

Modular Multiplication To encode T, for example, we convert T to 19, multiply by 3 (to get 57), then add 5 (to get 62). Finally we find the remainder, 10

Modular Multiplication Now we know how to encode a message using an affine cipher How do we decode? Since the 2nd step is to add 5, we should subtract 5 first

Modular Multiplication How do we undo the “multiply by 3” step? The natural answer would be to divide by 3, but that’s not really possible in modular arithmetic

Modular Multiplication There is a way to undo the “multiply by 3” step It turns out that what we need to do is to multiply by 9

Modular Multiplication There is a way to undo the “multiply by 3” step It turns out that what we need to do is to multiply by 9

Modular Multiplication How does multiplying twice get us back to where we started? Notice that we’re multiplying by 3 and then by 9 So we’re multiplying by 3 x 9 = 27 = 1 Multiplying by 1 doesn’t change anything

Modular Multiplication We say that 3 and 9 are multiplicative inverses modulo 26 Also, multiplying by 3 and multiplying by 9 are inverse operations Finding these inverse operations is key to using multiplication to encode and decode messages

Searching for Inverses Can any multiplication operation be reversed? How about multiplication by 6?

Searching for Inverses Can any multiplication operation be reversed? How about multiplication by 6? As we can see, both B and O get encoded as G

Searching for Inverses If we wanted to decode a message that has a G in it, there would be no way of knowing if it should be a B or an O We can’t use this operation to encode messages because it is not reversible

Searching for Inverses The problem is even worse if we try to multiply by 13 Every letter gets encoded as A or N It would be impossible to decode a message using this cipher

Searching for Inverses How can we know in advance whether a particular multiplication operation will be reversible? Whenever we multiply by a number that shares a common factor greater than 1 with the modulus, that operation will not be reversible

Searching for Inverses 6 and 26 are both divisible by 2 13 and 26 are both divisible by 13 3 and 26 do not share any common factors other than 1

Prime Numbers For this reason, we will often change the modulus from 26 to a prime number A prime number only has divisors of 1 and itself For example, 27 is not prime (its divisors are 1, 3, 9, and 27), but 29 is prime

Prime Numbers The advantage of using a prime number modulus is that we no longer have to worry about the numbers we multiply by sharing common factors with the modulus The disadvantage is that our modulus is now greater than 26

Prime Numbers Suppose we encode the message “Retreat at once” using multiplication by 6, modulo 29

Prime Numbers Suppose we encode the message “Retreat at once” using multiplication by 6, modulo 29

Prime Numbers Suppose we encode the message “Retreat at once” using multiplication by 6, modulo 29 Notice that we get results like 26 and 27, which we cannot turn back into letters

Prime Numbers When we use multiplicative and affine ciphers with a modulus greater than 26, we will simply leave our encoded message as a sequence of numbers

Prime Numbers We know that using prime numbers means that we will always have a reversible multiplicative cipher However, in general, finding the inverse operation can be quite difficult

Public-Key Cryptography Affine and multiplicative ciphers are examples of asymmetric ciphers This means that the method for decoding messages is not easily determined even if you know the encoding method Asymmetric ciphers allow for a system called public-key cryptography

Public-Key Cryptography In a public-key system, everyone has two keys: a method for encoding messages, and a method for decoding messages With a multiplicative cipher, the keys are numbers: The encoding key is the number you must multiply by to encode the message The decoding key is the number used to decode the message

Public-Key Cryptography The difference in a public-key system is that the encoding keys are made public Everyone knows everyone else’s encoding key The decoding keys are kept private For a system like this to work, it must be very difficult to determine the decoding keys from the encoding keys

Public-Key Cryptography How does a system like this work? Suppose Adam wants to send a message to Beth Adam encodes his message using Beth’s public key

Public-Key Cryptography Remember that only Beth knows her private decoding key So only Beth will be able to decode the message But anyone is able to send a private message like this to Beth

Public-Key Cryptography Think about it this way: Using Beth’s public key to encode a message is like putting in a special kind of box that only Beth can open In this case suppose that Beth’s boxes are blue, and only Beth can open blue boxes But anyone can buy blue boxes, and use them to send messages to her

Public-Key Cryptography Suppose Adam’s boxes are red Again, anyone can buy red Adam boxes, but only Adam can open them If Christine sends Adam a message encoded using his public key, she doesn’t have to worry about Beth intercepting the message and decoding it

Beyond Packages: Signatures This analogy breaks down a bit, as there is something else we can do with this system Suppose Christine works at a bank and receives a request to transfer a large amount out of Beth’s bank account She wants Beth to send a secure message verifying the transfer

Beyond Packages: Signatures The problem is that anyone can send a message to Christine posing as Beth Even if they use Christine’s public key to encode the message, this doesn’t ensure that the message came from Beth, it just makes sure that the message goes to Christine

Beyond Packages: Signatures Instead, Beth can send a message (such as “I authorize the transfer”) to Christine encoded with Beth’s private key Now anyone can decode this message (using Beth’s public key), but only Beth could have encoded it, since only Beth knows that private key In this way, it is guaranteed that the message came from Beth

Real-World Cryptography Notice that affine and multiplicative ciphers are substitution ciphers This means that they are susceptible to techniques like frequency analysis These methods are unsuitable to use for public-key cryptography, which requires that the codes be virtually unbreakable

Real-World Cryptography A common system in use today is RSA cryptography, which relies on the same kinds of ideas we have studied (prime numbers and inverse operations in modular arithmetic) However, the prime numbers we use for RSA are many digits long

Real-World Cryptography For example, here is a typical security message used by a web browser “128 bit” means that the encryption key could be as large as 2128, which a 39-digit number

Real-World Cryptography Even with a computer checking a billion keys per second, it would take up to 10 thousand billion billion years to check them all This is far, far longer than the age of the universe RSA relies on the size of the key being large enough to make breaking the code take an impossibly long amount of time