Chapter 8 Network Security Principles, Symmetric Key Cryptography, Public Key Cryptography Professor Rick Han University of Colorado at Boulder

Slides:



Advertisements
Similar presentations
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Advertisements

Dr. Kalpakis CMSC 421, Operating Systems. Fall 2008 URL: Security – Additional material.
Computer Science CSC 474By Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.1 Introduction to Cryptography.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (4) Information Security.
1 CS 854 – Hot Topics in Computer and Communications Security Fall 2006 Introduction to Cryptography and Security.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Network Security – Part 1 Spring 2005 V.T. Raja, Ph.D., Oregon State University.
Chapters 8 Network Security
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Introduction to Symmetric Block Cipher Jing Deng Based on Prof. Rick Han’s Lecture Slides Dr. Andreas Steffen’s Security Tutorial.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Computer Networking Lecture 21: Security and Cryptography Thanks to various folks from , semester’s past and others.
Chapters 9 and 8 Samba/SMB, Network Security Professor Rick Han University of Colorado at Boulder
Overview of Cryptography and Its Applications Dr. Monther Aldwairi New York Institute of Technology- Amman Campus INCS741: Cryptography.
Lecture 23 Symmetric Encryption
Security Module – Part 1 Spring 2006 V.T. Raja, Ph.D., Oregon State University.
8: Network Security8-1 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key: K r e.g., key is knowing substitution.
Public Key Cryptography RSA Diffie Hellman Key Management Based on slides by Dr. Lawrie Brown of the Australian Defence Force Academy, University College,
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
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.
Lecture 4 Cryptographic Tools (cont) modified from slides of Lawrie Brown.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.5 Public Key Algorithms.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Introduction to Public Key Cryptography
Public Key Model 8. Cryptography part 2.
Chapter 12 Cryptography (slides edited by Erin Chambers)
Lecture 23 Cryptography CPE 401 / 601 Computer Network Systems Slides are modified from Jim Kurose & Keith Ross.
© Neeraj Suri EU-NSF ICT March 2006 DEWSNet Dependable Embedded Wired/Wireless Networks MUET Jamshoro Computer Security: Principles and Practice Slides.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
Dr. Khalid A. Kaabneh Amman Arab University
Chapter 20 Symmetric Encryption and Message Confidentiality.
Network Security Lecture 17 Presented by: Dr. Munam Ali Shah.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Based on Applied Cryptography by Schneier Chapter 1: Foundations Dulal C. Kar.
Network Security Principles, Symmetric Key Cryptography, Public Key Cryptography Modified by Xiuzhen Cheng Originally provided by Professor Rick Han
Midterm Review Cryptography & Network Security
Network Security Lecture 11 Presented by: Dr. Munam Ali Shah.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
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.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
Day 37 8: Network Security8-1. 8: Network Security8-2 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key:
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Public-Key Cryptography and Message Authentication.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
Dr. Reuven Aviv, Nov 2008 Conventional Encryption 1 Conventional Encryption & Message Confidentiality Acknowledgements for slides Henric Johnson Blekinge.
Stream Ciphers and Block Ciphers A stream cipher is one that encrypts a digital data stream one bit or one byte at a time. Examples of classical stream.
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
30.1 Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Encryption No. 1  Seattle Pacific University Encryption: Protecting Your Data While in Transit Kevin Bolding Electrical Engineering Seattle Pacific University.
Lecture 2: Introduction to Cryptography
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
Lecture 23 Symmetric Encryption
+ Security. + What is network security? confidentiality: only sender, intended receiver should “understand” message contents sender encrypts message receiver.
PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9 PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9 Principles Applications Requirements RSA Algorithm Description.
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
8: Network Security8-1 Chapter 8 Network Security A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students,
Computer Security By Rubel Biswas. Introduction History Terms & Definitions Symmetric and Asymmetric Attacks on Cryptosystems Outline.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
PART VII Security.
Security: Public Key Cryptography
Presentation transcript:

