Block Ciphers & the Data Encryption Standard 4/10/20
Total Page:16
File Type:pdf, Size:1020Kb
Block Ciphers & The Data Encryption Standard 4/10/20 CS 330 Block Ciphers 1 Administrivia • “Live” lecture on Monday (4/13) instead of recording • Expect new HW assignment soon • Talk by Lauren Harris (‘14) on Tuesday CS 330 Block Ciphers Guest Speaker! • Secure File Transfer Protcol by Trang Tran CS 330 Block Ciphers There are two kinds of cryptography in this world: cryptography that will stop your kid sister from reading your files, and cryptography that will stop major governments from reading your files. -- Preface to Applied Cryptography by Bruce Schneier CS 330 Block Ciphers 4 Modern computer-based ciphers • modern cipher systems take the idea of using multiple, changing substitution alphabets from the mechanical systems developed during WW2 and extend them to the binary representation of data in modern computers. • still two basic types of systems – substitution, which comes in two flavors • symmetric, and • asymmetric – and transposition CS 330 Block Ciphers 5 Symmetric cipher systems • Issues – key management – speed – key-length – ease of programming (and embedding in hardware) – ease of use • the ideal is to make the system invisible to the user. CS 330 Block Ciphers 6 Block vs. Stream Ciphers • block ciphers process messages in blocks, each of which is then en/decrypted – like a substitution on very big characters – or like the polygraphic systems we looked at (Playfair) – 64-bits or more – most current symmetric cipher algorithms are block ciphers (e.g., DES, AES, Blowfish, Twofish, IDEA, TEA) CS 330 Block Ciphers 7 Block vs. Stream Ciphers • stream ciphers process messages a bit or byte at a time when en/decrypting – these systems also may change the key as they encipher, attempting to emulate a one-time pad. – works like a Vigenère autokey cipher (see RC4) CS 330 Block Ciphers 8 Block Ciphers • block ciphers typically have substitution elements to add non-linearity (confusion) • and permutations to increase diffusion (and contribute to confusion) • they are by definition product ciphers CS 330 Block Ciphers 9 Symmetric Block Ciphers • Data Encryption Standard (DES) by IBM with a little help from our friends at the NSA. • International Data Encryption Algorithm (IDEA) by Xuejia Lai and James Massey, Swiss Federal Institute of Technology • RC5 by Ron Rivest, MIT • Blowfish & Twofish (by Bruce Schneier) • AES (Rijndael by a group of Belgian guys) • and others ... CS 330 Block Ciphers 10 Attacking Symmetric Encryption • cryptanalysis – rely on nature of the algorithm – plus some knowledge of plaintext characteristics – even some sample plaintext-ciphertext pairs – exploits characteristics of algorithm to deduce specific plaintext or key • brute-force attack – try all possiBle keys on some ciphertext until get an intelligible translation into plaintext CS 330 Block Ciphers 11 Exhaustive Key Search (aka brute-force) DES AES CS 330 Block Ciphers 12 Computationally Secure Algs • encryption is computationally secure if: – cost of breaking cipher exceeds info value – time required to break cipher exceeds the useful lifetime of the info – See Shannon (1949) • usually very difficult to estimate the amount of effort required to break CS 330 Block Ciphers 13 Block Cipher Principles • would need a table of 2n entries for an n-bit block • and all need to be reversible so you can decrypt • so you must produce 2n unique ciphertext messages (else it’s not reversible) • so each key defines a set of reversible mappings from plaintext to ciphertext CS 330 Block Ciphers 14 Sample Encryption & Decryption Tables for a 4-bit block CS 330 Block Ciphers 16 Size will Matter • but you can’t use a small n – because it’s then just a simple substitution cipher • So you need n >= 64 or so – but then the table’s too big (264) – and so is the key • really, the mapping IS the key CS 330 Block Ciphers 17 Size will Matter • So you need a product cipher – mix substitutions and permutations(transpositions) so you can use a smaller key – and approximate the generality of the substitution cipher with a large key CS 330 Block Ciphers 18.