Cryptography Lecture 15.

Slides:



Advertisements
Similar presentations
1 KCipher-2 KDDI R&D Laboratories Inc.. ©KDDI R&D Laboratories Inc. All rights Reserved. 2 Introduction LFSR-based stream ciphers Linear recurrence between.
Advertisements

CS470, A.SelcukStream Ciphers1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
1 Introduction to Practical Cryptography Lectures 3/4 Stream Ciphers.
LINEAR FEEDBACK SHIFT REGISTERS, GALOIS FIELDS, AND STREAM CIPHERS Mike Thomsen Cryptography II May 14 th, 2012.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography) 1 Cryptography Algorithms Symmetric and Asymmetric Cryptography Algorithms Data Stream.
CIS 5371 Cryptography 3b. Pseudorandomness.
Cryptography and Network Security Chapter 3
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.
Stream Ciphers 1 Stream Ciphers. Stream Ciphers 2 Stream Ciphers  Generalization of one-time pad  Trade provable security for practicality  Stream.
Lecture 23 Symmetric Encryption
6. Practical Constructions of Symmetric-Key Primitives
Computer Security CS 426 Lecture 3
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
Códigos y Criptografía Francisco Rodríguez Henríquez A Short Introduction to Stream Ciphers.
CS555Spring 2012/Topic 51 Cryptography CS 555 Topic 5: Pseudorandomness and Stream Ciphers.
Stream Ciphers Making the one-time pad practical.
Resynchronization Attacks on WG and LEX Hongjun Wu and Bart Preneel Katholieke Universiteit Leuven ESAT/COSIC.
Cryptanalysis of the Stream Cipher DECIM Hongjun Wu and Bart Preneel Katholieke Universiteit Leuven ESAT/COSIC.
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
Session 1 Stream ciphers 1.
Multiple Encryption & DES  clearly a replacement for DES was needed Vulnerable to brute-force key search attacks Vulnerable to brute-force key search.
PRBG Based on Couple Chaotic Systems & its Applications in Stream- Cipher Cryptography Li Shujun, Mou Xuanqin, Cai Yuanlong School of Electronics & Information.
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.
Randomness.
School of Computer Science and Engineering Pusan National University
Cryptography CS 555 Topic 15: Stream Ciphers.
Modern symmetric-key Encryption
Cryptography Lecture 2.
Cryptography Lecture 9.
Cryptography Lecture 13.
Cryptography Lecture 12.
Topic 5: Constructing Secure Encryption Schemes
Cryptography Lecture 18.
Cryptography Lecture 16.
Cryptography Lecture 5.
Cryptography Lecture 19.
Cryptography Lecture 15.
CMSC 414 Computer and Network Security Lecture 3
Cryptography Lecture 6.
Cryptography Lecture 10.
Cryptography Lecture 17.
Cryptography and Network Security Chapter 7
RC4 RC
Cryptography Lecture 5.
Cryptography Lecture 8.
SYMMETRIC ENCRYPTION.
Block Ciphers (Crypto 2)
Security of Wireless Sensor Networks
Cryptography Lecture 11.
Cryptography Lecture 9.
Cryptography Lecture 12.
Cryptography Lecture 2.
CH 6. Stream Ciphers Information Security & IoT Lab 김해용
Cryptography Lecture 14.
Cryptography Lecture 13.
Cryptography Lecture 9.
Cryptography Lecture 11.
Cryptography Lecture 16.
Cryptography Lecture 16.
Cryptography Lecture 13.
Cryptography Lecture 17.
Cryptography Lecture 18.
Information and Computer Security CPIS 312 Lab 4 & 5
Stream Cipher Structure
By: Anthony Gervasi & Adam Dickinson
Blockchains Lecture 4.
Presentation transcript:

Cryptography Lecture 15

Summary and review We have finished our treatment of private-key schemes! (Though they will come up again later) Private-key crypto is used extensively in practice Arguably more than public-key crypto

So far… We have seen how to construct schemes based on various lower-level primitives Stream ciphers/PRGs Block ciphers/PRFs Hash functions How do we construct these primitives?

Two approaches Construct from even lower-level assumptions Can prove secure (given lower-level assumption) Inefficient Build directly Much more efficient! Need to assume security, but… We have formal definitions to aim for We can concentrate our analysis on these primitives We can develop/analyze various design principles

Stream ciphers/PRGs

Terminology Init algorithm GetBits algorithm Takes as input a key [+ initialization vector (IV)] Outputs initial state GetBits algorithm Takes as input the current state Outputs next bit/byte/chunk and updated state Allows generation of as many bits as needed

