Stream Cipher. Block cipher as stream cipher LFSR stream cipher RC4 General remarks. Stream cipher

Similar documents
LFSR stream cipher RC4. Stream cipher. Stream Cipher

V.Sorge/E.Ritter, Handout 5

Cryptography CS 555. Topic 5: Pseudorandomness and Stream Ciphers. CS555 Spring 2012/Topic 5 1

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 2 Stream Ciphers ver.

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 2 Stream Ciphers ver.

Stream Ciphers. Debdeep Mukhopadhyay

New Address Shift Linear Feedback Shift Register Generator

Cryptanalysis of LILI-128

Attacking of Stream Cipher Systems Using a Genetic Algorithm

Sequences and Cryptography

Performance Evaluation of Stream Ciphers on Large Databases

DESIGN and IMPLETATION of KEYSTREAM GENERATOR with IMPROVED SECURITY

Randomness analysis of A5/1 Stream Cipher for secure mobile communication

WG Stream Cipher based Encryption Algorithm

Design for Test. Design for test (DFT) refers to those design techniques that make test generation and test application cost-effective.

Encryption. Secure Chat. Encryption Machine

An Introduction to Cryptography

Fault Analysis of Stream Ciphers

21.1. Unit 21. Hardware Acceleration

Designing Integrated Accelerator for Stream Ciphers with Structural Similarities

MATHEMATICAL APPROACH FOR RECOVERING ENCRYPTION KEY OF STREAM CIPHER SYSTEM

Testing of Cryptographic Hardware

Pseudorandom bit Generators for Secure Broadcasting Systems

CS408 Cryptography & Internet Security

Testing Digital Systems II

Fault Analysis of Stream Ciphers

How to Predict the Output of a Hardware Random Number Generator

Institute of Southern Punjab, Multan

Most people familiar with codes and cryptography have at least heard of the German

A Pseudorandom Binary Generator Based on Chaotic Linear Feedback Shift Register

Permutation-based cryptography for the Internet of Things

Sherlock Holmes and the adventures of the dancing men

Breaking the Enigma. Dmitri Gabbasov. June 2, 2015

Physical Layer Built-in Security Analysis and Enhancement of CDMA Systems

VLSI Test Technology and Reliability (ET4076)

Modified Alternating Step Generators with Non-Linear Scrambler

(12) Patent Application Publication (10) Pub. No.: US 2003/ A1

A New Proposed Design of a Stream Cipher Algorithm: Modified Grain - 128

Modified Version of Playfair Cipher Using Linear Feedback Shift Register and Transpose Matrix Concept

Welch Gong (Wg) 128 Bit Stream Cipher For Encryption and Decryption Algorithm

EFFICIENT IMPLEMENTATION OF RECENT STREAM CIPHERS ON RECONFIGURABLE HARDWARE DEVICES

Segmented Leap-Ahead LFSR Architecture for Uniform Random Number Generator

Cold Boot Attacks are Still Hot: Security Analysis of Memory Scramblers in Modern Processors

True Random Number Generation with Logic Gates Only

ISSN (Print) Original Research Article. Coimbatore, Tamil Nadu, India

Decim v2. To cite this version: HAL Id: hal

UPDATE TO DOWNSTREAM FREQUENCY INTERLEAVING AND DE-INTERLEAVING FOR OFDM. Presenter: Rich Prodan

LFSR Based Watermark and Address Generator for Digital Image Watermarking SRAM

CSc 466/566. Computer Security. 4 : Cryptography Introduction

Design and Implementation of Data Scrambler & Descrambler System Using VHDL

Enigma. Developed and patented (in 1918) by Arthur Scherbius Many variations on basic design Eventually adopted by Germany

Eric Roberts and Jerry Cain Handout #36 CS 106J May 15, The Enigma Machine

CMOS Testing-2. Design for testability (DFT) Design and Test Flow: Old View Test was merely an afterthought. Specification. Design errors.

The Swiss cipher machine NeMa

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Multiple Image Secret Sharing based on Linear System

