Professional Documents
Culture Documents
1
Cryptography Types of Cryptanalytic Attacks
• ciphertext only
• can characterize by: – only know algorithm / ciphertext, statistical, can
– type of encryption operations used identify plaintext
• substitution / transposition / product • known plaintext
– number of keys used – know/suspect plaintext & ciphertext to attack cipher
• single-key or private / two-key or public • chosen plaintext
– way in which plaintext is processed – select plaintext and obtain ciphertext to attack cipher
• block / stream • chosen ciphertext
– select ciphertext and obtain plaintext to attack cipher
• chosen text
– select either plaintext or ciphertext to en/decrypt to
attack cipher
2
Classical Substitution Ciphers Caesar Cipher
• where letters of plaintext are replaced by • earliest known substitution cipher
other letters or by numbers or symbols • by Julius Caesar
• or if plaintext is viewed as a sequence of • first attested use in military affairs
bits, then substitution involves replacing • replaces each letter by 3rd letter on
plaintext bit patterns with ciphertext bit
patterns • example:
meet me after the toga party
PHHW PH DIWHU WKH WRJD SDUWB
3
Transposition Ciphers Rail Fence cipher
• now consider classical transposition or • write message letters out diagonally over a
permutation ciphers number of rows
• these hide the message by rearranging • then read off cipher row by row
the letter order • eg. write message out as:
• without altering the actual letters used m e m a t r h t g p r y
e t e f e t e o a a t
• can recognise these since have the same
frequency distribution as the original text • giving ciphertext
MEMATRHTGPRYETEFETEOAAT
4
Modern Block Ciphers Block vs Stream Ciphers
• will now look at modern block ciphers • block ciphers process messages in into
• one of the most widely used types of blocks, each of which is then en/decrypted
cryptographic algorithms • like a substitution on very big characters
• provide secrecy and/or authentication – 64-bits or more
services • stream ciphers process messages a bit or
• in particular will introduce DES (Data byte at a time when en/decrypting
Encryption Standard) • many current ciphers are block ciphers
• hence are focus of this section of course
5
Feistel Cipher Structure Feistel Cipher Structure
• Horst Feistel devised the feistel cipher
– based on concept of invertible product cipher
• partitions input block into two halves
– process through multiple rounds which
– perform a substitution on left data half
– based on round function of right half & subkey
– then have permutation swapping halves
• implements Shannon’s substitution-
permutation network concept
6
Data Encryption Standard (DES) DES History
• most widely used block cipher in world • IBM developed Lucifer cipher
• adopted in 1977 by NBS (now NIST) – by team led by Feistel
– used 64-bit data blocks with 128-bit key
– as FIPS PUB 46
• then redeveloped as a commercial cipher
• encrypts 64-bit data using 56-bit key with input from NSA and others
• has widespread use • in 1973 NBS issued request for proposals
• has been considerable controversy over for a national cipher standard
its security • IBM submitted their revised Lucifer which
was eventually accepted as the DES
7
Initial Permutation IP DES Decryption
• first step of the data computation • decrypt must unwind steps of data computation
• with Feistel design, do encryption steps again
• IP reorders the input data bits
• using subkeys in reverse order (SK16 … SK1)
• even bits to LH half, odd bits to RH half • note that IP undoes final FP step of encryption
• quite regular in structure (easy in h/w) • 1st round with SK16 undoes 16th encrypt round
• see text Table 3.2 • ….
• 16th round with SK1 undoes 1st encrypt round
• example:
• then final FP undoes initial encryption IP
IP(675a6967 5e5a6b5a) = (ffb2194d 004df6fb)
• thus recovering original data value