Chapter 8 Network Security Principles, Symmetric Key Cryptography, Public Key Cryptography Professor Rick Han University of Colorado at Boulder

Prof. Rick Han, University of Colorado at Boulder Network Security Classic properties of secure systems: Confidentiality Encrypt message so only sender and receiver can understand it. Authentication Both sender and receiver need to verify the identity of the other party in a communication: are you really who you claim to be? Authorization Does a party with a verified identity have permission to access (r/w/x/…) information? Gets into access control policies.

Prof. Rick Han, University of Colorado at Boulder Network Security (2) Classic properties of secure systems: (cont.) Integrity During a communication, can both sender and receiver detect whether a message has been altered? Non-Repudiation Originator of a communication can’t deny later that the communication never took place Availability Guaranteeing access to legitimate users. Prevention of Denial-of-Service (DOS) attacks.

Prof. Rick Han, University of Colorado at Boulder Cryptography Encryption algorithm also called a cipher Cryptography has evolved so that modern encryption and decryption use secret keys Only have to protect the keys! => Key distribution problem Cryptographic algorithms can be openly published EncryptionDecryption plaintextciphertextplaintext EncryptionDecryption plaintextciphertextplaintext Key K A Key K B

Prof. Rick Han, University of Colorado at Boulder Cryptography (2) Cryptography throughout history: Julius Caesar cipher: replaced each character by a character cyclically shifted to the left. Weakness? Easy to attack by looking at frequency of characters Mary Queen of Scots: put to death for treason after Queen Elizabeth’s I’s spymaster cracked her encryption code WWII: Allies break German Enigma code and Japanese naval code Enigma code machine (right)

Prof. Rick Han, University of Colorado at Boulder Cryptography (3) Cryptanalysis – Type of attacks: Brute force: try every key Ciphertext-only attack: Attacker knows ciphertext of several messages encrypted with same key (but doesn’t know plaintext). Possible to recover plaintext (also possible to deduce key) by looking at frequency of ciphertext letters Known-plaintext attack: Attacker observes pairs of plaintext/ciphertext encrypted with same key. Possible to deduce key and/or devise algorithm to decrypt ciphertext.

Prof. Rick Han, University of Colorado at Boulder Cryptography (4) Cryptanalysis – Type of attacks: Chosen-plaintext attack: Attacker can choose the plaintext and look at the paired ciphertext. Attacker has more control than known-plaintext attack and may be able to gain more info about key Adaptive Chosen-Plaintext attack: Attacker chooses a series of plaintexts, basing the next plaintext on the result of previous encryption Differential cryptanalysis – very powerful attacking tool But DES is resistant to it Cryptanalysis attacks often exploit the redundancy of natural language Lossless compression before encryption removes redundancy

Prof. Rick Han, University of Colorado at Boulder Principles of Confusion and Diffusion Terms courtesy of Claude Shannon, father of Information Theory “Confusion” = Substitution a -> b Caesar cipher “Diffusion” = Transposition or Permutation abcd -> dacb DES EncryptionDecryption plaintextciphertextplaintext Key K A Key K B

Prof. Rick Han, University of Colorado at Boulder Principles of Confusion and Diffusion (2) Modern substitution ciphers take in N bits and substitute N bits using lookup table: called S- Boxes “Confusion” : a classical Substitution Cipher Courtesy: Andreas Steffen

Prof. Rick Han, University of Colorado at Boulder Principles of Confusion and Diffusion (3) “Diffusion” : a classical Transposition cipher modern Transposition ciphers take in N bits and permute using lookup table : called P-Boxes Courtesy: Andreas Steffen

Prof. Rick Han, University of Colorado at Boulder Symmetric-Key Cryptography Both sender and receiver keys are the same: K A =K B The keys must be kept secret and securely distributed – we’ll study this later Thus, also called “Secret Key Cryptography” Data Encryption Standard (DES) EncryptionDecryption plaintextciphertextplaintext Key K A Key K B =K A Secure Key Distribution