Design of Fault Coverage Test Pattern Generator Using LFSR

BeepBeep: Embedded Real-Time Encryption

An Improved Hardware Implementation of the Grain-128a Stream Cipher

LECTURE NOTES ON Classical Cryptographic Techniques ( Substitution Ciphers System)

TEST PATTERN GENERATION USING PSEUDORANDOM BIST

EE241 - Spring 2001 Advanced Digital Integrated Circuits. References

Built-In Self-Test (BIST) Abdil Rashid Mohamed, Embedded Systems Laboratory (ESLAB) Linköping University, Sweden

Fully Pipelined High Speed SB and MC of AES Based on FPGA

Physical Layer Built-in Security Enhancement of DS-CDMA Systems Using Secure Block Interleaving

VIDEO intypedia001en LESSON 1: HISTORY OF CRYPTOGRAPHY AND ITS EARLY STAGES IN EUROPE. AUTHOR: Arturo Ribagorda Garnacho

LFSR Counter Implementation in CMOS VLSI

Physical Layer Built-in Security Enhancement of DS-CDMA Systems Using Secure Block Interleaving

Substitution cipher. Contents

Bit Swapping LFSR and its Application to Fault Detection and Diagnosis Using FPGA

(12) United States Patent (10) Patent No.: US 6,409,089 B1. Eskicioglu (45) Date of Patent: Jun. 25, 2002

STA4000 Report Decrypting Classical Cipher Text Using Markov Chain Monte Carlo

Efficient Realization for A Class of Clock-Controlled Sequence Generators

Securing Scan Design Using Lock & Key Technique

Power Optimization of Linear Feedback Shift Register Using Clock Gating

Optimization of Multi-Channel BCH Error Decoding for Common Cases. Russell Dill Master's Thesis Defense April 20, 2015

MODERN day VLSI designs are placing an ever increasing

Fault Analysis of GRAIN-128

VLSI System Testing. BIST Motivation

Individual Project Report

Statistical analysis of the LFSR generators in the NIST STS test suite

2e 23-1 Peta Bits Per Second (Pbps) PRBS HDL Design for Ultra High Speed Applications/Products

DETERMINISTIC SEED RANGE AND TEST PATTERN DECREASE IN LOGIC BIST

Synthesis Techniques for Pseudo-Random Built-In Self-Test Based on the LFSR

CSE 352 Laboratory Assignment 3

Ultra-lightweight 8-bit Multiplicative Inverse Based S-box Using LFSR

Further Details Contact: A. Vinay , , #301, 303 & 304,3rdFloor, AVR Buildings, Opp to SV Music College, Balaji

Keywords- Cryptography, Frame, Least Significant Bit, Pseudo Random Equations, Text, Video Image, Video Steganography.

Comparative Analysis of Stein s. and Euclid s Algorithm with BIST for GCD Computations. 1. Introduction

Cabinet War Rooms SIGSALY. The A-3 scrambler

Testing Digital Systems II

ECE 715 System on Chip Design and Test. Lecture 22

BLOCK CIPHER AND NON-LINEAR SHIFT REGISTER BASED RANDOM NUMBER GENERATOR QUALITY ANALYSIS

Implementation of a new DES chip 1

PART FIVE. Transposition Systems TYPES OF TRANSPOSITION SYSTEMS

Design and Implementation OF Logic-BIST Architecture for I2C Slave VLSI ASIC Design Using Verilog

Power Optimization of Linear Feedback Shift Register (LFSR) using Power Gating

Cryptanalysis of the Bluetooth E 0 Cipher using OBDD s

Design of Test Circuits for Maximum Fault Coverage by Using Different Techniques

DESIGN OF LOW POWER TEST PATTERN GENERATOR

