Main menu

Pages

Explanation of how Block cipher works

Block cipher


Welcome to a new article. In this article, we move you to another world ... which is the world of coding. We'll explain how Block cipher works?

First we have to look at the following table:

Often the full English alphabets are used in the Plaintext field. Suppose we want to encode the following sentence "I AM READY TO CHANGE" How can we do that ?!

The idea is very briefly that each letter in this sentence we are replacing it with the corresponding letter in the Ciphertext field, the question that poses itself !! What does Ciphertext contain?

Contains the full alphabets, but after they are offset to the right by one or two letters, or ... by the number of the "Key". Either it is 1, 2, 3, or ...

 

Suppose key = 1, then the characters in the Ciphertext field will be shifted to the right by one letter and the table will look like this:

 

Ciphertext = Plaintext >> 1

To see what our statement looks like after encoding, we substitute each letter from Plaintext with its Ciphertext counterpart:

H ZL QDZCX SN BGAMFD 

Now our sentence is ready! .. 

Block cipher can work the other way around as the word or sentence encoded as Plaintext and the original sentence can be found via Ciphertext.

The general rule for Block cipher is:

E (K, M) = M >> K

Whereas, the letter E stands for Encryption

And K denotes Key

And M stands for Plaintext Message

And in the opposite case, it is as follows:

E-1 (K, E (K, M)) = M.

.

.

.

To here ends our journey in Block cipher, I hope she got what you wanted and found your way through it ... We meet you in a new educational technical article, bye

You can see this code in the Java language you wrote an application on it:




read also : 

How to contribute to open source projects



reactions

Comments