Stream ciphers Can use (Init, GetBits) to generate any desired number of output bits from an initial seed s IV Init GetBits GetBits st0 st1 st2 y1 y2

Security requirements If there is no IV, then (for a uniform key) the output of GetBits should be indistinguishable from a uniform, independent stream of bits If there is an IV, then (for a uniform key) the outputs of GetBits on multiple, uniform IVs should be indistinguishable from multiple uniform, independent streams of bits Even if the attacker is given the IVs

Security requirements In practice, want near-optimal concrete security Not just asymptotic security Stream cipher with n-bit key should be secure against attackers running in time 2n

LFSRs Degree n  n registers State: bits sn-1, …, s0 (contents of the registers) Feedback coefficients cn-1, …, c0 (do not change, though can depend on key) Registers updated and output generated in each “clock tick”

Example Assume initial content of registers is 0100 First 4 state transitions: 0100  1010  0101  0010  … First 3 output bits: 0 0 1 …

LFSRs as stream ciphers Key [+ IV] used to initialize state of the LFSR (possibly including feedback coefficients) One bit of output per clock tick State is updated each clock tick

LFSRs State (and output) “cycles” if state ever repeated Short cycles are bad for security How long can a cycle be? A maximal-length LFSR cycles through all 2n - 1 nonzero states Known how to set feedback coefficients so as to achieve maximal length

LFSRs Maximal-length LFSRs have good statistical properties… …but they are not cryptographically secure!

Security? If feedback coefficients are fixed (and hence known to the attacker), then the key just determines the initial register contents First n bits of the output reveal the entire key!

Security? Even if feedback coefficients are unknown (and determined by the key), can use linear algebra to learn everything from initial 2n output bits Moral: linearity is bad for pseudorandomness (because linear algebra is so powerful)

Nonlinear FSRs Add nonlinearity to prevent attacks Nonlinear feedback Output is a nonlinear function of the state Multiple (coupled) LFSRs …or some combination of the above Still want to preserve statistical properties of the output, and long cycle length From now on, assume design is fixed Key only determines the initial register contents

Nonlinear feedback s4 s3 s2 s1 s0

Nonlinear feedback Need to avoid bias! s3 s2 s1 s0 s4 

Nonlinear filter s3 s2 s1 s0 s4  Update of state is still linear… …but output is a nonlinear function of the entire state s3 s2 s1 s0 s4 

Nonlinear filter Need to avoid bias! s3 s2 s1 s0 s4 

Combination generator   r4 r3 r2 r1 r0  MAJ s3 s2 s1 s0  t2 t1 t0

Correlation attacks Consider previous example, and let R, S, and T be the output sequence generated by each LFSR So the overall output is MAJ(R, S, T) Let , ,  denote the degree of each LFSR Key has length  +  +  Want security for attacks running in time 2 +  + 

Correlation attacks Key observation: R, S, and T are each highly correlated with the output Assuming S, T are unbiased, Pr[Ri = outputi] = ¾ for all i (and similarly for S, T) Alternately, for large enough sequences, ¾ of the bits in R should be equal to the corresponding output bits Can do a brute-force search over the state of each LFSR individually! Key-recovery attack runs in time 2 + 2 + 2 < 2 +  + 

Trivium Designed by De Cannière and Preneel in 2006 as part of eSTREAM competition Intended to be simple and efficient (especially in hardware) No attacks better than brute-force search are known!

Trivium

Trivium Three FSRs of degree 93, 84, and 111 Initialization: 80-bit key in left-most registers of first FSR 80-bit IV in left-most registers of second FSR Remaining registers set to 0, except for three right-most registers of third FSR Run for 4 x 288 clock ticks

RC4 Designed in 1987 Designed to have good performance in software, rather than hardware No longer considered secure, but still interesting to study Simple description; not LFSR-based Still encountered in practice Interesting attacks

RC4

RC4 Not designed to take an IV, but often used with an IV anyway E.g., prepend IV to the key

Attack: bias in 2nd output byte Let St denote permutation after t steps Treat S0 as uniform for simplicity Say X = S0[1]  2 and S0[2] = 0 Occurs with probability 1/256 Then: After 1 step, S1[X]=X, i=1, j=X After 2 steps, j=X; output S2[X]=0 Otherwise, S2[X] is uniform Overall probability 2nd byte is 0 is 2/256

RC4 bias Statistical bias in other output bytes was determined experimentally Enough to break pseudo-OTP encryption based on RC4! See http://www.isg.rhul.ac.uk/tls