Transcript for:
Understanding the Feistel Cipher Structure

hello everyone welcome back in today's presentation we are going to focus on the Fel Cipher structure 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 Fel Cipher structure and outcome number two know the various design features of the Fel structure design so let's see the fisal cipher structure here is the feistel structure so this side is the encryption portion and this side is the decryption part this left hand side structure is actually the structure proposed by feistel we know this is an encryption process so obviously the input is going to be the plank text and the output is going to be the cipher text so we are clear that this input pling text is converted into the cipher text using this Fel structure now what is really happening in the structure if you see here the plank text is actually splitted into two parts one is the left hand side part and the other one is the right hand side part this left hand side part and right hand side part is actually the plank text suppose if the plank text size is 64 bits then the left hand side part is 32 bits and the right hand side part is another 32 bits so 32 bits plus 32 bits will be the original 64 bits playing text why we are splitting this because this right hand side bits is actually given to a function and this function is going to carry out some operations let me reveal what's the operation that is carried out by this function later but for now just see this function is going to compute some activities with the help of this key K1 and then the output of this function is then performed with the exor operation of the left hand side bits it means the left hand side bits are exort with the output of this function and whatever we get will be the half in the right hand side part and whatever is there in the right hand side part is just taken and placed here so that the exact number of bits are received here in this example I told you 64 bits is the size of the playing text let's say this 32 bits in the left hand side and 32 bits in the right hand side and this right hand side 32 bits is entering into the function and some operation is carried out with this key K1 and then the output of this function will be 32 bits this 32 bits will be performed with the exor of the left hand side 32 bits and the result will be 32 bits this 32 bits is the right hand side part and we need another 32 bits right the left hand side 32 bits is exactly what we had in the right hand side part before starting this operation so that we will get this 32 bits and this 32 bits constitute 64 bits after performing round one so this is the operation of round one for round one we are using K1 as the key so we can call this K1 key as the round key key now these bits undergo another round of operation the same steps is followed what we saw in round one so in round two whatever we did in round one the same activities are performed except this function takes a different key here which is K2 for round two this K2 is the round key for round two likewise how many rounds are performed can you see here likewise 16 rounds are performed for 16th round k16 is the round key at the end of round 16 we will be getting 32 bits in the left hand side and 32 bits in the right hand side simply 64 bits we will get then what we are going to do we are going to just do a swap that is the right hand side bits will be the left hand side bits of the next stage and whatever we had in the left hand side in the previous round or the round 16's output that will be the right hand side in the next stage so this operation we call as a swap operation so after this operation whatever we get is exactly the cipher text so from this what we are understanding is this input that is the playing text is undergoing some n number of rounds of operations n here is 16 so this pling text is undergoing 16 rounds of operations and in all these 16 rounds we are having different keys for every round there will be different key so for round one it is k1 for round two it is K2 likewise for round 16 we'll be having k16 once this plank text under goes all 16 rounds whatever we get is the pre-output this is not the actual output or the cipher text so after swapping this whatever we get is the ciper text so this is the whole encryption process and the reverse process is the decryption just note how decryption is done the input here for decryption is the cipher text because encryption algorithm is going to take the plank text whereas the decryption algorithm is going to take the cipher text as the input so the input is cipher text this input is going to round one please note here this input Cipher text is going for round one with k16 as the key whereas in encryption for round one we use K1 decryption is quite reverse isn't it so for round one we are using k16 as the key it means whatever we used in round 16 that key is used for round round one so when you do the same approach in the reverse manner this is exactly the decryption process so for round 15 we'll be using K2 so K2 is the round key for round 15 and K1 is the round key for round 16 and after round 16 whatever we get this is the pre-output this is not the original plank text we need to perform one more operation what is that the swap so just swap the left hand side bits and the right hand side bits then whatever we get will be the output the the output is going to be the playing text because this is the decryption process so this is what exactly the Fel structure is so this Fel structure is the basis for the block siher Concepts the dees encryption and decryption algorithm which we are going to see in the next lecture uses this Fel structure only for encryption and decryption the round operation is going to be the same so iteratively the round operation is going to be carried out but with only one difference that for each round a separate key is used so we need some key scheduling algorithm for generating round keys for every round it doesn't mean that we are going to supply new keys for every round we will be fixing a key and that key is scheduled accordingly in such a way that for every round a round key is generated from that original key I hope the things are clear for you so what we are expecting from Fel structure we are expecting the cipher text right and what two proper properties that clot shenon introduced the confusion and diffusion properties right any encryption algorithm if it contains confusion and diffusion properties then it will be stronger enough so now in order to get the confusion and diffusion property for the cipher text we need something to be carried out isn't it now what is actually happening in this function f in this function f we are going to carry out two important operations that are responsible for confusion and diffusion the operations are the substitution and the permutation we have already seen what is confusion and what is diffusion in the previous lecture if you are not clear about that I request you to watch my previous lecture you'll be gaining some knowledge about confusion and diffusion this Cipher text needs confusion and diffusion so this function is responsible for carrying out the substitution and the permutation activities so that the cipher Tex we get will be having confusion and diffusion properties before we sign out let's see the Fel structure design features now we have the Fel structure before us now if you see here or what are all the features that this Fel structure is truly depending on the first one is the block size we know this Fel structure is a block ciper this is not a stream Cipher where group of bits are given as an input so let's say if it is 64 bits then the block size is of 64 what is the input block size and what is the output block size the dees data encryption standard algorithm uses 64 bits block size and AES uses 128 bit block size AES stands for advanced encryption standard and this is one of the most popular algorithms that we are using in today's contemporary and secured World many features of AES are still unbreakable and that's why AES is widely used but Dees or data encryption standard is outdated we are no more using Dees because it can be easily hacked so the first f structure design feature that we are addressing is the block size it means how many bits can be encrypted or decrypted at a time by Any Given algorithm the block ciphering algorithms now coming to the second design feature which is the key size now we know there are end rounds if there are end rounds then obviously we need end round Keys now the question is what is the round key size and the original key size because these are the round keys that are actually generated from the or original key now we need to understand what is the original key size and what is the round key size say if we want greater security obviously we need greater or bigger key size but unfortunately if we go for bigger key size then it may decrease the encryption and decryption speed we need high speed also because for data transfer if we are adopting this Fel structure if it takes more time for encryption and decryption obviously we will not prefer such algorithms or block ciphering algorithms at the same time if the key size is smaller then it will be vulnerable to Brute Force attack and also it leads to lesser confusion what we want from Fel structure we want greater confusion greater diffusion and high security so key size is the next parameter that we should understand in the Fel structure design features and coming to the third one which is the number of rounds is one round sufficient for better security definitely no if there is only one round in the encryption process obviously it can be easily broken so we need end rounds right so how many rounds we are going to carry out in order to generate the pling text into Cipher text say if the number of round is 16 in encryption obviously it needs 16 rounds in the decryption as well because this is a symmetric encryption model what a symmetric encryption the same key is used for encryption and decryption in the Fel structure we can see K1 K2 up to k6 are the keys that are used for encryption and the same keys are used for decryption the only difference is the order of usage is differing so the real security relies in the number of rounds so if you have multiple rounds if the number of rounds are higher then the security is higher or greater and coming to the next one is the subkey generation algorithm as I already mentioned we are not going to feed individual keys for every round rather we are going to give a key and that key is going to generate the round Keys now we need some sub key generation algorithm in order to generate the round ke and also if the key size is Big it will be difficult to break it so the sub key generation algorithm should also have greater complexity in the design because we don't want the Crypt analyst or the attacker to break the algorithm easily so we want a secured algorithm and coming to the next one is the round function what is happening in this round function we need some complex design in the round function so that we will be gaining both confusion and diffusion properties so the round function should also be designed in such a way that it is more complex and then the next design feature is the fast encryption and decryption in most of the cases encryption is actually a part of the application or in the hardware so we need this to be carried out as fast as it should be because ultimately we are going to transfer the data for encryption and decryption if it is taking more time obviously it invites dissatisfaction over the system so the speed of the algorithm is also very important even if you increase the number of rounds even if you make the design of this function complex even if the entire Fel structure is complex but still the speed of execution of the algorithm should be fast otherwise it becomes a concern for practical applications so this is exactly the fast encryption decryption algorithm and finally we have the ease of analysis ease of analysis means in Crypt analyst perspective it should not be easy for them to analyze what is happening in the entire process it should be more difficult for the Crypt analyst to see what is happening generally it should not be feasible or possible to Crypt analyze because the algorithm should be designed in such a way that it is more complex at the same time the algorithm should also be explained concisely and clearly so that it can be easy for analyzing the algorithm for Crypt anal itic vulnerabilities and also we can develop a higher level of assurance as to its strength one such example is Dees and AES and that's it guys I hope now you understood the Fel Cipher structure and we also have seen the various design features for Fel structure design the design features whatever we have seen is not only for this Fel structure it is also applicable for the block cfers basically Fel structure is a block cfer I hope the session is informative and thank you for watching [Music] [Applause] [Music]