SlideShare a Scribd company logo
1 of 58
 Topics
Mathematics of Symmetric Key Cryptography
Introduction to Modern Symmetric Key Ciphers
Data Encryption Standard
Advanced Encryption Standard
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Prepared by
L BUJJIBABU
 Mathematics of Symmetric Key Cryptography
The two basic building blocks of all encryption
techniques are substitution and transposition.
 A substitution technique is one in which the letters
of plaintext are replaced by other letters or by
numbers or symbols.
 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.
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 The subsitution techniques have a four techniques
 caeser cipher
 Monoalphabetic cipher
 play fair cipher
 hill cipher
 polyalphabetic cipher
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 Caesar Cipher:
caeser cipher involves replacing each letter of the
alphabet with the letter standing three place further down
the alphabet
plain: meet me after the toga party
cipher: PHHW PH DIWHU WKH WRJD SDUWB
we can define transposition listing
plain: a b c d e f g h I j k l m
cipher: D E F G H I K L M N O P Q
The algorithm can be expressed:
plain text p, subsitution the cipher text c2
c=E(3,p)=(p+3)mod 26
general caeser algorithm:
c=E(k,p)=(p+k)mod 26
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 Three important characteristics of this problem
1.Encryption and Decryption algorithm
2.There are 25 key
3.The language are plaintext the text
file compressed using algorithm called ZIP
EX:BRUTE FORCE CRYPTANALYSIS OF CAESER
CIPHER
PHHW PH WKH
OGGU OG VJG
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Playfair Cipher
 one approach to improving security was to encrypt
multiple letters
 the Playfair Cipher is an example
 invented by Charles Wheatstone in 1854, but named after
his friend Baron Playfair
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Playfair Key Matrix
• a 5X5 matrix of letters based on a
keyword
(I and J aren’t distinguished)
•fill in letters of keyword (sans duplicates)
• fill rest of matrix with other letters
•eg. using the keyword MONARCHY
MONAR
CHYBD
EFGIK
LPQST
UVWXZ
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Encrypting and Decrypting
 plaintext encrypted two letters at a time:
1. each letter is replaced by the one in its row in the
column of the other letter of the pair, eg. “hs" encrypts
to "BP", and “ea" to "IM" or "JM" (as desired). Except
when that doesn’t work!
2. . if a pair is a repeated letter, insert a filler like 'X',
eg. "balloon" transformed to "ba lx lo on“
3. if both letters fall in the same row, replace each with
letter to right (wrapping back to start from end),
eg. “ar" encrypts as "RM"
4. if both letters fall in the same column, replace each with
the letter below it (again wrapping to top from bottom),
eg. “mu" encrypts to "CM
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Polyalphabetic Ciphers
 another approach to improving security is to use multiple
cipher alphabets
 called polyalphabetic substitution ciphers
 makes cryptanalysis harder with more alphabets to guess
and flatter frequency distribution
 use a key to select which alphabet is used for each letter
of the message
 use each alphabet in turn
 repeat from start after end of key is reached
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Vigenère Cipher
 simplest polyalphabetic substitution cipher is the
Vigenère Cipher
 effectively multiple caesar ciphers
 key is multiple letters long K = k1 k2 ... Kd
 i th letter specifies ith alphabet to use use each alphabet
in turn
 repeat from start after d letters in message
 decryption simply works in reverse
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Example
 write the plaintext out
 write the keyword repeated above it
 use each key letter as a caesar cipher key
 encrypt the corresponding plaintext letter
 eg: using keyword deceptive
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
cipher text: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Autokey Cipher
 ideally want a key as long as the message
 Vigenère proposed the autokey cipher
 with keyword is prefixed to message as key
 knowing keyword can recover the first few letters
 use these in turn on the rest of the message
 but still have frequency characteristics to attack eg. given
key deceptive
key: deceptivewearediscoveredsav
plaintext: wearediscoveredsaveyourself
cipher text: ZICVTWQNGKZEIIGASXSTSLVVWLA
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Transposition Ciphers
 Consider classical transposition or
permutation ciphers
 these hide the message by rearranging the
letter order
 without altering the actual letters used
 can recognize these since have the same
frequency distribution as the original text
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Rail Fence cipher
 write message letters out diagonally over a number of
rows
 then read off cipher row by row
 eg. write message out as:
m e m a t r h t g p r y
e t e f e t e o a a t
giving ciphertext
MEMATRHTGPRYETEFETEOAAT
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Row Transposition Ciphers
 a more complex scheme
 write letters of message out in rows over a specified
number of columns
 then reorder the columns according to some key before
reading off the rows
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 x y z
Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
The Feistel Cipher:
 Feistel proposed the use of a cipher that alternates
substitutions and permutations
 Substitution: Each plaintext element or group of
elements is uniquely replaced by a corresponding
cipher text element or group of elements.
 Permutation: A sequence of plaintext elements is
replaced by a permutation of that sequence
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
FEISTEL CIPHER STRUCTURE
 A substitution is performed on the left half of the
