CRYPTOGRAPHY. WHAT IS PUBLIC-KEY ENCRYPTION? Encryption is the key to information security The main idea- by using only public information, a sender can.

Slides:



Advertisements
Similar presentations
RSA.
Advertisements

Public Key Cryptosystem
RSA COSC 201 ST. MARY’S COLLEGE OF MARYLAND FALL 2012 RSA.
Data encryption with big prime numbers
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?
OOP/Java1 Public Key Crytography From: Introduction to Algorithms Cormen, Leiserson and Rivest.
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.
Caesar Cipher a b c d e f g h I j k l m n o p q r s t u v w x y z b c d e f g h I j k l m n o p q r s t u v w x y z a shift of 1 c d e f g h I j k l m.
HW6 due tomorrow Teams T will get to pick their presentation day in the order Teams T will get to pick their presentation day in the orderQuestions? Review.
CC3.12 Erdal KOSE Privacy & Digital Security Encryption.
Public Key Crytography1 From: Introduction to Algorithms Cormen, Leiserson and Rivest.
Computers in Society Encryption. Representing Sensory Experience Some objects correspond to human sensory experience – these representations are created.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
1 Lecture #10 Public Key Algorithms HAIT Summer 2005 Shimrit Tzur-David.
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
CSCI 172/283 Fall 2010 Public Key Cryptography. New paradigm introduced by Diffie and Hellman The mailbox analogy: Bob has a locked mailbox Alice can.
Encryption. Introduction Computer security is the prevention of or protection against –access to information by unauthorized recipients –intentional but.
Codes, Ciphers, and Cryptography-RSA Encryption
Introduction to Public Key Cryptography
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
David Froot.  How do we transmit information and data, especially over the internet, in a way that is secure and unreadable by anyone but the sender.
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.
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.
Welcome back! It’s spring…or supposed to be MAT199: Math Alive Cryptography Ian Griffiths Mathematical Institute, University of Oxford, Department of.
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.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Public-Key Cryptography CS110 Fall Conventional Encryption.
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.
Encryption.
Cryptography Dave Feinberg. Suppose I send an from to Who has access to that ? What if I want the.
CSCI 172/283 Fall 2010 Hash Functions, HMACs, and Digital Signatures.
1 Simple and Unbreakable: The Mathematics of Internet Security Dr. Monica Nevins Department of Mathematics and Statistics University of Ottawa University.
Traditional Symmetric-Key Ciphers
Network Security – Special Topic on Skype Security.
CPS 290 Computer Security Network Tools Cryptography Basics CPS 290Page 1.
Encryption. Introduction The incredible growth of the Internet has excited businesses and consumers alike with its promise of changing the way we live.
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!
14-1 Last time Internet Application Security and Privacy Basics of cryptography Symmetric-key encryption.
Encryption CS110: Computer Science and the Internet.
CS Modular Division and RSA1 RSA Public Key Encryption To do RSA we need fast Modular Exponentiation and Primality generation which we have shown.
Chapter 12: Cryptography MAT 320 Spring Cryptography: Basic Ideas We want to encode information so that no one other than the intended recipient.
Cryptography CS Lecture 19 Prof. Amit Sahai.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Data encryption with big prime numbers DANIEL FREEMAN, SLU.
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,
Cryptography By: Nick Belhumeur. Overview What is Cryptography? What is Cryptography? 2 types of cryptosystems 2 types of cryptosystems Example of Encryption.
Digital Signatures.
Lesson 2-18 AP Computer Science Principles
Asymmetric-Key Cryptography
Vocabulary Big Data - “Big data is a broad term for datasets so large or complex that traditional data processing applications are inadequate.” Moore’s.
Big Numbers: Mathematics and Internet Commerce
Public Key Cryptography
NET 311 Information Security
NET 311 Information Security
Symmetric-Key Cryptography
Public – Private Key Cryptography
Presentation transcript:

CRYPTOGRAPHY

WHAT IS PUBLIC-KEY ENCRYPTION? Encryption is the key to information security The main idea- by using only public information, a sender can lock up their information in such a way that it can only be unlocked (privately) by the intended recipient.

WAIT, WHAT? Let’s say we each have a box. Each of us buys a padlock with our name on it and puts it on a table, unlocked for everyone to use. You have the key to your lock and no one else does. Now Melanie wants to send a secure message to Elyse. She puts it in Elyse’s box, then locks the box with Elyse’s lock. Since only Elyse can unlock her box, the message is safe!

AC Only Elyse’s key can unlock it and get the message! EM CR PL AC ML CRPL ML EM

PUBLIC KEYS AND PRIVATE KEYS You can think of the pad lock from the earlier example as a public key- everyone has access to it and can use it to secure the message in the box. Anyone who wants to send Elyse a message just has to grab her lock from the table, put a message in her box, and lock the box. The key, in this case, is a private key - only the recipient of the message has it. If you don’t have the private key, you can’t unlock the message! The public key and private key are a pair, just like the lock and key- you need both for the system to work!

SENDING MESSAGES- ALICE AND BOB Alice wants to send Bob a secret message. Instead of an actual box and key, though, Alice just wants to hand him a piece of paper. Eve wants to intercept Alice’s message and read it. Alice needs to use encryption so that Bob can read her message but no one else can. Instead of a box and key, though, we are going to use maps.

THE IDEA Alice wants to send Bob a message in words. To do that, she first has to convert her message into numbers. We can use ASCII for this! Let’s say that Alice wants to send Bob a message that simply says “B.” According to the ASCII character codes chart, this means that she wants to somehow send him the number 66.

STEP ONE- BOB’S PRIVATE KEY Before Alice can send Bob a message, Bob needs to create his own private key. In this example, Bob’s private key is a map. Only Bob can see this map!

