0% found this document useful (0 votes)
24 views

2 Chapter

Symmetric ciphers use the same key to encrypt and decrypt messages. The document discusses several symmetric cipher techniques including: 1. Caesar cipher which shifts letters by a set number. 2. Monoalphabetic ciphers which substitute each letter for another but can be cracked through frequency analysis. 3. Playfair cipher which encrypts digrams to provide multiple substitutes and avoid frequency analysis. 4. Polyalphabetic ciphers like the Vigenere cipher which use multiple substitution alphabets from a keyword to further strengthen security. 5. The one-time pad cipher which is theoretically unbreakable if the key is truly random and never reused.

Uploaded by

Pratibha Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

2 Chapter

Symmetric ciphers use the same key to encrypt and decrypt messages. The document discusses several symmetric cipher techniques including: 1. Caesar cipher which shifts letters by a set number. 2. Monoalphabetic ciphers which substitute each letter for another but can be cracked through frequency analysis. 3. Playfair cipher which encrypts digrams to provide multiple substitutes and avoid frequency analysis. 4. Polyalphabetic ciphers like the Vigenere cipher which use multiple substitution alphabets from a keyword to further strengthen security. 5. The one-time pad cipher which is theoretically unbreakable if the key is truly random and never reused.

Uploaded by

Pratibha Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

Symmetric Ciphers

Key points
• An original message is known as the plaintext. The coded
message is called the ciphertext.
• The process of converting from plaintext to ciphertext is known as
enciphering or encryption;
• Restoring the plaintext from the ciphertext is deciphering or
decryption.
• The many schemes used for encryption constitute the area of
study known as cryptography.
• Techniques used for deciphering a message without any knowledge
of the enciphering details fall into the area of cryptanalysis.
• The areas of cryptography and cryptanalysis together are called
cryptology.
Symmetric Cipher Model
A symmetric encryption scheme has five ingredients :
Plaintext: This is the original intelligible message or data that is fed
into the algorithm as input.
• Encryption algorithm: The encryption algorithm performs various
substitutions and transformations on the plaintext.
• Secret key: The secret key is also input to the encryption
algorithm. The key is a value independent of the plaintext and of the
algorithm. The algorithm will produce a different output depending
on the specific key being used at the time. The exact substitutions
and transformations performed by the algorithm depend on the key.
• Ciphertext: This is the scrambled message
produced as output. It depends on the
plaintext and the secret key. For a given
message, two different keys will produce two
different ciphertexts. The ciphertext is an
apparently random stream of data and, as it
stands, is unintelligible.
• Decryption algorithm: This is essentially the
encryption algorithm run in reverse. It takes the
ciphertext and the secret key and produces the
original plaintext.
Simplified model of symmetric encryption
Two Requirement of secure use of Symmetric Encryption:-
1. A secret key known by only sender and receiver
2. Strong Encryption Algorithm
• Mathematically:
• Y = E(K, X) and X = D(K, Y)
• X = plaintext
• Y = ciphertext
• K = secret key
• E = encryption algorithm
• D = decryption algorithm
Cryptanalysis and Brute-Force Attack
Typically, the objective of attacking an encryption system is to
recover the key in use rather than simply to recover the plaintext of a
single ciphertext. There are two general approaches to attacking a
conventional encryption scheme:
• Cryptanalysis: Cryptanalytic attacks rely on the nature of the
algorithm plus perhaps some knowledge of the general characteristics
of the plaintext or even some sample plaintext–ciphertext pairs. This
type of attack exploits the characteristics of the algorithm to attempt
to deduce a specific plaintext or to deduce the key being used.
• Brute-force attack: The attacker tries every possible key on a piece
of ciphertext until an intelligible translation into plaintext is obtained.
On average, half of all possible keys must be tried to achieve success.
SUBSTITUTION TECHNIQUES
• The two basic building blocks of all encryption
techniques are:
1. Substitution and
2. Transposition
A 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
• The earliest known, and the simplest, use of a
substitution cipher was by Julius Caesar.
• The Caesar cipher involves replacing each
letter of the alphabet with the letter standing
three places further down the alphabet.
• It’s simply a type of substitution cipher
• The encryption can be represented
using modular arithmetic by first transforming
the letters into numbers, according to the
scheme, A = 0, B = 1,…, Z = 25. Encryption of a
letter by a shift n can be described
mathematically as.
• c=E(p, k) =( p+k )mod 26
(Encryption Phase with shift n)
• p=D(c, k) =(c-k) mod 26
(Decryption Phase with shift n)
• For example
a b c d e f g h i j k l m
d e f g h i j k l m n o p
n o p q r s t u v w x y z
q r s t u v w x y z a b c

