Computer Science, asked by cspriyadarshan, 1 year ago

What is the encrypted string for the given plain text is in the binary string 10010100 and the key is 01011001 in Vernam cipher? 1) 11011101 2) 11001101 3) 00110010 4) 11100110

Answers

Answered by QGP
5

Vernam Cipher

The Vernam Cipher was introduced by Gilbert Verman, an American engineer working at the AT&T Bell Labs.

The Vernam Cipher uses a Key of the same length as Plaintext messages and combines them with the XOR Operation to create the Cipher text.

The Cipher Text can be combined with the same key with the XOR Operation to obtain the Plaintext.

So,

\begin{aligned}\texttt{Plain Text }&\oplus\texttt{ Key = Cipher Text} \\\\ \texttt{Cipher Text }&\oplus\texttt{ Key = Plain Text}\end{aligned}

The XOR is denoted by  \oplus .

The Vernam Cipher is secure provided that only the concerned people possess the key, and that the key is completely random. The key must also not be used more than once and should be destroyed immediately after use.

Different keys must be randomly generated for each use.

 \rule{320}{1}

XOR - Exclusive OR

The Exclusive OR (XOR) is a binary operation. It returns 1 only when both the inputs are different.

XOR returns 0 when both inputs are the same.

This is different from OR. The OR returns 1 when both inputs are 1. But here, the XOR will return zero.

Both inputs cannot be 0, or cannot be 1 simultaneously. Here's the Table for XOR:

\begin{array}{|cc|c|}\cline{1-3}\tt A & \tt B &\tt A \oplus B\\ \cline{1-3} \tt 0 & \tt 0 & \tt 0 \\ \tt 0 & \tt 1 & \tt 1 \\ \tt 1 & \tt 0 & \tt 1 \\ \tt 1 & \tt 1 & \tt 0 \\ \cline{1-3}\end{array}

 \rule{320}{1}

Encrypting the Cipher Text in Question

We have all that we need to get the Plain Text.

\begin{aligned}\tt Plain\ Text &=\tt 10010100 \\ \tt Key &= \tt 01011001\end{aligned}

To get the Cipher Text, we just need to combine the two binary strings by a XOR.

Let's do it in a table. We will call the Plain Text as P and the Key as K. Let's call the Encrypted Cipher Text as C.

\begin{array}{|c|cccccccc|}\cline{1-9}\tt P & \tt 1 & \tt 0 & \tt 0 & \tt 1 & \tt 0 & \tt 1 & \tt 0 & \tt 0 \\ \tt K & \tt 0 & \tt 1 & \tt 0 & \tt 1 & \tt 1 & \tt 0 & \tt 0 & \tt 1 \\ \cline{1-9} \tt C = P \oplus K & \tt 1 & \tt 1 & \tt 0 & \tt 0 & \tt 1 & \tt 1 & \tt 0 & \tt 1 \\ \cline{1-9}\end{array}

Thus, the Encrypted Cipher Text is (2) 11001101

Similar questions