Prof. Rick Han, University of Colorado at Boulder Symmetric-Key Cryptography (2) DES 64-bit input is permuted 16 stages of identical operation differ in the 48-bit key extracted from 56-bit key - complex R2= “R1 is encrypted with K1 and XOR’d with L1” L2=R1, … Final inverse permutation stage

Prof. Rick Han, University of Colorado at Boulder Symmetric-Key Cryptography (3) Data Encryption Standard (DES) Encodes plaintext in 64-bit chunks using a 64-bit key (56 bits + 8 bits parity) Uses a combination of diffusion and confusion to achieve security abcd  dbac Was cracked in 1997 Parallel attack – exhaustively search key space Triple-DES: put the output of DES back as input into DES again with a different key, loop again: 3*56 = 168 bit key Decryption in DES – it’s symmetric! Use K A again as input and then the same keys except in reverse order Advanced Encryption Standard (AES) successor

Prof. Rick Han, University of Colorado at Boulder Symmetric-Key Cryptography (4) DES is an example of a block cipher Divide input bit stream into n-bit sections, encrypt only that section, no dependency/history between sections In a good block cipher, each output bit is a function of all n input bits and all k key bits Courtesy: Andreas Steffen

Prof. Rick Han, University of Colorado at Boulder Symmetric-Key Cryptography (5) Electronic Code Book (ECB) mode for block ciphers of a long digital sequence Vulnerable to replay attacks: if an attacker thinks block C 2 corresponds to $ amount, then substitute another C k Attacker can also build a codebook of pairs

Prof. Rick Han, University of Colorado at Boulder Symmetric-Key Cryptography (6) Cipher Block Chaining (CBC) mode for block ciphers Inhibits replay attacks and codebook building: identical input plaintext P i =P k won’t result in same output code due to memory-based chaining IV = Initialization Vector – use only once

Prof. Rick Han, University of Colorado at Boulder Symmetric-Key Cryptography (7) Stream ciphers Rather than divide bit stream into discrete blocks, as block ciphers do, XOR each bit of your plaintext continuous stream with a bit from a pseudo-random sequence At receiver, use same symmetric key, XOR again to extract plaintext

Prof. Rick Han, University of Colorado at Boulder Symmetric-Key Cryptography (8) RC4 stream cipher by Ron Rivest of RSA Data Security Inc. – used in b’s security Block ciphers vs. stream ciphers Stream ciphers work at bit-level and were originally implemented in hardware => fast! Block ciphers work at word-level and were originally implemented in software => not as fast Error in a stream cipher only affects one bit Error in a block cipher in CBC mode affects two blocks Distinction is blurring: Stream ciphers can be efficiently implemented in software Block ciphers getting faster

Prof. Rick Han, University of Colorado at Boulder Symmetric-Key Cryptography (9) Symmetric key is propagated to both endpoints A & B via Diffie-Hellman key exchange algorithm A & B agree on a large prime modulus n, a “primitive element” g, and a one-way function f(x)=g x mod n n and g are publicly known A chooses a large random int a and sends B AA=g a mod n B chooses a large random int b and sends A BB= g b mod n A & B compute secret key S = g ba mod n Since x=f -1 (y) is difficult to compute, then observer who knows AA, BB, n, g and f will not be able to deduce the product ab and hence S is secure

Prof. Rick Han, University of Colorado at Boulder Symmetric Key Distribution Key distribution Public key via trusted Certificate Authorities Symmetric key? Diffie-Helman Key Exchange Public key, then secret key (e.g. SSL) Symmetric Key distribution via a KDC (Key Distribution Center)

