Prac V2
Prac V2
OBJECTIVES:
LEARNING OUTCOMES:
Understand the encryption of plain text and decryption of cipher text using Vernam Cipher.
Simulate Vernam Cipher for encryption and decryption
THEORY:
Vernam proposed a bit-wise exclusive or of the message stream with a truly random zero-one
stream which was shared by sender and recipient.
This cipher is unbreakable in a very strong sense. The intuition is that any message can be
transformed into any cipher (of the same length) by a pad, and all transformations are equally
likely. Given a two letter message, there is a pad which adds to the message to give OK, and
another pad which adds to the message to give NO. Since either of these pads are equally
likely, the message is equally likely to be OK or NO.
PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043
PROCEDURE:
1. Select a plain text and a key by clicking on the Next buttons next to the respective fields.
2. If the generated key is biased, make it unbiased in 0 and 1, and use it. You can use the idea
given in theory part.
3. On clicking on "Encrypt" button, you will get the ciphertext for the same encryption scheme.
You can get the cipher text for as many plaintext and key pairs as you like for the same
encryption scheme. You can change the encryption scheme too if you want.
4. You can take a look at all the possible 2^(length of plaintext + length of key) tuples of
plaintext, key and ciphertext in the next block.
5. By observing the tuples obtained above, you need to tell if the encryption scheme being
used is secure or not. If not, you need to find the message, m and ciphertext, c such that
P(M=m|C=c) = P(M=m).
In the experiment the size of the message space and that of the key space are equal.
Thus from Shannon's theorem, to show that a scheme is not perfect, it is enough if you locate
two distinct plaintexts that are encrypted to obtain the same ciphertext for the same key.
ADD screenshots of result output and name it as Fig. Simulation of Vernam Cipher for
encryption and decryption
PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043
CONCLUSION:
REFERENCES:
1. William Stallings, “Cryptography and Network Security”, Pearson Education, 4th Edition
2. Atul Kahate, “Cryptography and Network Security”, McGraw Hill, 3rd Edition.
3. C K Shymala, N Harini, Dr. T R Padmanabhan, “Cryptography and Network Security”,
WileyIndia,1st Edition.