data
 This is done by applying a round function F
 Permutation is performed that consists of the
interchange of the two halves of the data
 a Feistel network depends on the choice of the
following parameters and design features:
Block Size
Key size
No. of Rounds
Sub key generation algorithm
Round function F
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Fig: Feistel Cipher structures
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 FEISTEL Encryption and Decryption
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Data Encryption Standard (DES):
 DES is a Symmetric-key algorithm for the
encryption of electronic data.
 DES originated at IBM in 1977 & was adopted by
the U.S Department of Defence. Now it is under
the NIST (National Institute of Standard &
Technology)
 Data Encryption Standard (DES) is a widely-used
method of data encryption using a private (secret)
key
 DES applies a 56-bit key to each 64-bit block of
data. The process can run in several modes and
involves 16 rounds or operations.
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Simple Structure of DES Algorithm
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Flow Diagram of DES Algorithm for encrypting Data
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Permutation Tables for DES
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 To see that these two permutation functions are indeed the
inverse of each other, consider the following 64-bit input M:
 Where Mi is a binary digit. Then the permutation X =
(IP(M)) is as follows:
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
DETAILS OF SINGLE ROUND
 Below figure shows the internal structure of a single
round. Again, begin by focusing on the left-hand side
of the diagram. The left and right halves of each 64-bit
intermediate value are treated as separate 32-bit
quantities, labeled L (left) and R (right). As in any
classic Feistel cipher, the overall processing at each
round can be summarized in the following formulas:
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Fig: Single Round Function of DES Algorithm
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Fig: Calculation of F(R,K)
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
KEY GENERATION:
Returning to above all figures, we see that a 64-bit
key is used as input to the algorithm. The bits of the
key are numbered from 1 through 64; every eighth bit
is ignored, as indicated by the lack of shading in the
above Table The key is first subjected to a permutation
governed by a table labeled Permuted Choice One
Table .
DES DECRYPTION:
 Whatever process we following in the encryption that
process is used for decryption also but the order of key
is changed on input message (cipher text).
 Reverse order of keys are K16, K15 ,……, K1.
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
THE STRENGTH OF DES:
The Use of 56-Bit Keys:
 With a key length of 56 bits, there are 256 possible
keys, which is approximately 7.2 x 1016.
 A brute-force attack appears impractical.
 a single machine performing one DES encryption per
microsecond would take more than a thousand years
to break the cipher
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Triple DES (3DES):
 Triple DES is simply another mode of DES operation.
It takes three 64-bit keys, for an overall key length of
192 bits.
 The Triple DES then breaks the user provided key into
three subkeys, padding the keys if necessary so they
are each 64 bits long.
 The procedure for encryption is exactly the same as
regular DES, but it is repeated three times. Hence the
name Triple DES. The data is encrypted with the first
key, decrypted with the second key, and finally
encrypted again with the third key.
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
ADVANCED ENCRYPTION STANDARD (AES):
 The Advanced Encryption Standard (AES) was
published by the National Institute of Standards and
Technology (NIST) in 2001.
 AES is a block cipher intended to replace DES for
commercial applications.
 It uses a 128-bit block size and a key size of 128, 192, or
256 bits.
 AES does not use a Feistel structure. Instead, each full
round consists of four separate functions: byte
substitution, permutation, arithmetic operations over
a finite field, and XOR with a key
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 AES parameters:
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Inner Workings of a Round
 The algorithm begins with an Add round key stage
followed by 9 rounds of four stages and a tenth round
of three stages. This applies for both encryption and
decryption with the exception that each stage of a
round the decryption algorithm is the inverse of its
counterpart in the encryption algorithm. The four
stages are as follows:
1. Substitute bytes
2. Shift rows
3. Mix Columns
4. Add Round Key
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 The tenth round simply leaves out the Mix Columns
stage. The first nine rounds of the decryption
algorithm consist of the following:
1. Inverse Shift rows
2. Inverse Substitute bytes
3. Inverse Add Round Key
4. Inverse Mix Columns
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Fig: Structure of the AES Algorithm
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Substitute Bytes:
 This stage (known as SubBytes) is simply a table
lookup using a 16×16 matrix of byte values called an s-
box.
Fig: Data structures in the AES algorithm.
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Fig: Substitute Bytes Stage of the AES Algorithm
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Shift Rows Transformation:
 Shift row transformation are two types.
Forward Shift row transformation which is used in encryption.
Inverse Shift row transformation which is used in decryption.
FORWARD SHIFT ROW TRANSFORMATION:
 The first row of State matrix is not altered.
 For the second row, a 1-byte circular left shift is
performed.
 For the third row, a 2-byte circular left shift is
performed.
 For the fourth row, a 3-byte circular left shift is
performed.
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 The following is an example of Shift Rows:
INVERSE SHIFT ROWS:
 Performs the circular shifts in the opposite direction
for each of the last three rows, with a one-byte circular
right shift for the second row and soon
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
MIX COLUMNS TRANSFORMATION:
 Mix columns transformation are two types.
