You are on page 1of 8

Symmetric Encryption Basic Terminology

• or conventional / private-key / single-key • plaintext - the original message


• ciphertext - the coded message
• sender and recipient share a common key • cipher - algorithm for transforming plaintext to ciphertext
• all classical encryption algorithms are • key - info used in cipher known only to sender/receiver
• encipher (encrypt) - converting plaintext to ciphertext
private-key • decipher (decrypt) - recovering ciphertext from plaintext
• was only type prior to invention of public- • cryptography - study of encryption principles/methods
• cryptanalysis (codebreaking) - the study of principles/
key in 1970’s methods of deciphering ciphertext without knowing key
• cryptology - the field of both cryptography and
cryptanalysis

Symmetric Cipher Model Requirements


• two requirements for secure use of
symmetric encryption:
– a strong encryption algorithm
– a secret key known only to sender / receiver
Y = EK(X)
X = DK(Y)
• assume encryption algorithm is known
• implies a secure channel to distribute key

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

Brute Force Search More Definitions


• always possible to simply try every key • unconditional security
• most basic attack, proportional to key size – no matter how much computer power is
available, the cipher cannot be broken since
• assume either know / recognise plaintext the ciphertext provides insufficient information
to uniquely determine the corresponding
plaintext
• computational security
– given limited computing resources (eg time
needed for calculations is greater than age of
universe), the cipher cannot be broken

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

Caesar Cipher One-Time Pad


• can define transformation as: • if a truly random key as long as the
a b c d e f g h i j k l m n o p q r s t u v w x y z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
message is used, the cipher will be secure
• mathematically give each letter a number • called a One-Time pad
a b c d e f g h i j k l m • is unbreakable since ciphertext bears no
0 1 2 3 4 5 6 7 8 9 10 11 12
n o p q r s t u v w x y Z
statistical relationship to the plaintext
13 14 15 16 17 18 19 20 21 22 23 24 25 • since for any plaintext & any ciphertext
• then have Caesar cipher as: there exists a key mapping one to other
C = E(p) = (p + k) mod (26) • can only use the key once though
p = D(C) = (C – k) mod (26) • have problem of safe distribution of key

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

Row Transposition Ciphers Product Ciphers


• a more complex scheme • ciphers using substitutions or transpositions are
• write letters of message out in rows over a not secure because of language characteristics
specified number of columns • hence consider using several ciphers in
• then reorder the columns according to succession to make harder, but:
some key before reading off the rows – two substitutions make a more complex substitution
Key: 4 3 1 2 5 6 7
Plaintext: a t t a c k p – two transpositions make more complex transposition
o s t p o n e – but a substitution followed by a transposition makes a
d u n t i l t new much harder cipher
w o a m x y z
Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ • this is bridge from classical to modern ciphers

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

Block Cipher Principles Confusion and Diffusion


• most symmetric block ciphers are based on a • cipher needs to completely obscure
Feistel Cipher Structure statistical properties of original message
• needed since must be able to decrypt ciphertext • a one-time pad does this
to recover messages efficiently • more practically Shannon suggested
• block ciphers look like an extremely large combining elements to obtain:
substitution
• diffusion – dissipates statistical structure
• would need table of 264 entries for a 64-bit block of plaintext over bulk of ciphertext
• instead create from smaller building blocks • confusion – makes relationship between
• using idea of a product cipher ciphertext and key as complex as possible

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

Feistel Cipher Design Principles Feistel Cipher Decryption


• block size
– increasing size improves security, but slows cipher
• key size
– increasing size improves security, makes exhaustive key
searching harder, but may slow cipher
• number of rounds
– increasing number improves security, but slows cipher
• subkey generation
– greater complexity can make analysis harder, but slows cipher
• round function
– greater complexity can make analysis harder, but slows cipher
• fast software en/decryption & ease of analysis
– are more recent concerns for practical use and testing

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

DES Design Controversy DES Encryption


• although DES standard is public
• was considerable controversy over design
– in choice of 56-bit key (vs Lucifer 128-bit)
– and because design criteria were classified
• subsequent events and public analysis
show in fact design was appropriate
• DES has become widely used, especially
in financial applications

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

Strength of DES – Key Size


• 56-bit keys have 256 = 7.2 x 1016 values
• brute force search looks hard
• recent advances have shown is possible
– in 1997 on Internet in a few months
– in 1998 on dedicated h/w (EFF) in a few days
– in 1999 above combined in 22hrs!
• still must be able to recognize plaintext
• new alternatives to DES
– Triple DES
– AES

You might also like