Computer Security CS 426 Lecture 3

Slides:



Advertisements
Similar presentations
“Advanced Encryption Standard” & “Modes of Operation”
Advertisements

CMSC 414 Computer (and Network) Security Lecture 4 Jonathan Katz.
CIS 5371 Cryptography 3b. Pseudorandomness.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Lecture 2.1: Private Key Cryptography -- I CS 436/636/736 Spring 2013 Nitesh Saxena.
Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
Stream cipher diagram + + Recall: One-time pad in Chap. 2.
CMSC 414 Computer and Network Security Lecture 4 Jonathan Katz.
RC4 1 RC4 RC4 2 RC4  Invented by Ron Rivest o “RC” is “Ron’s Code” or “Rivest Cipher”  A stream cipher  Generate keystream byte at a step o Efficient.
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Intro To Encryption Exercise 1. Monoalphabetic Ciphers Examples:  Caesar Cipher  At Bash  PigPen (Will be demonstrated)  …
CS470, A.SelcukIntroduction1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
Session 6: Introduction to cryptanalysis part 1. Contents Problem definition Symmetric systems cryptanalysis Particularities of block ciphers cryptanalysis.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
CS426Fall 2010/Lecture 21 Computer Security CS 426 Lecture 2 Cryptography: Terminology & Classic Ciphers.
CS555Spring 2012/Topic 41 Cryptography CS 555 Topic 4: Computational Approach to Cryptography.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Dan Boneh Stream ciphers The One Time Pad Online Cryptography Course Dan Boneh.
CS526Topic 3: One-time Pad and Perfect Secrecy 1 Information Security CS 526 Topic 3 Cryptography: One-time Pad, Information Theoretic Security, and Stream.
symmetric key cryptography
9/01/2010CS 686 Stream Cipher EJ Jung CS 686 Special Topics in CS Privacy and Security.
Cryptography and Network Security Chapter 6. Multiple Encryption & DES  clear a replacement for DES was needed theoretical attacks that can break it.
Slide 1 Stream Ciphers uBlock ciphers generate ciphertext Ciphertext(Key,Message)=Message  Key Key must be a random bit sequence as long as message uIdea:
One-Time Pad Or Vernam Cipher Sayed Mahdi Mohammad Hasanzadeh Spring 2004.
CS555Spring 2012/Topic 51 Cryptography CS 555 Topic 5: Pseudorandomness and Stream Ciphers.
Topic 21 Cryptography CS 555 Topic 2: Evolution of Classical Cryptography CS555.
Based on Applied Cryptography by Schneier Chapter 1: Foundations Dulal C. Kar.
Stream Ciphers Making the one-time pad practical.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Stream Cipher July 2011.
Symmetric-Key Cryptography
Cryptographic Attacks on Scrambled LZ-Compression and Arithmetic Coding By: RAJBIR SINGH BIKRAM KAHLON.
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
Cryptography Lynn Ackler Southern Oregon University.
Cryptography Part 1: Classical Ciphers Jerzy Wojdyło May 4, 2001.
Multiple Encryption & DES  clearly a replacement for DES was needed Vulnerable to brute-force key search attacks Vulnerable to brute-force key search.
CRYPTANALYSIS OF STREAM CIPHER Bimal K Roy Cryptology Research Group Indian Statistical Institute Kolkata.
Traditional Symmetric-Key Ciphers
Giuseppe Bianchi Warm-up example 1 found on a real paper! Warm-up example 1 found on a real paper!
1 Information Theory Nathanael Paul Oct. 09, 2002.
Lecture 2: Introduction to Cryptography
Class 3 Cryptography Refresher II CIS 755: Advanced Computer Security Spring 2014 Eugene Vasserman
Lecture 23 Symmetric Encryption
PRNGs Pseudo-random number generation. Randomness and Cryptography Randomness and pseudo-randomness are useful in cryptography: –To generate random and.
CS555Spring 2012/Topic 31 Cryptography CS 555 Topic 3: One-time Pad and Perfect Secrecy.
CS555Spring 2012/Topic 71 Cryptography CS 555 Topic 7: Stream Ciphers and CPA Security.
Wired Equivalent Privacy (WEP) Chris Overcash. Contents What is WEP? What is WEP? How is it implemented? How is it implemented? Why is it insecure? Why.
University of Malawi, Chancellor College
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Slide 1 Vitaly Shmatikov CS 378 Stream Ciphers. slide 2 Stream Ciphers uRemember one-time pad? Ciphertext(Key,Message)=Message  Key Key must be a random.
Cryptography Lecture 3 Arpita Patra © Arpita Patra.
Substitution Ciphers Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 2 – Stream Ciphers These slides were.
หัวข้อบรรยาย Stream cipher RC4 WEP (in)security LFSR CSS (in)security.
Cryptography CS 555 Topic 15: Stream Ciphers.
B504/I538: Introduction to Cryptography
Cryptography Lecture 4.
Topic 5: Constructing Secure Encryption Schemes
Cryptography Lecture 4.
Information Security CS 526 Topic 3
Cryptography Lecture 3.
Presentation transcript:

