Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.

Slides:



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

Modern Symmetric-Key Ciphers
Network Security. Confidentiality Using Symmetric Encryption John wrote the letters of the alphabet under the letters in its first lines and tried it.
Applied Cryptography (Public key) Part I. Let’s first finish “Symmetric Key” before talking about public key John wrote the letters of the alphabet under.
CS457 – Introduction to Information Systems Security Cryptography 1b Elias Athanasopoulos
Cryptography and Network Security
Chapter 3 Block Ciphers and the Data Encryption Standard
Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography1 CPSC 3730 Cryptography Chapter 6 Triple DES, Block Cipher Modes of Operation.
First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown and edited by Archana Chidanandan Cryptographic Tools.
Stream cipher diagram + + Recall: One-time pad in Chap. 2.
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.
Cryptography and Network Security Chapter 6
Lecture 23 Symmetric Encryption
Cryptography and Network Security Chapter 7
Chapter 2 (D) – Contemporary Symmetric Ciphers "I am fairly familiar with all the forms of secret writings, and am myself the author of a trifling monograph.
Computer Security CS 426 Lecture 3
Cryptography and Network Security Chapter 7 Fourth Edition by William Stallings Lecture slides by Lawrie Brown Modified – Tom Noack, UPRM.
Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
© Neeraj Suri EU-NSF ICT March 2006 DEWSNet Dependable Embedded Wired/Wireless Networks MUET Jamshoro Computer Security: Principles and Practice Slides.
RC4-Stream Ciphers Blowfish, RC5 Block Ciphers M. Sakalli, Marmara Univ. Chapter 6 of Cryptography and Network Security by William Stallings Modified from.
Fourth Edition by William Stallings (Based on Lecture slides by Lawrie Brown) 1.
Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings.
Cryptography and Network Security (CS435)
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:
Network Security Lecture 17 Presented by: Dr. Munam Ali Shah.
CS555Spring 2012/Topic 51 Cryptography CS 555 Topic 5: Pseudorandomness and Stream Ciphers.
Information Security Lab. Dept. of Computer Engineering 182/203 PART I Symmetric Ciphers CHAPTER 7 Confidentiality Using Symmetric Encryption 7.1 Placement.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Stream Cipher July 2011.
Network Security Essentials Chapter 2: Symmetric Encryption Fourth Edition by William Stallings (Based on Lecture slides by Lawrie Brown)
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
3DES and Block Cipher Modes of Operation CSE 651: Introduction to Network Security.
Multiple Encryption & DES  clearly a replacement for DES was needed Vulnerable to brute-force key search attacks Vulnerable to brute-force key search.
Politiche delle Reti e Sicurezza 2008 UNICAM. M.L.Maggiulli © Maria Laura Maggiulli Dipartimento di Informatica.
Modes of Operation INSTRUCTOR: DANIA ALOMAR. Modes of Operation A block cipher can be used in various methods for data encryption and decryption; these.
Cryptography and Network Security Contemporary Symmetric Ciphers.
Chapter 7 – Confidentiality Using Symmetric Encryption.
Chapter 7 Confidentiality Using Symmetric Encryption.
Cryptography and Network Security Key Distribution for Symmetric Encryption.
Data Security and Encryption (CSE348) 1. Lecture # 14 2.
Symmetric Encryption IT 352 : Lecture 2- part2 Najwa AlGhamdi, MSc – 2012 /1433.
Network Security Lecture 18 Presented by: Dr. Munam Ali Shah.
Presented by: Dr. Munam Ali Shah
Lecture 23 Symmetric Encryption
Network Security Essentials Chapter 2 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Fall 2006CS 395: Computer Security1 Confidentiality Using Symmetric Encryption.
Applied Cryptography (Symmetric) Part I. Many savages at the present day regard their names as vital parts of themselves, and therefore take great pains.
Dr. Lo’ai Tawalbeh summer 2007 Chapter 6: Contemporary Symmetric Ciphers Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus INCS.
University of Malawi, Chancellor College
Chapter 7 – Confidentiality Using Symmetric Encryption.
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.
หัวข้อบรรยาย Stream cipher RC4 WEP (in)security LFSR CSS (in)security.
Modes of Operation block ciphers encrypt fixed size blocks – eg. DES encrypts 64-bit blocks with 56-bit key need some way to en/decrypt arbitrary amounts.
Cryptography and Network Security Chapter 7
Issues of Random Numbers and Cryptography
Cryptography and Network Security Chapter 7
Chapter 7: Confidentiality Using Symmetric Encryption
Cryptography CS 555 Topic 15: Stream Ciphers.
Cryptography and Network Security
Stream Cipher.
Pseudo Random Number Generators
Confidentiality using Symmetric Encryption
Confidentiality using Symmetric Encryption
Block vs Stream Ciphers
ADVANCED ENCRYPTION STANDARDADVANCED ENCRYPTION STANDARD
Cryptography and Network Security Chapter 7
Chapter -4 STREAM CIPHERS
Presentation transcript:

Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings Lecture slides by Lawrie Brown