STEP 2- BOB’S PUBLIC MAP Once Bob has made his private map, he publishes a public map for everyone to see! Now anyone, including Alice, can send him a message using it.

HOW DOES IT WORK? Alice wants to send Bob the number 66. To do that, she needs to place random numbers on each intersection of the map, so that all of the numbers on the map add up to

THAT DOESN’T SEEM SAFE… You’re right! That message definitely isn’t secure- if someone were to intercept it, all they would have to do is add up the numbers to figure out the message! This is where the encoding part comes in- Alice needs to encrypt this map so that only Bob can read it!

ALICE’S ENCRYPTION To make her map secure, Alice needs to assign a new number to each node. This new number is the sum of the three surrounding nodes and the node itself. The new number is in parentheses.

SENDING THE MESSAGE Once Alice has assigned a new value to each of the nodes, she sends her map with just the new numbers (not the original ones!) to Bob. Now Bob needs to decode the message using his private key.

CRACKING THE CODE Remember Bob’s map? When you first saw it, it probably didn’t make any sense. This map tells us that when we add up the large nodes, we get the original message!

THE FINAL RESULT Anyone without that vital piece of information would probably be stumped by the map- they wouldn’t know what to do with all of those numbers! With Bob’s private key, however, it’s easy to decrypt = 66!

YOUR TURN Now that you’ve seen encryption in action, it’s time to try it out yourself! First we will try it with pre-made maps, and then we will make our own.

PUBLIC KEY ENCRYPTION IN COMPUTER SCIENCE Sending messages to each other is fun and all, but how does this apply to computer science? Public key encryption is used all of the time to send messages between computers. For instance, let’s say you wanted to buy something online with your credit card. You only want the person you are buying from to receive your credit card number. What’s stopping someone from stealing your credit card number by intercepting it?

THE SOLUTION- RSA Instead of just sending your credit card number as- is, the computer will encrypt the number based on the recipient’s public key. That way, only the recipient will be able to decode the message- just like the lock and key analogy! The way that computers use this concept is called the RSA public key cryptosystem.

HOW DOES IT WORK? The big idea behind RSA is that it is very difficult to factor large numbers. When we say “factor,” we mean finding all of the prime factors of a number. This means finding the prime numbers that multiply together to make the original number. For example, the prime factorization of 6 is 2x3, the prime factorization of 24 is 2x2x2x3, etc. It can take a supercomputer several months to factor a 100 digit number!

HOW DOES THIS HELP US? It may be very difficult to factor large numbers, but it’s very easy to multiply two prime numbers together! Using that fact, we can choose two large prime numbers (say 12,553 and 13,007) and multiply them together to get 163,276,871. If we were told to factor 163,276,871 without any hints, it would be very difficult to do! Although the math behind cryptography can be difficult, the underlying principle is pretty simple!

RSA- WHAT HAPPENS Just like with our maps, the first step is to choose a private key. Instead of creating a map, this algorithm requires you to choose 2 large prime numbers to be your private key. The larger they are, the better! For this example we are going to use 12,553 and 13,007.

RSA- WHAT HAPPENS Next, we need to make a public key that goes with our private key. For this algorithm, the public key is a pair of numbers The first number is the product of our two numbers (12553 x = 163,276,861). Let’s call it m. The second number is any number that is relatively prime to (i.e. shares no common factors with) the product of (12,553 -1)x( ), which is 163,251,312. For this example, we will use 79,921 (trust us, it’s relatively prime!) Let’s call it k.

WHY IS THAT PUBLIC KEY SAFE? Like we said before, it is very difficult to factor large numbers! If someone saw the number 163,276,861 and wanted to figure out the two primes we chose originally by factoring it, it would take them a very long time! And these numbers aren’t even that big! So now the public knows that our two numbers are 163,276,861 (m) and 79,921 (k). Using these numbers, how can someone send us a message?

SENDING THE MESSAGE USING MODS RSA involves modular arithmetic, which we discussed briefly. Let’s say we want to send the message “To be or not to be.” This means that we want to send the number We can’t send it all at once! You can only send your message in pieces that are smaller than the “m” you’ve chosen. In this case, our “m” is 9 digits long, so we’re actually sending four numbers: , , , 15.

SENDING THE MESSAGE USING MODS Now, we take each of these numbers and plug it in to a special equation: “number”^k = “encoded number”(mod m) One equation: ^79921 = “encoded number”(mod ) You can see that in order to solve the equation, we need our recipient’s public key, or “m” and “k.” Without these two numbers, we can’t encode our number! If you solve this equation for each number, you get four new numbers, the “encoded numbers”. We did this part for you; here is our message after it has been encoded: , , ,

DECODING THE MESSAGE Once we send those numbers to our recipient, they need to decode it. For each number we sent them, they need to solve this equation: “answer”^k = “number”(mod m) One equation: “answer”^79921 = (mod ) Remember: The yellow and brown numbers are our public key, and the green number is part of our encoded message.

WHERE DOES THE FACTORING COME IN? We won’t go into the specifics about how to solve this equation, but the important thing to know is that in order to solve it, we need to factor our number “m” (163,276,861). Luckily, our recipient knows the prime factorization of m- it is his private key, the two prime numbers he chose in the first place! In our example, those numbers were 12,553 and 13,007. Anyone else who tried to solve those equations without knowing that would have a very difficult time!

SUMMARY Even if computers become better at factoring large numbers, this method will still work! For instance, if computers can factor 200 digit numbers very quickly in the future, all you need to do is choose two 200 digit primes for your private key- that way, you get a 400 digit number for your number “m” in your public key, which is extremely hard to factor!