• Plain Text He l l o
• Cipher Text= k ho or
• Welcome
• zh0frph
Encryption
Plain text = “Hello”
C(P)=(P+3) mod 26
C(H)=(7+3) mod 26
C(H) =10 mod 26
C(H)=10
C(H)= K
Decryption
cipher text = “khoor”
P(C)=(C-3) mod 26
P(C)=(10-3) mod 26
P(C) =7 mod 26
P(C)=7
P(C)= h
• Hacking of Caesar Cipher Algorithm
• The cipher text can be hacked with various
possibilities. One of such possibility is Brute
Force Technique, which involves trying every
possible decryption key.
• Simply try all the 25 possible keys.
• This technique does not demand much effort
and is relatively simple for a hacker.
Monoalphabetic Cipher
• Better than Caeser Cipher
• For each character of alphabet, assign different-abrupt
concerned character
• Example:
a b c d e f g h i
Z Y X W V U T S R

j k l m n o p q r
Q P O N M L K J I

S t u v w x y z
H G F E D C B A
• Monoalphabetic ciphers are easy to break
because they reflect the frequency data of the
original alphabet.
• A counter measure is to provide multiple
substitutes, known as homophones, for a
single letter
Playfair Cipher
• The best-known multiple-letter encryption cipher is the
Playfair, which treats diagrams in the plaintext as single
units and translates these units into ciphertext
diagrams.
• The Playfair algorithm is based on the use of a 5 * 5
matrix of letters constructed using a keyword.
 For Example,
 Keyword: security
 Plaintext: pattern
• .
• In this case, the keyword is security. The
matrix is constructed by filling in the letters
of the keyword (minus duplicates) from left to
right and from top to bottom, and then filling
in the remainder of the matrix with the
remaining letters in alphabetic order.
 Note: The letters I and J count as one letter
S E C U R
I/J T Y A B
D F G H K Plaintext is encrypted two letters at a
L M N O P time, according to the following rules:
Q V W X Z

1) Repeating plaintext letters that are in the same pair are


separated with a filler letter, such as x, so that pattern
would be treated as pa tx te rn.

2) Two plaintext letters that fall in the same row of the matrix
are each replaced by the letter to the right, with the first
element of the row circularly following the last. For
example, op is encrypted as PL.
• Two plaintext letters that fall in the same
column are each replaced by the letter
beneath, with the top element of the column
circularly following the last. For example, mv is
encrypted as VE.
4) Otherwise, each plaintext letter in a pair is replaced by
the letter that lies in its own row and the column
occupied by the other plaintext letter. Thus, pa
becomes OB.

Plaintext: pa tx te rn
Ciphertext: OB AV FT CP

 The Playfair cipher is a great advance over simple


monoalphabetic ciphers.

 For one thing, whereas there are only 26 letters, there


are 26 * 26 = 676 diagrams, so that identification of
individual diagrams is more difficult.
Polyalphabetic Ciphers
• Another way to improve on the simple monoalphabetic
technique is to use different monoalphabetic substitutions as
one proceeds through the plaintext message.
• The general name for this approach is polyalphabetic
substitution cipher.
• All these techniques have the following features in
common:

1. A set of related monoalphabetic substitution rules is used.


2. A key determines which particular rule is chosen for a given
transformation.
• Vigenere Cipher is a method of encrypting alphabetic
text. It uses a simple form of polyalphabetic
substitution. A polyalphabetic cipher is any cipher
based on substitution, using multiple substitution
alphabets
• The table consists of the alphabets written out 26
times in different rows, each alphabet shifted cyclically
to the left compared to the previous alphabet,
corresponding to the 26 possible Caesar Ciphers.
• At different points in the encryption process, the
cipher uses a different alphabet from one of the rows.
• The alphabet used at each point depends on a
repeating keyword.
For Example

Plain Text N E E L I M A

Key A U T H O R A
Cipher N Y X S W A A
Text
Key A U T H O R A
Plain Text N E E L I M A
Cipher Text N Y X S W A A
Advantages of Vigenere Cipher
• It is difficult to retrieve the plain text from the
cipher text obtained using Vigenere cipher just
by analyzing the frequency of letters in the
cipher text because Vigenere cipher
encryption method successfully avoids the
frequent appearances of the English alphabets
One-Time Pad (Vernam cipher)
• Most popular substitution cipher is the Vernam
Cipher, also called as one-time pad.
• The cipher text is unbreakable since it has no
statistical relationship to the plain text
• The key is exactly same as the length of message
which is encrypted.
• The key is made up of random symbols.
• As the name suggests, key is used one time only
and never used again for any other message to be
encrypted.
• Due to this, encrypted message will be vulnerable
to attack for a cryptanalyst. The key used for a one-
time pad cipher is called pad, as it is printed on
pads of paper.
Encryption Algorithm:

