arrangements cryptography
play

Arrangements Cryptography Lecture Course in Autumn Term 2013 Will - PowerPoint PPT Presentation

Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Arrangements Cryptography Lecture Course in Autumn Term 2013 Will have two lectures (Tue 2pm, Fri 11am and one exercise


  1. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Arrangements Cryptography Lecture Course in Autumn Term 2013 Will have two lectures (Tue 2pm, Fri 11am and one exercise class University of Birmingham (Fri 2pm) per week, all in UG07, Learning Centre There will be six assessed exercise sheets plus exam Exam counts 80%, all exercises 20% towards final mark Eike Ritter Eike Ritter Cryptography 2013/14 1 Eike Ritter Cryptography 2013/14 2

  2. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers What is Cryptography Encryption essential for security on the internet For syllabus, lecture notes etc see webpage ( http://www.cs. Confidentiality, integrity, privacy cannot be guaranteed otherwise bham.ac.uk/~exr/teaching/lectures/crypto/13_14 ) Works in principle as follows: Have also facebook group UoBCryptography • Alice and Bob share a secret key HOW?? I am happy to add anyone taking this module • Alice uses secret key to scramble data encryption • Alice sends scrambled data to Bob • Bob decrypts data with secret key, gets message back Eike Ritter Cryptography 2013/14 3 Eike Ritter Cryptography 2013/14 4

  3. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Course content Kinds of cryptography • Transposition: permutes components of a message • Substitution: replacing components. Two main ways: Lecture course will explain basic cryptographic algorithms • Codes: algorithms for substitution of entire words Will also reason about their security (working on meaning) Will explain how to use the algorithms properly • Ciphers: algorithms substituting single letters or blocks Ciphers are easiest to use and mathematically well understood ⇒ will concentrate on those Eike Ritter Cryptography 2013/14 5 Eike Ritter Cryptography 2013/14 6

  4. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Terminology Transposition Cipher Used already since antiquity Plaintext Message before encryption Example: Rail Fence Cipher Plaintext Message before encryption • Key: Column size Encryption Process of scrambling a message • Encryption: Arrange message in columns of fixed size (the Ciphertext An enciphered message key). Add dummy text to fill the last column. Ciphertext Decryption Process of unscrambling a message consists of rows. • Decryption: Calculate row size by dividing message length by Plaintext Ciperhtext Decryption Original plaintext Encryption the key. Arrange message in rows of this size. Plaintext consists of columns. Eike Ritter Cryptography 2013/14 7 Eike Ritter Cryptography 2013/14 8

  5. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Security of Transposition Cipher 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: Is this cipher secure? • C selects message length n and chooses a key k < n . Informal answer: : No. • C chooses message m and sends encrypted message to A Given any ciphertext, attacker tries all possible values for the key. • A does some computations and eventually outputs a message For a message of size n there are at most n possibilities for the key, A wins the game if m is initial substring of A’s output. hence attacker will obtain plaintext. (Note: A doesn’t have key!) A has probability of at least 1 n of winning this game for any message. ⇒ Protocol insecure. Eike Ritter Cryptography 2013/14 9 Eike Ritter Cryptography 2013/14 10

  6. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Precise formulation of security Permutations A permutation describes the re-arrangement of the elements of an Use game between two parties: ordered list into a one-to-one correspondence of itself • Attacker(A): Aim is to obtain plaintext for given ciphertext Permutation is therefore a function from { 1 , . . . , n } to itself which • Challenger(C): provides the challenge for the attacker is one-to-one. Moves of the game: Example: reordering of (1 , 2 , 3) to (3 , 1 , 2). • C selects message length n and chooses a key k < n . Two notations used • C chooses message m and sends encrypted message to A • Array notation: Write the re-ordered list below the original � 1 • A does some computations and eventually outputs a message � 2 3 one, here A wins the game if m is initial substring of A’s output. 2 3 1 (Note: A doesn’t have key!) • Write down the cycles. The first cycle is the list of numbers obtained by applying the permutation first to 1, then to the A has probability of at least 1 n of winning this game for any result and so on. Stop when 1 appears again. The other message. cycles are obtained by starting with the lowest number not ⇒ Protocol insecure. appearing in the previous cycle and applying the same recipe. Cycles of length 1 are omitted. Example would be (123). Eike Ritter Cryptography 2013/14 11 Eike Ritter Cryptography 2013/14 12

  7. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Operations on permutations Permutation cipher • Key: permutation of length n of the alphabet • Encryption: Split plaintext into blocks of length n and apply permutation • Decryption: Split ciphertext into blocks of length n and apply Have identity which maps any number to itself inverse permutation Multiplying permutations is composition of functions Have also variant for deriving key: Inverse of a permutation s is the permutation t such that s • Choose keyword multiplied with t is the identity • 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 Eike Ritter Cryptography 2013/14 13 Eike Ritter Cryptography 2013/14 14

  8. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Security Enigma 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 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”. Eike Ritter Cryptography 2013/14 15 Eike Ritter Cryptography 2013/14 16

  9. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Modular arithmetic Probability Will use discrete probabilities Definition Definition • We say two numbers a , b ∈ Z are congruent modulo n ∈ Z , Let U be a finite set. A probability distribution P is a function written a ≡ b (mod n ), if a − b is divisible by n P : U → [0 , 1] such that • 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 � P ( u ) = 1 a ≡ b (mod n ). u ∈ U • We define addition, subtraction and multiplication on residue We denote by | U | the size of U (the number of elements in U ) classes by Example [ a ] n + [ b ] n = [ c ] n if ( a + b ) ≡ c (mod n ) Let U be a finite set. The uniform distribution is the probability [ a ] n − [ b ] n = [ c ] n if ( a − b ) ≡ c (mod n ) distribution P defined by [ a ] n ∗ [ b ] n = [ c ] n if ( a ∗ b ) ≡ c (mod n ) P ( u ) = 1 | U | Eike Ritter Cryptography 2013/14 17 Eike Ritter Cryptography 2013/14 18

  10. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Probabilities, continued Precise formulation of cipher algorithm Definition Definition Let P : U → [0 , 1] be a probability distribution. Let K , M and C be three sets of keys, messages and ciphertext. A • An event A is a subset of U . cipher over ( K , M , C ) is a pair of efficient algorithms • The probability of an event A , written P [ A ], is defined as ( E : K × M → C , D : K × C → M ) such that for all m ∈ M and k ∈ K � P [ A ] = P ( u ) D ( k , E ( k , m )) = m u ∈ A Eike Ritter Cryptography 2013/14 19 Eike Ritter Cryptography 2013/14 20

  11. Organisation Organisation Overview Overview Historic Ciphers Historic Ciphers Symmetric Ciphers Symmetric Ciphers Bitstrings One-time pad First cipher which is secure We write { 0 , 1 } n for the set of all sequences of n bits. Message and keys are bitstrings • Key: Random bitstring k 1 , . . . , k n , as long as message Have important operation ⊕ on bitstrings: m 1 , . . . , m n ⊕ is addition modulo 2 on each bit • Encryption: k 1 ⊕ m 1 , . . . , k n ⊕ m n • Decryption of ciphertext c 1 , . . . , c n : k 1 ⊕ c 1 , . . . , k n ⊕ c n Eike Ritter Cryptography 2013/14 21 Eike Ritter Cryptography 2013/14 22

Recommend


More recommend