1. Forward Mix columns transformation which is
used in encryption.
2. Inverse Mix columns transformation which is used
in decryption.
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Forward Mix columns transformation:
 Forward Mix columns transformation called mix
columns, operates on each column individually. Each
byte of a column is mapped into a new value that is a
function of all 4 bytes in that column. The
transformation can be defined by the following matrix
multiplication on state.
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Inverse Mix columns transformation:
 The inverse mix column transformation, called
InvMixColumns, is defined by the following matrix
multiplication:
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
AddRoundKey Transformation:
 In the forward add round key transformation, called
AddRoundKey, the 128 bits of State are bitwise XORed
with the 128 bits of the round key.
 The inverse add round key transformation is identical
to the forward add round key transformation, because
the XOR operation is its own inverse.
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
AES Key Expansion:
 The 128-bit key value can be expanded into 44 words
i.e. 44X32=1408bits
 In each round 4 words will be used i.e. 4x32=128 bits
 In Addroundkey first 4 words w0,w1,w2,w3 are used.
 In first round, w4, w5, w6, w7 are used and soon.
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 The 128 bit key is expanded as follows
 First 128 bit key is arranged as a 4x4 matrix each value size
is 8-bits
 The first 32 bits (k0,k1,k2,k3) is considered as w0.
 The first 32 bits (k4,k5,k6,k7) is considered as w1.
 The first 32 bits (k8,k9,k10,k11) is considered as w2.
 The first 32 bits (k12,k13,k14,k15) is considered as w4.
 Next 4 words w4,w5,w6,w7 are followed as
w4=w0 ⊕ w3
w5=w1 ⊕ w4
w6=w2 ⊕w5
w7=w3 ⊕w6
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Fig: Key Expansion
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Objective type Questions:
 Cryptographic algorithms are based on mathematical algorithms where
these algorithms use ___________ for a secure transformation of data.
a) secret key
b) external programs
c) add-ons
d) secondary key
Answer: a
 Cryptography can be divided into ______ types.
a) 5
b) 4
c) 3
d) 2
Answer: d (Classic & Modern)
 There are ________ types of cryptographic techniques used in general.
a) 2
b) 3
c) 4
d) 5
Answer: b
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 Conventional cryptography is also known as _____________ or
symmetric-key encryption.
a) secret-key
b) public key
c) protected key
d) primary key
Answer: a
 Data Encryption Standard is an example of a _____________
cryptosystem.
a) conventional
b) public key
c) hash key
d) asymmetric-key
Answer: a
 _______________ cryptography deals with traditional characters,
i.e., letters & digits directly.
a) Modern
b) Classic
c) Asymmetric
d) Latest
Answer: b
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 The method of reverting the encrypted text which is
known as cipher text to its original form i.e. plain text is
known as ________________
a) cryptanalysis
b) decryption
c) reverse engineering
d) encryption
Answer: b
 ______________ is the mathematical procedure or
algorithm which produces a cipher-text for any specified
plaintext.
a) Encryption Algorithm
b) Decryption Algorithm
c) Hashing Algorithm
d) Tuning Algorithm
Answer: a
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 _______________ takes the plain text and the key as input for creating
cipher-text.
a) Decryption Algorithm
b) Hashing Algorithm
c) Tuning Algorithm
d) Encryption Algorithm
Answer: a
 A set of all probable decryption keys are collectively termed as
____________
a) key-stack
b) key bunch
c) key space
d) key pack
Answer: c
 In _____________________ same keys are implemented for encrypting
as well as decrypting the information.
a) Symmetric Key Encryption
b) Asymmetric Key Encryption
c) Asymmetric Key Decryption
d) Hash-based Key Encryption
Answer: a
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 The DES Algorithm Cipher System consists of
____________rounds (iterations) each with a round key
a) 12
b) 18
c) 9
d) 16
Answer: d
 The DES algorithm has a key length of
a) 128 Bits
b) 32 Bits
c) 64 Bits
d) 16 Bits
Answer: c
 In the DES algorithm the round key is __________ bit and the
Round Input is ____________bits.
a) 48, 32
b) 64,32
c) 56, 24
d) 32, 32
Answer: a
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 ____________ cryptography operates on binary-bit series and
strings.
a) Modern
b) Classic
c) Traditional
d) Primitive
Answer: a
 __________ cryptography has always been focusing on the
concept of ‘security through obscurity’.
a) Modern
b) Asymmetric
c) Classic
d) Latest
Answer: c
 ________________ cryptography is based on publicly known
mathematically designed algorithms to encrypt the information.
a) Modern
b) Classic
c) Traditional
d) Primitive
Answer: a
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 In the DES algorithm the Round Input is 32 bits, which is
expanded to 48 bits via ____________
a) Scaling of the existing bits
b) Duplication of the existing bits
c) Addition of zeros
d) Addition of ones
Answer: a
 The Initial Permutation table/matrix is of size
