Public – Private Key Cryptography

Slides:



Advertisements
Similar presentations
The Diffie-Hellman Algorithm
Advertisements

1 Key Exchange Solutions Diffie-Hellman Protocol Needham Schroeder Protocol X.509 Certification.
Hash Functions A hash function takes data of arbitrary size and returns a value in a fixed range. If you compute the hash of the same data at different.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (4) Information Security.
Digital Signatures. Anononymity and the Internet.
Section 3.8: More Modular Arithmetic and Public-Key Cryptography
Public Key Algorithms …….. RAIT M. Chatterjee.
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
RSA Exponentiation cipher
Cryptography Prof. Seth D. Bergmann Rowan University Computer Science.
Network Security – Part 2 V.T. Raja, Ph.D., Oregon State University.
Diffie-Hellman Key Exchange
Lecture 6: Public Key Cryptography
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.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Network Security – Part 2 (Continued) Lecture Notes for May 8, 2006 V.T. Raja, Ph.D., Oregon State University.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Public-Key Cryptography CS110 Fall Conventional Encryption.
RSA Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
Week 4 - Wednesday.  What did we talk about last time?  RSA algorithm.
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
Encryption CS110: Computer Science and the Internet.
Network Security Continued. Digital Signature You want to sign a document. Three conditions. – 1. The receiver can verify the identity of the sender.
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Network Security Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography (confidentiality) 8.3 Message integrity 8.4 End-point authentication.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 14. Digital signature.
Secure HTTP (HTTPS) Pat Morin COMP 2405.
Web Security.
Public Key Cryptography
Digital Signatures.
최신정보보호기술 경일대학교 사이버보안학과 김 현성.
Lesson 2-18 AP Computer Science Principles
CS480 Cryptography and Information Security
Basics of Cryptography
Attacks on Public Key Encryption Algorithms
RSA Slides by Kent Seamons and Tim van der Horst
Cryptography Much of computer security is about keeping secrets
Privacy & Security.
Public Key Encryption Systems
Public-key Cryptography
May 2008 Prepared by Dr. Abdulrahman Awadhi
12. Encryption on the Internet
Introduction to security goals and usage of cryptographic algorithms
Keys Campbell R. Harvey Duke University, NBER and
Campbell R. Harvey Duke University and NBER
Public Key Cryptography
Public Key Infrastructure
Security through Encryption
Campbell R. Harvey Duke University and NBER
NET 311 Information Security
Cryptography: Basics (2)
CS Introduction to Operating Systems
Practical Aspects of Modern Cryptography
CS2911 Week 9, Class 1 Today Discussion on RSA Video Eavesdropping
Chapter 4 Cryptography / Encryption
Key Management Network Systems Security
NET 311 Information Security
Diffie-Hellman key exchange/agreement algorithm
Discrete Math for CS CMPSC 360 LECTURE 14 Last time:
Introduction to Elliptic Curve Cryptography
Secure How do you do it? Need to worry about sniffing, modifying, end-user masquerading, replaying. If sender and receiver have shared secret keys,
One Time Signature.
Key Distribution Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, /18/2019 Ref: Pfleeger96, Ch.4.
Asymmetric Cryptographic Algorithms
Public Key Encryption Systems
Secure Diffie-Hellman Algorithm
Presentation transcript:

Public – Private Key Cryptography Solving the problem of exchanging keys while creating brand new problems!

Symmetric Cryptography Last time we talked about encryption algorithms that involve a key But… both sides the encipher-er and the decipher-er both had to have the same key How can we send that securely… basic answer is we can’t unless… we use another method that doesn’t rely on us having the same key

Public-Private Key The idea behind public private key cryptography is simple (the math is also pretty simple but it relies on prime numbers heavily) You generate two keys, a public key that you provide to everyone and a private key that you put under your pillow to guard with your life Anytime anyone wants to send you a message, they can encrypt their message to you with the public key and then only you can decrypt it Anytime you send a message to someone, you can encrypt with their public key and sign the message with your private key thus they know the message is from you because they can’t decrypt without verifying the sign with your public key

The Math!! This relies on prime numbers and modulo arithmetic The formulas are simple, but there are a lot of them Pair up and pull out a calculator (or python…)

Alice & Bob Alice and Bob want to communicate securely so they decide they generate public-private key pairs and exchange public keys Steps Pick two prime numbers p and q (i.e. 7 & 13) Multiply them to produce n (i.e. 91) Compute k, the “totient” function (p – 1) * (q – 1) (i.e. 72) Pick a random number, e, such that 1 < e < k and e is coprime with k, it shares no common factors (i.e. 23) [this is the hardest step] Compute the modular multiplicative inverse, d, such that e^-1 = d % k (i.e. 47) That’s it! Your public key is n and e and the private key is n and d

Generation Public Key (n = 91, e = 23) Private Key (n = 91, d = 47) Alice Bob Public Key (n = 91, e = 23) Private Key (n = 91, d = 47) Alice sends Bob the public key Public Key (n = 77, e = 17) Private Key (n = 77, d = 53) Bob sends Alice the public key

Sending Messages (Alice => Bob) Public Key (n = 91, e = 23) Private Key (n = 91, d = 47) Encrypt using Bob’s public key m = 44 c = m ^ e % n (44 ^ 77 % 17) c = 11 Sign the message with Alice’s private key b = c * 2654435761 % 2^32 s = b ^ d % n s = 47 Alice sends c and s Public Key (n = 77, e = 17) Private Key (n = 77, d = 53) First confirm its Alice by using her public key b = c * 2654435761 % 2^32 s = b^e % n s = 47 The signatures match so decrypt with Bob’s private key m = c^d % n (11 ^ 53 % 77) m = 44

Why is this Safe? First the prime numbers we use for this are huge, so large in fact it would take millennia to find the original numbers using the public key But this does have a problem… What if, during the exchange of public keys, someone stepped into the middle Bob sends Alice his key, but Mary intercepts the message Mary sends Alice her public key instead When Bob sends a message, Mary gets it, reads the contents and then forwards to Alice using her keys instead This is a man in the middle attack!

Enter Certificate Authorities All they really do is confirm that the public key you received truly came from the person you believe sent it because they generated and keep a copy of the public / private key pair