Introduction to Cryptography

Slides:



Advertisements
Similar presentations
Chapter 3 Public Key Cryptography and Message authentication.
Advertisements

Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
TLS Introduction 14.2 TLS Record Protocol 14.3 TLS Handshake Protocol 14.4 Summary.
Topic 7: Using cryptography in mobile computing. Cryptography basics: symmetric, public-key, hash function and digital signature Cryptography, describing.
Computer Science CSC 474By Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.1 Introduction to Cryptography.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
Netprog: Cryptgraphy1 Cryptography Reference: Network Security PRIVATE Communication in a PUBLIC World. by Kaufman, Perlman & Speciner.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Cryptography The science of writing in secret code.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Security Chapters 14,15. The Security Environment Threats Security goals and threats.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CC3.12 Erdal KOSE Privacy & Digital Security Encryption.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
Apr 22, 2003Mårten Trolin1 Agenda Course high-lights – Symmetric and asymmetric cryptography – Digital signatures and MACs – Certificates – Protocols Interactive.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CS1001 Lecture 24. Overview Encryption Encryption Artificial Intelligence Artificial Intelligence Homework 4 Homework 4.
Chapter 13: Electronic Commerce and Information Security Invitation to Computer Science, C++ Version, Fourth Edition SP09: Contains security section (13.4)
Computer Science CSC 774Dr. Peng Ning1 CSC 774 Advanced Network Security Topic 2. Review of Cryptographic Techniques.
1 Fluency with Information Technology Lawrence Snyder Chapter 17 Privacy & Digital Security Encryption.
Sorting Out Digital Certificates Bill blog.codingoutloud.com ··· Boston Azure ··· 13·Dec·2012 ···
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
1 Cryptography Basics. 2 Cryptography Basic terminologies Symmetric key encryption Asymmetric key encryption Public Key Infrastructure Digital Certificates.
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.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
.Net Security and Performance -has security slowed down the application By Krishnan Ganesh Madras.
Linux Networking and Security Chapter 8 Making Data Secure.
Network Security. Security Threats 8Intercept 8Interrupt 8Modification 8Fabrication.
The School of Electrical Engineering and Computer Science (EECS) CS/ECE Network Security Dr. Attila Altay Yavuz Basics Credit: Prof. Dr. Peng Ning Network.
Cryptography, Authentication and Digital Signatures
Chapter 17 Security. Information Systems Cryptography Key Exchange Protocols Password Combinatorics Other Security Issues 12-2.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
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.
Lecture 16: Security CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9.
Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
Digital Signatures, Message Digest and Authentication Week-9.
CS 4244: Internet Programming Security 1.0. Introduction Client identification and cookies Basic Authentication Digest Authentication Secure HTTP.
Lecture 2: Introduction to Cryptography
1 Normal executable Infected executable Sequence of program instructions Entry Original program Entry Jump Replication and payload Viruses.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Encryption. Introduction The incredible growth of the Internet has excited businesses and consumers alike with its promise of changing the way we live.
Encryption CS110: Computer Science and the Internet.
Public Key Encryption, Secure WWW Transactions & Digital Signatures.
Intro to Cryptography Lesson Introduction
MM Clements Cryptography. Last Week Firewalls A firewall cannot protect against poor server, client or network configuration A firewall cannot.
Lecture 3 Page 1 CS 236 Online Introduction to Cryptography CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
 Encryption provides confidentiality  Information is unreadable to anyone without knowledge of the key  Hashing provides integrity  Verify the integrity.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
CMSC 414 Computer and Network Security Lecture 2 Jonathan Katz.
CRYPTOGRAPHY Cryptography is art or science of transforming intelligible message to unintelligible and again transforming that message back to the original.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Symmetric Cryptography
IT443 – Network Security Administration Instructor: Bo Sheng
Cryptography Reference: Network Security
Cryptography Reference: Network Security
Secure Sockets Layer (SSL)
Encryption
Cryptography.
Cryptography Basics and Symmetric Cryptography
The Secure Sockets Layer (SSL) Protocol
Cryptography Reference: Network Security
Introduction to Cryptography (1)
Presentation transcript:

Introduction to Cryptography Joe McCarthy

CSS 432: Introduction to Cryptography Outline 2. Introduction to Cryptography. What Is Cryptography? Breaking an Encryption Scheme. Types of Cryptographic Functions. Secret Key Cryptography. Public Key Cryptography. Hash Algorithms. Network Security: Private Communication in a Public World, 2/E Charlie Kaufman Radia Perlman Mike Speciner CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography The art of secret writing. The art of mangling information into apparent unintelligibility in a manner allowing a secret method of unmangling. CSS 432: Introduction to Cryptography

