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

Similar documents
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.

V.Sorge/E.Ritter, Handout 2

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

CPSC 467: Cryptography and Computer Security

Classical 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.

Math 1111 Math Exam Study Guide

The number theory behind cryptography

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Chapter 4 The Data Encryption Standard

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

Lecture 1: Introduction

CRYPTANALYSIS OF THE PERMUTATION CIPHER OVER COMPOSITION MAPPINGS OF BLOCK CIPHER

EE 418: Network Security and Cryptography

EE 418 Network Security and Cryptography Lecture #3

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

Data security (Cryptography) exercise book

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

Diffie-Hellman key-exchange protocol

TMA4155 Cryptography, Intro

Introduction to Cryptography CS 355

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

Historical cryptography 2. CSCI 470: Web Science Keith Vertanen

Math 1111 Math Exam Study Guide

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

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

DUBLIN CITY UNIVERSITY

Introduction to Cryptography

Cryptography Made Easy. Stuart Reges Principal Lecturer University of Washington

MA 111, Topic 2: Cryptography

A Secure Image Encryption Algorithm Based on Hill Cipher System

Cryptanalysis on short messages encrypted with M-138 cipher machine

Cryptography Lecture 1: Remainders and Modular Arithmetic Spring 2014 Morgan Schreffler Office: POT 902

Distribution of Primes

X = {1, 2,...,n} n 1f 2f 3f... nf

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

1 Introduction to Cryptology

The Chinese Remainder Theorem

Merkle s Puzzles. c Eli Biham - May 3, Merkle s Puzzles (8)

The Chinese Remainder Theorem

Solutions for the Practice Final

A basic guitar is a musical string instrument with six strings. In standard tuning they have the notes E, A, D, G, B and E

Fermat s little theorem. RSA.

Classification of Ciphers

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

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

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

A Cryptosystem Based on the Composition of Reversible Cellular Automata

Unlinkability and Redundancy in Anonymous Publication Systems

Some Cryptanalysis of the Block Cipher BCMPQ

SECURITY OF CRYPTOGRAPHIC SYSTEMS. Requirements of Military Systems

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

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

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

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

Public-Key Cryptosystem Based on Composite Degree Residuosity Classes. Paillier Cryptosystem. Harmeet Singh

Introduction to Cryptography

Chapter 4 MASK Encryption: Results with Image Analysis

La Storia dei Messaggi Segreti fino alle Macchine Crittografiche

A STENO HIDING USING CAMOUFLAGE BASED VISUAL CRYPTOGRAPHY SCHEME

Network Security: Secret Key Cryptography

Towards a Cryptanalysis of Scrambled Spectral-Phase Encoded OCDMA

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

DUBLIN CITY UNIVERSITY

Cryptography s Application in Numbers Station

Voting Systems, Mass Murder, and the Enigma Machine

Drill Time: Remainders from Long Division

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

Cryptography, Number Theory, and RSA

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

17. Symmetries. Thus, the example above corresponds to the matrix: We shall now look at how permutations relate to trees.

4. Design Principles of Block Ciphers and Differential Attacks

Differential Cryptanalysis of REDOC III

Colored Image Ciphering with Key Image

Mathematical Foundations of Computer Science Lecture Outline August 30, 2018

Week 3: Block ciphers

GLOBAL JOURNAL OF ENGINEERING SCIENCE AND RESEARCHES AN EFFICIENT METHOD FOR SECURED TRANSFER OF MEDICAL IMAGES M. Sharmila Kumari *1 & Sudarshana 2

CDMA Physical Layer Built-in Security Enhancement

A Novel Encryption System using Layered Cellular Automata

Cryptography. 2. decoding is extremely difficult (for protection against eavesdroppers);

Introduction to Modular Arithmetic

Codes and Nomenclators

Random Bit Generation and Stream Ciphers

Public Key Cryptography

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

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

Stream Ciphers And Pseudorandomness Revisited. Table of contents

DES Data Encryption standard

Lecture 2.3: Symmetric and alternating groups

Challenge 2. uzs yfr uvjf kay btoh abkqhb khgb tv hbk lk t tv bg akwv obgr

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

Vernam Encypted Text in End of File Hiding Steganography Technique

Automated Analysis and Synthesis of Block-Cipher Modes of Operation

CHAPTER 2. Modular Arithmetic

COUNTING AND PROBABILITY

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

p 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m.

