Network Security: Secret Key Cryptography

Similar documents
Chapter 4 The Data Encryption Standard

o Broken by using frequency analysis o XOR is a polyalphabetic cipher in binary

Journal of Discrete Mathematical Sciences & Cryptography Vol. ( ), No., pp. 1 10

Block Ciphers Security of block ciphers. Symmetric Ciphers

DES Data Encryption standard

TMA4155 Cryptography, Intro

DUBLIN CITY UNIVERSITY

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014

DUBLIN CITY UNIVERSITY

Introduction to Cryptography

B. Substitution Ciphers, continued. 3. Polyalphabetic: Use multiple maps from the plaintext alphabet to the ciphertext alphabet.

Cryptanalysis on short messages encrypted with M-138 cipher machine

Course Business. Harry. Hagrid. Homework 2 Due Now. Midterm is on March 1. Final Exam is Monday, May 1 (7 PM) Location: Right here

The number theory behind cryptography

Lecture 32. Handout or Document Camera or Class Exercise. Which of the following is equal to [53] [5] 1 in Z 7? (Do not use a calculator.

Classical Cryptography

V.Sorge/E.Ritter, Handout 2

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

Cryptography. Module in Autumn Term 2016 University of Birmingham. Lecturers: Mark D. Ryan and David Galindo

Random Bit Generation and Stream Ciphers

Secret Key Systems (block encoding) Encrypting a small block of text (say 128 bits) General considerations for cipher design:

ElGamal Public-Key Encryption and Signature

Quality of Encryption Measurement of Bitmap Images with RC6, MRC6, and Rijndael Block Cipher Algorithms

Vernam Encypted Text in End of File Hiding Steganography Technique

CDMA Physical Layer Built-in Security Enhancement

Chapter 3 LEAST SIGNIFICANT BIT STEGANOGRAPHY TECHNIQUE FOR HIDING COMPRESSED ENCRYPTED DATA USING VARIOUS FILE FORMATS

OFDM Based Low Power Secured Communication using AES with Vedic Mathematics Technique for Military Applications

New Linear Cryptanalytic Results of Reduced-Round of CAST-128 and CAST-256

Chapter 4 MASK Encryption: Results with Image Analysis

Topic Notes: Digital Logic

4. Design Principles of Block Ciphers and Differential Attacks

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

CPSC 467: Cryptography and Computer Security

Algorithmic Number Theory and Cryptography (CS 303)

Dr. V.U.K.Sastry Professor (CSE Dept), Dean (R&D) SreeNidhi Institute of Science & Technology, SNIST Hyderabad, India. P = [ p

Pseudorandom Number Generation and Stream Ciphers

IND-CCA Secure Hybrid Encryption from QC-MDPC Niederreiter

Automated Analysis and Synthesis of Block-Cipher Modes of Operation

Introduction to Cryptography

A Novel Encryption System using Layered Cellular Automata

Stream Ciphers And Pseudorandomness Revisited. Table of contents

Lecture 1: Introduction

Overview. The Big Picture... CSC 580 Cryptography and Computer Security. January 25, Math Basics for Cryptography

Data security (Cryptography) exercise book

Number Theory and Security in the Digital Age

LOGIC DIAGRAM: HALF ADDER TRUTH TABLE: A B CARRY SUM. 2012/ODD/III/ECE/DE/LM Page No. 1

Math 1111 Math Exam Study Guide

MAT 302: ALGEBRAIC CRYPTOGRAPHY. Department of Mathematical and Computational Sciences University of Toronto, Mississauga.

AES Encryption and Decryption in Microsoft.NET

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Diffie-Hellman key-exchange protocol

Towards a Cryptanalysis of Scrambled Spectral-Phase Encoded OCDMA

II. RC4 Cryptography is the art of communication protection. This art is scrambling a message so it cannot be clear; it

Cryptography CS 555. Topic 20: Other Public Key Encryption Schemes. CS555 Topic 20 1

Amalgamation of Cyclic Bit Operation in SD-EI Image Encryption Method: An Advanced Version of SD-EI Method: SD-EI Ver-2

Keywords: dynamic P-Box and S-box, modular calculations, prime numbers, key encryption, code breaking.

LIST OF EXPERIMENTS. KCTCET/ /Odd/3rd/ETE/CSE/LM

Week 3: Block ciphers

Differential Cryptanalysis of REDOC III

Sheet 1: Introduction to prime numbers.

EE 418: Network Security and Cryptography

CESEL: Flexible Crypto Acceleration. Kevin Kiningham Dan Boneh, Mark Horowitz, Philip Levis

Colored Image Ciphering with Key Image

Classification of Ciphers

Drill Time: Remainders from Long Division

Cryptanalysis of Ladder-DES

FPGA Implementation of Secured Image STEGNOGRAPHY based on VIGENERE CIPHER and X BOX Mapping Techniques

Implementation and Performance Testing of the SQUASH RFID Authentication Protocol

Why (Special Agent) Johnny (Still) Can t Encrypt: A Security Analysis of the APCO Project 25 Two-Way Radio System

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence.

Encryption at the Speed of Light? Towards a cryptanalysis of an optical CDMA encryption scheme

High Diffusion Cipher: Encryption and Error Correction in a Single Cryptographic Primitive

Proceedings of Meetings on Acoustics

Solution: Alice tosses a coin and conveys the result to Bob. Problem: Alice can choose any result.

Distribution of Primes

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

EE 418 Network Security and Cryptography Lecture #3

MA 111, Topic 2: Cryptography

CRYPTANALYSIS OF THE PERMUTATION CIPHER OVER COMPOSITION MAPPINGS OF BLOCK CIPHER

Secure Function Evaluation

Lecture 3 Data Link Layer - Digital Data Communication Techniques

A Cryptosystem Based on the Composition of Reversible Cellular Automata

SRV ENGINEERING COLLEGE SEMBODAI RUKMANI VARATHARAJAN ENGINEERING COLLEGE SEMBODAI

Single Error Correcting Codes (SECC) 6.02 Spring 2011 Lecture #9. Checking the parity. Using the Syndrome to Correct Errors

6.004 Computation Structures Spring 2009

Successful Implementation of the Hill and Magic Square Ciphers: A New Direction

Purple. Used by Japanese government. Not used for tactical military info. Used to send infamous 14-part message

Symmetric-key encryption scheme based on the strong generating sets of permutation groups

Written Exam Information Transmission - EIT100

Proposal of New Block Cipher Algorithm. Abstract

Basic concepts of Digital Watermarking. Prof. Mehul S Raval

Encryption Systems 4/14/18. We have seen earlier that Python supports the sorting of lists with the built- in.sort( ) method

Visual Cryptography. Frederik Vercauteren. University of Bristol, Merchant Venturers Building, Woodland Road, Bristol BS8 1UB.

methods for subliminal channels Kazukuni Kobara and Hideki Imai Institute of Industrial Science, The University of Tokyo

Grade 7 and 8 Math Circles March 19th/20th/21st. Cryptography

Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017

Application: Public Key Cryptography. Public Key Cryptography

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Fermat s little theorem. RSA.

Transcription:

1 Network Security: Secret Key Cryptography Henning Schulzrinne Columbia University, New York schulzrinne@cs.columbia.edu Columbia University, Fall 2000 cfl1999-2000, Henning Schulzrinne Last modified September 28, 2000

2 Secret Key Cryptography fixed-size block, fixed-size key! block DES, IDEA message into blocks?

3 Generic Block Encryption convert block into another, one-to-one long enough to avoid known-plaintext attack 64 bit typical (nice for RISC!) 18 10 18 (peta) naive: 2 64 input values, 64 bits each! 2 70 bits output should look random plain, ciphertext: no correlation (half the same, half different) bit spreading substitution: 2 k ;k fi 64 values mapped k 2 k bits permutation: change bit position of each bit k log 2 k bits to specify round: combination of substitution of chunks and permutation do often enough so that a bit can affect every output bit but no more

4 Block Encryption 64 bit input 8bits 8bits 8bits 8bits 8bits 8bits 8bits 8bits S1 S2 S3 S4 S5 S6 S7 S8 key based substitution functions 8bits 8bits 8bits 8bits 8bits 8bits 8bits 8bits 64 bit intermediate permute the bits, possibly based on the key loop for n rounds 64 bit output

5 Data Encryption Standard (DES) published in 1977 by National Bureau of Standards developed at IBM ( Lucifer ) 56-bit key, with parity bits 64-bit blocks easy in hardware, slow in software 50 MIPS: 300 kb/s 10.7 Mb/s on a 90 MHz Pentium in 32-bit protected mode grow 1 bit every 2 years

6 Breaking DES brute force: check all keys 500,000 MIPS years easy if you have known plaintext have to know something about plaintext (ASCII, GIF,...) commercial DES chips not helpful: key loading time > decryption time easy to do with FPGA, without arousing suspicion easily defeated with repeated encryption

7 DES Overview initial permutation 56-bit key! 16 48-bit per-round keys (different subset) 16 rounds: 64 bit input + 48-bit key! 64-bit output final permutation (inverse of initial) decryption: run backwards reverse key order

8 Permutation just slow down software ith byte! (9 i)th bits even-numbered bits into byte 1-4 odd-numbered bits into byte 5-8 no security value: if we can decrypt innards, we could decrypt DES

9 DES: Generating Per-Round Keys 56-bit key! 16 48-bit keys K 1 ;:::K 16 : bits8,16,...,64areparity permutation split into 28-bit pieces C 0 ;D 0 : 57; 49;::: again, no security value rounds 1, 2, 9, 16: single-bit rotate left otherwise: two-bit rotate left permutation for left/right half of K i discard a few bits 48-bit key in each round

x Φ x =0 10 XOR Arithmetic x Φ 0=x x Φ 1=μx

11 DES Round mangler function can be non-reversible L = R n n+1 R n+1 = m(r n ;K n ) Φ L n R n = L n+1 decryption L n = m(r n ;K n ) Φ R n+1 because (ΦL n ;R n+1 ): R n+1 Φ R n+1 Φ L n = m() Φ L n Φ L n Φ R n+1

12 DES Mangler Function R(32);K(48) Φ L n! R n+1 expand from 32 to 48 bits: 4-bit chunks, borrow bits from neighbors 6-bit chunks: expanded R Φ K 8 different S-boxes for each 6 bits of data Sbox: 6 bit (64 entries) into 4 bit (16) table: 4 each four separate 4x4 S-boxes, selected by outer 2 bits of 6-bit chunk afterwards, random permutation: P-box

4 weak keys = C 0 ;D 0 =0:::0 or 1 :::1 own inverses: E k (m) =D k (m) semi-weak keys: E k1 (m) =D k2 (m) 13 DES: Weak Keys 16 keys to avoid: C 0 ;D 0 0...0,1...1,0101...,1010... sequential key search avoid low-numbered keys

14 IDEA International Data Encryption Algorithm ETH Zurich, 1991 similar to DES: 64 bit blocks but 128-bit keys

+mod2 16 treat 0 as encoding for 2 16 15 Primitive Operations 2 16-bit! 1 16-bit: Φ Ω 2 +1: 16 mod 9 reversible y inverse 8x 2 [1; 2 of ]a Ω x Ω y = a x, 16 or x Ω y =1 example: x = 2;y = 32769 Euclid s algorithm reason: 2 16 +1is prime

16 IDEA Key Expansion 128-bit key! 52 16-bit keys K 1 ;:::;K 52 encryption, decryption: different keys key generation: first chop off 16 bit chunks from 128 bit key eight 16-bit keys start at bit 25, chop again eight 16-bit keys shift 25 bits and repeat

64 bit input! 4 16-bit inputs: X a ;X b ;X c ;X d operations! output X 0 a ;X0 b ;X0 c ;X0 d odd rounds use 4K i : K a ;K b ;K c ;K d even rounds use 2K i : K e ;K f 17 IDEA: One Round 17 rounds, even and odd

X 0 a = X a Ω K a X 0 d = X d Ω K d X 0 c = X b + K b X 0 b = X c + K c X 0 a Ω K 0 a = X a Ω K a Ω K 0 a 18 IDEA: Odd Round reverse with inverses of K i :

Y in = X a Φ X b Y out = ((K e Ω Y in + Z in ) Ω K f X 0 a = X a Φ Y out X 0 b = X b Φ Y out X 0 c = X c Φ Z out X 0 d = X d Φ Z out 19 IDEA: Even Round mangler: Y out ;Z out = f(y in ;Z in ;K e ;K f ) 1. 2. Z in = X c Φ X d 3. Z out = K e Ω Y in + Y out

X 0 a = X a Φ Y out = X 0 a Φ Y out = (X a Φ Y out ) Φ Y out 20 IDEA Even Round: Inverse Feed X 0 a to input: = X a round is its own inverse! same keys

21 Encrypting a Large Message Electronic Code Book (ECB) Cipher Block Chaining (CBC) k-bit Cipher Feedback Mode (CFB) k-bit Output Feedback Mode (OFB)

22 Electronic Code Book (ECB) break into 64-bit blocks encrypt each block independently some plaintext same ciphertext easy to change message by copying blocks bit errors do not propagate rarely used

23 Cipher Block Chaining (CBC) simple Φ fix: blocks with 64-bit random number must keep random number secret repeats in plaintext 6! = ciphertext can still remove selected blocks

24 Cipher Block Chaining (CBC) random number r i+1 = c i : previous block of ciphertext random (but public) initialization vector (IV): avoid equal initial text Trudy can t detect changes in plaintext can t feed chosen plaintext to encryption but: can twiddle some bits (while modifying others): c modify n to change m desired n+1 m (and n ) combine with MICs

25 Output Feedback Mode (OFB) 64-bit OFB: encrypt encrypt IV:! b 1! b 2 ::: 0 b = m i Φ b i i, transmit with IV c ciphertext damage limited plaintext damage can be transmitted byte-by-byte but: known plaintext modify plaintext into anything extra/missing characters garble whole rest variation: k-bit OFB

26 Cipher Feedback Mode (CFB) similar to OFB: generate k bits, Φ with plaintext use k bits of ciphertext instead of IV-generated can t generate ahead of time 8-bit CFB will resynchronize after byte loss/insertion requires encryption for each k bits

27 Generating MICs only send last block of CBC CBC residue any modification in plaintext modifies CBC residue replicating last CBC block doesn t work P+I: use separate (but maybe related) secret keys for encryption and MIC two encryption passes CBC(message j hash)

two keys K 1, K 2 K 1 K 2 K 1 K 1 K 2 K 1 28 Multiple Encryption DES applicable to any encryption, important for DES encrypt-decrypt-encrypt (EDE): just reversible functions # # #! E! D! E! c m decryption just reverse: # # # standard CBC c! D! E! D! m

29 Triple DES: Why 3? security $ efficiency K 1 = K 2 : twice the work for encryption, cryptanalyst A:E(K 1 ) 2) r plaintext! c B:E(K i! i m (ciphertext) not quite equivalent to 112 bit key: assume (m given ;c 1 ); (m 2 ;c 2 ); (m 3 ;c 3 ) 1 2 Table (10 A: TB) entries: r = Kfm 56 g8k,sortbyr 4 1 2 Table B: r = c entries: 56 1 decrypted with K,sorted find matching r K A ;K B if multiple K A ;K B pairs, test against m 2 ;c 2,etc. 2 64 values, 2 56 entries 1/256 chance to appear in table 2 48 matches

30 Triple DES: Why 3? Table A:... 1234567890abcd00 ab485095845922 1234567890abcd03 12834893573257 1234567890abcd04 43892ab8348a85 1234567890abcd08 185ab80184092c... r = E(m 1 ;K) (64 bits) K (56 bits) Table B:

31 = D(c 1 ;K) (64 bits) r... 1234567890abcd00 1234567890abcd03 1234567890abcd07 1234567890abcd09... (56 bits) K 38acd043858ac0 91870ab8a8d8a0 058a0fa858abcd fd884a90407821 computation: 2 2 56 +2 48

32 Triple DES EDE: can run as single DES with K 1 = K 2 can be used with any chaining method CBC on the outside no change in properties CBC on the inside avoid plaintext manipulation but want self-synchronizing: wrong bit x in block n 1 n 1 garbled, n x changed, others unaffected CBC inside: parallelization