Chapter 7 – Stream Ciphers and Random Number Generation The comparatively late rise of the theory of probability shows how hard it is to grasp, and the many paradoxes show clearly that we, as humans, lack a well grounded intuition in this matter. In probability theory there is a great deal of art in setting up the model, in solving the problem, and in applying the results back to the real world actions that will follow. — The Art of Probability, Richard Hamming

Random Numbers  many uses of random numbers in cryptography nonces in authentication protocols to prevent replay nonces in authentication protocols to prevent replay session keys session keys public key generation public key generation keystream for a one-time pad keystream for a one-time pad  in all cases its critical that these values be statistically random, uniform distribution, independent statistically random, uniform distribution, independent unpredictability of future values from previous values unpredictability of future values from previous values  true random numbers provide this  care needed with generated random numbers

Pseudorandom Number Generators (PRNGs)  often use deterministic algorithmic techniques to create “random numbers” although are not truly random although are not truly random can pass many tests of “randomness” can pass many tests of “randomness”  known as “pseudorandom numbers”  created by “ Pseudorandom Number Generators (PRNGs)”

Random & Pseudorandom Number Generators

PRNG Requirements  randomness uniformity, scalability, consistency uniformity, scalability, consistency  unpredictability forward & backward unpredictability forward & backward unpredictability use same tests to check use same tests to check  characteristics of the seed secure secure if known adversary can determine output if known adversary can determine output so must be random or pseudorandom number so must be random or pseudorandom number

PRNG Requirements  Randomness Uniformity – at any point in the generation of the PRN sequence, the occurrence of a zero or a one is equally likely (i.e., p = 0.5) Uniformity – at any point in the generation of the PRN sequence, the occurrence of a zero or a one is equally likely (i.e., p = 0.5) Scalability – any test for randomness applicable to a sequence can also be applied to any random subsequence (it should pass) Scalability – any test for randomness applicable to a sequence can also be applied to any random subsequence (it should pass) Consistency – the characteristics of the PRN sequence of the PRNG must not depend on the seed used Consistency – the characteristics of the PRN sequence of the PRNG must not depend on the seed used

Linear Congruential Generator  common iterative technique using: X n+1 = (aX n + c) mod m  given suitable values of parameters can produce a long random-like sequence  suitable criteria to have are: function generates a full-period function generates a full-period generated sequence should appear random generated sequence should appear random efficient implementation with 32-bit arithmetic efficient implementation with 32-bit arithmetic  note that an attacker can reconstruct sequence given a small number of values  have possibilities for making this harder

Blum Blum Shub Generator  based on public key algorithms  use least significant bit from iterative equation: x i = x i-1 2 mod n x i = x i-1 2 mod n where n=p.q, and primes p,q=3 mod 4 where n=p.q, and primes p,q=3 mod 4  unpredictable, passes next-bit test  security rests on difficulty of factoring N  is unpredictable given any run of bits  slow, since very large numbers must be used  too slow for cipher use, good for key generation

Using Block Ciphers as PRNGs  for cryptographic applications, can use a block cipher to generate random numbers  often for creating session keys from master key  CTR X i = E K [V i ]  OFB X i = E K [X i-1 ]

ANSI X9.17 PRG Dti = date and time

Stream Ciphers  process message bit by bit (as a stream)  have a pseudo random keystream  combined (XOR) with plaintext bit by bit  randomness of stream key completely destroys statistically properties in message C i = M i XOR StreamKey i C i = M i XOR StreamKey i  but must never reuse stream key otherwise can recover messages (cf book cipher) otherwise can recover messages (cf book cipher)

Stream Cipher Structure

