Cryptography and Network Security: Sixth Edition by William Stallings
Cryptography and Network Security: Sixth Edition by William Stallings
Cryptography and Network Security: Sixth Edition by William Stallings
and Network
Security
Sixth Edition
by William Stallings
Chapter 2
Classical Encryption
Techniques
"I am fairly familiar with all the forms of secret
writings, and am myself the author of a trifling
monograph upon the subject, in which I analyze
one hundred and sixty separate ciphers," said
Holmes.
• Computationally secure
• The cost of breaking the cipher exceeds the value
of the encrypted information
• The time required to break the cipher exceeds
the useful lifetime of the information
Brute-Force Attack
Substitution Technique
• Is one in which the letters of plaintext are
replaced by other letters or by numbers or
symbols
• If the plaintext is viewed as a sequence of bits,
then substitution involves replacing plaintext
bit patterns with ciphertext bit patterns
Caesar Cipher
• Simplest and earliest known use of a substitution cipher
• A shift may be of any amount, so that the general Caesar algorithm is:
C = E(k , p ) = (p + k ) mod 26
• Where k takes on a value in the range 1 to 25; the decryption algorithm
is simply:
p = D(k , C ) = (C - k ) mod 26
Brute-Force
Cryptanalysis of
Caesar Cipher
• Trigram
• Three-letter combination
• Most frequent is the
Playfair Cipher
• Best-known multiple-letter encryption cipher
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
Vigenère Autokey System
• A keyword is concatenated with the plaintext itself
to provide a running key
• Example:
key: deceptivewearediscoveredsav
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGKZEIIGASXSTSLVVWLA
• Even this scheme is vulnerable to cryptanalysis
• Because the key and the plaintext share the same
frequency distribution of letters, a statistical
technique can be applied
Vernam Cipher
One-Time Pad
• Improvement to Vernam cipher proposed by an Army Signal Corp
officer, Joseph Mauborgne
• Use a random key that is as long as the message so that the key need
not be repeated
• Key is used to encrypt and decrypt a single message and then is
discarded
• Each new message requires a new key of the same length as the new
message
• Scheme is unbreakable
• Produces random output that bears no statistical relationship to the
plaintext
• Because the ciphertext contains no information whatsoever about the
plaintext, there is simply no way to break the code
Difficulties
• The one-time pad offers complete security but, in practice, has
two fundamental difficulties:
• There is the practical problem of making large quantities of random
keys
• Any heavily used system might require millions of random characters on
a regular basis
• Mammoth key distribution problem
• For every message to be sent, a key of equal length is needed by both
sender and receiver
• Steganography