Cryptography Definitions Messages: Plaintext Ciphertext Ingredients: Algorithm(s) Key(s) Players: Cryptographer: invents clever algorithms Cryptanalyst: breaks clever algorithms CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Algorithm Key(s) = secret value(s) OK for good algorithm to be public Not OK to use bad algorithm “Sunlight is the best disinfectant” Algorithm without key does not help unmangle the information CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Computational Issues Algorithm should be reasonably efficient Security depends on how hard it is to break Combination lock 3 number sequence (2R, 1L, 0R), #s between 1-40 Possible combinations: CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Computational Issues Algorithm should be reasonably efficient Security depends on how hard it is to break Combination lock 3 number sequence (2R, 1L, 0R), #s between 1-40 Possible combinations: 403 = 64,000 10 seconds per sequence: 178 hours (/ 2 = 89) CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Computational Issues Algorithm should be reasonably efficient Security depends on how hard it is to break Combination lock 3 number sequence (2R, 1L, 0R), #s between 1-40 Possible combinations: 403 = 64,000 10 seconds per sequence: 178 hours (/ 2 = 89) CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Computational Issues Algorithm should be reasonably efficient Security depends on how hard it is to break Combination lock 3 number sequence (2R, 1L, 0R), #s between 1-40 Possible combinations: 403 = 64,000 10 seconds per sequence: 178 hours (/ 2 = 89) 4 number sequence, 13 seconds per sequence CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Computational Issues Algorithm should be reasonably efficient Security depends on how hard it is to break Combination lock 3 number sequence (2R, 1L, 0R), #s between 1-40 Possible combinations: 403 = 64,000 10 seconds per sequence: 178 hours (/ 2 = 89) 4 number sequence, 13 seconds per sequence 404 = 2,560,000 9,244 hours CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Computational Issues Algorithm should be reasonably efficient Security depends on how hard it is to break Combination lock 3 number sequence (2R, 1L, 0R), #s between 1-40 Possible combinations: 403 = 64,000 10 seconds per sequence: 178 hours (/ 2 = 89) 4 number sequence, 13 seconds per sequence 404 = 2,560,000 9,244 hours CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Publication Issues Public or secret algorithms? CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Publication Issues Public or secret algorithms: OK for good algorithm to be public “Sunlight is the best disinfectant” Reverse engineering, leaks “Free consulting” by cryptanalysts Generally: Commercial: public Military: secret CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Secret Codes Caesar cipher Substitute letter 3 letters further on DOZEN  GRCHQ CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Secret Codes Caesar cipher Substitute letter 3 letters further on DOZEN  GRCHQ Captain Midnight Secret Decoder Rings Substitute letter n letters further on (n = 1..25) HAL  IBM (n = 1) CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Secret Codes Caesar cipher Substitute letter 3 letters further on DOZEN  GRCHQ Captain Midnight Secret Decoder Rings Substitute letter n letters further on (n = 1..25) HAL  IBM (n = 1) Monoalphabetic cipher Arbitrary mappings (26! = 4.03291461 × 1026) 1 ms / try  10M years … but: letter frequencies CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography [from Stallings, Cryptography & Network Security] CSS 432: Introduction to Cryptography

Breaking an Encryption Scheme Ciphertext only Try all possible keys, look for intelligibility Need sufficiently long ciphertext XYZ = ? Known plaintext (plaintext, ciphertext) pair(s) Chosen plaintext Have plaintext encrypted, compare expected values CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Types of Cryptography Public Key Two keys: public & private Symmetric Key (aka “Secret Key”) One key: secret (but possibly shared) Hash Functions No keys CSS 432: Introduction to Cryptography

Symmetric Key Cryptography AKA secret key cryptography AKA conventional cryptography CSS 432: Introduction to Cryptography

Symmetric Key Applications Transmission over insecure channel Shared secret (transmitter, receiver) Secure storage on insecure media Authentication Strong authentication: prove knowledge without revealing key CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography A simple example KAB = +3 (Caesar cipher), known by Alice & Bob rA = “marco” rA encrypted with KAB: rB = “polo” CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography A simple example KAB = +3 (Caesar cipher), known by Alice & Bob rA = “marco” rA encrypted with KAB: “pdufr” rB = “polo” rA encrypted with KAB: “sror” CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography A simple example KAB = +3 (Caesar cipher), known by Alice & Bob rA = “marco” rA encrypted with KAB: “pdufr” rB = “polo” rA encrypted with KAB: “sror” (“marco”, “pdufr”), (“polo”, “sror”) CSS 432: Introduction to Cryptography

