0% found this document useful (0 votes)
6 views32 pages

Encryption - Chapter 2

The document discusses classical encryption techniques, detailing the two main types: private-key (symmetric) and public-key (asymmetric) encryption. It outlines the elements of an encryption system, including plaintext, encryption algorithms, keys, ciphertext, and decryption algorithms, as well as various cryptanalysis methods. Additionally, it covers specific classical ciphers such as the Caesar cipher, Playfair cipher, and Vigenere cipher, along with their encryption and decryption processes.

Uploaded by

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

Encryption - Chapter 2

The document discusses classical encryption techniques, detailing the two main types: private-key (symmetric) and public-key (asymmetric) encryption. It outlines the elements of an encryption system, including plaintext, encryption algorithms, keys, ciphertext, and decryption algorithms, as well as various cryptanalysis methods. Additionally, it covers specific classical ciphers such as the Caesar cipher, Playfair cipher, and Vigenere cipher, along with their encryption and decryption processes.

Uploaded by

ap2976415
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter - 2

Classical Encryption
Techniques
INTRODUCTION
• Cryptography – process/technique(s) of converting data
into unintelligible form in order to ensure:
confidentiality, data integrity, and authentication
✔ requirement 1: no data should be lost
✔ requirement 2: it should be possible to recover data fully

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 2


Two forms of encryption are in common use:
– Private-key (or Symmetric)
• Single key shared by sender and receiver.
• Examples: DES, AES, IDEA
– Public-key (or Asymmetric)
• Separate keys for sender and receiver.
• Examples: RSA, Diffie-Hellman

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 3


ELEMENTS OF ENCRYPTION SYSTEM
• Plaintext – original message that should be ‘protected’
• Encryption algorithm – performs various substitutions
and transformations on plaintext
• Key – variable data that is input into encryption
algorithm together with plaintext
✔ determines exact substitutions and transformations
performed on plaintext
• Ciphertext – scrambled message produced as output
• Decryption algorithm – encryption algorithm run in
reverse
• Cryptanalysis – methods of deciphering ciphertext
without knowing the key.

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 4


SIMPLIFIED MODEL OF CONVENTIONAL
ENCRYPTION
010111010101000 010111010101000

Unsafe
environment
CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 5
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)
• Implies a secure channel to distribute key

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 6


CRYPTOGRAPHY CLASSIFICATION
• By type of encryption operations used
✔ Substitution
✔ Transposition
• By number of keys used
✔ Single-key or private
✔ Two-key or public
• By the way in which plaintext is processed
✔ Block
✔ Stream

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 7


CRYPTANALYSIS
• Objective : To recover key, not just message
• Approaches:
✔ Cryptanalytic attack
✔ Brute-force attack
• If either succeed all key use is compromised
• With current processing capabilities, 56 bit keys are
not considered safe.

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 8


TYPES OF CRYPTANALYTIC ATTACKS
• ciphertext only
- only know algorithm / ciphertext, statistical, can identify
plaintext
• known plaintext
- know/suspect plaintext & ciphertext to attack cipher
• chosen plaintext
- select plaintext and obtain ciphertext to attack cipher
• chosen ciphertext
- select ciphertext and obtain plaintext to attack cipher
• chosen text
- select either plaintext or ciphertext to en/decrypt to
attack cipher

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 9


ELEMENTS OF ENCRYPTION SYSTEM

Broadly falls under two categories:


1. Substitution ciphers
Each letter of group of letters of the plaintext are
replaced by some other letter or group of letters, to
obtain the ciphertext.

2. Transposition ciphers
Letters of the plaintext are permuted in some form.

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 10


CLASSICAL CIPHERS
Substitution Cipher – the units of plaintext (letters) are
kept in the same original sequence, but the units
themselves are altered
Caesar Cipher – substitution cipher in which each letter in
the plaintext is replaced by a letter some fixed number of
positions down the alphabet Example: Caesar Cipher
with k=3

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 11


