Classical Cryptography
ALLPPT.com _ Free PowerPoint Templates, Diagrams and Charts
What Is Cryptography?
Cryptography is the practice and study of techniques for securing
communication and data in the presence of adversaries.
Introduction to Cryptography
• Cryptography is the study of
• secret (crypto-) writing (-graphy)
• concerned with developing algorithms which may be used to:
– conceal the context of some message from all except the sender and recipient
(privacy or secrecy), and/or
– verify the correctness of a message to the recipient (authentication)
• form the basis of many technological solutions to computer and
communications security problems
Basic Concepts
Cryptography: the art or science encompassing the principles and
methods of transforming an intelligible message into one that is
unintelligible, and then retransforming that message back to its original
form
Plaintext: the original intelligible message
Ciphertext: the transformed message
Cipher: an algorithm for transforming an intelligible message into one
that is unintelligible by transposition and/or substitution methods
Key: some critical information used by the cipher, known only to the
sender & receiver
Encipher (encode): the process of converting plaintext to ciphertext
using a cipher and a key
Basic Concepts
Decipher (decode): the process of converting cipher text back into
plaintext using a cipher and a key
Cryptanalysis: the study of principles and methods of transforming an
unintelligible message back into an intelligible message without knowledge of
the key. Also called codebreaking
Cryptology: both cryptography and cryptanalysis
Code: an algorithm for transforming an intelligible message into an
unintelligible one using a code-book
Concepts
Cryptanalytic Attacks
• have several different types of attacks
ciphertext only
• only have access to some enciphered messages
• use statistical attacks only
known plaintext
• know (or strongly suspect) some plaintext-ciphertext pairs
• use this knowledge in attacking cipher
chosen plaintext
• can select plaintext and obtain corresponding ciphertext
• use knowledge of algorithm structure in attack
chosen plaintext-ciphertext
• can select plaintext and obtain corresponding ciphertext, or select ciphertext and obtai
n plaintext
• allows further knowledge of algorithm structure to be used
Symmetric Cryptography
In the symmetric cryptography a single key is used for encrypting and decrypti
on the data. This encryption key is private key. This is the limitation of this encr
yption technique that this private key must be distributed only among the auth
orized sender and receiver.
Classical Cryptography
Transposition Ciphers
In Cryptography, a transposition cipher is a method of encryption by which the positio
ns held by units of plaintext (which are commonly characters or groups of characters) a
re shifted according to a regular system, so that the ciphertext constitutes a permutation
of the plaintext
That is, the order of the units is changed (the plaintext is reordered). Mathematically, a
bijective function is used on the characters’ positions to encrypt and an inverse functio
n to decrypt.
Classical Cryptography
Substitution Cipher
Method of encryption by which units of plaintext are replaced with ciphertext,
according to a fixed system; the “units” may be single letters (the most comm
on), pairs of letters, triplets of letters, mixtures of the above, and so forth.
Substitution Cipher
Caesar Cipher:
Caesar cipher algorithm is as follows:
• Read each alphabet of plain text
• Replace each alphabet by 3 places down.
• Repeat the process for all alphabet in the plain text.
Plain Text: meet me tomorrow
Cipher Text: phhw ph wrpruurz
Look at the example above, we have replaced, ‘m’ with ‘p’ which occur three places
after, ‘m’. Similarly, ‘e’ is replaced with ‘h’ which occurs in three places after ‘e’.
Substitution Cipher
Monoalphabetic Cipher:
Monoalphabetic cipher is a substitution cipher, where the cipher alphabet for
each plain text alphabet is fixed, for the entire encryption.
In simple words, if the alphabet ‘p’ in the plain text is replaced by the
cipher alphabet ‘d’. Then in the entire plain text wherever alphabet ‘p’ is
used, it will be replaced by the alphabet ‘d’ to form the ciphertext.
Substitution Cipher
Playfair Cipher:
Playfair cipher is a substitution cipher which involves a 5X5 matrix. Let us
discuss the technique of this Playfair cipher with the help of an example:
Plain Text: meet me tomorrow
Key: KEYWORD
Step 1: Create a 5X5 matrix and place the
key in that matrix row-wise from left to right.
Then put the remaining alphabets in the blank
space.
Substitution Cipher
Playfair Cipher:
Step 2: Now, you have to break the plain text into a pair of alphabets.
Plain Text: meet me tomorrow
Pair: me et me to mo rx ro wz
Step 3: In this step, we will convert plain text into ciphertext. For that, take the
first pair of plain text and check for cipher alphabets for the corresponding in the
matrix. To find cipher alphabets follow the rules below.
Pair: me et me to mo rx ro wz
Cipher Text: kn ku kn kz ks ta kc yo
This is how a plain text converts to ciphertext using Playfair cipher. When
compared with monoalphabetic cipher Playfair cipher is much more advanced.
But still, it is easy to break.
Substitution Cipher
Hill Cipher:
Hill cipher is a polyalphabetic cipher introduced by Lester Hill in 1929. Let us
discuss the technique of hill cipher.
Plain text: Binary
Key: HILL
Choose the key in such a way that it always forms a square matrix. With HILL
as the key, we can form a 2×2 matrix.
The general equation to find cipher text using hill cipher is as follow:
C = KP mod 26
Substitution Cipher
Polyalphabetic Cipher:
Polyalphabetic cipher is far more secure than a monoalphabetic
cipher. As monoalphabetic cipher maps a plain text symbol or
alphabet to a ciphertext symbol and uses the same ciphertext
symbol wherever that plain text occurs in the message.
But polyalphabetic cipher, each time replaces the plain text with
the different ciphertext.
Modern Cryptography
Stream Cipher
Symmetric or secret-key encryption algorithm that encrypts a single bit at a ti
me. With a Stream Cipher, the same plaintext bit or byte will encrypt to a differ
ent bit or byte every time it is encrypted.
Modern Cryptography
Block Cipher
An encryption method that applies a deterministic algorithm along with a sym
metric key to encrypt a block of text, rather than encrypting one bit at a time a
s in stream ciphers.
Advantages of Classical Cryptography:
While employing the one-time pad, it is unbreakable.
It is easy to do manually, no computer required.
It protects the plain text from casual snooping.
Disadvantages of Classical Cryptography:
While employing the one-time pad, it is cumbersome and requires a personal meetup to
exchange the pads.
If not employing the OTP, anyone who is even remotely interested in knowing what yo
u wrote and knows about cryptography will be able to break the encryption.
Thank You!