Public Key Cryptography AKA asymmetric cryptography AKA unconventional cryptography (?) Public key: published, ideally known widely Private key (NOT “secret key”): not published CSS 432: Introduction to Cryptography

Public Key Cryptography http://en.wikipedia.org/wiki/Public_key_cryptography CSS 432: Introduction to Cryptography

Public Key Cryptography Issues Efficiency Public key cryptographic algorithms are orders of magnitude slower than symmetric key algorithms Hybrid model Public key used to establish temporary shared key Symmetric key used for remainder of communication CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography SSL / TLS CLIENT_HELLO: Available crypto & compression algorithms Highest SSL/TLS protocol version SSL Session ID Random data SERVER_HELLO Specific crypto & compression Specific SSL version CERTIFICATE Server’s public encryption key Session Key Server’s public encryption key + random data CSS 432: Introduction to Cryptography

Secure Storage on Insecure Media Option 1: Encrypt with public key Decrypt with private key CSS 432: Introduction to Cryptography

Secure Storage on Insecure Media Option 1: Encrypt with public key Decrypt with private key Option 2: Generate random secret key Encrypt with that secret key Encrypt secret key with public key CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Digital Signatures Asymmetry: Signature can only be generated by owner/knower of private key Signature can be verified by anyone via public key Non-repudiation: Sender cannot prove message (signature) was not sent Key may have been stolen CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Message Integrity Keyed hash, shared secret CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Hash Algorithms Message digests / one-way transformations easy to compute a hash value for any given message infeasible to find a message that has a given hash infeasible to modify a message without hash being changed infeasible to find two different messages with the same hash http://en.wikipedia.org/wiki/Cryptographic_hash_function CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Hash Algorithms http://en.wikipedia.org/wiki/Cryptographic_hash_function CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography An example This example uses the common unix utility "md5sum", which hashes the data on stdin to a 128 bit hash, displayed as 32 hex digits. Assume the password is "mysecretpass" and both the client and the server know this. The client connects to the server. The server makes up some random data, say "sldkfjdslfkjweifj”. The server sends this data to client. The client concatenates the random data with the password, resulting in "sldkfjdslfkjweifjmysecretpass" The client computes the MD5 hash of this value: $ echo sldkfjdslfkjweifjmysecretpass | md5sum 4fab7ebffd7ef35d88494edb647bac37 The client sends "4fab7ebffd7ef35d88494edb647bac37" to the server. [The server confirms that it gets the same value when it runs echo "sldkfjdslfkjweifjmysecretpass” | md5sum] http://www.hcsw.org/reading/chalresp.txt CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography md5sum on Linux [joemcc@uw1-320-17 ~]$ cat > test1.txt Testing 1, 2, 3 [joemcc@uw1-320-17 ~]$ md5sum test1.txt 6a8c5c1973dd8ed2df1260297964cd64 test1.txt [joemcc@uw1-320-17 ~]$ cp test1.txt test2.txt [joemcc@uw1-320-17 ~]$ md5sum test2.txt 6a8c5c1973dd8ed2df1260297964cd64 test2.txt [joemcc@uw1-320-17 ~]$ cat > test3.txt Testing 1, 2, 4 [joemcc@uw1-320-17 ~]$ md5sum test3.txt 5e361a608a1f63b154f259dba0f452dc test3.txt [joemcc@uw1-320-17 ~]$ echo "Testing 1, 2, 3" | md5sum 6a8c5c1973dd8ed2df1260297964cd64 - [joemcc@uw1-320-17 ~]$ CSS 432: Introduction to Cryptography

Cryptographic Hash Lifecycle http://valerieaurora.org/hash.html [via http://www.schneier.com/blog/archives/2011/06/the_life_cycle.html] CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Password Hashing Only hashes (not passwords) are stored Passwords can still be guessed (dictionary) http://nakedsecurity.sophos.com/2012/06/06/linkedin-confirms-hack-over-60-of-stolen-passwords-already-cracked/ CSS 432: Introduction to Cryptography

CSS 432: Introduction to Cryptography Message Fingerprint Compute h(message)t1 Compare to h(message)t2 Message can be a program (e.g., ssh) shv4 CSS 432: Introduction to Cryptography