Computer Security CS 426 Lecture 3 Cryptography: One-time Pad, Information Theoretical Security, and Stream CIphers CS426 Fall 2010/Lecture 3

One-Time Pad Fix the vulnerability of the mono-alphabetical substitution cipher by encrypting letters in different locations differently Key is a random string that is at least as long as the plaintext Encryption is similar to shift cipher Invented by Vernam in the 1920s CS426 Fall 2010/Lecture 3

One-Time Pad Let Zm ={0,1,…,m-1} be the alphabet. Plaintext space = Ciphtertext space = Key space = (Zm)n The key is chosen uniformly randomly Plaintext X = (x1 x2 … xn) Key K = (k1 k2 … kn) Ciphertext Y = (y1 y2 … yn) ek(X) = (x1+k1 x2+k2 … xn+kn) mod m dk(Y) = (y1-k1 y2-k2 … yn-kn) mod m CS426 Fall 2010/Lecture 3

How Good is One-Time Pad? Intuitively, it is secure … The key is random, so the ciphertext is completely random CS426 Fall 2010/Lecture 3

Shannon (Information-Theoretic) Security Basic Idea: Ciphertext should reveal no “information” about Plaintext More precisely, given any ciphertext, each plaintext (of the same length) is equally likely When keys are uniformly chosen in a cipher, the cipher has Shannon security iff. the number of keys encrypting M to C to be the same for any (M,C) We also say such a scheme has perfect secrecy. secure even if the adversary has unbounded computation resources One-time pad has perfect secrecy (Proof?) When you see the ciphertext is, say, “Hello”, any five-word plaintext is possible. CS426 Fall 2010/Lecture 3

Key Randomness in One-Time Pad One-Time Pad uses a very long key, what if the key is not chosen randomly, instead, texts from, e.g., a book are used as keys. this is not One-Time Pad anymore this does not have perfect secrecy this can be broken How? The key in One-Time Pad should never be reused. If it is reused, it is Two-Time Pad, and is insecure! Why? Given a ciphertext that is the XOR of two English texts, how to break it? CS426 Fall 2010/Lecture 3

The “Bad News” Theorem for Perfect Secrecy Perfect secrecy  key-length  msg-length Proof: Difficult to use in practice Why is this still useful, even though difficult? Cipherttext Plaintext Fix any ciphertext, need at least one key for each plaintext message. CS426 Fall 2010/Lecture 3

The Binary Version of One-Time Pad Plaintext space = Ciphtertext space = Keyspace = {0,1}n Key is chosen randomly For example: Plaintext is 11011011 Key is 01101001 Then ciphertext is 10110010 CS426 Fall 2010/Lecture 3