Transcription:

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 1 Cryptography Module in Autumn Term 2016 University of Birmingham Lecturers: Mark D. Ryan and David Galindo Slides originally written by Eike Ritter Based on material developed by Volker Sorge

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 2 What is Cryptography Encryption essential for security on the internet Confidentiality, integrity, privacy cannot be guaranteed otherwise Works in principle as follows: Alice and Bob share a secret key. HOW?? Alice uses secret key to scramble data: encryption Alice sends scrambled data to Bob Bob decrypts data with secret key, gets message back

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 3 Course content Lecture course will explain basic cryptographic algorithms Will also reason about their security Will explain how to use the algorithms properly

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 4 Kinds of cryptography Transposition: permutes components of a message Substitution: replacing components. Two main ways: Codes: algorithms for substitution of entire words (working on meaning) Ciphers: algorithms substituting bits, bytes or blocks Ciphers are easiest to use and mathematically well understood will concentrate on those

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 5 Terminology Plaintext Encryption Ciphertext Decryption Message before encryption Process of scrambling a message An enciphered message Process of unscrambling a message Plaintext Encryption Ciperhtext Decryption Original plaintext

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 6 Transposition Cipher Used already since antiquity Example: Rail Fence Cipher Key: Column size Encryption: Arrange message in columns of fixed size (the key). Add dummy text to fill the last column. Ciphertext consists of rows. Decryption: Calculate row size by dividing message length by the key. Arrange message in rows of this size. Plaintext consists of columns.

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 7 Security of Transposition Cipher Is this cipher secure? Informal answer: No. Given any ciphertext, attacker tries all possible values for the key. For a message of size n there are at most n possibilities for the key, hence attacker will obtain plaintext.

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 8 Precise formulation of security Use game between two parties: Attacker(A): Aim is to obtain plaintext for given ciphertext Challenger(C): provides the challenge for the attacker Moves of the game: C selects message length n and chooses a key k. C chooses message m and sends encrypted message Enc k (m) to A A does some computations and eventually outputs a message A wins the game if A s output is essentially the same as m. (Note: A doesn t have key!) A has probability of at least 1 n message. Protocol insecure. of winning this game for any

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 9 Precise formulation of security Use game between two parties: Attacker(A): Aim is to obtain plaintext for given ciphertext Challenger(C): provides the challenge for the attacker Moves of the game: C selects message length n and chooses a key k. C chooses message m and sends encrypted message Enc k (m) to A A does some computations and eventually outputs a message A wins the game if A s output is essentially the same as m. (Note: A doesn t have key!) A has probability of at least 1 n message. Protocol insecure. of winning this game for any

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 10 Permutations A permutation describes the re-arrangement of the elements of an ordered list into a one-to-one correspondence of itself Permutation is therefore a function from {1,..., n} to itself which is one-to-one. Example: reordering of (1, 2, 3) to (2, 3, 1). Two notations used Array notation: ( Write) the re-ordered list below the original 1 2 3 one, here 2 3 1 Write down the cycles. The first cycle is the list of numbers obtained by applying the permutation first to 1, then to the result and so on. Stop when 1 appears again. The other cycles are obtained by starting with the lowest number not appearing in the previous cycle and applying the same recipe. Cycles of length 1 are omitted. Example would be (123).

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 11 Operations on permutations There is the identity which maps any number to itself Two permutations can be composed, resulting in another permutation The inverse of a permutation s is the permutation t such that s composed with t is the identity.

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 12 Monoalphabetic substitution cipher Key: permutation of the alphabet Encryption: Apply the permutation Decryption: Apply the inverse permutation Here is one way to choose the key: Choose keyword (or keyphrase) remove all duplicate letters from keyword start cipher-alphabet with letters from duplicate-free keyword and the end of the codeword continue with next unused letter of alphabet following last letter in codeword continue filling in letters in alphabetical order leaving out already used letters

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 13 Security How difficult is it for the attacker to break this cipher? Have 26! 2 86 permutations But: Have other tools available, eg frequency analysis Frequency of letter occurrence varies dramatically amongst letters In English text, 12.7% of all letters are e, and 0.2% of all letters are x.

Enigma machine Encryption was mechanised at the beginning of 20th century Famous example: Enigma machine (used by German military in WW2) consisted of keyboard, plug board, three rotors and reflector Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 14

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 15 Enigma machine Encryption method: Letters from keyboard are substituted using plugboard with substitution cipher In next step, each rotor applies fixed substitution to the letters Key point: rotors are dynamic: rotors advance after each letter Message passes through the reflector, which applies one more permutation and applies all three rotors in opposite direction. Successfully broken by scientist in Bletchley Park (Turing) Also initiated the development of modern day computers

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 16 Modular arithmetic Definition We say two numbers a, b Z are congruent modulo n Z, written a b(mod n), if a b is divisible by n If 0 a n, we write [a] n, called the residue class of a modulo n, for the set of all numbers b such that a b(mod n). We define addition, subtraction and multiplication on residue classes by [a] n + [b] n = [c] n if (a + b) c(mod n) [a] n [b] n = [c] n if (a b) c(mod n) [a] n [b] n = [c] n if (a b) c(mod n)

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 17 Probability Will use discrete probabilities Definition Let U be a finite set. A probability distribution P is a function P : U [0, 1] such that P(u) = 1 u U We denote by U the size of U (the number of elements in U) Example Let U be a finite set. The uniform distribution is the probability distribution P defined by P(u) = 1 U

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 18 Probabilities, continued Definition Let P : U [0, 1] be a probability distribution. An event A is a subset of U. The probability of an event A, written P[A], is defined as P[A] = u A P(u)

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 19 Bitstrings We write {0, 1} n for the set of all sequences of n bits. Have important operation on bitstrings: is addition modulo 2 on each bit

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 20 One-time pad First cipher which is secure Message and keys are bitstrings Key: Random bitstring k 1,..., k n, as long as message m 1,..., m n Encryption: k 1 m 1,..., k n m n Decryption of ciphertext c 1,..., c n : k 1 c 1,..., k n c n

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 21 Precise formulation of cipher algorithm Definition Let K, M and C be three sets, called keys, messages and ciphertexts. A cipher over (K, M, C) is a pair of efficient algorithms (E : K M C, D : K C M) such that for all m M and k K D(k, E(k, m)) = m

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 22 Security of one-time pad One-time pad satisfies very strong notion of security: Attacker cannot learn any information by looking only at ciphertexts Formalised by: Definition A cipher (E, D) over (K, M, C) satisfies perfect security if for any length n all messages m 1 and m 2 of length n and all ciphertext c P[E(k, m 1 ) = c] = P[E(k, m 2 ) = c] where P is the uniform distribution over keys of length n.

Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 23 Theorem The one-time pad satisfies perfect security. Proof. For randomly-chosen m, c and n, P[E(k, m) = c] = 1 2 n