a) 16×8
b) 12×8
c) 8×8
d) 4×8
Answer: c
 The number of unique substitution boxes in DES after the 48 bit
XOR operation are
a) 8
b) 4
c) 6
d) 12
Answer: a
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 The number of tests required to break the DES algorithm are
a) 2.8×1014
b) 4.2×109
c) 1.84×1019
d) 7.2×1016
Answer: d
 The number of tests required to break the Double DES algorithm are
a) 2112
b) 2111
c) 2128
d) 2119
Answer: b
 How many keys does the Triple DES algorithm use?
a) 2
b) 3
c) 2 or 3
d) 3 or 4
Answer: c
 AES uses a ____________ bit block size and a key size of __________ bits.
a) 128; 128 or 256
b) 64; 128 or 192
c) 256; 128, 192, or 256
d) 128; 128, 192, or 256
Answer: d
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 Like DES, AES also uses Feistel Structure.
a) True
b) False
Answer: b
 Which one of the following is not a cryptographic
algorithm - JUPITER, Blowfish, RC6, Rijndael and Serpent?
a) JUPITER
b) Blowfish
c) Serpent
d) Rijndael
Answer: a
 . In AES the 4×4 bytes matrix key is transformed into a keys
of size __________
a) 32 words
b) 64 words
c) 54 words
d) 44 words
Answer: d
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
 For the AES-128 algorithm there are __________ similar rounds
and _________ round is different.
a) 2 pair of 5 similar rounds ; every alternate
b) 9 ; the last
c) 8 ; the first and last
d) 10 ; no
Answer: b
 Which of the 4 operations are false for each round in the AES
algorithm
i) Substitute Bytes
ii) Shift Columns
iii) Mix Rows
iv) XOR Round Key
a) i) only
b) ii) iii) and iv)
c) ii) and iii)
d) only iv)
Answer: b
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Previous Questions:
1. Explain in detail Feistel Block Cipher structure with neat
sketch. Oct/Nov - 2018
2. Compare stream cipher with block cipher with an example .
Oct/Nov – 2018
3. Discuss any four Substitution Technique and list their merits
and demerits . Oct/Nov – 2018
4. Draw the general structure of DES. Explain the encryption and
decryption process. Oct/Nov – 2018
5. Compare Substitution and Transposition techniques. Oct/Nov –
2018
6. What is a block cipher? Oct/Nov - 2018
7. Explain the DES algorithm in detail. Oct/Nov - 2018
8. Discuss various transformation functions of AES Oct/Nov - 2019
9. List the parameters of three AES versions. Oct/Nov - 2019
10. Compare the substitution in DES and AES. Oct/Nov - 2019
11. Compare the round keys in DES and AES. In which cipher is
the size of the round keys the same as the size of the block.
Oct/Nov - 2019
D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

More Related Content

What's hot (20)

Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Cryptography and Network Security
Cryptography and Network SecurityCryptography and Network Security
Cryptography and Network Security
 
C++ programming
C++ programmingC++ programming
C++ programming
 
Cryptography
CryptographyCryptography
Cryptography
 
CRYPTOGRAPHY & NETWORK SECURITY
CRYPTOGRAPHY & NETWORK SECURITYCRYPTOGRAPHY & NETWORK SECURITY
CRYPTOGRAPHY & NETWORK SECURITY
 
Draw Star in Visual Studio
Draw Star in Visual StudioDraw Star in Visual Studio
Draw Star in Visual Studio
 
IT6712 lab manual
IT6712 lab manualIT6712 lab manual
IT6712 lab manual
 
Monoalphabetic Substitution Cipher
Monoalphabetic Substitution  CipherMonoalphabetic Substitution  Cipher
Monoalphabetic Substitution Cipher
 
PUBLIC KEY ENCRYPTION
PUBLIC KEY ENCRYPTIONPUBLIC KEY ENCRYPTION
PUBLIC KEY ENCRYPTION
 
Basic cryptography
Basic cryptographyBasic cryptography
Basic cryptography
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
Rc4
Rc4Rc4
Rc4
 
Block Ciphers Modes of Operation
Block Ciphers Modes of OperationBlock Ciphers Modes of Operation
Block Ciphers Modes of Operation
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation
 
Classical Encryption Techniques
Classical Encryption TechniquesClassical Encryption Techniques
Classical Encryption Techniques
 
Hardware security
Hardware securityHardware security
Hardware security
 
Symmetric encryption
Symmetric encryptionSymmetric encryption
Symmetric encryption
 
Cryptography
CryptographyCryptography
Cryptography
 
One time pad Encryption:
One time pad Encryption:One time pad Encryption:
One time pad Encryption:
 
Rsa algorithm key generation
Rsa algorithm key generation Rsa algorithm key generation
Rsa algorithm key generation
 

Similar to CNS UNIT-II.pptx

Data Protection Techniques and Cryptography
Data Protection Techniques and CryptographyData Protection Techniques and Cryptography
Data Protection Techniques and CryptographyTalha SAVAS
 
