ETHICAL HACKING - ENCRYPTION ALGORITHM
We will talk about different encryption algorithms which we can use in order toxin kept our data so in the last I told you about cipher text that the cipher text is obtained after converting our plaintext or after encrypting our plaintext and the cipher text is in the unreadable form so that a normal person can’t be understand that what's the meaning of that cipher text now we will discuss about types of type ciphers first so there are two types of ciphers the first one is stream cipher and the second one is block cipher so the stream ciphers know what a stream ciphers so stream ciphers actually encrypt one digit at a onetime just for example our data contains five digits that is hello e double L o so the first digit that is H will be encrypted first then the next digit that is e encrypted then the will be encrypted then another L and then o will be encrypted so in the stream cipher one digit is encrypted ate one time and the stream cipher contains only symmetric key encryption which means the key for encrypting the data and the key for decrypting the data will be same now let's talk about block cipher so as a name suggests block which means the block cipher converts particular block or the block cipher encrypt a particular bit of block so here you can see that it operate on affixed length of a group called as blocks one group at a onetime which means one group of a block that is a -bit will be converted at a one time so here you can see that it might be D ciphers so block ciphers are not secure so they might be easily deciphered but there are different different ways and now let us talk about different kind of encryption algorithms so the first one is restream cipher so arc algorithm is called as reversed cipher for and it's actually stream cipher which

means it will convert a one digit at a onetime adhere you can see that it's also symmetric key algorithm the key for encrypting the data and key for decrypting the data is same now let us talk about some block ciphers algorithms the first one is des algorithm so algorithm stands for data encryption standard here you can sees data encryption standard algorithm actually operates on a fixed length of block so it's fixed length string so cipher text of a plain site and the block size is bit which means if our data is actually a -bit then the first-bit will be encrypted first then the another -bit will encrypted after our the previous -bit data and one more thing to be noticed that in the block ciphers the key the key and the size of data which convert at one time is same so as the des algorithm is actually converting the block size of bit data which means it's key should be also of-bit but this des algorithm is venerable to brute-force attack or different dictionary attacks so that's why it’s not secure so in order to make it secure information security researchers actually developed one more algorithm that is three DES so three DES algorithm stands for triple data encryption standard so in addition to DES this algorithm contains three keys so in order to protect our data and with the help of these three keys our data is secure from different kind of password guessing attacks like dictionary attack and Booth force attacks and in the last there is one algorithm called as Ashish is one of the most popularly used algorithm around the globe so ea. stands for advanced encryption standard so thesis the one of the most powerful algorithm which is used for encrypting our data why because the key size of this AES algorithm is -bit bit and even five one two bit key which means the key size is five one two and the data or the block size should bathe same as the size of the key so that’s why this algorithm AES should be considered one of the most powerful

algorithm used in the world now let’s see how encryption work with the help of one Python program now let's have a look at different encryption algorithms and they’re working so in the previous we have downloaded this clipped Swiss crypto and in this I will use the same script so let us open the script soaps I told you earlier that the encryption is off to type symmetric and so in symmetric encryption the key for encrypting the data and the key for decrypting the data is same whereas in asymmetric encryption the key for encrypting and the key for decrypting the data is different so this tool which have created actually supports symmetric encryption at this time so lotus click over here and then it asks us for the cipher we want to use so first of all let us click over here to the block cipher and we know that there are different kind of block cipher algorithms but common one our advanced encryption standard algorithm and data encryption standard algorithm so first of all we'll discuss data encryption standard algorithm so click over here as soon as we click over here it asks us for the data to convert so as I told you earlier that in data encryption standard algorithm we always have to add the data and multiple of it which means if I adhere hello so the total length of this data is so we have to add data multiple of eights means if you want toad more data we have to add the till then and multiple of eights so let’s click over here to ok and here you will see that our data is converted to the cipher text and here we got our encrypted text you can see here and here is our key encryption key which we got but you might be wondering that why this key is not a long random key the reasons that I haven't added a random key generation function in data encryption standard algorithm and this Python program so that's why I have made this key constant in this Python program so that’s why you are seeing this eight digits key so the another reason of making this key constant is that I want to show you that the key or in DE algorithm is always should be in eight digits or in the multiple of AIDS so the data and the key should always be in

multiple of eight so now let's try to decrypt the data encryption standard algorithm so let's click over here decryption symmetric encryption then we have to select the decryption algorithm so the point to be notice is that we have to select the same algorithm which we have used in order to encrypt the data so let's select this and here it asks us for the key to decrypt and our key is and let's copy our encrypted text or cipher text from here from this Python shell and let me paste it here and click on decrypt give us an error okay I think we misses something so we have to copy the text very carefully otherwise it will give us an error and let me paste it here click on decrypt and here you will see that we got our normal text back that is hello so this is how data encryption standard worked so and the main disadvantage of data encryption standard is that it always accept the data and key in multiple of bits and there is some restriction of that we can’t add up to bit so that is why the key size is very small in data encryption standard which is vulnerable to some brute-force attacks now let’s have a look at advanced encryption standard and it's working and let’s start the script again let's go here block ciphers and now now let this time click over here advanced encryption standard so in advanced encryption standard we can add the data and but it’s not mandatory that we have to add the data in multiple of it which means we can add any data of any size just for example let's write here this is secret and if I click on OK here you will see that our text is encrypted and we got our encrypted text here at the bottom and above it we got our long random key the same thing we got in Python shell you can see here so this is the beauty of advanced encryption standard that the size of key is very long that makes the key and our data secure from wolf force attack so we can add here any data click on OK you will see we got another key parent encrypted text so this is how advanced encryption standard work and in order to decrypt it the steps are same so this this was all about block ciphers algorithm now let’s have a look at one stream cipher algorithm that is arc so let's go here encryption symmetric encryption then stream cipher arc algorithm that is reversed cipher four and here it asks us for enter the key and data so as I told you earlier that in arc algorithm it’s not mandatory that we have to add detain multiple of eight bits so we can adhere any key like hello let's make it as hello one two three so it's every key oar password and let's add here text which we want to encrypt so our text will bayou can write here anything very secrets if I click on convert you will see that we got our cipher text or encrypted text so let's copy this text from here and now let's go here to decryption let’s try to decrypt this text we have to select the same algorithm arc so here we have to add our key so our key was hello one two three and our text which we have copied so I have pasted it here click on OK and here you will see that we got our normal text back that is very secret so this is how block ciphers stream ciphers and the different algorithm works so this was the short example of demonstration of different encryption algorithms.
Comments
Post a Comment