Bit Operators Bit AND Bit OR Addition mod 2 (also known as Bit XOR) 0  0 = 0 0  1 = 0 1  0 = 0 1  1 = 1 Bit OR 0  0 = 0 0  1 = 1 1  0 = 1 1  1 = 1 Addition mod 2 (also known as Bit XOR) 0  0 = 0 0  1 = 1 1  0 = 1 1  1 = 0 Can we use operators other than Bit XOR for binary version of One-Time Pad? CS426 Fall 2010/Lecture 3

Stream Ciphers In One-Time Pad, a key is a random string of length at least the same as the message Stream ciphers: Idea: replace “rand” by “pseudo rand” Use Pseudo Random Number Generator PRNG: {0,1}s  {0,1}n expand a short (e.g., 128-bit) random seed into a long (e.g., 106 bit) string that “looks random” Secret key is the seed Ekey[M] = M  PRNG(key) CS426 Fall 2010/Lecture 3

The RC4 Stream Cipher A proprietary cipher owned by RSA, designed by Ron Rivest in 1987. Became public in 1994. Simple and effective design. Variable key size (typical 40 to 256 bits), Output unbounded number of bytes. Widely used (web SSL/TLS, wireless WEP). Extensively studied, not a completely secure PRNG, but no known serious security flaw as a stream cipher CS426 Fall 2010/Lecture 3

Pseudo Random Number Generator Useful for cryptography and for simulation The same seed gives the same output stream why is this necessary for stream ciphers? Simulation requires uniform distributed sequences Cryptographically secure pseudo-random number generator requires unpredictable sequences satisfies the "next-bit test“: given consecutive sequence of bits output (but not seed), next bit must be hard to predict withstands “state compromise extensions”: given sequences from bits k+1 on, should be difficult to predict earlier bits Also useful for generating temporary keys, etc. CS426 Fall 2010/Lecture 3

Properties of Stream Ciphers Typical stream ciphers are very fast Widely used, often incorrectly Content Scrambling System (uses Linear Feedback Shift Registers incorrectly), Wired Equivalent Privacy (uses RC4 incorrectly) SSL (uses RC4, SSLv3 has no known major flaw) Are they secure? CS426 Fall 2010/Lecture 3

Adversarial Models for Ciphers The language of the plaintext and the nature of the cipher are assumed to be known to the adversary. Ciphertext-only attack: The adversary knows only a number of ciphertexts. Known-plaintext attack: The adversary knows some pairs of ciphertext and corresponding plaintext. Chosen-plaintext attack: The adversary can choose a number of messages and obtain the ciphertexts Chosen-ciphertext attack: The adversary can choose a number of ciphertexts and obtain the plaintexts. When would these attacks be relevant in wireless communications? CS426 Fall 2010/Lecture 3

Security Properties of Stream Ciphers Under known plaintext, chosen plaintext, or chosen ciphertext, the adversary knows key stream (i.e., PRNG(key)) Security depends on PRNG PRNG must be “unpredictable” Does not have perfect secrecy How to break a stream cipher? CS426 Fall 2010/Lecture 3

Computational Security vs. Information Theoretical Security If only having computational security, then can be broken by a brute force attack, e.g., enumerating all possible keys Weak algorithms can be broken with much less time How to prove computational security? Assume that some problems are hard (requires a lot of computational resources to solve), then show that breaking security means solving the problem Computational security is foundation of modern cryptography. CS426 Fall 2010/Lecture 3

Real Weaknesses of Stream Ciphers If the same stream is used twice ever, then easy to break. Highly malleable easy to change ciphertext so that plaintext changes in predictable, e.g., flip bits which of the three properties is violated here? These are fundamental weaknesses of stream ciphers; they exist even if the PRNG is strong CS426 Fall 2010/Lecture 3

Readings for This Lecture Required reading from wikipedia One-Time Pad Information theoretic security Stream cipher Pseudorandom number generator CS426 Fall 2010/Lecture 3

Coming Attractions … Cryptography: Block ciphers, encryption modes, cryptographic functions CS426 Fall 2010/Lecture 3