classicalencryptiontechniques.ppt
classicalencryptiontechniques.pptclassicalencryptiontechniques.ppt
classicalencryptiontechniques.pptutsavkakkad1
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesJanani S
 
02 Information System Security
02  Information System Security02  Information System Security
02 Information System SecurityShu Shin
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2AfiqEfendy Zaen
 
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...JAINAM KAPADIYA
 
Secret key cryptography
Secret key cryptographySecret key cryptography
Secret key cryptographyPrabhat Goel
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesDr.Florence Dayana
 
Cryptography (Revised Edition)
Cryptography (Revised Edition)Cryptography (Revised Edition)
Cryptography (Revised Edition)Somaditya Basak
 
Computer Security (Cryptography) Ch03
Computer Security (Cryptography) Ch03Computer Security (Cryptography) Ch03
Computer Security (Cryptography) Ch03Saif Kassim
 
M.Sridevi II-M.Sc (computer science)
M.Sridevi II-M.Sc (computer science)M.Sridevi II-M.Sc (computer science)
M.Sridevi II-M.Sc (computer science)SrideviM4
 
Cryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSACryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSAaritraranjan
 

Similar to CNS UNIT-II.pptx (20)

Data Protection Techniques and Cryptography
Data Protection Techniques and CryptographyData Protection Techniques and Cryptography
Data Protection Techniques and Cryptography
 
classicalencryptiontechniques.ppt
classicalencryptiontechniques.pptclassicalencryptiontechniques.ppt
classicalencryptiontechniques.ppt
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
02 Information System Security
02  Information System Security02  Information System Security
02 Information System Security
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2
 
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
 
Secret key cryptography
Secret key cryptographySecret key cryptography
Secret key cryptography
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Cryptography (Revised Edition)
Cryptography (Revised Edition)Cryptography (Revised Edition)
Cryptography (Revised Edition)
 
Computer Security (Cryptography) Ch03
Computer Security (Cryptography) Ch03Computer Security (Cryptography) Ch03
Computer Security (Cryptography) Ch03
 
Cryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie BrownCryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie Brown
 
DES.ppt
DES.pptDES.ppt
DES.ppt
 
Module 1.pptx
Module 1.pptxModule 1.pptx
Module 1.pptx
 
unit 2.ppt
unit 2.pptunit 2.ppt
unit 2.ppt
 
M.Sridevi II-M.Sc (computer science)
M.Sridevi II-M.Sc (computer science)M.Sridevi II-M.Sc (computer science)
M.Sridevi II-M.Sc (computer science)
 
Day5
Day5Day5
Day5
 
Ch06
Ch06Ch06
Ch06
 
Edward Schaefer
Edward SchaeferEdward Schaefer
Edward Schaefer
 
Cryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSACryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSA
 

Recently uploaded

BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 

Recently uploaded (20)

BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 