Transcription:

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 90 Stream Cipher Suppose you want to encrypt a stream of data, such as: the data from a keyboard the data from a sensor Block ciphers might be awkward/inefficient (consider each keystroke as a block??).

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 91 A stream cipher is a bit like a one-time pad: we generate a key that s as long as the data, but we generate it from a short seed. The key stream is thus not random, but pseudorandom. Use seed (short random number) and produce keystream. Plaintext Ciphertext Key/Seed Pseudo-random generator Keystream

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 92 Example 1 A block cipher, using counter mode.

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 93 Example 2: LFSR Linear Feedback Shift Register: Building block for many modern stream ciphers Can be implemented very efficiently Key idea: have register of single bit cells shifted by one at every clock cycle together with feedback function Source: Wikipedia

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 94 Example: Source: Wikipedia

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 95 Reasoning about LFSRs Interesting property: Length of keystream period Reasoning works as follows: Have state vector s = [s 1,..., s n ] for shift register with n cells c 1 c 2 c n 1 c n 1 0 0 0 Have a matrix M = 0 1 0 0......... 0 0 1 0 where c i is 1 if the i th cell in s is used for feedback and 0 if not. Next state vector given by M s.

Combining LFSRs LFSRs are insecure in practice (given a lot of output, the values c i can computed fairly efficiently) Hence multiple LFSRs are combined in non-linear fashion Source: Wikipedia Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 96

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 97 CSS CSS used to encrypt DVD for copy protection Following steps are taken: Check whether region code and code on DVD match Use player keys to extract disk key from DVD Use disk key to extract title key for track Use title key to extract for each sector a sector key, which is used to decrypt the sector.

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 98 Sector encryption is combination of two LFSR s added modulo 256 (observing carry bit from previous addition): seed 1 K 0 K 1 17 bit LFSR add modulo 256 8 bit keystream 1 K 2 K 3 K 4 25 bit LFSR

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 99 Security of CSS Can be broken in time 2 17 : Idea: Because of structure of MP4, first 20 bytes of plaintext are known Hence also first 20 bytes of keystream are known Given output of 17 bit LFSR, can deduce output of 25 bit LFSR by subtraction Hence try all 2 17 possibilities for 17 bit LFSR and if generated 25 bit LFSR produces observed keystream, cipher is cracked

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 100 A5/1 used in GSM mobile phone communication Became public knowledge through leaks and reverse engineering Built from three LFSRs with irregular clock cycle 54 bit secret key and 22 bit initialisation vector A register is shifted only if its clock bit is the same as majority of the three clock bits

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 101 Source: Wikipedia

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 102 Security of A5/1 Better design: Clock shift make cryptanalysis much harder However, advanced techniques means mainstream PC with terabytes of flash memory (to store pre-processed tables) can break A5/1 with probability 90% in a few seconds

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 103 Example 3: invented 1987 by Ron Rivest Main datastructure is array S of 256 bytes. Consists of two phases: Initalisation of S phase ( key schedule ) Keystream generation phase

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 104 Code for for i := 0 to 255 do S[i] := i end j := 0 for i := 0 to 255 do j := (j + S[i] + K[i mod keylength]) mod 256 swap(s[i],s[j]) end i := 0 j := 0 while GeneratingOutput: i := (i + 1) mod 256 j := (j + S[i]) mod 256 swap(s[i],s[j]) output S[(S[i] + S[j]) mod 256] end

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 105 Graphical representation Source: Wikipedia

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 106 Properties of Extremely compact, and beautiful Exhaustively studied Two books, and hundreds of research papers Pretty good! But not good enough by modern standards: Numerous attacks (biases in the stream, especially the first few bytes) Led to real attacks on WEP, and modes of TLS that use it

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 107 WEP Old standard for encryption on wireless networks based on, but seriously broken - don t use Source: Wikipedia

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 108 Weaknesses in WEP Initialisation vector only 24 bits, hence key streams repeat after at most 2 24 frames With certain initialisation vectors knowing m bytes of key and keystream means you can deduce byte m + 1 of key First bytes of key stream known because standard headers are always sent With this method, can crack the key in minutes on modern PC hardware

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 109 Keys for stream ciphers must not be reused. Formally, and LFSR as presented do not satisfy IND-CPA security. Need carefully used initialisation vectors or nonces to obtain IND-CPA.