• Assign a number to each character of the plain-


text and the key according to alphabetical order.
• Add both the number (Corresponding plain-text
character number and Key character number).
• Subtract the number from 26 if the added number
is greater than 26, if it isn’t then leave it.
Plain Text C O L L E G E
2 14 11 11 4 6 4
One –Time 18 7 17 0 3 3 7
Pad s h r a d d h
Sum (P+K) 20 21 28 11 7 9 11
Subtract 20 21 2 11 7 9 11
26, if >25
Cipher U V C L H J L
Text
In theory, we need look no further for a cipher. The one-time pad
offers complete security but, in practice, has two fundamental
difficulties:

1. 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. Supplying truly random
characters in this volume is a significant task.
2. Even more distinguish problem of key distribution and
protection. For every message to be sent, a key of equal length is
needed by both sender and receiver. Thus, a key distribution
problem exists.
3. Because of these difficulties, the one-time pad is of limited
utility and is useful primarily for low-and width channels requiring
very high security.
Transposition Cipher
All the techniques examined so far involve the
substitution of a cipher text symbol for a plaintext
symbol. A very different kind of mapping is achieved by
performing some sort of permutation on the plaintext
letters. This technique is referred to as a transposition
cipher.
The simplest such cipher is the rail fence technique, in
which the plaintext is written down as a sequence of
diagonals and then read off as a sequence of rows.
For example, to encipher the message “meet me after
the toga party” with a rail fence of depth 2,
wem write
e the following:
m a t r h t g p r y
e t e f e t e o a a t
• Cipher text= mematrhtgpryetefeteoaat
• Meet me after toga party PT SK-2

• Welcome sk 3
• Wc e
• E o come together sk 3
• L m
• Ct===wceeolm
Simple Columnar Transposition
• This sort of thing would be trivial to
cryptanalyze.
• A more complex scheme is to write the
message in a rectangle, row by row, and read
the message off, column by column,
• but permute the order of the columns. The
order of the columns then becomes the key to
the algorithm.
Key= 4 3 1 2 5 6 7
PT= attack postponed until two am
• Key: 4 3 1 2 5 6 7
• Plaintext: a t t a c k p
o s t p o n e
d u n t i l t
w o a m
Ciphertext=ttnaaptmtsuoaodwcoixknlypetz

tsuottnaaodw petaptmcoiknl
• Today heavy rain is there=PT
• 3 1 2 4 ==SK

• 3 1 2 4
• T 0 d a
• Y - h e
• A V y -
• r a i n
• - i s -
• T h e r
• e
• CT=ohynhderietyviteaaasr
• o vaihdhyiseTyar teae n r
The transposition cipher can be made significantly more
secure by performing more than one stage of transposition.
The result is a more complex permutation that is not easily
reconstructed. Thus, if the foregoing message is re-encrypted
using the same algorithm,
Key: 4 3 1 2 5 6 7
Input: t t n a a p t
mt suoao
d w coixk
n l ypetz
Ciphertext:-nscyauopttwltmdnaoiepaxttokz
STEGANOGRAPHY
• A plaintext message may be hidden in one of
two ways. The methods of steganography
conceal the existence of the message,
whereas the methods of cryptography render
the message unintelligible to outsiders by
various transformations of the text.
• Steganography is hiding of message in another
text or images
In past following techniques were used

• Character marking: Selected letters of printed


or typewritten text are overwritten in pencil.
The marks are ordinarily not visible unless the
paper is held at an angle to bright light.
• Invisible ink: A number of substances can be
used for writing but leave no visible trace until
heat or some chemical is applied to the paper.
In past following techniques were used

• Pin punctures: Small pin punctures on


selected letters are ordinarily not visible
unless the paper is held up in front of a light.
• Typewriter correction ribbon: Used between
lines typed with a black ribbon, the
results of typing with the correction tape are
visible only under a strong light.
• Steganography has a number of drawbacks
when compared to encryption. It requires a lot
of overhead to hide a relatively few bits of
information, although using a scheme like that
proposed in the preceding paragraph may
make it more effective

You might also like