CNS UNIT-II.pptx

  • 1.  Topics Mathematics of Symmetric Key Cryptography Introduction to Modern Symmetric Key Ciphers Data Encryption Standard Advanced Encryption Standard D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Prepared by L BUJJIBABU
  • 2.  Mathematics of Symmetric Key Cryptography The two basic building blocks of all encryption techniques are substitution and transposition.  A substitution technique is one in which the letters of plaintext are replaced by other letters or by numbers or symbols.  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. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 3.  The subsitution techniques have a four techniques  caeser cipher  Monoalphabetic cipher  play fair cipher  hill cipher  polyalphabetic cipher D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 4.  Caesar Cipher: caeser cipher involves replacing each letter of the alphabet with the letter standing three place further down the alphabet plain: meet me after the toga party cipher: PHHW PH DIWHU WKH WRJD SDUWB we can define transposition listing plain: a b c d e f g h I j k l m cipher: D E F G H I K L M N O P Q The algorithm can be expressed: plain text p, subsitution the cipher text c2 c=E(3,p)=(p+3)mod 26 general caeser algorithm: c=E(k,p)=(p+k)mod 26 D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 5.  Three important characteristics of this problem 1.Encryption and Decryption algorithm 2.There are 25 key 3.The language are plaintext the text file compressed using algorithm called ZIP EX:BRUTE FORCE CRYPTANALYSIS OF CAESER CIPHER PHHW PH WKH OGGU OG VJG D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 6. Playfair Cipher  one approach to improving security was to encrypt multiple letters  the Playfair Cipher is an example  invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 7. Playfair Key Matrix • a 5X5 matrix of letters based on a keyword (I and J aren’t distinguished) •fill in letters of keyword (sans duplicates) • fill rest of matrix with other letters •eg. using the keyword MONARCHY MONAR CHYBD EFGIK LPQST UVWXZ D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 8. Encrypting and Decrypting  plaintext encrypted two letters at a time: 1. each letter is replaced by the one in its row in the column of the other letter of the pair, eg. “hs" encrypts to "BP", and “ea" to "IM" or "JM" (as desired). Except when that doesn’t work! 2. . if a pair is a repeated letter, insert a filler like 'X', eg. "balloon" transformed to "ba lx lo on“ 3. if both letters fall in the same row, replace each with letter to right (wrapping back to start from end), eg. “ar" encrypts as "RM" 4. if both letters fall in the same column, replace each with the letter below it (again wrapping to top from bottom), eg. “mu" encrypts to "CM D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 9. Polyalphabetic Ciphers  another approach to improving security is to use multiple cipher alphabets  called polyalphabetic substitution ciphers  makes cryptanalysis harder with more alphabets to guess and flatter frequency distribution  use a key to select which alphabet is used for each letter of the message  use each alphabet in turn  repeat from start after end of key is reached D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 10. Vigenère Cipher  simplest polyalphabetic substitution cipher is the Vigenère Cipher  effectively multiple caesar ciphers  key is multiple letters long K = k1 k2 ... Kd  i th letter specifies ith alphabet to use use each alphabet in turn  repeat from start after d letters in message  decryption simply works in reverse D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 11. Example  write the plaintext out  write the keyword repeated above it  use each key letter as a caesar cipher key  encrypt the corresponding plaintext letter  eg: using keyword deceptive key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself cipher text: ZICVTWQNGRZGVTWAVZHCQYGLMGJ D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 12. Autokey Cipher  ideally want a key as long as the message  Vigenère proposed the autokey cipher  with keyword is prefixed to message as key  knowing keyword can recover the first few letters  use these in turn on the rest of the message  but still have frequency characteristics to attack eg. given key deceptive key: deceptivewearediscoveredsav plaintext: wearediscoveredsaveyourself cipher text: ZICVTWQNGKZEIIGASXSTSLVVWLA D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 13. Transposition Ciphers  Consider classical transposition or permutation ciphers  these hide the message by rearranging the letter order  without altering the actual letters used  can recognize these since have the same frequency distribution as the original text D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 14. Rail Fence cipher  write message letters out diagonally over a number of rows  then read off cipher row by row  eg. write message out as: m e m a t r h t g p r y e t e f e t e o a a t giving ciphertext MEMATRHTGPRYETEFETEOAAT D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 15. Row Transposition Ciphers  a more complex scheme  write letters of message out in rows over a specified number of columns  then reorder the columns according to some key before reading off the rows 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 x y z Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 16. The Feistel Cipher:  Feistel proposed the use of a cipher that alternates substitutions and permutations  Substitution: Each plaintext element or group of elements is uniquely replaced by a corresponding cipher text element or group of elements.  Permutation: A sequence of plaintext elements is replaced by a permutation of that sequence D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 17. FEISTEL CIPHER STRUCTURE  A substitution is performed on the left half of the data  This is done by applying a round function F  Permutation is performed that consists of the interchange of the two halves of the data  a Feistel network depends on the choice of the following parameters and design features: Block Size Key size No. of Rounds Sub key generation algorithm Round function F D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 18. Fig: Feistel Cipher structures D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 19.  FEISTEL Encryption and Decryption D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 20. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 21. Data Encryption Standard (DES):  DES is a Symmetric-key algorithm for the encryption of electronic data.  DES originated at IBM in 1977 & was adopted by the U.S Department of Defence. Now it is under the NIST (National Institute of Standard & Technology)  Data Encryption Standard (DES) is a widely-used method of data encryption using a private (secret) key  DES applies a 56-bit key to each 64-bit block of data. The process can run in several modes and involves 16 rounds or operations. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 22. Simple Structure of DES Algorithm D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 23. Flow Diagram of DES Algorithm for encrypting Data D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 24. Permutation Tables for DES D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 25.  To see that these two permutation functions are indeed the inverse of each other, consider the following 64-bit input M:  Where Mi is a binary digit. Then the permutation X = (IP(M)) is as follows: D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 26. DETAILS OF SINGLE ROUND  Below figure shows the internal structure of a single round. Again, begin by focusing on the left-hand side of the diagram. The left and right halves of each 64-bit intermediate value are treated as separate 32-bit quantities, labeled L (left) and R (right). As in any classic Feistel cipher, the overall processing at each round can be summarized in the following formulas: D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 27. Fig: Single Round Function of DES Algorithm D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 28. Fig: Calculation of F(R,K) D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 29. KEY GENERATION: Returning to above all figures, we see that a 64-bit key is used as input to the algorithm. The bits of the key are numbered from 1 through 64; every eighth bit is ignored, as indicated by the lack of shading in the above Table The key is first subjected to a permutation governed by a table labeled Permuted Choice One Table . DES DECRYPTION:  Whatever process we following in the encryption that process is used for decryption also but the order of key is changed on input message (cipher text).  Reverse order of keys are K16, K15 ,……, K1. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 30. THE STRENGTH OF DES: The Use of 56-Bit Keys:  With a key length of 56 bits, there are 256 possible keys, which is approximately 7.2 x 1016.  A brute-force attack appears impractical.  a single machine performing one DES encryption per microsecond would take more than a thousand years to break the cipher D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 31. Triple DES (3DES):  Triple DES is simply another mode of DES operation. It takes three 64-bit keys, for an overall key length of 192 bits.  The Triple DES then breaks the user provided key into three subkeys, padding the keys if necessary so they are each 64 bits long.  The procedure for encryption is exactly the same as regular DES, but it is repeated three times. Hence the name Triple DES. The data is encrypted with the first key, decrypted with the second key, and finally encrypted again with the third key. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 32. ADVANCED ENCRYPTION STANDARD (AES):  The Advanced Encryption Standard (AES) was published by the National Institute of Standards and Technology (NIST) in 2001.  AES is a block cipher intended to replace DES for commercial applications.  It uses a 128-bit block size and a key size of 128, 192, or 256 bits.  AES does not use a Feistel structure. Instead, each full round consists of four separate functions: byte substitution, permutation, arithmetic operations over a finite field, and XOR with a key D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 33.  AES parameters: D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 34. Inner Workings of a Round  The algorithm begins with an Add round key stage followed by 9 rounds of four stages and a tenth round of three stages. This applies for both encryption and decryption with the exception that each stage of a round the decryption algorithm is the inverse of its counterpart in the encryption algorithm. The four stages are as follows: 1. Substitute bytes 2. Shift rows 3. Mix Columns 4. Add Round Key D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 35.  The tenth round simply leaves out the Mix Columns stage. The first nine rounds of the decryption algorithm consist of the following: 1. Inverse Shift rows 2. Inverse Substitute bytes 3. Inverse Add Round Key 4. Inverse Mix Columns D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 36. Fig: Structure of the AES Algorithm D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 37. Substitute Bytes:  This stage (known as SubBytes) is simply a table lookup using a 16×16 matrix of byte values called an s- box. Fig: Data structures in the AES algorithm. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 38. Fig: Substitute Bytes Stage of the AES Algorithm D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 39. Shift Rows Transformation:  Shift row transformation are two types. Forward Shift row transformation which is used in encryption. Inverse Shift row transformation which is used in decryption. FORWARD SHIFT ROW TRANSFORMATION:  The first row of State matrix is not altered.  For the second row, a 1-byte circular left shift is performed.  For the third row, a 2-byte circular left shift is performed.  For the fourth row, a 3-byte circular left shift is performed. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 40.  The following is an example of Shift Rows: INVERSE SHIFT ROWS:  Performs the circular shifts in the opposite direction for each of the last three rows, with a one-byte circular right shift for the second row and soon D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 41. MIX COLUMNS TRANSFORMATION:  Mix columns transformation are two types. 1. Forward Mix columns transformation which is used in encryption. 2. Inverse Mix columns transformation which is used in decryption. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 42. Forward Mix columns transformation:  Forward Mix columns transformation called mix columns, operates on each column individually. Each byte of a column is mapped into a new value that is a function of all 4 bytes in that column. The transformation can be defined by the following matrix multiplication on state. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 43. Inverse Mix columns transformation:  The inverse mix column transformation, called InvMixColumns, is defined by the following matrix multiplication: D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 44. AddRoundKey Transformation:  In the forward add round key transformation, called AddRoundKey, the 128 bits of State are bitwise XORed with the 128 bits of the round key.  The inverse add round key transformation is identical to the forward add round key transformation, because the XOR operation is its own inverse. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 45. AES Key Expansion:  The 128-bit key value can be expanded into 44 words i.e. 44X32=1408bits  In each round 4 words will be used i.e. 4x32=128 bits  In Addroundkey first 4 words w0,w1,w2,w3 are used.  In first round, w4, w5, w6, w7 are used and soon. D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 46.  The 128 bit key is expanded as follows  First 128 bit key is arranged as a 4x4 matrix each value size is 8-bits  The first 32 bits (k0,k1,k2,k3) is considered as w0.  The first 32 bits (k4,k5,k6,k7) is considered as w1.  The first 32 bits (k8,k9,k10,k11) is considered as w2.  The first 32 bits (k12,k13,k14,k15) is considered as w4.  Next 4 words w4,w5,w6,w7 are followed as w4=w0 ⊕ w3 w5=w1 ⊕ w4 w6=w2 ⊕w5 w7=w3 ⊕w6 D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 47. Fig: Key Expansion D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 48. Objective type Questions:  Cryptographic algorithms are based on mathematical algorithms where these algorithms use ___________ for a secure transformation of data. a) secret key b) external programs c) add-ons d) secondary key Answer: a  Cryptography can be divided into ______ types. a) 5 b) 4 c) 3 d) 2 Answer: d (Classic & Modern)  There are ________ types of cryptographic techniques used in general. a) 2 b) 3 c) 4 d) 5 Answer: b D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 49.  Conventional cryptography is also known as _____________ or symmetric-key encryption. a) secret-key b) public key c) protected key d) primary key Answer: a  Data Encryption Standard is an example of a _____________ cryptosystem. a) conventional b) public key c) hash key d) asymmetric-key Answer: a  _______________ cryptography deals with traditional characters, i.e., letters & digits directly. a) Modern b) Classic c) Asymmetric d) Latest Answer: b D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 50.  The method of reverting the encrypted text which is known as cipher text to its original form i.e. plain text is known as ________________ a) cryptanalysis b) decryption c) reverse engineering d) encryption Answer: b  ______________ is the mathematical procedure or algorithm which produces a cipher-text for any specified plaintext. a) Encryption Algorithm b) Decryption Algorithm c) Hashing Algorithm d) Tuning Algorithm Answer: a D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 51.  _______________ takes the plain text and the key as input for creating cipher-text. a) Decryption Algorithm b) Hashing Algorithm c) Tuning Algorithm d) Encryption Algorithm Answer: a  A set of all probable decryption keys are collectively termed as ____________ a) key-stack b) key bunch c) key space d) key pack Answer: c  In _____________________ same keys are implemented for encrypting as well as decrypting the information. a) Symmetric Key Encryption b) Asymmetric Key Encryption c) Asymmetric Key Decryption d) Hash-based Key Encryption Answer: a D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 52.  The DES Algorithm Cipher System consists of ____________rounds (iterations) each with a round key a) 12 b) 18 c) 9 d) 16 Answer: d  The DES algorithm has a key length of a) 128 Bits b) 32 Bits c) 64 Bits d) 16 Bits Answer: c  In the DES algorithm the round key is __________ bit and the Round Input is ____________bits. a) 48, 32 b) 64,32 c) 56, 24 d) 32, 32 Answer: a D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 53.  ____________ cryptography operates on binary-bit series and strings. a) Modern b) Classic c) Traditional d) Primitive Answer: a  __________ cryptography has always been focusing on the concept of ‘security through obscurity’. a) Modern b) Asymmetric c) Classic d) Latest Answer: c  ________________ cryptography is based on publicly known mathematically designed algorithms to encrypt the information. a) Modern b) Classic c) Traditional d) Primitive Answer: a D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 54.  In the DES algorithm the Round Input is 32 bits, which is expanded to 48 bits via ____________ a) Scaling of the existing bits b) Duplication of the existing bits c) Addition of zeros d) Addition of ones Answer: a  The Initial Permutation table/matrix is of size a) 16×8 b) 12×8 c) 8×8 d) 4×8 Answer: c  The number of unique substitution boxes in DES after the 48 bit XOR operation are a) 8 b) 4 c) 6 d) 12 Answer: a D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 55.  The number of tests required to break the DES algorithm are a) 2.8×1014 b) 4.2×109 c) 1.84×1019 d) 7.2×1016 Answer: d  The number of tests required to break the Double DES algorithm are a) 2112 b) 2111 c) 2128 d) 2119 Answer: b  How many keys does the Triple DES algorithm use? a) 2 b) 3 c) 2 or 3 d) 3 or 4 Answer: c  AES uses a ____________ bit block size and a key size of __________ bits. a) 128; 128 or 256 b) 64; 128 or 192 c) 256; 128, 192, or 256 d) 128; 128, 192, or 256 Answer: d D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 56.  Like DES, AES also uses Feistel Structure. a) True b) False Answer: b  Which one of the following is not a cryptographic algorithm - JUPITER, Blowfish, RC6, Rijndael and Serpent? a) JUPITER b) Blowfish c) Serpent d) Rijndael Answer: a  . In AES the 4×4 bytes matrix key is transformed into a keys of size __________ a) 32 words b) 64 words c) 54 words d) 44 words Answer: d D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 57.  For the AES-128 algorithm there are __________ similar rounds and _________ round is different. a) 2 pair of 5 similar rounds ; every alternate b) 9 ; the last c) 8 ; the first and last d) 10 ; no Answer: b  Which of the 4 operations are false for each round in the AES algorithm i) Substitute Bytes ii) Shift Columns iii) Mix Rows iv) XOR Round Key a) i) only b) ii) iii) and iv) c) ii) and iii) d) only iv) Answer: b D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
  • 58. Previous Questions: 1. Explain in detail Feistel Block Cipher structure with neat sketch. Oct/Nov - 2018 2. Compare stream cipher with block cipher with an example . Oct/Nov – 2018 3. Discuss any four Substitution Technique and list their merits and demerits . Oct/Nov – 2018 4. Draw the general structure of DES. Explain the encryption and decryption process. Oct/Nov – 2018 5. Compare Substitution and Transposition techniques. Oct/Nov – 2018 6. What is a block cipher? Oct/Nov - 2018 7. Explain the DES algorithm in detail. Oct/Nov - 2018 8. Discuss various transformation functions of AES Oct/Nov - 2019 9. List the parameters of three AES versions. Oct/Nov - 2019 10. Compare the substitution in DES and AES. Oct/Nov - 2019 11. Compare the round keys in DES and AES. In which cipher is the size of the round keys the same as the size of the block. Oct/Nov - 2019 D N R COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING