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

Similar documents
Network Security: Secret Key Cryptography

DUBLIN CITY UNIVERSITY

CPSC 467: Cryptography and Computer Security

Block Ciphers Security of block ciphers. Symmetric Ciphers

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

TMA4155 Cryptography, Intro

Introduction to Cryptography

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

Pseudorandom Number Generation and Stream Ciphers

Some Cryptanalysis of the Block Cipher BCMPQ

Random Bit Generation and Stream Ciphers

A Novel Encryption System using Layered Cellular Automata

Implementation and Performance Testing of the SQUASH RFID Authentication Protocol

4. Design Principles of Block Ciphers and Differential Attacks

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

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

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

Colored Image Ciphering with Key Image

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

Classical Cryptography

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

The number theory behind cryptography

Stream Ciphers And Pseudorandomness Revisited. Table of contents

The following code should by now seem familiar: do {

V.Sorge/E.Ritter, Handout 2

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

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

Automated Analysis and Synthesis of Block-Cipher Modes of Operation

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

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

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

DUBLIN CITY UNIVERSITY

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

CDMA Physical Layer Built-in Security Enhancement

Spread Spectrum. Chapter 18. FHSS Frequency Hopping Spread Spectrum DSSS Direct Sequence Spread Spectrum DSSS using CDMA Code Division Multiple Access

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

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

Simple Algorithm in (older) Selection Diversity. Receiver Diversity Can we Do Better? Receiver Diversity Optimization.

Introduction to Cryptography

Conditional Cube Attack on Reduced-Round Keccak Sponge Function

SHA-3 and permutation-based cryptography

Secure Function Evaluation

Vernam Encypted Text in End of File Hiding Steganography Technique

SECURITY OF CRYPTOGRAPHIC SYSTEMS. Requirements of Military Systems

Classification of Ciphers

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

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

Low power implementation of Trivium stream cipher

Lecture 1: Introduction

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

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

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

Security in Sensor Networks. Written by: Prof. Srdjan Capkun & Others Presented By : Siddharth Malhotra Mentor: Roland Flury

IND-CCA Secure Hybrid Encryption from QC-MDPC Niederreiter

ECOM 4311 Digital System Design using VHDL. Chapter 9 Sequential Circuit Design: Practice

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

CSE 3482 Introduction to Computer Security.

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

Chapter 4 The Data Encryption Standard

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

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

Available online at ScienceDirect. Procedia Computer Science 65 (2015 )

EE 418 Network Security and Cryptography Lecture #3

EE 418: Network Security and Cryptography

Quasi group based crypto-system

Image Steganography with Cryptography using Multiple Key Patterns

Voice and image encryption, and performance analysis of counter mode advanced encryption standard for WiMAX

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

Introduction to Cryptography CS 355

DEEJAM: Defeating Energy-Efficient Jamming in IEEE based Wireless Networks

Number Theory and Public Key Cryptography Kathryn Sommers

Wireless Sensor Networks

R.S. ENCODERS OF LOW POWER DESIGN

Image Encryption using Pseudo Random Number Generators

Pseudo Noise Sequence Generation using Elliptic Curve for CDMA and Security Application

Cryptography, Number Theory, and RSA

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

La Storia dei Messaggi Segreti fino alle Macchine Crittografiche

Power Analysis Attacks on SASEBO January 6, 2010

Towards a Cryptanalysis of Scrambled Spectral-Phase Encoded OCDMA

MA/CSSE 473 Day 9. The algorithm (modified) N 1

Cryptanalysis on short messages encrypted with M-138 cipher machine

A Secure Image Encryption Algorithm Based on Hill Cipher System

Public-key Cryptography: Theory and Practice

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

A Steganography Algorithm for Hiding Secret Message inside Image using Random Key

Software Security. Encryption. Encryption. Encryption. Encryption. Encryption. Week 5 Part 1. Masking Data from Unwelcome eyes

Proposal of New Block Cipher Algorithm. Abstract

A Cryptosystem Based on the Composition of Reversible Cellular Automata

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.

Codes and Nomenclators

Error Protection: Detection and Correction

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

A Novel Color Image Cryptosystem Using Chaotic Cat and Chebyshev Map

6. FUNDAMENTALS OF CHANNEL CODER

Xor. Isomorphisms. CS70: Lecture 9. Outline. Is public key crypto possible? Cryptography... Public key crypography.

Page 1. Outline. Basic Idea. Hamming Distance. Hamming Distance Visual: HD=2

Math 1111 Math Exam Study Guide

Data security (Cryptography) exercise book

Lecture #2. EE 471C / EE 381K-17 Wireless Communication Lab. Professor Robert W. Heath Jr.

Transcription:

We spoke about defense challenges Crypto introduction o Secret, public algorithms o Symmetric, asymmetric crypto, one-way hashes Attacks on cryptography o Cyphertext-only, known, chosen, MITM, brute-force Types of ciphers o Mix of substitution and transposition o Monoalphabetic, homophonic, polygram, polyalphabetic Bpqa kzgxbwozixpg ammua zmit miag. Em eivb uwzm! Answer 1: o The call of death is a call of love. Death can be sweet if we answer it in the affirmative, if we accept it as one of the great eternal forms of life and transformation. o Broken by using frequency analysis Bpqa kzgxbwozixpg ammua zmit miag. Em eivb uwzm! Answer 2: o This cryptography seems real easy. We want more! o Ceasar cipher with offset 18, symmetric o Q: If we use offset 18 to encrypt and offset 8 to decrypt how is this symmetric crypto? Polyalphabetic many monoalphabetic ciphers are used sequentially o First mapping is used for the first letter, second mapping for the second letter and so on o XOR is a polyalphabetic cipher in binary domain Polyalphabetic cipher with infinite o Combine letters from the message with the letters from an infinite, randomly generated o Never reuse the o Key needs to be generated using a very good RNG (to avoid any patterns) This cipher cannot be broken Sender and receiver must be perfectly synchronized Stream ciphers: polyalphabetic o Work on message a bit or a byte at a time o Same bit/byte will encrypt differently, depending on the position of the Block ciphers: polygram o Work on message block by block o Block size is usually the same as size o Same block may encrypt into the same block, depending on the cipher mode Assume XOR with the 1

C A L I F R A G I L I S T I C F M M D Y K B U C M L E U D V Bonus question: What was the encryption algorithm I used here? If Eve can get hold of /cyphertext pair she can retrieve the Keystream is generated continuously and is the function of the secret stored inside the RNG Key should be pseudorandom hard to break but easily reproduced for decryption Security depends entirely on RNG generating the Key Internal State Next State Function Output Function Keystream Keystream is generated from the K Sender and receiver must be synchronized One-bit error in produces onebit error in Upon loss of synchronization both sides start afresh with a new Any deletions and insertions will cause loss of synchronization Mallory can toggle/change bits Key Internal State Output Function P i C i 2

Internal state is the function only of the previous n bits and depends on the K Decryption stream generator will completely synchronize with encryption generator after receiving n bits Advantage: o Recovery from loss of bits after n bits Drawback: o Error extension one-bit error in produces n errors in o Mallory can replay messages We need to generate a sequence that looks random but is reproducible There shouldn t be any obvious regularities, otherwise Eve can learn the pattern after seeing several numbers, and guess the next ones We would like to cover the whole range of numbers (e.g. 2 n if the number has n bits) Generators of the form X n = ( ax n 1 b) mod m o A period of a generator is number of steps before it repeats the sequence o If a, b and m are properly chosen, this generator will be maximal period generator and have period of m o It has been proven that any polynomial congruential generator can be broken Used for cryptography today A shift register is transformed in every step through feedback function o Contents are shifted one bit to the right, the bit that falls out is the output o New leftmost bit is XOR of some bits in the shift register - tap sequence o If we choose a proper tap sequence period will be 2 n -1 4 4 1 X = X X 1111 0110 1 0111 1 0011 0 1011 1 1001 1 0101 1 0100 1 1010 1 0010 0 1101 0 0001 0 1000 1 1100 0 1110 0 1111 0 Proper tap sequences are those where a polynomial from a tap sequence 1 is a primitive polynomial in GF(2) There are tables of primitive polynomials LFSR is fast in hardware but slow in software LFSR are not themselves secure but they are used as building blocks in encryption algorithms 3

V G Q Z K V G Q Z K S S S S S S S S substitution round V G Q Z K V G Q Z K permutation 4

Electronic Code Book (ECB) Cipher Block Chaining (CBC) k-bit Cipher Feedback Mode (CFB) k-bit Output Feedback Mode (OFB) Things to consider: o Can we encrypt/decrypt efficiently (as soon as bits arrive) o How hard it is to break encryption o What if a bit is flipped on the channel o What if we lose a bit on the channel Store mapping for every possible block o Fast encryption/decryption just a table lookup o Ability to process text in any order and in parallel o Table size could be enormous so we need to make the mapping depend on the Eve can detect which blocks map to other blocks, by seeing several and corresponding messages Due to language redundancy even partial decryption might provide enough information Bit error invalidates one block Bit loss/addition is not recoverable 12B7 7783 38AC CDC7 3231 12B7 7783 38AC CDC7 Bank A E K (M) D K (C) Bank B Bank A E K (M) D K (C) Bank B Transfer $100 to my account in Bank B Mallory Transfer $100 to my account in Bank B Mallory Mallory does this couple of times, looks for similar block sequences. She can now replay 12B7 7783 38AC CDC7 at will Bank adds timestamps Mallory picks specific blocks of message carrying his name and account number and replaces those in other messages between Bank A and Bank B Problem with ECB is that Mallory can replace, add or drop blocks at will Chaining prevents this by adding feedback o Each block depends on all previous blocks Also, with CBC, same blocks will encrypt to different blocks thus obscuring patterns in IV Encryption Initialization vector (IV) is just a block of random numbers, to ensure that no messages have the same beginning. Both the sender and the receiver must use the same IV. 5

An error in affects the rest of the message but is easily spotted and removed after decryption An error in affects one block and several bits of Decryption Error extension Mallory can: o Add blocks o Drop blocks o Introduce bit errors Bit loss/addition is not recoverable input queue output block 1 Ciphertext unit (k bits) is added to the right to input queue, and next unit is processed 2 IV must be unique, otherwise it opens a vulnerability If a k-bit unit is lost or added, next n/k-1 units will be garbled but then the algorithm will recover from error One-bit error in produces onebit error in and n/k-1 subsequent units are garbled (n is the block size, k is the unit size) Similar to CFB but unit is taken from the output queue, not from the input queue output block 1 IV is placed in input queue and encrypted, leftmost unit is XOR-ed with one unit and sent 6

input queue output block 2 1 Leftmost unit from the output block is added to the right to input queue, and next unit is processed Output block generation can be done offline, is then just XOR-ed when it arrives One-bit error in produces onebit error in Bit loss/addition is not recoverable Stream ciphers can be analysed mathematically and can be efficiently implemented in hardware Block ciphers are more general and can be efficiently implemented in software ECB is easiest and fastest but also weakest. Can be used for encrypting random data, such as other s. CBC is good for encrypting files, no danger of lack of synchronization CFB is good for encrypting streams of characters OFB is good if error propagation cannot be tolerated 7