Lecture 9
Lecture 9
NUMBER THEORY
Prof. Saurabh Kulkarni
Department of Artificial Intelligence & Data Science
AGENDA FOR TODAY
• Recap of last lecture
• Block and stream cipher overview
• Data Encryption Standard
• Clicker activity
• Summary/ Conclusion
STREAM CIPHERS
• Encrypts a digital data stream one bit or one byte at a
time
• Examples of classical stream ciphers are the autokeyed
Vigenère cipher and the Vernam cipher
• If the cryptographic keystream is random, then this cipher
is unbreakable by any means other than acquiring the
keystream
• The keystream must be provided to both users in advance
via some independent and secure channel
STREAM CIPHERS
BLOCK CIPHER
• A block cipher is one in which a block of plaintext is
treated as a whole and used to produce a ciphertext block
of equal length
• Typical block size- 64 bits or 128 bits
• 2 users share symmetric encryption key
• A block cipher can be used to achieve same effect as
stream cipher
BLOCK CIPHER
DES (DATA ENCRYPTION
STANDARD)
• Until the introduction of the Advanced Encryption
Standard (AES) in 2001, the Data Encryption Standard
(DES) was the most widely used encryption scheme
• DES was issued in 1977 by National Institute of Standards
and Technology (NIST)
• The algorithm is Data Encryption Algorithm (DEA)
• Data are encrypted in 64-bit blocks using a 56-bit key
• Algorithm transforms 64-bit input in a series of steps into
a 64-bit output and same steps, with the same key, are
used to reverse the encryption
DES (DATA ENCRYPTION
STANDARD)
• Dominant in financial application security
• Now its only used in legacy systems and triple DES is
used in many applications
DES ENCRYPTION SCHEME
DES ENCRYPTION SCHEME
• There are two inputs to the encryption function: the
plaintext to be encrypted and the key
• The plaintext must be 64 bits in length and the key is 56
bits in length
• First, the 64-bit plaintext passes through an initial
permutation (IP) that rearranges the bits to produce the
permuted input
• This is followed by a phase consisting of sixteen rounds of
the same function, which involves both permutation and
substitution functions
DES ENCRYPTION SCHEME
• The output of the last round consists of 64 bits that are a
function of the input plaintext and the key
• The left and right halves of the output are swapped to
produce the preoutput
• Finally, the preoutput is passed through a permutation [IP-
1
] that is the inverse of the initial permutation function, to
produce the 64-bit ciphertext
DES ENCRYPTION SCHEME
• The right-hand portion of the diagram shows the way in
which the 56-bit key is used
• Initially, the key is passed through a permutation
function. Then, for each of the sixteen rounds, a subkey
(Ki) is produced by the combination of a left circular shift
and a permutation
• The permutation function is the same for each round, but
a different subkey is produced because of the repeated
shifts of the key bits
DES DECRYPTION
• Decryption uses the same algorithm as encryption,
except that the application of the subkeys is reversed
• Additionally, the initial and final permutations are
reversed
SELF-STUDY MATERIAL
• Kindly study the example given in the following URL to
understand internal working of DES in detail.
• https://page.math.tu-berlin.de/~kant/teaching/hess/krypt
o-ws2006/des.htm
DES EXAMPLE
DES EXAMPLE
AVALANCHE EFFECT
• A desirable property of any encryption algorithm is that a
small change in either the plaintext or the key should
produce a significant change in the ciphertext
• A change in one bit of the plaintext or one bit of the key
should produce a change in many bits of the ciphertext
• This is referred to as the avalanche effect
• If the change were small, this might provide a way to
reduce the size of the plaintext or key space to be
searched
AVALANCHE EFFECT IN DES:
CHANGE IN PLAINTEXT
AVALANCHE EFFECT IN DES:
CHANGE IN KEY
STRENGTH OF DES: USE OF 56-BIT KEYS