CAESAR CIPHER
• can define transformation as:
abcdefghijklmnopqrstuvwxyz
DEFGHIJKLMNOPQRSTUVWXYZABC
• mathematically give each letter a number
abcdefghij k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
24 25
• then have Caesar cipher as:
c = E(p) = (p + k) mod (26)
p = D(c) = (c – k) mod (26)

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 12


ALGORITHM TO BREAK THE CAESAR CIPHER
1. Let k be a number equal to 1
2. Read the complete cipher text message.
3. Replace each alphabet in the cipher text message with an
alphabet that is k positions down the order
4. Increment k by 1
5. If k is less than 26, then go to step 2. otherwise, stop the
process.
6. The original text message corresponding to the cipher text
message is one of the 25 possibilities produced by the
above steps.

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 13


MONOALPHABETIC CIPHER
• Also known as a simple substitution cipher, relies on a
fixed replacement structure. That is, the substitution is
fixed for each letter of the alphabet. Thus, if "a" is
encrypted to "R", then every time we see the letter "a"
in the plaintext, we replace it with the letter "R" in the
ciphertext.

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 14


CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 15
PIGPEN CIPHER
• substitution cipher in which each letter is replaced with a
graphical symbol.
✔ alphabet is written in grids shown below.
✔ each letter is replaced with a symbol that corresponds to
the portion of the pigpen grid that contains the letter

Example:

SECRET CODE

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 16


PLAYFAIR CIPHER
• Use a 5 x 5 matrix.
• Fill in letters of the key (w/o duplicates).
• Fill the rest of matrix with other letters.
• E.g., key = MONARCHY.

M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 17


ENCRYPTING AND DECRYPTING
Plaintext is encrypted two letters at a time.
1. If a pair is a repeated letter, insert filler like 'X’.
2. If both letters fall in the same row, replace each
with the letter to its right (circularly).
3. If both letters fall in the same column, replace each
with the the letter below it (circularly).
4. Otherwise, each letter is replaced by the letter in the
same row but in the column of the other letter of
the pair

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 18


POLYALPHABETIC / VIGENERE CIPHER
• Instead of shifting each character by the same number,
characters located at different positions are shifted by
different numbers
✔ key (word) must be provided
✔ key is aligned with plaintext – key-letter determines the
value of cipher-letter

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 19


EXAMPLE : VIEGENERE CIPHER
• Plaintext: HOW ARE YOU
• Key: ABC ABC ABC
• Ciphertext: HPY ASG YPW

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 20


CLASSICAL CIPHERS
• Transposition Cipher – order of letters in the ciphertext
is rearranged according to some predetermined method
• Rail Fence Cipher – transposition cipher in which the
plaintext is written downwards and upwards on
successive ‘rails’ of an imaginary fence
the message is then read off in rows

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 21


EXAMPLE: HOW TO BREAK A 2-RAIL CIPHER?
HLOWRDEL OL
Decrypting algorithm:
1)Count the letters in the cipher.
2)Divide the letters in 2 equal parts.
3) Draw/write the letters in a 2-rail zigzag pattern with ½ of
the letters on the top and ½ of the bottom rail.
If number of letters is odd, add extra letter to the top rail.
H L O W R D
E L _ O L
HELLO WORLD

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 22


EXAMPLE: HOW TO BREAK A 3-RAIL CIPHER?
M _ AETM _ T6EE _
Decrypting algorithm:
1)Count the number of letters.
2)Make an outline of the zigzag pattern with the given
number of rails and given number of letters.
3) Arrange the letters at the allocated spaces …

M - A

E T M - T 6

E E -

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 23


CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 24
CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 25
CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 26
CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 27
CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 28
CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 29
CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 30
CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 31
WHAT IS THE MESSAGE EMBEDDED IN
THE FOLLOWING FIGURE?

CHAPTER-1:CLASSICAL ENCRYPTION TECHNIQUES 32

You might also like