Cryptography Prof. Seth D. Bergmann Rowan University Computer Science.

Slides:



Advertisements
Similar presentations
Last Class: The Problem BobAlice Eve Private Message Eavesdropping.
Advertisements

Netprog: Cryptgraphy1 Cryptography Reference: Network Security PRIVATE Communication in a PUBLIC World. by Kaufman, Perlman & Speciner.
CSE331: Introduction to Networks and Security Lecture 19 Fall 2002.
22C:19 Discrete Structures Integers and Modular Arithmetic
BY : Darshana Chaturvedi.  INTRODUCTION  RSA ALGORITHM  EXAMPLES  RSA IS EFFECTIVE  FERMAT’S LITTLE THEOREM  EUCLID’S ALGORITHM  REFERENCES.
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Digital Signatures and applications Math 7290CryptographySu07.
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.
8-1 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents m sender encrypts message m receiver.
Cryptography (continued). Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m.
Public Encryption: RSA
RSA Exponentiation cipher
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Public Key Algorithms 4/17/2017 M. Chatterjee.
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
Network Security – Part 2 V.T. Raja, Ph.D., Oregon State University.
[[ NET-CENTRIC CAPABILITIES TURBULENCE TECHNICAL OVERVIEW : AUGUST 2007 ]] MATH CAREERS AT NATIONAL SECURITY AGENCY Jill Calhoun May 2010.
Diffie-Hellman Key Exchange
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 Methods By: Michael A. Scott
Encryption. Introduction Computer security is the prevention of or protection against –access to information by unauthorized recipients –intentional but.
Public Key Model 8. Cryptography part 2.
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.
Sorting Out Digital Certificates Bill blog.codingoutloud.com ··· Boston Azure ··· 13·Dec·2012 ···
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
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.
Pretty Good Privacy by Philip Zimmerman presented by: Chris Ward.
Cryptography ECT 582 – Winter 2004 Robin Burke. Discussion.
CS110: Computers and the Internet Encryption and Certificates.
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.
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.
Public-Key Cryptography CS110 Fall Conventional Encryption.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Midterm Review Cryptography & Network Security
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
Encryption.
1 Cryptography NOTES. 2 Secret Key Cryptography Single key used to encrypt and decrypt. Key must be known by both parties. Assuming we live in a hostile.
Encryption. What is Encryption? Encryption is the process of converting plain text into cipher text, with the goal of making the text unreadable.
1 Security and Cryptography: basic aspects Ortal Arazi College of Engineering Dept. of Electrical & Computer Engineering The University of Tennessee.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
1 Introduction The State of the Art in Electronic Payment Systems, IEEE Computer, September 1997.
1 Network Security Basics. 2 Network Security Foundations: r what is security? r cryptography r authentication r message integrity r key distribution.
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
1 Hello World and Welcome to The simple crypt Key=23 {txzr7c x7Cr 7d~zg{r 7tengc Private-key Cryptography.
Encryption CS110: Computer Science and the Internet.
Electronic Commerce School of Library and Information Science PGP and cryptography I. What is encryption? Cryptographic systems II. What is PGP? How does.
Introduction to Cryptography Lecture 9. Public – Key Cryptosystems Each participant has a public key and a private key. It should be infeasible to determine.
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.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Cryptographic Security Aveek Chakraborty CS5204 – Operating Systems1.
RSA Cryptosystem Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 8Feb. 09, 2006Carnegie Mellon University.
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 Cryptography is art or science of transforming intelligible message to unintelligible and again transforming that message back to the original.
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.
Basics of Cryptography
Public-key Cryptography
Cryptography Reference: Network Security
Discrete Math for CS CMPSC 360 LECTURE 14 Last time:
Public – Private Key Cryptography
Presentation transcript:

Cryptography Prof. Seth D. Bergmann Rowan University Computer Science

Cryptography: Why? Secure communication is needed by: Government Military Financial organizations Individual citizens The Internet is not a secure channel.

Cryptography Alice wishes to send a confidential message to Bob.

Cryptography (Evil) Eve wants to intercept the message To learn what Alice is sending to Bob To change all or part of the message to Bob To pretend that she is Alice (and/or Bob). Eve Bob Alice

How Can Alice and Bob Thwart Eve? Encrypt the message (plain text) into an unreadable form (cipher text) which only Bob can decipher Authenticate Alice’s message, to prove that it is really sent directly by Alice Provide a message ‘digest’ which guarantees that Eve has not tampered with the message.

Secure Communication Terminology Cryptology Cryptography (Encryption and decryption) Cryptanalysis (“Breaking” a code) Authentication Integrity Verification (of authenticity and integrity) Key Distribution Certificates.

Metaphors Authentication Certificate Encryption and Integrity Ordinary Email To::

Private-key Cryptography Same key used for encryption and decryption Symmetric Key distribution is a major problem.

Private-key Cryptography OK, How about 11011001 ? We need to agree on a Key!

Key Distribution Could Be a Problem OK, I’ve got your key!!! OK, How about 11011001 ? We need to agree on a Key!

Private-key Cryptography We both need to know how to use this key for encryption and decryption !

Math for Encryption and Decryption All information is coded as 0’s and 1’s For example: ‘A’ is 00000 ‘B’ is 00001 ‘C’ is 00010 ‘Z’ is 11001

Math for Encryption and Decryption Exclusive OR is defined as: + x y 1 0 = false 1 = true Exclusive OR means ‘different’

Math for Encryption and Decryption x y 1

Using XOR to Encrypt a Message Example: plain 00111 01000 = “HI” key 01011 00110 = “LG” cipher 01100 01110 = “MO”

Using XOR to Decrypt the Cipher

Using XOR to Decrypt the Cipher Example: cipher 01100 01110 = “MO” key 01011 00110 = “LG” plain 00111 01000 = “HI”

Private-Key Cryptography Summary Encryption: Decryption:

Public-key Cryptography Each person has two keys: Public key, used by anyone encrypting messages to this person Private key, used by this person to decrypt received messages A person may announce the public key to the world, but the private key is secret. The public and private keys are related in such a way that the private key is used to decrypt any message encrypted with the public key.

Use it to encrypt messages to me! Bob Has Two Keys My private key is 0001011101 My public key is 1011100010! Use it to encrypt messages to me!

Alice Uses Bob’s Public Key to Encrypt the Message Encr(1011100010 ,“Hey!”) = “gX&*3i” “gX&*3i”

Bob Uses His Private Key to Decrypt the Message Decr(“gX&*3i”, 0001011101) = “Hey!”

Eve Has Been Thwarted “gX&*3i” “Hey!” ??? “Hey!” No problem with key distribution!

How Does it Work? Prime numbers have no divisors: 2, 3, 5, 7, 11, 13, 17, 19, 23, ... Every number is the product of prime factors Examples 36 = 2 x 2 x 3 x 3 21 = 3 x 7 100 = 2 x 2 x 5 x 5 Finding factors of large numbers is hard

Public and Private Keys The public and private keys are related To find Bob’s private key, using his public key, Eve will have to factor the public key. This could take years, even with a fast computer. Eve has been thwarted.

How Does Public Key Cryptography Work? Mathematics Modular Arithmetic Exponents, modular Multiplicative inverse, modular.

Modular Arithmetic 2 1

Modular Arithmetic Remainder after division Example:

Mod 5 4 1 3 2

Multiplicative Inverses if xy = 1, then x and y are inverses What is the inverse of 2 (mod 5)?

How Does Public Key Cryptography Work? My private key is 0001011101 My public key is 1011100010! Use it to encrypt messages to me!

How Does Public Key Cryptography Work? Bob chooses two random prime numbers: p and q Bob’s public modulus is m = pq n = (p-1) (q-1) Bob chooses a number, e, which is relatively prime to n (e and n share no factors) e is Bob’s (public) encryption exponent m and e, together, make up Bob’s public key.

How Does Public Key Cryptography Work? Bob announces his public key (m,e) to the world To encrypt a message to Bob, Alice codes the message as a number and uses his public key:

Decryption Bob will need a private key, d, to decrypt the message: The (private) decryption exponent is the inverse of the (public) encryption exponent

Decryption From Fermat’s Little Theorem (1636): To decrypt the message from Alice, Bob uses his private key, d:

Can Eve Find Bob’s Private Key? Hmm, m = 55 = 5*11 = p*q n = (p-1) * (q-1) = 4*10 = 40 d = e-1 (mod 40) = 23 Gotcha! My public key is: m = 55 e = 7

Public Key Cryptography My private key is d = 103,583,939 I don’t care who intercepts the message. My public key is: m = 117,852,727 e = 24,059 Use these to encrypt messages to me!

Can Eve Find Bob’s Private Key? Hmm, m = 117,852,727 = ??? Takes too long to factor!!! Foiled!! My public key is: m = 117,852,727 e = 24,059

Useful By-products of Public Key Cryptography Integrity: Has somebody tampered with this message? Authentication: Is this message really coming from the person in the from field, or is it from an impostor? (Digital signature).

Integrity To: Alice From: Bob You stink! To: Alice From: Bob I Love You Eve can intercept a message, change it, and forward it to Alice, without her knowing it! (Integrity is poor)

Authentication To: Alice From: Bob Meet me after school at McD’s! Eve can send a message to Alice, pretending to be Bob! (The message is not authentic)

Digital Signatures Bob wishes to sign a message to Alice in such a way that she can be sure it is from him She will also know that nobody has tampered with the message.

Digital Signatures Solution to both problems Ensure message integrity Provide authentication By-product of public-key cryptography.

Digital Signatures Bob encrypts the message with his private decryption key, d!!! This is his signature. Sig = Decr(msg) He sends his signature and the message to Alice. To: Alice From: Bob I Love You Signed: 011010

Verification Alice uses Bob’s public encryption key (m,e) to decrypt the signature. Encr(sig) = msg If the result doesn’t match the message, she knows that either Someone altered the message or the signature, or The message did not come from Bob It’s really from Bob! To: Alice From: Bob I Love You Signed: 011010 To: Alice From: Bob I Love You Encr(011010) = I Love You

Digital Signatures Why does it work? (msgd)e (mod m) = msg There is only one person who knows d: Bob He is the only one who could have created the signature, msgd.

Summary Communications Security is Improved by Cryptography (Encryption & Decryption) Integrity (Tamper-proof communications) Authenticity (Impostors are ignored) No security system is 100% effective Thank you for listening... And be careful!!

Are You Interested in Computer Science? http://cs.rowan.edu/compsci www.abet.org