Prof. Rick Han, University of Colorado at Boulder Symmetric Key Distribution (2) Symmetric Key distribution via a KDC (Key Distribution Center) KDC is a server (trusted 3 rd party) sharing a different symmetric key with each registered user Alice wants to talk with Bob, and sends encrypted request to KDC, K A-KDC (Alice,Bob) KDC generates a one-time shared secret key R1 KDC encrypts Alice’s identity and R1 with Bob’s secret key, let m= K B-KDC (Alice,R1) KDC sends to both Alice R1 and m, encrypted with Alice’s key: i.e. K A-KDC (R1, K B-KDC (Alice,R1)) Alice decrypts message, extracting R1 and m. Alice sends m to Bob. Bob decrypts m and now has the session key R1

Prof. Rick Han, University of Colorado at Boulder Symmetric Key Distribution (3) Kerberos authentication basically follows this KDC trusted 3 rd party approach In Kerberos, the message m is called a ticket and has an expiration time m=

Chapter 8 Public Key Cryptography, Authentication, Data Integrity Professor Rick Han University of Colorado at Boulder

Prof. Rick Han, University of Colorado at Boulder Public-Key Cryptography For over 2000 years, from Caesar to 1970s, encrypted communication required both sides to share a common secret key => key distribution problems! Diffie and Hellman in 1976 invented asymmetric public key cryptography – elegant, revolutionary! Sender’s key differs from receiver’s key Simplifies key distribution – just protect K private Useful for authentication as well as encryption EncryptionDecryption plaintextciphertextplaintext Key K PUBLIC Key K PRIVATE

Prof. Rick Han, University of Colorado at Boulder Public-Key Cryptography (2) Host (receiver) who wants data sent to it in encrypted fashion advertises a public encryption key K public Sender encrypts with public key Receiver decrypts with private key EncryptionDecryption plaintextciphertextplaintext Key K PUBLIC Key K PRIVATE Secure KeyPublic Key Distribution

Prof. Rick Han, University of Colorado at Boulder Public-Key Cryptography (3) Decryption algorithm has the property that only a private key K private can decrypt the ciphertext, and it is computationally infeasible to deduce K private even though attacker knows the public key K public and the encryption algorithm EncryptionDecryption plaintextciphertextplaintext Key K PUBLIC Key K PRIVATE Secure KeyPublic Key Distribution

Prof. Rick Han, University of Colorado at Boulder Public-Key Cryptography (4) Decryption algorithm has the property that only a private key K private can decrypt the ciphertext Based on the difficulty of factoring the product of two prime #’s Example: RSA algorithm (Rivest, Shamir, Adleman) Choose 2 large prime #’s p and q n=p*q should be about 1024 bits long z=(p-1)*(q-1) Choose e<n with no common factors with z Find d such that (e*d) mod z = 1 Public key is (n,e), private key is (n,d) Message m is encrypted to c = m e mod n Ciphertext c is decrypted m = c d mod n

Prof. Rick Han, University of Colorado at Boulder RSA example: A host chooses p=5, q=7. Then n=35, z=24. e=5 (so e, z relatively prime). d=29 (so ed-1 exactly divisible by z. letter m m e c = m mod n e “L” c m = c mod n d c d letter “L” encrypt: decrypt:

Prof. Rick Han, University of Colorado at Boulder Public-Key Cryptography (4) Provides security because: There are no known algorithms for quickly factoring n=p*q, the product of two large prime #’s If we could factor n into p and q, then it would be easy to break the algorithm: have n, p, q, e, then just iterate to find decryption key d. Public-key cryptography is slow because of the exponentiation: m = c d mod n = (m e ) d mod n = (m d ) e mod n From kbps (1024-bit value for n) So, don’t use it for time-sensitive applications and/or use only for small amounts of data – we’ll see how SSL makes use of this

Prof. Rick Han, University of Colorado at Boulder Public-Key Cryptography (5) A 512 bit number (155 decimals) was factored into two primes in 1999 using one Cray and 300 workstations 1024 bit keys still safe Incredibly useful property of public-key cryptography: m = c d mod n = (m e ) d mod n = (m d ) e mod n Thus, can swap the order in which the keys are used. Example: can use private key for encryption and a public key for decryption – will see how it is useful in authentication!