WeBeginners-Community / DocBook

Documentations of Html to every open source technologies. It's a low-code repository
30 stars 54 forks source link

Title: Vernam Cipher Algorithm #235

Closed Dharnish38 closed 1 year ago

Dharnish38 commented 1 year ago

Is your feature request related to a problem? Please describe.

It is the only available algorithm that is unbreakable (completely secure). It is a method of encrypting alphabetic plain text. It is one of the Substitution techniques which converts plain text into ciphertext. In this mechanism, we assign a number to each character of the Plain-Text. The two requirements for the vernam cipher are 1) The key should be randomly generated as long as the size of the message. 2) The key is to be used to encrypt and decrypt a single message, and then it is discarded.

Describe the solution you'd like.

1) Firstly, we convert both our plain text and the key string into its binary form. 2) The key can be either in string form or directly in binary form also. 3) The bits of the key string is repeated again and again until its length becomes equal to that of the plain text. 4) Perform XOR operation between the elements of the plain text with the respective elements of the ley string which hold the same positions. E (Pi , Ki) = Pi (XOR) Ki 5) The process of decrypting the ciphertext to convert it back into plain text is performed in the same way as the encryption process. Therefore, the formula for decryption of the text under Vernam cipher is as follows, D (Ci , Ki) = Ci (XOR) Ki

Describe alternatives you've considered.

.

Add any other context or screenshots about the feature request here.

Vernam