Single Round of DES Algorithm
Summary
TLDRThe video script provides an in-depth look into the Data Encryption Standard (DES) algorithm, focusing on the single round function. It begins with an overview of the DES encryption process, which transforms a 64-bit plaintext into ciphertext through a series of permutations, substitutions, and key-based operations. The script explains the initial permutation, where the input text's bit positions are rearranged, and the inverse initial permutation, which reverses this process. The swap function is also discussed, highlighting its role in exchanging the left and right 32 bits of the text. The core of the presentation is the single round function, which takes a 64-bit input and a 48-bit round key, performing an expansion permutation, substitution through S-boxes, and transposition to produce a new 64-bit output. The round key is derived from the original 56-bit key through a left circular shift operation. The script concludes with a teaser for the next presentation, which will delve into the specifics of the function F within each round. Overall, the script offers a clear and engaging explanation of the DES algorithm's encryption process, piquing the interest of viewers in the intricacies of data security.
Takeaways
- ๐๏ธ The DES (Data Encryption Standard) algorithm is a symmetric-key encryption algorithm that converts a 64-bit plaintext into a 64-bit ciphertext.
- ๐ The DES process involves an initial permutation, 16 rounds of processing with round keys, a swap function, and an inverse initial permutation.
- ๐ The original 64-bit key is reduced to a 56-bit key, which is then further processed to generate 48-bit round keys for each of the 16 rounds.
- ๐ The initial permutation rearranges the 64-bit plaintext, and the inverse permutation does the same to the ciphertext before it is output.
- ๐ The swap function exchanges the left and right 32-bit halves of the data after all 16 rounds of processing.
- ๐ Each round of DES encryption uses a unique 48-bit round key derived from the original 56-bit key through a left circular shift operation.
- ๐ In each round, the right 32 bits of the input are expanded to 48 bits to match the round key size, then processed through substitution and permutation boxes.
- ๐ The output of each round is a new 32-bit left half and a new 32-bit right half, which become the input for the next round.
- ๐ The left and right halves are XORed within each round to produce the output for that round.
- ๐ The 'F function' or 'mangler function' is a key part of each round, which will be explained in more detail in a subsequent presentation.
- ๐ The presentation aims to help learners understand the steps involved in a single round of the DES algorithm, including initial and inverse permutations and the swap function.
Q & A
What is the main topic of the presentation?
-The main topic of the presentation is the single round of the DES (Data Encryption Standard) algorithm.
What are the two key outcomes expected from the session?
-The two key outcomes are understanding the initial permutation, inverse initial permutation, and the swap function, and understanding the single round of the DES algorithm.
How does the initial permutation function work?
-The initial permutation function takes a 64-bit plaintext, changes the position of the bits, and outputs a 64-bit text.
What is the role of the round key in the round function?
-The round key, which is 48 bits, is used in conjunction with the right side of the 64-bit input to the round function. It is combined with the expanded 48 bits from the right side of the input through an XOR operation.
How many rounds are there in the DES algorithm?
-There are 16 rounds in the DES algorithm.
What happens to the right side of the 64-bit input in the round function?
-The right side of the 64-bit input, which is 32 bits, is expanded into 48 bits using an expansion function before being combined with the 48-bit round key.
What is the purpose of the expansion permutation?
-The expansion permutation is used to convert the 32 bits into 48 bits so that it can be combined with the 48-bit round key via an XOR operation.
What is the swap function's role in the DES algorithm?
-The swap function takes the 64-bit output from the last round and swaps the left 32 bits with the right 32 bits before it is passed to the inverse initial permutation function.
How does the DES algorithm produce its 56-bit key from the original 64-bit key?
-The original 64-bit key is reduced to 56 bits by a process that involves a left circular shift operation, and then the 56-bit key is used to derive the 48-bit round keys.
What is the final step after the 16 rounds of processing in the DES algorithm?
-The final step is to pass the 64-bit output from the swap function to the inverse initial permutation function, which changes the position of the bits to produce the final 64-bit ciphertext.
What is the F function or Mangler function in the context of the DES algorithm?
-The F function, also known as the Mangler function, is a part of the DES algorithm that takes the right side of the input and the round key as inputs and performs operations including expansion, XOR with the round key, substitution using S-boxes, and permutation using a P-box.
Outlines
๐ Introduction to DES Algorithm Rounds
This paragraph introduces the DES (Data Encryption Standard) algorithm, focusing on the single round function. The session aims to teach two main outcomes: understanding the initial permutation, inverse initial permutation, and the swap function; and grasping the concept of a single round of the DES algorithm. The DES algorithm takes a 64-bit plaintext and converts it into a 64-bit ciphertext through a series of steps involving initial permutation, round functions with round keys, and a final swap function. The key-related process involves converting a 64-bit key into a 56-bit key size for the algorithm, which is then used to generate 48-bit round keys through a left circular shift operation. The paragraph provides an overview of the encryption process and sets the stage for a deeper dive into the initial permutation and round function mechanisms.
๐ Understanding Initial and Inverse Permutations and the Swap Function
The second paragraph delves into the specifics of the initial permutation, inverse initial permutation, and the swap function within the DES algorithm. The initial permutation rearranges the 64-bit plaintext, changing the position of the bits to produce a 64-bit output. The inverse initial permutation performs a similar function but on the 64-bit ciphertext, converting it back to the original bit order. The swap function is straightforward, taking the output from the initial permutation and swapping the left and right 32-bit halves to prepare it for the next stages of encryption. The paragraph explains these processes in detail, ensuring that the learner can understand how the plaintext and ciphertext are manipulated through these functions.
๐ The Mechanics of a Single Round in DES
This paragraph provides an in-depth look at a single round of the DES algorithm. Each round takes a 64-bit input and a 48-bit round key to produce a 64-bit output. The process involves splitting the input into left and right 32-bit halves. The right half undergoes an expansion function to match the round key's size, which is then combined with the round key through an XOR operation. This result is then reduced to 32 bits by a substitution box (S-box), which is followed by a permutation box (P-box) that changes the bit positions. The output from the P-box is XORed with the left half of the input, resulting in a new set of left and right 32-bit halves that move on to the next round. The paragraph explains the iterative nature of the 16 rounds, each with its own 48-bit round key derived from the original 56-bit key. This detailed explanation sets the foundation for understanding the complex encryption process within a single round of DES.
Mindmap
Keywords
๐กDES
๐กInitial Permutation
๐กRound Function
๐กSwap Function
๐กInverse Initial Permutation
๐กCiphertext
๐กRound Key
๐กExpansion Function
๐กSubstitution Box (S-Box)
๐กPermutation Box (P-Box)
๐กXOR Operation
Highlights
Introduction to the DES (Data Encryption Standard) algorithm focusing on the single round function.
Understanding the initial permutation, inverse initial permutation, and the swap function.
The DES algorithm takes a 64-bit plaintext and converts it into a 64-bit ciphertext.
The round function accepts a 48-bit round key and processes the input through 16 rounds.
The swap function rearranges the left and right 32 bits of the 64-bit block.
The 64-bit key is reduced to a 56-bit key size for the DES algorithm.
The left circular shift algorithm generates the 48-bit round keys from the 56-bit key.
The initial permutation changes the position of the 64 bits of plaintext.
The inverse initial permutation reverses the changes made by the initial permutation.
The expansion function converts 32 bits into 48 bits to combine with the round key.
The S-boxes (substitution boxes) reduce the 48 bits back to 32 bits.
The P-box (permutation box) changes the position of the 32 bits without expanding or reducing them.
The output of the round function is a 64-bit block, consisting of a new left and right 32-bit half.
The process of the round function is repeated 16 times with different round keys.
The original 64-bit key is reduced to a 48-bit round key for each round.
The function F, also known as the mangler function, will be elaborated in the next presentation.
The presentation concludes with a comprehensive understanding of the single round in the DES algorithm.
Transcripts
foreign
welcome back in the last presentation we
have seen about the introduction to desk
and in that we have seen about the Des
encryption algorithm in today's
presentation we will focus on what
happens in that round function so the
topic of the day is single round of Des
the Des algorithm as usual let's start
the session with the outcomes upon the
completion of the session the learner
will be able to outcome number one
understand the initial permutation the
inverse initial permutation and the swap
function and outcome number two which is
understanding the single round of this
algorithm and in the last presentation
we have seen about this this encryption
algorithm where this algorithm is going
to take a 64-bit blank text and it is
going to be converted into a 64-bit
ciphertext and this 64-bit playing text
is given to the initial permutation
function and the position of the bits
are changed and then the output of this
initial permutation is going to be 64
bits this 64 bits is going to the round
function where it accepts the round key
which is of 48 bit if it is round 1 it
is going to be K1 which is of 48 bits
then after processing the input it goes
to round 2 goes to round three round
four and so on and finally it completes
round 16. for round 16 it takes k16 as a
round key and then the 64 bits are given
to a swap function where this swap
function is going to swap the left hand
side 32 bits and the right hand side 32
bits and the output of this function is
going to be again 64 bit and these 64
bits are then given to the inverse
initial permutation function again the
position of the bits are changed and
finally we will be getting the 64-bit
ciphertext
in the left hand side we can see the
encryption related Parts the initial
permutation the round functions swap
function and the inverse initial
permutation function and coming to this
side we can see everything is of key
related things where the 64-bit key is
actually inputted with the playing text
for the encryption algorithm and these
64 bits are actually converted into 56
bits which is the key size or the key
length of the dash algorithm these 56
bits are actually given to the left
circular shift algorithm in order to do
a left circular shift operation
all these 48-bit round keys are actually
derived from this 56-bit key so this is
just a recapture of the previous lecture
now what we are going to learn in
today's presentation we are going to
learn about the initial permutation the
round function and then the inverse
initial permutation function let's start
with the first one the initial
permutation this initial permutation is
going to take 64 bits plain text and
it's going to change the position of the
bits and it's going to give 64 bits
output right so let's see that now
if we take the playing text which is of
64 bits which are ordered like this the
first bit the second bit the third bit
fourth bit and if the bits are placed
like this obviously the last bit will be
the 64th bit now if you see here the
input what we are giving is going to be
converted into binary bits and the
64-bit binary bits are placed like this
as I already mentioned in the last
diagram this initial permutation
function takes 64 bits input and it
converts this into 64-bit output and
what is actually happening
the position of the bits are changed
let's see that now we know the inputs
are placed like this and how it is going
to be changed it's going to be changed
like this the first eight bits are
placed like this the first bit here the
second bit here the third bit here the
fourth bit here five six seven and eight
what about the second row 9 to 16 9 10
11 12 13 14 15 16 likewise the bit
positions are changed now if you start
reading from here whatever we had in the
58th position maybe this might be a zero
bit or a one bit this bit takes this
position and whatever we have in this
place it can also be either a zero or a
one that bit is placed here so if you do
this approach ultimately we will be
getting 64 bits only and we need to
start reading like this this is the
first bit second bit third bit fourth
bit now if you read like this then
obviously we'll be having 64 bits so the
initial permutation changes the position
of the 64 bits
I hope things are clear for you so let's
see the diagram now so we are done with
completing the initial permutation where
the position of the playing text is 64
bits are changed let's now focus on
inverse initial permutation where it is
also going to take 64 bits and it's
going to convert the 64-bit Cipher text
the input 64 bits is actually coming
from the 32-bit swap function anyway
let's see the diagram now let's see the
inverse initial permutation now
let's understand the swap function is
giving 64 bits and those 64 bits are
arranged like this the first 8 Bits are
placed like this one two three four five
six seven eight then the next eight bits
are placed like this 9 10 11 12 13 14 15
16 in this manner if you arrange then it
is inverse initial permutation so it's
so simple whatever we get from the
32-bit swap function let's assume that
it is ordered like one two three four
sequentially take the first row and
place it in the second column in this
manner if this is also reordering this
is also permutation right
so we are done with dealing with the
initial permutation and the inverse
initial permutation and 32-bit swap
operation is so simple if you have 64
bits just partition that into two equal
halves left hand side 32 right hand side
32 take the right hand side 32 and place
it in the left hand side take the left
hand side 32 bits and place it in the
right hand side so we will be getting 64
bits though 64 bits after swapping what
we get that only is given to the inverse
initial permutation
so we are done with dealing the initial
permutation and the inverse initial
permutation let's now focus on what
happens in every round that's the topic
of the day the single round of this
algorithm here is the single round of
this algorithm let's see what happens in
one round let's revisit the diagram one
more time
what happens in every round this round
receives 64 bits as the input and it
also takes 48-bit key that is the round
key please note here round function
takes 64 bits input and 48-bit key and
finally what's the output of every round
it is 64 bits only so every round is
going to take 64 bits input and a 48-bit
key and finally it gives a 64-bit output
let's take any round since we are not
able to place the complete round details
here we have simply mentioned it as
round one round two up to round 16. now
what happens in every single round
in every single round this is happening
so if you note here this is one round
and what's the input size which is
getting into the round it's 64 bits
right the entire 64 bits which is
entering into the round contains the
left hand side 32 bits and the right
hand side 32 bits these right hand side
32 bits are just taken as such so can
you see here the right hand side 32 bits
are taken and this is actually given to
an expansion function now the role of
this expansion function or expansion
permutation is to expand it why we need
to expand it because we are getting a 48
bit key and what is the input that is
fed into the round function it is 64
bits right now these 64 bits we have
partitioned into two halves one is the
left hand side 32 and the other one is
the right hand side 32. now this right
hand side 32 have to be converted into
48 bits so that this can be absorbed
with the round key which is 48 bits so
this is actually
can you see here the original key is
What 64 bits it is also having 32 bits
here and 32 bits here I will just go
back to the previous diagram so that it
will be easy for you to understand
in this diagram the original key is What
64 bits and what we are giving for every
round 48 bits this original 64 bits
whatever is given to the round contains
left hand side 32 and right hand side
32. the right hand side 32 is expanded
so that the 32 bits in the right hand
side is converted into 48 bits and then
this 48 bit can be absorbed with this 48
bits which is the round key that is what
we are dealing here so the right hand
side 32 bits are actually expanded and
then we will be getting 48 bits how we
are going to expand this that we will
see later but just understand the
concept so the right hand side 32 bits
are expanded into 48 bits and whatever
we get from the round key this is of 48
bits so when this 48 bit is xorbed with
this 48 bit will be getting 48 bits so
this 48 bits actually now to be reduced
to 32 bits because already we have 32
bits in the left hand side so we have to
reduce this so what we are going to do
is we are going to reduce this 48 bits
into 30 two bits by giving this to a
substitution box which is also called as
yes box so what is Box is doing it's
taking 48 bits as the input and it is
reducing it into 32 bits so if you see
here expansion table is expanding into
48 bits whereas the s box is reducing
this into 32 bits now these 32 bits are
actually given to a p box which is the
permutation box or a transposition box
where the position is going to be
changed and whatever we get here is
going to be another 32 bits because we
are not going to expand or reduce rather
we are going to change the position only
after changing the position whatever we
get you can ignore this for now and
whatever you get after changing the
position will be 32 bits and these 32
bits actually are xored with the left
hand side 32 bits can you see here the
left hand side is of 32 bit these 32
bits are just absorbed with the 32 bits
after processing these many aspects now
whatever the result we get will be 32
bits because the left hand side 32 bits
is actually absorbed with the 32 bits
after performing these operations so 32
bits xorbate another 32 bits will be 32
bits and these 32 bits are the right
hand side part and what about the left
hand side 32 part before starting any
round we will be having 64 bits input
right the 32 bits are just taken here
and placed here so that this is 32 bits
and this is 32 bits these 32 plus 3264
bits are going to the next round it
means this is the previous round which
is I minus 1 this is the next round
which is I how many times these rounds
are being performed 16 times the rounds
are performed for every 16 time we get
16 round keys I hope things are clear
for you now let's see what happens here
the original key is 32 plus 32 64 bits
it is actually reduced into 56 this 56
bit key is actually reduced to 48 bit
and this is the round key for every
round we have a 48 bit round now this
entire process is repeated for how many
times 16 times because how many rounds
we have 16 rounds so this is exactly
what happens in this round or in this
round or in any of the rounds this is
what happens in every single round of
this algorithm so let's see the equation
what happens in left hand side and right
hand side
let's take this diagram what is actually
Li let's say the input is Li minus 1 and
RI minus 1 and the output of the round
function is l i and r a now what is l i
this Li is exactly whatever is there in
the ri minus 1 so l i is exactly ra
minus 1 so R A minus 1 is exactly l i
and what about this r i r i is l i minus
1 xorb with these many things right so
what is RI RI is Li minus 1 which is RIS
l i minus 1 xorbit this entire function
what is this function this function is a
mangular function where it takes the
right hand side part which is R minus 1
as the input and this k i key right so
these two inputs are given for this
function f which is exactly the F
function or Mangler function don't worry
about this function now anyway in the
next presentation we are going to
elaborately focus on what happens in
this function f in every round and
that's it guys I hope now you understood
what happens in the initial permutation
in the inverse initial permutation and
the swap function and also we have
understood the single round of this
algorithm I hope you guys enjoyed this
presentation and thank you for watching
[Music]
[Applause]
[Music]
Browse More Related Video
5.0 / 5 (0 votes)