Stream Cipher Properties  some design considerations are: long period with no repetitions long period with no repetitions statistically random statistically random depends on large enough key depends on large enough key large linear complexity large linear complexity  properly designed, can be as secure as a block cipher with same size key  but usually simpler & faster

RC4  a proprietary cipher owned by RSA DSI  another Ron Rivest design, simple but effective  variable key size, byte-oriented stream cipher  widely used (web SSL/TLS, wireless WEP/WPA)  key forms random permutation of all 8-bit values  uses that permutation to scramble input info processed a byte at a time

RC4 Key Schedule  starts with an array S of numbers:  use key to well and truly shuffle  S forms internal state of the cipher for i = 0 to 255 do S[i] = i // init S to identity T[i] = K[i mod keylen])// extend key j = 0// location of swap for i = 0 to 255 do // for each element // update location of swap j = (j + S[i] + T[i]) (mod 256) swap (S[i], S[j])// permute

RC4 Encryption  encryption continues shuffling array values  sum of shuffled pair selects "stream key" value from permutation  XOR S[t] with next byte of message to en/decrypt i = j = 0 for each message byte M i i = (i + 1) (mod 256)// rotate thru S j = (j + S[i]) (mod 256)// update swap location swap(S[i], S[j])// update permutation S t = (S[i] + S[j]) (mod 256)// pick key index C i = M i XOR S[t]// encrypt

RC4 Overview initialize permutation extend key shuffle permutation update permutation

RC4 Security  claimed secure against known attacks However, have some analyses, some on the verge of practical However, have some analyses, some on the verge of practical first 256 bytes have bias first 256 bytes have bias multiple keys/same plaintext attack multiple keys/same plaintext attack  result is very non-linear  since RC4 is a stream cipher, must never reuse a key  have a concern with WEP, but due to key handling rather than RC4 itself

RC4 Security Probability of recovery of plaintext from 2 24 ciphertexts vs. byte position

Natural Random Noise  best source is natural randomness in real world  find a regular but random event and monitor  do generally need special h/w to do this eg. radiation counters, radio noise, audio noise, thermal noise in diodes, leaky capacitors, mercury discharge tubes etc eg. radiation counters, radio noise, audio noise, thermal noise in diodes, leaky capacitors, mercury discharge tubes etc  starting to see such h/w in new CPUs – Intel Ivy Bridge, Via Padlock  problems of bias or uneven distribution in signal have to compensate for this when sample, often by passing bits through a hash function have to compensate for this when sample, often by passing bits through a hash function best to only use a few noisiest bits from each sample best to only use a few noisiest bits from each sample RFC4086 recommends using multiple sources + hash RFC4086 recommends using multiple sources + hash

Intel Ivy Bridge TRNG Entropy Source Negative feedback RS-NOR latch Detect when settled, and store output Entropy Source - shared by all cores - RS-NOR latch becomes metastable when input De-asserted - Output settles to 0 or 1, depending on thermal Noise - Feedback helps reach Metastable state - Output detects when settled, stores result, reasserts input

Intel Ivy Bridge TRNG DRNG output fed to all processors hardware instruction-level access

Intel Ivy Bridge TRNG - Output is biased due to feedback MHz clock Conditioner outputs 256 bits every few microseconds Expand rate using NIST SP PRNG to rate of 800 MBps

Intel Ivy Bridge TRNG Health tests are basic, ad hoc, but detect RNG failure Output zero with carry zero on failure (can't read a 0) Built-In Self Test

Trustworthiness of TRNGs  Design appears to be very sound  Possible back doors Snowden leaks show NSA coerced hardware and software manufacturers to introduce back doors Snowden leaks show NSA coerced hardware and software manufacturers to introduce back doors Intel and Via hardware considered suspect Intel and Via hardware considered suspect  Approach by FreeBSD Use hardware PRNG as a source Use hardware PRNG as a source Pass through Yarrow PRNG algorithm when producing cryptographically significant random numbers Pass through Yarrow PRNG algorithm when producing cryptographically significant random numbers See:

Published Sources  a few published collections of random numbers  Rand Co, in 1955, published 1 million numbers generated using an electronic roulette wheel generated using an electronic roulette wheel has been used in some cipher designs cf Khafre has been used in some cipher designs cf Khafre  earlier Tippett in 1927 published a collection  issues are that: these are limited these are limited too well-known for most uses too well-known for most uses

Summary  pseudorandom number generation  stream ciphers  RC4  true random numbers