Sample Solution

MMTE-006 Solved Assignment 2024 CS

CRYPTOGRAPHY

(January 31st, 2024 – December 31st, 2024)

  1. a) Let f ( x ) = x 3 x 1 Z 5 [ x ] f ( x ) = x 3 x 1 Z 5 [ x ] f(x)=x^(3)-x-1inZ_(5)[x]f(x)=x^3-x-1 \in \mathbf{Z}_5[x]f(x)=x3x1Z5[x]. Find the product of x 2 + 2 x + 1 + ( f ( x ) ) x 2 + 2 x + 1 + ( f ( x ) ) x^(2)+2x+1+(f(x))x^2+2 x+1+(f(x))x2+2x+1+(f(x)) and x 2 + 3 x 1 + ( f ( x ) ) x 2 + 3 x 1 + ( f ( x ) ) x^(2)+3x-1+(f(x))x^2+3 x-1+(f(x))x2+3x1+(f(x)) using the algorithm in page 23, block 1. You should show all the steps as in example 11, page 22, block 1 .
    b) Let f ( x ) = x 4 + x + 1 F 2 [ x ] f ( x ) = x 4 + x + 1 F 2 [ x ] f(x)=x^(4)+x+1inF_(2)[x]f(x)=x^4+x+1 \in \mathbf{F}_2[x]f(x)=x4+x+1F2[x]. We represent the field F 2 4 F 2 4 F_(2^(4))\mathbf{F}_{2^4}F24 by F 2 [ x ] / ( f ( x ) ) F 2 [ x ] / ( f ( x ) ) F_(2)[x]//(f(x))\mathbf{F}_2[x] /(f(x))F2[x]/(f(x)). Let us write γ = x + ( f ( x ) ) γ = x + ( f ( x ) ) gamma=x+(f(x))\gamma=x+(f(x))γ=x+(f(x)). The table of values is given below:
i i iii γ i γ i gamma ^(i)\gamma^iγi Vector i i iii γ i γ i gamma ^(i)\gamma^iγi Vector
0 1 ( 0 , 0 , 0 , 1 ) ( 0 , 0 , 0 , 1 ) (0,0,0,1)(0,0,0,1)(0,0,0,1) 8 γ 2 + 1 γ 2 + 1 gamma^(2)+1\gamma^2+1γ2+1 ( 0 , 1 , 0 , 1 ) ( 0 , 1 , 0 , 1 ) (0,1,0,1)(0,1,0,1)(0,1,0,1)
1 γ γ gamma\gammaγ ( 0 , 0 , 1 , 0 ) ( 0 , 0 , 1 , 0 ) (0,0,1,0)(0,0,1,0)(0,0,1,0) 9 γ 3 + γ γ 3 + γ gamma^(3)+gamma\gamma^3+\gammaγ3+γ ( 1 , 0 , 1 , 0 ) ( 1 , 0 , 1 , 0 ) (1,0,1,0)(1,0,1,0)(1,0,1,0)
2 γ 2 γ 2 gamma^(2)\gamma^2γ2 ( 0 , 1 , 0 , 0 ) ( 0 , 1 , 0 , 0 ) (0,1,0,0)(0,1,0,0)(0,1,0,0) 10 γ 2 + γ + 1 γ 2 + γ + 1 gamma^(2)+gamma+1\gamma^2+\gamma+1γ2+γ+1 ( 0 , 1 , 1 , 1 ) ( 0 , 1 , 1 , 1 ) (0,1,1,1)(0,1,1,1)(0,1,1,1)
3 γ 3 γ 3 gamma^(3)\gamma^3γ3 ( 1 , 0 , 0 , 0 ) ( 1 , 0 , 0 , 0 ) (1,0,0,0)(1,0,0,0)(1,0,0,0) 11 γ 3 + γ 2 + γ γ 3 + γ 2 + γ gamma^(3)+gamma^(2)+gamma\gamma^3+\gamma^2+\gammaγ3+γ2+γ ( 1 , 1 , 1 , 0 ) ( 1 , 1 , 1 , 0 ) (1,1,1,0)(1,1,1,0)(1,1,1,0)
4 γ + 1 γ + 1 gamma+1\gamma+1γ+1 ( 0 , 0 , 1 , 1 ) ( 0 , 0 , 1 , 1 ) (0,0,1,1)(0,0,1,1)(0,0,1,1) 12 γ 3 + γ 2 + γ + 1 γ 3 + γ 2 + γ + 1 gamma^(3)+gamma^(2)+gamma+1\gamma^3+\gamma^2+\gamma+1γ3+γ2+γ+1 ( 1 , 1 , 1 , 1 ) ( 1 , 1 , 1 , 1 ) (1,1,1,1)(1,1,1,1)(1,1,1,1)
5 γ 2 + γ γ 2 + γ gamma^(2)+gamma\gamma^2+\gammaγ2+γ ( 0 , 1 , 1 , 0 ) ( 0 , 1 , 1 , 0 ) (0,1,1,0)(0,1,1,0)(0,1,1,0) 13 γ 3 + γ 2 + 1 γ 3 + γ 2 + 1 gamma^(3)+gamma^(2)+1\gamma^3+\gamma^2+1γ3+γ2+1 ( 1 , 1 , 0 , 1 ) ( 1 , 1 , 0 , 1 ) (1,1,0,1)(1,1,0,1)(1,1,0,1)
6 γ 3 + γ 2 γ 3 + γ 2 gamma^(3)+gamma^(2)\gamma^3+\gamma^2γ3+γ2 ( 1 , 1 , 0 , 0 ) ( 1 , 1 , 0 , 0 ) (1,1,0,0)(1,1,0,0)(1,1,0,0) 14 γ 3 + 1 γ 3 + 1 gamma^(3)+1\gamma^3+1γ3+1 ( 1 , 0 , 0 , 1 ) ( 1 , 0 , 0 , 1 ) (1,0,0,1)(1,0,0,1)(1,0,0,1)
7 γ 3 + γ + 1 γ 3 + γ + 1 gamma^(3)+gamma+1\gamma^3+\gamma+1γ3+γ+1 ( 1 , 0 , 1 , 1 ) ( 1 , 0 , 1 , 1 ) (1,0,1,1)(1,0,1,1)(1,0,1,1)
i gamma ^(i) Vector i gamma ^(i) Vector 0 1 (0,0,0,1) 8 gamma^(2)+1 (0,1,0,1) 1 gamma (0,0,1,0) 9 gamma^(3)+gamma (1,0,1,0) 2 gamma^(2) (0,1,0,0) 10 gamma^(2)+gamma+1 (0,1,1,1) 3 gamma^(3) (1,0,0,0) 11 gamma^(3)+gamma^(2)+gamma (1,1,1,0) 4 gamma+1 (0,0,1,1) 12 gamma^(3)+gamma^(2)+gamma+1 (1,1,1,1) 5 gamma^(2)+gamma (0,1,1,0) 13 gamma^(3)+gamma^(2)+1 (1,1,0,1) 6 gamma^(3)+gamma^(2) (1,1,0,0) 14 gamma^(3)+1 (1,0,0,1) 7 gamma^(3)+gamma+1 (1,0,1,1) | $i$ | $\gamma^i$ | Vector | $i$ | $\gamma^i$ | Vector | | :— | :— | :— | :— | :— | :— | | 0 | 1 | $(0,0,0,1)$ | 8 | $\gamma^2+1$ | $(0,1,0,1)$ | | 1 | $\gamma$ | $(0,0,1,0)$ | 9 | $\gamma^3+\gamma$ | $(1,0,1,0)$ | | 2 | $\gamma^2$ | $(0,1,0,0)$ | 10 | $\gamma^2+\gamma+1$ | $(0,1,1,1)$ | | 3 | $\gamma^3$ | $(1,0,0,0)$ | 11 | $\gamma^3+\gamma^2+\gamma$ | $(1,1,1,0)$ | | 4 | $\gamma+1$ | $(0,0,1,1)$ | 12 | $\gamma^3+\gamma^2+\gamma+1$ | $(1,1,1,1)$ | | 5 | $\gamma^2+\gamma$ | $(0,1,1,0)$ | 13 | $\gamma^3+\gamma^2+1$ | $(1,1,0,1)$ | | 6 | $\gamma^3+\gamma^2$ | $(1,1,0,0)$ | 14 | $\gamma^3+1$ | $(1,0,0,1)$ | | 7 | $\gamma^3+\gamma+1$ | $(1,0,1,1)$ | | | |
i) Prepare logarithm and antilogarithm tables as given in page 23 of block 1.
ii) Compute ( γ 4 + γ 2 ) + ( γ 3 + γ + 1 ) ( 1 + γ 2 + γ 4 ) ( 1 + γ 3 ) γ 4 + γ 2 + γ 3 + γ + 1 1 + γ 2 + γ 4 1 + γ 3 ((gamma^(4)+gamma^(2))+(gamma^(3)+gamma+1))/((1+gamma^(2)+gamma^(4))(1+gamma^(3)))\frac{\left(\gamma^4+\gamma^2\right)+\left(\gamma^3+\gamma+1\right)}{\left(1+\gamma^2+\gamma^4\right)\left(1+\gamma^3\right)}(γ4+γ2)+(γ3+γ+1)(1+γ2+γ4)(1+γ3) and γ 2 ( γ 2 + γ + 1 ) ( γ 3 + γ 2 ) ( 1 + γ 6 ) γ 2 γ 2 + γ + 1 γ 3 + γ 2 1 + γ 6 (gamma^(2)(gamma^(2)+gamma+1))/((gamma^(3)+gamma^(2))(1+gamma^(6)))\frac{\gamma^2\left(\gamma^2+\gamma+1\right)}{\left(\gamma^3+\gamma^2\right)\left(1+\gamma^6\right)}γ2(γ2+γ+1)(γ3+γ2)(1+γ6) using the logarithm and antilogarithm tables.
  1. a) Decrypt each of the following cipher texts:
    i) Text: "CBBGYAEBBFZCFEPXYAEBB", encrypted with affine cipher with key ( 7 , 2 ) ( 7 , 2 ) (7,2)(7,2)(7,2).
    ii) Text:"KSTYZKESLNZUV", encrypted with Vigenère cipher with key "RESULT".
    b) Another version of the columnar transposition cipher is the cipher using a key word. In this cipher, we encrypt as follows: Given a key word, we remove all the duplicate characters in the key word. For example, if the key word is ‘SECRET’, we remove the second ‘E’ and use ‘SECRT’ as the key word. To encrypt, we form a table as follows: In the first row, we write down the key word. In the following rows, we write the plaintext. Suppose we want to encrypt the text ‘ATTACKATDAWN’. We make a table as follows:
S S S\mathbf{S}S E E E\mathbf{E}E C C C\mathbf{C}C R R R\mathbf{R}R T T T\mathbf{T}T
A T T A C
K A T D A
W N X X X
S E C R T A T T A C K A T D A W N X X X| $\mathbf{S}$ | $\mathbf{E}$ | $\mathbf{C}$ | $\mathbf{R}$ | $\mathbf{T}$ | | :—: | :—: | :—: | :—: | :—: | | A | T | T | A | C | | K | A | T | D | A | | W | N | X | X | X |
Then we read off the columns in alphabetical order. We first read the column under ‘ C ‘, followed by the columns under ‘ E E EEE ‘, ‘ R R RRR ‘, ‘ S S SSS ‘ and ‘ T T TTT ‘. We get the cipher text TTX TAN ADX AKW CAX. To decrypt, we reverse the process. Note that, since we know the length of the keyword, we can find the length of the columns by dividing the length of the message by the length of the keyword.
Given the ciphertext ‘HNDWUEOESSRORUTXLARFASUXTINOOGFNEGASTORX’ and the key word ‘LANCE’, find the plaintext.
  1. a) Find the inverse of 13 ( mod 51 ) 13 ( mod 51 ) 13(mod 51)13(\bmod 51)13(mod51) using extended euclidean algorithm.
    b) Use Miller-Rabin test to check whether 75521 is a strong pseuodprime to the base 2 .
  2. a) In this exercise, we introduce you to Hill cipher. In this cipher, we convert our message to numbers, just as in affine cipher. However, instead of encrypting character by character, we encrypt pairs of characters by multiplying them with an invertible matrix with co-efficients in Z 26 Z 26 Z_(26)\mathbf{Z}_{26}Z26.
    Here is an example: Suppose we want to ENCRYPT "ALLISWELL". Since we require the plaintext to have even number of characters, we pad the message with the character ‘ X ‘. We break up the message into pairs of characters AL, LI, SW, EL and LX. We convert each pair of characters into a pair elements in Z 26 Z 26 Z_(26)\mathbf{Z}_{26}Z26 as follows:
A L A L ALA LAL ( 0 , 1 ) ( 0 ¯ , 1 ¯ ) ( bar(0), bar(1))(\overline{0}, \overline{1})(0,1)
L I L I LIL ILI ( 11 , 8 ) ( 11 ¯ , 8 ¯ ) ( bar(11), bar(8))(\overline{11}, \overline{8})(11,8)
S W S W SWS WSW ( 18 , 22 ) ( 18 ¯ , 22 ¯ ) ( bar(18), bar(22))(\overline{18}, \overline{22})(18,22)
E L E L ELE LEL ( 4 , 1 ) ( 4 ¯ , 1 ¯ ) ( bar(4), bar(1))(\overline{4}, \overline{1})(4,1)
L X L X LXL XLX ( 11 , 23 ) ( 11 ¯ , 23 ¯ ) ( bar(11), bar(23))(\overline{11}, \overline{23})(11,23)
AL ( bar(0), bar(1)) LI ( bar(11), bar(8)) SW ( bar(18), bar(22)) EL ( bar(4), bar(1)) LX ( bar(11), bar(23))| $A L$ | $(\overline{0}, \overline{1})$ | | :— | :— | | $L I$ | $(\overline{11}, \overline{8})$ | | $S W$ | $(\overline{18}, \overline{22})$ | | $E L$ | $(\overline{4}, \overline{1})$ | | $L X$ | $(\overline{11}, \overline{23})$ |
Next, we choose an inveritble 2 × 2 2 × 2 2xx22 \times 22×2 matrix with coefficients in Z 26 Z 26 Z_(26)\mathbf{Z}_{26}Z26, for example, A = [ 3 1 7 1 4 ] A = 3 ¯ 1 ¯ 7 ¯ 1 4 A=[[ bar(3), bar(1)],[ bar(7),(1)/(4)]]A=\left[\begin{array}{ll}\overline{3} & \overline{1} \\ \overline{7} & \frac{1}{4}\end{array}\right]A=[31714]. This matrix has determinant 3 4 7 1 = 5 3 ¯ 4 ¯ 7 ¯ 1 ¯ = 5 ¯ bar(3)* bar(4)- bar(7)* bar(1)= bar(5)\overline{3} \cdot \overline{4}-\overline{7} \cdot \overline{1}=\overline{5}3471=5 and 5 5 ¯ bar(5)\overline{5}5 is a unit in Z 26 Z 26 Z_(26)Z_{26}Z26 with inverse 21 21 ¯ bar(21)\overline{21}21. We write each pair of elements in Z 26 Z 26 Z_(26)Z_{26}Z26 as a column vector and multiply it by A A AAA :
We then convert each pair of numbers to a pair of characters and write them down. In this example, we get the cipher text "LSPFYGXUEN" corresponding to the plain text "ALLWELL".
To decrypt, we convert pairs of characters to pairs of numbers and multiply by A 1 = 5 1 [ 4 1 7 3 ] = 21 [ 4 7 1 3 ] = [ 5 9 11 ] A 1 = 5 ¯ 1 4 ¯ 1 ¯ 7 ¯ 3 ¯ = 21 ¯ 4 7 1 ¯ 3 ¯ = 5 ¯ 9 11 ¯ A^(-1)= bar(5)^(-1)[[ bar(4), bar(-1)],[ bar(-7), bar(3)]]= bar(21)[[(4)/(-7), bar(-1)],[ bar(3)]]=[[( bar(5))/(9), bar(11)]]A^{-1}=\overline{5}^{-1}\left[\begin{array}{cc}\overline{4} & \overline{-1} \\ \overline{-7} & \overline{3}\end{array}\right]=\overline{21}\left[\begin{array}{cc}\frac{4}{-7} & \overline{-1} \\ \overline{3}\end{array}\right]=\left[\begin{array}{cc}\frac{\overline{5}}{9} & \overline{11}\end{array}\right]A1=51[4173]=21[4713]=[5911] and we have
Decrypt the text "TWDXHUJLUENN" which was encrypted using the Hill’s cipher with the matrix [ 3 1 0 9 ] 3 ¯ 1 ¯ 0 ¯ 9 ¯ [[ bar(3), bar(1)],[ bar(0), bar(9)]]\left[\begin{array}{cc}\overline{3} & \overline{1} \\ \overline{0} & \overline{9}\end{array}\right][3109] as the encryption matrix.
5) a) Decrypt the ciphertext 101000111001 which was encrypted with the Toy block cipher once using the key 101010010. Show all the steps.
b) A 64 bit key for the DES is given below
11000111 10000101 11110111 11000001 11111011 10101011 10011101 10010001 11000111 10000101 11110111 11000001 11111011 10101011 10011101 10010001 {:[11000111,10000101],[11110111,11000001],[11111011,10101011],[10011101,10010001]:}\begin{array}{ll} 11000111 & 10000101 \\ 11110111 & 11000001 \\ 11111011 & 10101011 \\ 10011101 & 10010001 \end{array}1100011110000101111101111100000111111011101010111001110110010001
i) Check whether the key is error free using the parity bits.
ii) Find the keys for the second round.
6) a) Considering the bytes 10001001 and 10101010 as elements of the field F 2 [ X ] / g ( X ) F 2 [ X ] / g ( X ) F_(2)[X]//(:g(X):)\mathbf{F}_2[X] /\langle g(X)\rangleF2[X]/g(X), where g ( X ) g ( X ) g(X)g(X)g(X) is the polynomial X 8 + X 4 + X 3 + X + 1 X 8 + X 4 + X 3 + X + 1 X^(8)+X^(4)+X^(3)+X+1X^8+X^4+X^3+X+1X8+X4+X3+X+1, find their product and quotient.
b) Find a recurrence that generates the sequence 110110110110110 .
7) a) Apply the frequency test, serial test and autocorrelation test to the following sequence at level of significance α = 0.05 α = 0.05 alpha=0.05\alpha=0.05α=0.05 :
011001110000110010011100 .
b) Apply poker test to the following sequence with level of significane α = 0.05 α = 0.05 alpha=0.05\alpha=0.05α=0.05.
1001101000010000101111011
01110100101101100100110 .
c) Apply runs test to the following sequence:
1001101000010000101111011
0111010010110110010011010
0110011100001100100111000
1100001101010111101001110
0010001111000001101010010
1000110100000110100101101
1110001001
8) a) Decrypt the message c = 23 c = 23 c=23c=23c=23 that was encrypted using RSA algorithm with e = 43 e = 43 e=43e=43e=43 and n = 77 n = 77 n=77n=77n=77.
b) i) Bob uses ElGamal cyrptosystem with parameters p = 47 , g = 5 p = 47 , g = 5 p=47,g=5p=47, g=5p=47,g=5 and the secret value x = 3 x = 3 x=3x=3x=3. What values will he make public?
ii) Alice wants to send Bob the message M = 15 M = 15 M=15\mathscr{M}=15M=15. She chooses k = 5 k = 5 k=5k=5k=5. How will she compute the cipher text? What information does she send to Bob?
iii) Explain how Bob will decrypt the message.
  1. a) Solve the discrete logarithm problem 5 x 22 ( mod 47 ) 5 x 22 ( mod 47 ) 5^(x)-=22(mod 47)5^x \equiv 22(\bmod 47)5x22(mod47) using Baby-Step, Giant-Step algorithm.
    b) Alice wants to use the ElGamal digital signature scheme with public parameters p = 47 , α = 2 p = 47 , α = 2 p=47,alpha=2p=47, \alpha=2p=47,α=2, secret value a = 7 a = 7 a=7a=7a=7 and β = 34 β = 34 beta=34\beta=34β=34. She wants to sign the message M = 20 M = 20 M=20\mathscr{M}=20M=20 and send it to Bob. She chooses k = 5 k = 5 k=5k=5k=5 as the secret value. Explain the procedure that Alice will use for computing the signature of the message. What information will she send Bob?
    c) Alice wants to use the Digital Signature algorithm for signing messages. She chooses p = 83 p = 83 p=83p=83p=83, q = 41 , g = 2 q = 41 , g = 2 q=41,g=2q=41, g=2q=41,g=2 and a = 3 a = 3 a=3a=3a=3. Alice wants to sign the message M = 20 M = 20 M=20\mathscr{M}=20M=20. She chooses the secret value k = 8 k = 8 k=8k=8k=8. Explain the procedure that Alice will use for computing the signature. What information will she send Bob?

Expert Answer


Question:-1(a)

Let f ( x ) = x 3 x 1 Z 5 [ x ] f ( x ) = x 3 x 1 Z 5 [ x ] f(x)=x^(3)-x-1inZ_(5)[x]f(x)=x^3-x-1 \in \mathbf{Z}_5[x]f(x)=x3x1Z5[x]. Find the product of x 2 + 2 x + 1 + ( f ( x ) ) x 2 + 2 x + 1 + ( f ( x ) ) x^(2)+2x+1+(f(x))x^2+2 x+1+(f(x))x2+2x+1+(f(x)) and x 2 + 3 x 1 + ( f ( x ) ) x 2 + 3 x 1 + ( f ( x ) ) x^(2)+3x-1+(f(x))x^2+3 x-1+(f(x))x2+3x1+(f(x)) using the algorithm in page 23, block 1. You should show all the steps as in example 11, page 22, block 1.

Answer:

Step 1: Express the polynomials

We have:
c = x 2 + 2 x + 1 + ( f ( x ) ) and d = x 2 + 3 x 1 + ( f ( x ) ) c = x 2 + 2 x + 1 + ( f ( x ) ) and d = x 2 + 3 x 1 + ( f ( x ) ) c=x^(2)+2x+1+(f(x))quad”and”quad d=x^(2)+3x-1+(f(x))c = x^2 + 2x + 1 + (f(x)) \quad \text{and} \quad d = x^2 + 3x – 1 + (f(x))c=x2+2x+1+(f(x))andd=x2+3x1+(f(x))
where f ( x ) = x 3 x 1 f ( x ) = x 3 x 1 f(x)=x^(3)-x-1f(x) = x^3 – x – 1f(x)=x3x1
In Z 5 [ x ] Z 5 [ x ] Z_(5)[x]\mathbb{Z}_5[x]Z5[x], the polynomial coefficients are represented modulo 5.

Step 2: Represent the polynomials as arrays

  • The polynomial c c ccc can be represented by the array A A AAA:
A = 1 2 1 A = 1 2 1 A={:[1,2,1]:}A = \begin{array}{|l|l|l|} \hline 1 & 2 & 1 \\ \hline \end{array}A=121
where A [ 0 ] = 1 A [ 0 ] = 1 A[0]=1A[0] = 1A[0]=1, A [ 1 ] = 2 A [ 1 ] = 2 A[1]=2A[1] = 2A[1]=2, and A [ 2 ] = 1 A [ 2 ] = 1 A[2]=1A[2] = 1A[2]=1 are the coefficients of 1 1 111, x x xxx, and x 2 x 2 x^(2)x^2x2, respectively.
  • The polynomial d d ddd can be represented by the array B B BBB:
B = 4 3 1 B = 4 3 1 B={:[4,3,1]:}B = \begin{array}{|l|l|l|} \hline 4 & 3 & 1 \\ \hline \end{array}B=431
where B [ 0 ] = 4 B [ 0 ] = 4 B[0]=4B[0] = 4B[0]=4 (since 1 4 mod 5 1 4 mod 5 -1-=4mod5-1 \equiv 4 \mod 514mod5), B [ 1 ] = 3 B [ 1 ] = 3 B[1]=3B[1] = 3B[1]=3, and B [ 2 ] = 1 B [ 2 ] = 1 B[2]=1B[2] = 1B[2]=1 are the coefficients of 1 1 -1-11, x x xxx, and x 2 x 2 x^(2)x^2x2, respectively.

Step 3: Initialize the product array

We are multiplying two degree-2 polynomials, so the resulting polynomial will have degree 4. We initialize the product array P P PPP of size 5 with all entries as 0:
P = 0 0 0 0 0 P = 0 0 0 0 0 P={:[0,0,0,0,0]:}P = \begin{array}{|l|l|l|l|l|} \hline 0 & 0 & 0 & 0 & 0 \\ \hline \end{array}P=00000

Step 4: Multiply the polynomials

We perform the polynomial multiplication by computing the coefficients of each power of x x xxx in the resulting polynomial.

Term 1: Multiply B [ 0 ] × A B [ 0 ] × A B[0]xx AB[0] \times AB[0]×A

First, we multiply the constant term B [ 0 ] = 4 B [ 0 ] = 4 B[0]=4B[0] = 4B[0]=4 by the entire polynomial A A AAA. This gives:
B [ 0 ] × A = 4 × ( x 2 + 2 x + 1 ) = 4 x 2 + 8 x + 4 = 4 x 2 + 3 x + 4 ( mod 5 ) B [ 0 ] × A = 4 × ( x 2 + 2 x + 1 ) = 4 x 2 + 8 x + 4 = 4 x 2 + 3 x + 4 ( mod 5 ) B[0]xx A=4xx(x^(2)+2x+1)=4x^(2)+8x+4=4x^(2)+3x+4quad(“mod “5)B[0] \times A = 4 \times (x^2 + 2x + 1) = 4x^2 + 8x + 4 = 4x^2 + 3x + 4 \quad (\text{mod } 5)B[0]×A=4×(x2+2x+1)=4x2+8x+4=4x2+3x+4(mod 5)
This corresponds to the array:
4 3 4 0 0 4 3 4 0 0 {:[4,3,4,0,0]:}\begin{array}{|l|l|l|l|l|} \hline 4 & 3 & 4 & 0 & 0 \\ \hline \end{array}43400
Add this to P P PPP:
P = 4 3 4 0 0 P = 4 3 4 0 0 P={:[4,3,4,0,0]:}P = \begin{array}{|l|l|l|l|l|} \hline 4 & 3 & 4 & 0 & 0 \\ \hline \end{array}P=43400

Term 2: Multiply B [ 1 ] × x A B [ 1 ] × x A B[1]xx xAB[1] \times xAB[1]×xA

Next, we multiply the x x xxx-term B [ 1 ] = 3 B [ 1 ] = 3 B[1]=3B[1] = 3B[1]=3 by A A AAA, shifted by 1 position:
B [ 1 ] × A = 3 × ( x 2 + 2 x + 1 ) = 3 x 2 + 6 x + 3 = 3 x 2 + x + 3 ( mod 5 ) B [ 1 ] × A = 3 × ( x 2 + 2 x + 1 ) = 3 x 2 + 6 x + 3 = 3 x 2 + x + 3 ( mod 5 ) B[1]xx A=3xx(x^(2)+2x+1)=3x^(2)+6x+3=3x^(2)+x+3quad(“mod “5)B[1] \times A = 3 \times (x^2 + 2x + 1) = 3x^2 + 6x + 3 = 3x^2 + x + 3 \quad (\text{mod } 5)B[1]×A=3×(x2+2x+1)=3x2+6x+3=3x2+x+3(mod 5)
Shift this result by 1 position:
0 3 1 3 0 0 3 1 3 0 {:[0,3,1,3,0]:}\begin{array}{|l|l|l|l|l|} \hline 0 & 3 & 1 & 3 & 0 \\ \hline \end{array}03130
Add this to P P PPP:
P = 4 1 0 3 0 P = 4 1 0 3 0 P={:[4,1,0,3,0]:}P = \begin{array}{|l|l|l|l|l|} \hline 4 & 1 & 0 & 3 & 0 \\ \hline \end{array}P=41030

Term 3: Multiply B [ 2 ] × x 2 A B [ 2 ] × x 2 A B[2]xxx^(2)AB[2] \times x^2 AB[2]×x2A

Finally, we multiply the x 2 x 2 x^(2)x^2x2-term B [ 2 ] = 1 B [ 2 ] = 1 B[2]=1B[2] = 1B[2]=1 by A A AAA, shifted by 2 positions:
B [ 2 ] × A = 1 × ( x 2 + 2 x + 1 ) = x 2 + 2 x + 1 B [ 2 ] × A = 1 × ( x 2 + 2 x + 1 ) = x 2 + 2 x + 1 B[2]xx A=1xx(x^(2)+2x+1)=x^(2)+2x+1B[2] \times A = 1 \times (x^2 + 2x + 1) = x^2 + 2x + 1B[2]×A=1×(x2+2x+1)=x2+2x+1
Shift this result by 2 positions:
0 0 1 2 1 0 0 1 2 1 {:[0,0,1,2,1]:}\begin{array}{|l|l|l|l|l|} \hline 0 & 0 & 1 & 2 & 1 \\ \hline \end{array}00121
Add this to P P PPP:
P = 4 1 1 0 1 P = 4 1 1 0 1 P={:[4,1,1,0,1]:}P = \begin{array}{|l|l|l|l|l|} \hline 4 & 1 & 1 & 0 & 1 \\ \hline \end{array}P=41101

Step 5: Final result

The resulting array P P PPP corresponds to the polynomial:
P ( x ) = x 4 + x 2 + x + 4 P ( x ) = x 4 + x 2 + x + 4 P(x)=x^(4)+x^(2)+x+4P(x) = x^4 + x^2 + x + 4P(x)=x4+x2+x+4
Thus, the product of c c ccc and d d ddd in Z 5 [ x ] Z 5 [ x ] Z_(5)[x]\mathbb{Z}_5[x]Z5[x] is:
x 4 + x 2 + x + 4 x 4 + x 2 + x + 4 x^(4)+x^(2)+x+4x^4 + x^2 + x + 4x4+x2+x+4

Question:-1(b)

Let f ( x ) = x 4 + x + 1 F 2 [ x ] f ( x ) = x 4 + x + 1 F 2 [ x ] f(x)=x^(4)+x+1inF_(2)[x]f(x)=x^4+x+1 \in \mathbf{F}_2[x]f(x)=x4+x+1F2[x]. We represent the field F 2 4 F 2 4 F_(2^(4))\mathbf{F}_{2^4}F24 by F 2 [ x ] / ( f ( x ) ) F 2 [ x ] / ( f ( x ) ) F_(2)[x]//(f(x))\mathbf{F}_2[x] /(f(x))F2[x]/(f(x)). Let us write γ = x + ( f ( x ) ) γ = x + ( f ( x ) ) gamma=x+(f(x))\gamma=x+(f(x))γ=x+(f(x)). The table of values is given below:

i γ i V e c t o r i γ i V e c t o r 0 1 ( 0 , 0 , 0 , 1 ) 8 γ 2 + 1 ( 0 , 1 , 0 , 1 ) 1 γ ( 0 , 0 , 1 , 0 ) 9 γ 3 + γ ( 1 , 0 , 1 , 0 ) 2 γ 2 ( 0 , 1 , 0 , 0 ) 10 γ 2 + γ + 1 ( 0 , 1 , 1 , 1 ) 3 γ 3 ( 1 , 0 , 0 , 0 ) 11 γ 3 + γ 2 + γ ( 1 , 1 , 1 , 0 ) 4 γ + 1 ( 0 , 0 , 1 , 1 ) 12 γ 3 + γ 2 + γ + 1 ( 1 , 1 , 1 , 1 ) 5 γ 2 + γ ( 0 , 1 , 1 , 0 ) 13 γ 3 + γ 2 + 1 ( 1 , 1 , 0 , 1 ) 6 γ 3 + γ 2 ( 1 , 1 , 0 , 0 ) 14 γ 3 + 1 ( 1 , 0 , 0 , 1 ) 7 γ 3 + γ + 1 ( 1 , 0 , 1 , 1 ) i γ i V e c t o r i γ i V e c t o r 0 1 ( 0 , 0 , 0 , 1 ) 8 γ 2 + 1 ( 0 , 1 , 0 , 1 ) 1 γ ( 0 , 0 , 1 , 0 ) 9 γ 3 + γ ( 1 , 0 , 1 , 0 ) 2 γ 2 ( 0 , 1 , 0 , 0 ) 10 γ 2 + γ + 1 ( 0 , 1 , 1 , 1 ) 3 γ 3 ( 1 , 0 , 0 , 0 ) 11 γ 3 + γ 2 + γ ( 1 , 1 , 1 , 0 ) 4 γ + 1 ( 0 , 0 , 1 , 1 ) 12 γ 3 + γ 2 + γ + 1 ( 1 , 1 , 1 , 1 ) 5 γ 2 + γ ( 0 , 1 , 1 , 0 ) 13 γ 3 + γ 2 + 1 ( 1 , 1 , 0 , 1 ) 6 γ 3 + γ 2 ( 1 , 1 , 0 , 0 ) 14 γ 3 + 1 ( 1 , 0 , 0 , 1 ) 7 γ 3 + γ + 1 ( 1 , 0 , 1 , 1 ) {:[i,gamma ^(i),Vector,i,gamma ^(i),Vector],[0,1,(0″,”0″,”0″,”1),8,gamma^(2)+1,(0″,”1″,”0″,”1)],[1,gamma,(0″,”0″,”1″,”0),9,gamma^(3)+gamma,(1″,”0″,”1″,”0)],[2,gamma^(2),(0″,”1″,”0″,”0),10,gamma^(2)+gamma+1,(0″,”1″,”1″,”1)],[3,gamma^(3),(1″,”0″,”0″,”0),11,gamma^(3)+gamma^(2)+gamma,(1″,”1″,”1″,”0)],[4,gamma+1,(0″,”0″,”1″,”1),12,gamma^(3)+gamma^(2)+gamma+1,(1″,”1″,”1″,”1)],[5,gamma^(2)+gamma,(0″,”1″,”1″,”0),13,gamma^(3)+gamma^(2)+1,(1″,”1″,”0″,”1)],[6,gamma^(3)+gamma^(2),(1″,”1″,”0″,”0),14,gamma^(3)+1,(1″,”0″,”0″,”1)],[7,gamma^(3)+gamma+1,(1″,”0″,”1″,”1),,,]:}\begin{array}{|l|l|l|l|l|l|} \hline i & \gamma^i & Vector & i & \gamma^i & Vector \\ \hline 0 & 1 & (0,0,0,1) & 8 & \gamma^2+1 & (0,1,0,1) \\ 1 & \gamma & (0,0,1,0) & 9 & \gamma^3+\gamma & (1,0,1,0) \\ 2 & \gamma^2 & (0,1,0,0) & 10 & \gamma^2+\gamma+1 & (0,1,1,1) \\ 3 & \gamma^3 & (1,0,0,0) & 11 & \gamma^3+\gamma^2+\gamma & (1,1,1,0) \\ 4 & \gamma+1 & (0,0,1,1) & 12 & \gamma^3+\gamma^2+\gamma+1 & (1,1,1,1) \\ 5 & \gamma^2+\gamma & (0,1,1,0) & 13 & \gamma^3+\gamma^2+1 & (1,1,0,1) \\ 6 & \gamma^3+\gamma^2 & (1,1,0,0) & 14 & \gamma^3+1 & (1,0,0,1) \\ 7 & \gamma^3+\gamma+1 & (1,0,1,1) & & & \\ \hline \end{array}iγiVectoriγiVector01(0,0,0,1)8γ2+1(0,1,0,1)1γ(0,0,1,0)9γ3+γ(1,0,1,0)2γ2(0,1,0,0)10γ2+γ+1(0,1,1,1)3γ3(1,0,0,0)11γ3+γ2+γ(1,1,1,0)4γ+1(0,0,1,1)12γ3+γ2+γ+1(1,1,1,1)5γ2+γ(0,1,1,0)13γ3+γ2+1(1,1,0,1)6γ3+γ2(1,1,0,0)14γ3+1(1,0,0,1)7γ3+γ+1(1,0,1,1)
i) Prepare logarithm and antilogarithm tables as given in page 23 of block 1.
ii) Compute ( γ 4 + γ 2 ) + ( γ 3 + γ + 1 ) ( 1 + γ 2 + γ 4 ) ( 1 + γ 3 ) γ 4 + γ 2 + γ 3 + γ + 1 1 + γ 2 + γ 4 1 + γ 3 ((gamma^(4)+gamma^(2))+(gamma^(3)+gamma+1))/((1+gamma^(2)+gamma^(4))(1+gamma^(3)))\frac{\left(\gamma^4+\gamma^2\right)+\left(\gamma^3+\gamma+1\right)}{\left(1+\gamma^2+\gamma^4\right)\left(1+\gamma^3\right)}(γ4+γ2)+(γ3+γ+1)(1+γ2+γ4)(1+γ3) and γ 2 ( γ 2 + γ + 1 ) ( γ 3 + γ 2 ) ( 1 + γ 6 ) γ 2 γ 2 + γ + 1 γ 3 + γ 2 1 + γ 6 (gamma^(2)(gamma^(2)+gamma+1))/((gamma^(3)+gamma^(2))(1+gamma^(6)))\frac{\gamma^2\left(\gamma^2+\gamma+1\right)}{\left(\gamma^3+\gamma^2\right)\left(1+\gamma^6\right)}γ2(γ2+γ+1)(γ3+γ2)(1+γ6) using the logarithm and antilogarithm tables.

Answer:

Part (i): Logarithm and Antilogarithm Tables

Given the values of powers of γ γ gamma\gammaγ and their corresponding vectors in F 2 4 F 2 4 F_(2^(4))\mathbb{F}_{2^4}F24, we can construct the logarithm and antilogarithm tables. Let’s first summarize the table provided in terms of powers of γ γ gamma\gammaγ and then create the logarithm and antilogarithm tables.

Powers of γ γ gamma\gammaγ:

γ 0 = 1 (Vector: ( 0 , 0 , 0 , 1 ) ) γ 1 = γ (Vector: ( 0 , 0 , 1 , 0 ) ) γ 2 = γ 2 (Vector: ( 0 , 1 , 0 , 0 ) ) γ 3 = γ 3 (Vector: ( 1 , 0 , 0 , 0 ) ) γ 4 = γ + 1 (Vector: ( 0 , 0 , 1 , 1 ) ) γ 5 = γ 2 + γ (Vector: ( 0 , 1 , 1 , 0 ) ) γ 6 = γ 3 + γ 2 (Vector: ( 1 , 1 , 0 , 0 ) ) γ 7 = γ 3 + γ + 1 (Vector: ( 1 , 0 , 1 , 1 ) ) γ 8 = γ 2 + 1 (Vector: ( 0 , 1 , 0 , 1 ) ) γ 9 = γ 3 + γ (Vector: ( 1 , 0 , 1 , 0 ) ) γ 10 = γ 2 + γ + 1 (Vector: ( 0 , 1 , 1 , 1 ) ) γ 11 = γ 3 + γ 2 + γ (Vector: ( 1 , 1 , 1 , 0 ) ) γ 12 = γ 3 + γ 2 + γ + 1 (Vector: ( 1 , 1 , 1 , 1 ) ) γ 13 = γ 3 + γ 2 + 1 (Vector: ( 1 , 1 , 0 , 1 ) ) γ 14 = γ 3 + 1 (Vector: ( 1 , 0 , 0 , 1 ) ) γ 0 = 1 (Vector: ( 0 , 0 , 0 , 1 ) ) γ 1 = γ (Vector: ( 0 , 0 , 1 , 0 ) ) γ 2 = γ 2 (Vector: ( 0 , 1 , 0 , 0 ) ) γ 3 = γ 3 (Vector: ( 1 , 0 , 0 , 0 ) ) γ 4 = γ + 1 (Vector: ( 0 , 0 , 1 , 1 ) ) γ 5 = γ 2 + γ (Vector: ( 0 , 1 , 1 , 0 ) ) γ 6 = γ 3 + γ 2 (Vector: ( 1 , 1 , 0 , 0 ) ) γ 7 = γ 3 + γ + 1 (Vector: ( 1 , 0 , 1 , 1 ) ) γ 8 = γ 2 + 1 (Vector: ( 0 , 1 , 0 , 1 ) ) γ 9 = γ 3 + γ (Vector: ( 1 , 0 , 1 , 0 ) ) γ 10 = γ 2 + γ + 1 (Vector: ( 0 , 1 , 1 , 1 ) ) γ 11 = γ 3 + γ 2 + γ (Vector: ( 1 , 1 , 1 , 0 ) ) γ 12 = γ 3 + γ 2 + γ + 1 (Vector: ( 1 , 1 , 1 , 1 ) ) γ 13 = γ 3 + γ 2 + 1 (Vector: ( 1 , 1 , 0 , 1 ) ) γ 14 = γ 3 + 1 (Vector: ( 1 , 0 , 0 , 1 ) ) {:[gamma^(0)=1(Vector: (0″,”0″,”0″,”1)”)”],[gamma^(1)=gamma(Vector: (0″,”0″,”1″,”0)”)”],[gamma^(2)=gamma^(2)(Vector: (0″,”1″,”0″,”0)”)”],[gamma^(3)=gamma^(3)(Vector: (1″,”0″,”0″,”0)”)”],[gamma^(4)=gamma+1(Vector: (0″,”0″,”1″,”1)”)”],[gamma^(5)=gamma^(2)+gamma(Vector: (0″,”1″,”1″,”0)”)”],[gamma^(6)=gamma^(3)+gamma^(2)(Vector: (1″,”1″,”0″,”0)”)”],[gamma^(7)=gamma^(3)+gamma+1(Vector: (1″,”0″,”1″,”1)”)”],[gamma^(8)=gamma^(2)+1(Vector: (0″,”1″,”0″,”1)”)”],[gamma^(9)=gamma^(3)+gamma(Vector: (1″,”0″,”1″,”0)”)”],[gamma^(10)=gamma^(2)+gamma+1(Vector: (0″,”1″,”1″,”1)”)”],[gamma^(11)=gamma^(3)+gamma^(2)+gamma(Vector: (1″,”1″,”1″,”0)”)”],[gamma^(12)=gamma^(3)+gamma^(2)+gamma+1(Vector: (1″,”1″,”1″,”1)”)”],[gamma^(13)=gamma^(3)+gamma^(2)+1(Vector: (1″,”1″,”0″,”1)”)”],[gamma^(14)=gamma^(3)+1(Vector: (1″,”0″,”0″,”1)”)”]:}\begin{aligned} \gamma^0 &= 1 & \text{(Vector: } (0, 0, 0, 1)\text{)} \\ \gamma^1 &= \gamma & \text{(Vector: } (0, 0, 1, 0)\text{)} \\ \gamma^2 &= \gamma^2 & \text{(Vector: } (0, 1, 0, 0)\text{)} \\ \gamma^3 &= \gamma^3 & \text{(Vector: } (1, 0, 0, 0)\text{)} \\ \gamma^4 &= \gamma + 1 & \text{(Vector: } (0, 0, 1, 1)\text{)} \\ \gamma^5 &= \gamma^2 + \gamma & \text{(Vector: } (0, 1, 1, 0)\text{)} \\ \gamma^6 &= \gamma^3 + \gamma^2 & \text{(Vector: } (1, 1, 0, 0)\text{)} \\ \gamma^7 &= \gamma^3 + \gamma + 1 & \text{(Vector: } (1, 0, 1, 1)\text{)} \\ \gamma^8 &= \gamma^2 + 1 & \text{(Vector: } (0, 1, 0, 1)\text{)} \\ \gamma^9 &= \gamma^3 + \gamma & \text{(Vector: } (1, 0, 1, 0)\text{)} \\ \gamma^{10} &= \gamma^2 + \gamma + 1 & \text{(Vector: } (0, 1, 1, 1)\text{)} \\ \gamma^{11} &= \gamma^3 + \gamma^2 + \gamma & \text{(Vector: } (1, 1, 1, 0)\text{)} \\ \gamma^{12} &= \gamma^3 + \gamma^2 + \gamma + 1 & \text{(Vector: } (1, 1, 1, 1)\text{)} \\ \gamma^{13} &= \gamma^3 + \gamma^2 + 1 & \text{(Vector: } (1, 1, 0, 1)\text{)} \\ \gamma^{14} &= \gamma^3 + 1 & \text{(Vector: } (1, 0, 0, 1)\text{)} \\ \end{aligned}γ0=1(Vector: (0,0,0,1))γ1=γ(Vector: (0,0,1,0))γ2=γ2(Vector: (0,1,0,0))γ3=γ3(Vector: (1,0,0,0))γ4=γ+1(Vector: (0,0,1,1))γ5=γ2+γ(Vector: (0,1,1,0))γ6=γ3+γ2(Vector: (1,1,0,0))γ7=γ3+γ+1(Vector: (1,0,1,1))γ8=γ2+1(Vector: (0,1,0,1))γ9=γ3+γ(Vector: (1,0,1,0))γ10=γ2+γ+1(Vector: (0,1,1,1))γ11=γ3+γ2+γ(Vector: (1,1,1,0))γ12=γ3+γ2+γ+1(Vector: (1,1,1,1))γ13=γ3+γ2+1(Vector: (1,1,0,1))γ14=γ3+1(Vector: (1,0,0,1))

Logarithm Table

In the logarithm table, each element of the field is written in terms of a power of γ γ gamma\gammaγ. The logarithm of an element is the exponent i i iii such that γ i γ i gamma ^(i)\gamma^iγi equals that element.
Element Logarithm (to base γ ) 1 0 γ 1 γ 2 2 γ 3 3 γ + 1 4 γ 2 + γ 5 γ 3 + γ 2 6 γ 3 + γ + 1 7 γ 2 + 1 8 γ 3 + γ 9 γ 2 + γ + 1 10 γ 3 + γ 2 + γ 11 γ 3 + γ 2 + γ + 1 12 γ 3 + γ 2 + 1 13 γ 3 + 1 14 Element Logarithm (to base γ ) 1 0 γ 1 γ 2 2 γ 3 3 γ + 1 4 γ 2 + γ 5 γ 3 + γ 2 6 γ 3 + γ + 1 7 γ 2 + 1 8 γ 3 + γ 9 γ 2 + γ + 1 10 γ 3 + γ 2 + γ 11 γ 3 + γ 2 + γ + 1 12 γ 3 + γ 2 + 1 13 γ 3 + 1 14 {:[“Element”,”Logarithm (to base “gamma”)”],[1,0],[gamma,1],[gamma^(2),2],[gamma^(3),3],[gamma+1,4],[gamma^(2)+gamma,5],[gamma^(3)+gamma^(2),6],[gamma^(3)+gamma+1,7],[gamma^(2)+1,8],[gamma^(3)+gamma,9],[gamma^(2)+gamma+1,10],[gamma^(3)+gamma^(2)+gamma,11],[gamma^(3)+gamma^(2)+gamma+1,12],[gamma^(3)+gamma^(2)+1,13],[gamma^(3)+1,14]:}\begin{array}{|c|c|} \hline \text{Element} & \text{Logarithm (to base } \gamma \text{)} \\ \hline 1 & 0 \\ \gamma & 1 \\ \gamma^2 & 2 \\ \gamma^3 & 3 \\ \gamma + 1 & 4 \\ \gamma^2 + \gamma & 5 \\ \gamma^3 + \gamma^2 & 6 \\ \gamma^3 + \gamma + 1 & 7 \\ \gamma^2 + 1 & 8 \\ \gamma^3 + \gamma & 9 \\ \gamma^2 + \gamma + 1 & 10 \\ \gamma^3 + \gamma^2 + \gamma & 11 \\ \gamma^3 + \gamma^2 + \gamma + 1 & 12 \\ \gamma^3 + \gamma^2 + 1 & 13 \\ \gamma^3 + 1 & 14 \\ \hline \end{array}ElementLogarithm (to base γ)10γ1γ22γ33γ+14γ2+γ5γ3+γ26γ3+γ+17γ2+18γ3+γ9γ2+γ+110γ3+γ2+γ11γ3+γ2+γ+112γ3+γ2+113γ3+114

Antilogarithm Table

In the antilogarithm table, for each logarithm i i iii, we provide the corresponding element γ i γ i gamma ^(i)\gamma^iγi.
Logarithm (to base γ ) Element 0 1 1 γ 2 γ 2 3 γ 3 4 γ + 1 5 γ 2 + γ 6 γ 3 + γ 2 7 γ 3 + γ + 1 8 γ 2 + 1 9 γ 3 + γ 10 γ 2 + γ + 1 11 γ 3 + γ 2 + γ 12 γ 3 + γ 2 + γ + 1 13 γ 3 + γ 2 + 1 14 γ 3 + 1 Logarithm (to base γ ) Element 0 1 1 γ 2 γ 2 3 γ 3 4 γ + 1 5 γ 2 + γ 6 γ 3 + γ 2 7 γ 3 + γ + 1 8 γ 2 + 1 9 γ 3 + γ 10 γ 2 + γ + 1 11 γ 3 + γ 2 + γ 12 γ 3 + γ 2 + γ + 1 13 γ 3 + γ 2 + 1 14 γ 3 + 1 {:[“Logarithm (to base “gamma”)”,”Element”],[0,1],[1,gamma],[2,gamma^(2)],[3,gamma^(3)],[4,gamma+1],[5,gamma^(2)+gamma],[6,gamma^(3)+gamma^(2)],[7,gamma^(3)+gamma+1],[8,gamma^(2)+1],[9,gamma^(3)+gamma],[10,gamma^(2)+gamma+1],[11,gamma^(3)+gamma^(2)+gamma],[12,gamma^(3)+gamma^(2)+gamma+1],[13,gamma^(3)+gamma^(2)+1],[14,gamma^(3)+1]:}\begin{array}{|c|c|} \hline \text{Logarithm (to base } \gamma \text{)} & \text{Element} \\ \hline 0 & 1 \\ 1 & \gamma \\ 2 & \gamma^2 \\ 3 & \gamma^3 \\ 4 & \gamma + 1 \\ 5 & \gamma^2 + \gamma \\ 6 & \gamma^3 + \gamma^2 \\ 7 & \gamma^3 + \gamma + 1 \\ 8 & \gamma^2 + 1 \\ 9 & \gamma^3 + \gamma \\ 10 & \gamma^2 + \gamma + 1 \\ 11 & \gamma^3 + \gamma^2 + \gamma \\ 12 & \gamma^3 + \gamma^2 + \gamma + 1 \\ 13 & \gamma^3 + \gamma^2 + 1 \\ 14 & \gamma^3 + 1 \\ \hline \end{array}Logarithm (to base γ)Element011γ2γ23γ34γ+15γ2+γ6γ3+γ27γ3+γ+18γ2+19γ3+γ10γ2+γ+111γ3+γ2+γ12γ3+γ2+γ+113γ3+γ2+114γ3+1

Part (ii): Computations using the logarithm and antilogarithm tables

Expression 1: ( γ 4 + γ 2 ) + ( γ 3 + γ + 1 ) ( 1 + γ 2 + γ 4 ) ( 1 + γ 3 ) ( γ 4 + γ 2 ) + ( γ 3 + γ + 1 ) ( 1 + γ 2 + γ 4 ) ( 1 + γ 3 ) ((gamma^(4)+gamma^(2))+(gamma^(3)+gamma+1))/((1+gamma^(2)+gamma^(4))(1+gamma^(3)))\frac{(\gamma^4 + \gamma^2) + (\gamma^3 + \gamma + 1)}{(1 + \gamma^2 + \gamma^4)(1 + \gamma^3)}(γ4+γ2)+(γ3+γ+1)(1+γ2+γ4)(1+γ3)

Step 1: Compute the numerator
The numerator is ( γ 4 + γ 2 ) + ( γ 3 + γ + 1 ) ( γ 4 + γ 2 ) + ( γ 3 + γ + 1 ) (gamma^(4)+gamma^(2))+(gamma^(3)+gamma+1)(\gamma^4 + \gamma^2) + (\gamma^3 + \gamma + 1)(γ4+γ2)+(γ3+γ+1). Using the logarithm table:
γ 4 + γ 2 = γ + 1 + γ 2 γ 4 + γ 2 = γ + 1 + γ 2 gamma^(4)+gamma^(2)=gamma+1+gamma^(2)\gamma^4 + \gamma^2 = \gamma + 1 + \gamma^2γ4+γ2=γ+1+γ2
γ 3 + γ + 1 = γ 3 + γ + 1 γ 3 + γ + 1 = γ 3 + γ + 1 gamma^(3)+gamma+1=gamma^(3)+gamma+1\gamma^3 + \gamma + 1 = \gamma^3 + \gamma + 1γ3+γ+1=γ3+γ+1
Adding them together (in F 2 F 2 F_(2)\mathbb{F}_2F2, so addition is XOR):
( γ + 1 + γ 2 ) + ( γ 3 + γ + 1 ) = γ 3 + γ 2 ( γ + 1 + γ 2 ) + ( γ 3 + γ + 1 ) = γ 3 + γ 2 (gamma+1+gamma^(2))+(gamma^(3)+gamma+1)=gamma^(3)+gamma^(2)(\gamma + 1 + \gamma^2) + (\gamma^3 + \gamma + 1) = \gamma^3 + \gamma^2(γ+1+γ2)+(γ3+γ+1)=γ3+γ2
Thus, the numerator is γ 3 + γ 2 γ 3 + γ 2 gamma^(3)+gamma^(2)\gamma^3 + \gamma^2γ3+γ2.
Step 2: Compute the denominator
The denominator is ( 1 + γ 2 + γ 4 ) ( 1 + γ 3 ) ( 1 + γ 2 + γ 4 ) ( 1 + γ 3 ) (1+gamma^(2)+gamma^(4))(1+gamma^(3))(1 + \gamma^2 + \gamma^4)(1 + \gamma^3)(1+γ2+γ4)(1+γ3). First, simplify 1 + γ 2 + γ 4 1 + γ 2 + γ 4 1+gamma^(2)+gamma^(4)1 + \gamma^2 + \gamma^41+γ2+γ4 using the logarithm table:
1 + γ 2 + γ 4 = 1 + γ 2 + ( γ + 1 ) = γ + γ 2 1 + γ 2 + γ 4 = 1 + γ 2 + ( γ + 1 ) = γ + γ 2 1+gamma^(2)+gamma^(4)=1+gamma^(2)+(gamma+1)=gamma+gamma^(2)1 + \gamma^2 + \gamma^4 = 1 + \gamma^2 + (\gamma + 1) = \gamma + \gamma^21+γ2+γ4=1+γ2+(γ+1)=γ+γ2
Now multiply this by 1 + γ 3 1 + γ 3 1+gamma^(3)1 + \gamma^31+γ3:
( γ + γ 2 ) ( 1 + γ 3 ) = γ + γ 3 + γ 2 + γ 5 ( γ + γ 2 ) ( 1 + γ 3 ) = γ + γ 3 + γ 2 + γ 5 (gamma+gamma^(2))(1+gamma^(3))=gamma+gamma^(3)+gamma^(2)+gamma^(5)(\gamma + \gamma^2)(1 + \gamma^3) = \gamma + \gamma^3 + \gamma^2 + \gamma^5(γ+γ2)(1+γ3)=γ+γ3+γ2+γ5
Since γ 5 = γ 2 + γ γ 5 = γ 2 + γ gamma^(5)=gamma^(2)+gamma\gamma^5 = \gamma^2 + \gammaγ5=γ2+γ (from the logarithm table), this simplifies to:
γ + γ 3 + γ 2 + ( γ 2 + γ ) = γ 3 γ + γ 3 + γ 2 + ( γ 2 + γ ) = γ 3 gamma+gamma^(3)+gamma^(2)+(gamma^(2)+gamma)=gamma^(3)\gamma + \gamma^3 + \gamma^2 + (\gamma^2 + \gamma) = \gamma^3γ+γ3+γ2+(γ2+γ)=γ3
Thus, the denominator is γ 3 γ 3 gamma^(3)\gamma^3γ3.
Step 3: Simplify the expression
The expression becomes:
γ 3 + γ 2 γ 3 = 1 + γ 2 γ 3 + γ 2 γ 3 = 1 + γ 2 (gamma^(3)+gamma^(2))/(gamma^(3))=1+gamma^(2)\frac{\gamma^3 + \gamma^2}{\gamma^3} = 1 + \gamma^2γ3+γ2γ3=1+γ2
Thus, the result is 1 + γ 2 1 + γ 2 1+gamma^(2)1 + \gamma^21+γ2, which corresponds to the vector ( 0 , 1 , 0 , 1 ) ( 0 , 1 , 0 , 1 ) (0,1,0,1)(0, 1, 0, 1)(0,1,0,1).

Expression 2: γ 2 ( γ 2 + γ + 1 ) ( γ 3 + γ 2 ) ( 1 + γ 6 ) γ 2 ( γ 2 + γ + 1 ) ( γ 3 + γ 2 ) ( 1 + γ 6 ) (gamma^(2)(gamma^(2)+gamma+1))/((gamma^(3)+gamma^(2))(1+gamma^(6)))\frac{\gamma^2(\gamma^2 + \gamma + 1)}{(\gamma^3 + \gamma^2)(1 + \gamma^6)}γ2(γ2+γ+1)(γ3+γ2)(1+γ6)

Step 1: Compute the numerator
The numerator is γ 2 ( γ 2 + γ + 1 ) γ 2 ( γ 2 + γ + 1 ) gamma^(2)(gamma^(2)+gamma+1)\gamma^2(\gamma^2 + \gamma + 1)γ2(γ2+γ+1). Using the logarithm table:
γ 2 + γ + 1 = (Vector corresponding to ( 0 , 1 , 1 , 1 ) ) γ 2 + γ + 1 = (Vector corresponding to ( 0 , 1 , 1 , 1 ) ) gamma^(2)+gamma+1=(Vector corresponding to (0,1,1,1)”)”\gamma^2 + \gamma + 1 = \text{(Vector corresponding to } (0, 1, 1, 1)\text{)}γ2+γ+1=(Vector corresponding to (0,1,1,1))
Multiplying by γ 2 γ 2 gamma^(2)\gamma^2γ2:
γ 2 ( γ 2 + γ + 1 ) = γ 4 + γ 3 + γ 2 γ 2 ( γ 2 + γ + 1 ) = γ 4 + γ 3 + γ 2 gamma^(2)(gamma^(2)+gamma+1)=gamma^(4)+gamma^(3)+gamma^(2)\gamma^2(\gamma^2 + \gamma + 1) = \gamma^4 + \gamma^3 + \gamma^2γ2(γ2+γ+1)=γ4+γ3+γ2
Since γ 4 = γ + 1 γ 4 = γ + 1 gamma^(4)=gamma+1\gamma^4 = \gamma + 1γ4=γ+1, this becomes:
( γ + 1 ) + γ 3 + γ 2 = γ 3 + γ 2 + γ + 1 ( γ + 1 ) + γ 3 + γ 2 = γ 3 + γ 2 + γ + 1 (gamma+1)+gamma^(3)+gamma^(2)=gamma^(3)+gamma^(2)+gamma+1(\gamma + 1) + \gamma^3 + \gamma^2 = \gamma^3 + \gamma^2 + \gamma + 1(γ+1)+γ3+γ2=γ3+γ2+γ+1
Thus, the numerator is γ 3 + γ 2 + γ + 1 γ 3 + γ 2 + γ + 1 gamma^(3)+gamma^(2)+gamma+1\gamma^3 + \gamma^2 + \gamma + 1γ3+γ2+γ+1.
Step 2: Compute the denominator
The denominator is ( (\gamma^3 + \gamma^2)(1 + \gamma
^6) ). First, simplify 1 + γ 6 1 + γ 6 1+gamma^(6)1 + \gamma^61+γ6:
γ 6 = γ 3 + γ 2 γ 6 = γ 3 + γ 2 gamma^(6)=gamma^(3)+gamma^(2)\gamma^6 = \gamma^3 + \gamma^2γ6=γ3+γ2
Thus:
1 + γ 6 = 1 + γ 3 + γ 2 1 + γ 6 = 1 + γ 3 + γ 2 1+gamma^(6)=1+gamma^(3)+gamma^(2)1 + \gamma^6 = 1 + \gamma^3 + \gamma^21+γ6=1+γ3+γ2
Now multiply this by γ 3 + γ 2 γ 3 + γ 2 gamma^(3)+gamma^(2)\gamma^3 + \gamma^2γ3+γ2:
( γ 3 + γ 2 ) ( 1 + γ 3 + γ 2 ) = γ 3 + γ 2 ( γ 3 + γ 2 ) ( 1 + γ 3 + γ 2 ) = γ 3 + γ 2 (gamma^(3)+gamma^(2))(1+gamma^(3)+gamma^(2))=gamma^(3)+gamma^(2)(\gamma^3 + \gamma^2)(1 + \gamma^3 + \gamma^2) = \gamma^3 + \gamma^2(γ3+γ2)(1+γ3+γ2)=γ3+γ2
Thus, the denominator is γ 3 + γ 2 γ 3 + γ 2 gamma^(3)+gamma^(2)\gamma^3 + \gamma^2γ3+γ2.
Step 3: Simplify the expression
The expression becomes:
γ 3 + γ 2 + γ + 1 γ 3 + γ 2 = γ + 1 γ 3 + γ 2 + γ + 1 γ 3 + γ 2 = γ + 1 (gamma^(3)+gamma^(2)+gamma+1)/(gamma^(3)+gamma^(2))=gamma+1\frac{\gamma^3 + \gamma^2 + \gamma + 1}{\gamma^3 + \gamma^2} = \gamma + 1γ3+γ2+γ+1γ3+γ2=γ+1
Thus, the result is γ + 1 γ + 1 gamma+1\gamma + 1γ+1, which corresponds to the vector ( 0 , 0 , 1 , 1 ) ( 0 , 0 , 1 , 1 ) (0,0,1,1)(0, 0, 1, 1)(0,0,1,1).

Question:-2(a)

Decrypt each of the following cipher texts:

i) Text: "CBBGYAEBBFZCFEPXYAEBB", encrypted with affine cipher with key ( 7 , 2 ) ( 7 , 2 ) (7,2)(7,2)(7,2).
ii) Text: "KSTYZKESLNZUV", encrypted with Vigenère cipher with key "RESULT".

Answer:

Let’s solve both cipher texts using their respective decryption methods.

Part (i): Affine Cipher Decryption

For the affine cipher, the encryption is performed using the function:
E ( x ) = ( a x + b ) mod m E ( x ) = ( a x + b ) mod m E(x)=(ax+b)quadmodmE(x) = (ax + b) \mod mE(x)=(ax+b)modm
where a = 7 a = 7 a=7a = 7a=7, b = 2 b = 2 b=2b = 2b=2, and m = 26 m = 26 m=26m = 26m=26 (since we’re working with the alphabet). The decryption formula for the affine cipher is:
D ( y ) = a 1 ( y b ) mod m D ( y ) = a 1 ( y b ) mod m D(y)=a^(-1)(y-b)quadmodmD(y) = a^{-1}(y – b) \mod mD(y)=a1(yb)modm
where a 1 a 1 a^(-1)a^{-1}a1 is the modular inverse of a a aaa modulo 26, and b = 2 b = 2 b=2b = 2b=2 is the key.

Step 1: Find the Modular Inverse of a = 7 a = 7 a=7a = 7a=7 Mod 26

We need to find a 1 a 1 a^(-1)a^{-1}a1 such that:
7 a 1 1 mod 26 7 a 1 1 mod 26 7*a^(-1)-=1quadmod267 \cdot a^{-1} \equiv 1 \mod 267a11mod26
Using the extended Euclidean algorithm, we can find that the modular inverse of 7 modulo 26 is 15. Thus:
a 1 = 15 a 1 = 15 a^(-1)=15a^{-1} = 15a1=15

Step 2: Decrypt the Cipher Text

The cipher text is "CBBGYAEBBFZCFEPXYAEBB". Convert the letters to numbers where A = 0 A = 0 A=0A = 0A=0, B = 1 B = 1 B=1B = 1B=1, C = 2 C = 2 C=2C = 2C=2, …, Z = 25 Z = 25 Z=25Z = 25Z=25. The numeric equivalent of the cipher text is:
CBBGYAEBBFZCFEPXYAEBB [ 2 , 1 , 1 , 6 , 24 , 0 , 4 , 1 , 1 , 5 , 25 , 2 , 5 , 4 , 15 , 23 , 24 , 0 , 4 , 1 , 1 ] CBBGYAEBBFZCFEPXYAEBB [ 2 , 1 , 1 , 6 , 24 , 0 , 4 , 1 , 1 , 5 , 25 , 2 , 5 , 4 , 15 , 23 , 24 , 0 , 4 , 1 , 1 ] “CBBGYAEBBFZCFEPXYAEBB”-=[2,1,1,6,24,0,4,1,1,5,25,2,5,4,15,23,24,0,4,1,1]\text{CBBGYAEBBFZCFEPXYAEBB} \equiv [2, 1, 1, 6, 24, 0, 4, 1, 1, 5, 25, 2, 5, 4, 15, 23, 24, 0, 4, 1, 1]CBBGYAEBBFZCFEPXYAEBB[2,1,1,6,24,0,4,1,1,5,25,2,5,4,15,23,24,0,4,1,1]
Now apply the decryption formula D ( y ) = 15 ( y 2 ) mod 26 D ( y ) = 15 ( y 2 ) mod 26 D(y)=15(y-2)mod26D(y) = 15(y – 2) \mod 26D(y)=15(y2)mod26 to each number:
  • D ( 2 ) = 15 ( 2 2 ) mod 26 = 15 0 mod 26 = 0 D ( 2 ) = 15 ( 2 2 ) mod 26 = 15 0 mod 26 = 0 D(2)=15(2-2)mod26=15*0mod26=0D(2) = 15(2 – 2) \mod 26 = 15 \cdot 0 \mod 26 = 0D(2)=15(22)mod26=150mod26=0 → A
  • D ( 1 ) = 15 ( 1 2 ) mod 26 = 15 ( 1 ) mod 26 = 15 25 mod 26 = 375 mod 26 = 11 D ( 1 ) = 15 ( 1 2 ) mod 26 = 15 ( 1 ) mod 26 = 15 25 mod 26 = 375 mod 26 = 11 D(1)=15(1-2)mod26=15*(-1)mod26=15*25mod26=375mod26=11D(1) = 15(1 – 2) \mod 26 = 15 \cdot (-1) \mod 26 = 15 \cdot 25 \mod 26 = 375 \mod 26 = 11D(1)=15(12)mod26=15(1)mod26=1525mod26=375mod26=11 → L
  • D ( 1 ) = 15 ( 1 2 ) mod 26 = 11 D ( 1 ) = 15 ( 1 2 ) mod 26 = 11 D(1)=15(1-2)mod26=11D(1) = 15(1 – 2) \mod 26 = 11D(1)=15(12)mod26=11 → L
  • D ( 6 ) = 15 ( 6 2 ) mod 26 = 15 4 mod 26 = 60 mod 26 = 8 D ( 6 ) = 15 ( 6 2 ) mod 26 = 15 4 mod 26 = 60 mod 26 = 8 D(6)=15(6-2)mod26=15*4mod26=60mod26=8D(6) = 15(6 – 2) \mod 26 = 15 \cdot 4 \mod 26 = 60 \mod 26 = 8D(6)=15(62)mod26=154mod26=60mod26=8 → I
  • D ( 24 ) = 15 ( 24 2 ) mod 26 = 15 22 mod 26 = 330 mod 26 = 18 D ( 24 ) = 15 ( 24 2 ) mod 26 = 15 22 mod 26 = 330 mod 26 = 18 D(24)=15(24-2)mod26=15*22mod26=330mod26=18D(24) = 15(24 – 2) \mod 26 = 15 \cdot 22 \mod 26 = 330 \mod 26 = 18D(24)=15(242)mod26=1522mod26=330mod26=18 → S
  • D ( 0 ) = 15 ( 0 2 ) mod 26 = 15 ( 2 ) mod 26 = 30 mod 26 = 22 D ( 0 ) = 15 ( 0 2 ) mod 26 = 15 ( 2 ) mod 26 = 30 mod 26 = 22 D(0)=15(0-2)mod26=15*(-2)mod26=-30mod26=22D(0) = 15(0 – 2) \mod 26 = 15 \cdot (-2) \mod 26 = -30 \mod 26 = 22D(0)=15(02)mod26=15(2)mod26=30mod26=22 → W
  • D ( 4 ) = 15 ( 4 2 ) mod 26 = 15 2 mod 26 = 30 mod 26 = 4 D ( 4 ) = 15 ( 4 2 ) mod 26 = 15 2 mod 26 = 30 mod 26 = 4 D(4)=15(4-2)mod26=15*2mod26=30mod26=4D(4) = 15(4 – 2) \mod 26 = 15 \cdot 2 \mod 26 = 30 \mod 26 = 4D(4)=15(42)mod26=152mod26=30mod26=4 → E
  • D ( 1 ) = 15 ( 1 2 ) mod 26 = 11 D ( 1 ) = 15 ( 1 2 ) mod 26 = 11 D(1)=15(1-2)mod26=11D(1) = 15(1 – 2) \mod 26 = 11D(1)=15(12)mod26=11 → L
  • D ( 1 ) = 11 D ( 1 ) = 11 D(1)=11D(1) = 11D(1)=11 → L
  • D ( 5 ) = 15 ( 5 2 ) mod 26 = 15 3 mod 26 = 45 mod 26 = 19 D ( 5 ) = 15 ( 5 2 ) mod 26 = 15 3 mod 26 = 45 mod 26 = 19 D(5)=15(5-2)mod26=15*3mod26=45mod26=19D(5) = 15(5 – 2) \mod 26 = 15 \cdot 3 \mod 26 = 45 \mod 26 = 19D(5)=15(52)mod26=153mod26=45mod26=19 → T
  • D ( 25 ) = 15 ( 25 2 ) mod 26 = 15 23 mod 26 = 345 mod 26 = 7 D ( 25 ) = 15 ( 25 2 ) mod 26 = 15 23 mod 26 = 345 mod 26 = 7 D(25)=15(25-2)mod26=15*23mod26=345mod26=7D(25) = 15(25 – 2) \mod 26 = 15 \cdot 23 \mod 26 = 345 \mod 26 = 7D(25)=15(252)mod26=1523mod26=345mod26=7 → H
  • D ( 2 ) = 15 ( 2 2 ) mod 26 = 0 D ( 2 ) = 15 ( 2 2 ) mod 26 = 0 D(2)=15(2-2)mod26=0D(2) = 15(2 – 2) \mod 26 = 0D(2)=15(22)mod26=0 → A
  • D ( 5 ) = 19 D ( 5 ) = 19 D(5)=19D(5) = 19D(5)=19 → T
  • D ( 4 ) = 4 D ( 4 ) = 4 D(4)=4D(4) = 4D(4)=4 → E
  • D ( 15 ) = 15 ( 15 2 ) mod 26 = 15 13 mod 26 = 195 mod 26 = 13 D ( 15 ) = 15 ( 15 2 ) mod 26 = 15 13 mod 26 = 195 mod 26 = 13 D(15)=15(15-2)mod26=15*13mod26=195mod26=13D(15) = 15(15 – 2) \mod 26 = 15 \cdot 13 \mod 26 = 195 \mod 26 = 13D(15)=15(152)mod26=1513mod26=195mod26=13 → N
  • D ( 23 ) = 15 ( 23 2 ) mod 26 = 15 21 mod 26 = 315 mod 26 = 3 D ( 23 ) = 15 ( 23 2 ) mod 26 = 15 21 mod 26 = 315 mod 26 = 3 D(23)=15(23-2)mod26=15*21mod26=315mod26=3D(23) = 15(23 – 2) \mod 26 = 15 \cdot 21 \mod 26 = 315 \mod 26 = 3D(23)=15(232)mod26=1521mod26=315mod26=3 → D
  • D ( 24 ) = 18 D ( 24 ) = 18 D(24)=18D(24) = 18D(24)=18 → S
  • D ( 0 ) = 22 D ( 0 ) = 22 D(0)=22D(0) = 22D(0)=22 → W
  • D ( 4 ) = 4 D ( 4 ) = 4 D(4)=4D(4) = 4D(4)=4 → E
  • D ( 1 ) = 11 D ( 1 ) = 11 D(1)=11D(1) = 11D(1)=11 → L
  • D ( 1 ) = 11 D ( 1 ) = 11 D(1)=11D(1) = 11D(1)=11 → L
Thus, the decrypted message is "ALL IS WELL THAT ENDS WELL".

Part (ii): Vigenère Cipher Decryption

The Vigenère cipher decryption is performed by subtracting the key’s corresponding letter values from the cipher text, modulo 26.

Step 1: Prepare the Key

The key is "RESULT". We repeat the key to match the length of the cipher text:
Key: RESULTRESULTRESULT = "RESULTRESULT" Key: RESULTRESULTRESULT = "RESULTRESULT" “Key: “”RESULTRESULTRESULT”=””RESULTRESULT””\text{Key: } \text{RESULTRESULTRESULT} = \text{“RESULTRESULT”}Key: RESULTRESULTRESULT=“RESULTRESULT”

Step 2: Convert Text and Key to Numbers

Convert the letters of the cipher text "KSTYZKESLNZUV" and the key "RESULTRESULT" to numbers:
  • Cipher text: [ K , S , T , Y , Z , K , E , S , L , N , Z , U , V ] [ 10 , 18 , 19 , 24 , 25 , 10 , 4 , 18 , 11 , 13 , 25 , 20 , 21 ] [ K , S , T , Y , Z , K , E , S , L , N , Z , U , V ] [ 10 , 18 , 19 , 24 , 25 , 10 , 4 , 18 , 11 , 13 , 25 , 20 , 21 ] [K,S,T,Y,Z,K,E,S,L,N,Z,U,V]-=[10,18,19,24,25,10,4,18,11,13,25,20,21][K, S, T, Y, Z, K, E, S, L, N, Z, U, V] \equiv [10, 18, 19, 24, 25, 10, 4, 18, 11, 13, 25, 20, 21][K,S,T,Y,Z,K,E,S,L,N,Z,U,V][10,18,19,24,25,10,4,18,11,13,25,20,21]
  • Key: [ R , E , S , U , L , T , R , E , S , U , L , T , R ] [ 17 , 4 , 18 , 20 , 11 , 19 , 17 , 4 , 18 , 20 , 11 , 19 , 17 ] [ R , E , S , U , L , T , R , E , S , U , L , T , R ] [ 17 , 4 , 18 , 20 , 11 , 19 , 17 , 4 , 18 , 20 , 11 , 19 , 17 ] [R,E,S,U,L,T,R,E,S,U,L,T,R]-=[17,4,18,20,11,19,17,4,18,20,11,19,17][R, E, S, U, L, T, R, E, S, U, L, T, R] \equiv [17, 4, 18, 20, 11, 19, 17, 4, 18, 20, 11, 19, 17][R,E,S,U,L,T,R,E,S,U,L,T,R][17,4,18,20,11,19,17,4,18,20,11,19,17]

Step 3: Decrypt the Cipher Text

To decrypt, subtract the key value from the cipher text value, modulo 26:
D ( i ) = ( C ( i ) K ( i ) ) mod 26 D ( i ) = ( C ( i ) K ( i ) ) mod 26 D(i)=(C(i)-K(i))quadmod26D(i) = (C(i) – K(i)) \mod 26D(i)=(C(i)K(i))mod26
Now, decrypt each letter:
  • D ( 10 17 ) mod 26 = ( 7 ) mod 26 = 19 D ( 10 17 ) mod 26 = ( 7 ) mod 26 = 19 D(10-17)mod26=(-7)mod26=19D(10 – 17) \mod 26 = (-7) \mod 26 = 19D(1017)mod26=(7)mod26=19 → T
  • D ( 18 4 ) mod 26 = 14 D ( 18 4 ) mod 26 = 14 D(18-4)mod26=14D(18 – 4) \mod 26 = 14D(184)mod26=14 → O
  • D ( 19 18 ) mod 26 = 1 D ( 19 18 ) mod 26 = 1 D(19-18)mod26=1D(19 – 18) \mod 26 = 1D(1918)mod26=1 → B
  • D ( 24 20 ) mod 26 = 4 D ( 24 20 ) mod 26 = 4 D(24-20)mod26=4D(24 – 20) \mod 26 = 4D(2420)mod26=4 → E
  • D ( 25 11 ) mod 26 = 14 D ( 25 11 ) mod 26 = 14 D(25-11)mod26=14D(25 – 11) \mod 26 = 14D(2511)mod26=14 → O
  • D ( 10 19 ) mod 26 = ( 9 ) mod 26 = 17 D ( 10 19 ) mod 26 = ( 9 ) mod 26 = 17 D(10-19)mod26=(-9)mod26=17D(10 – 19) \mod 26 = (-9) \mod 26 = 17D(1019)mod26=(9)mod26=17 → R
  • D ( 4 17 ) mod 26 = ( 13 ) mod 26 = 13 D ( 4 17 ) mod 26 = ( 13 ) mod 26 = 13 D(4-17)mod26=(-13)mod26=13D(4 – 17) \mod 26 = (-13) \mod 26 = 13D(417)mod26=(13)mod26=13 → N
  • D ( 18 4 ) mod 26 = 14 D ( 18 4 ) mod 26 = 14 D(18-4)mod26=14D(18 – 4) \mod 26 = 14D(184)mod26=14 → O
  • D ( 11 18 ) mod 26 = ( 7 ) mod 26 = 19 D ( 11 18 ) mod 26 = ( 7 ) mod 26 = 19 D(11-18)mod26=(-7)mod26=19D(11 – 18) \mod 26 = (-7) \mod 26 = 19D(1118)mod26=(7)mod26=19 → T
  • D ( 13 20 ) mod 26 = ( 7 ) mod 26 = 19 D ( 13 20 ) mod 26 = ( 7 ) mod 26 = 19 D(13-20)mod26=(-7)mod26=19D(13 – 20) \mod 26 = (-7) \mod 26 = 19D(1320)mod26=(7)mod26=19 → T
  • D ( 25 11 ) mod 26 = 14 D ( 25 11 ) mod 26 = 14 D(25-11)mod26=14D(25 – 11) \mod 26 = 14D(2511)mod26=14 → O
  • D ( 20 19 ) mod 26 = 1 D ( 20 19 ) mod 26 = 1 D(20-19)mod26=1D(20 – 19) \mod 26 = 1D(2019)mod26=1 → B
  • D ( 21 17 ) mod 26 = 4 D ( 21 17 ) mod 26 = 4 D(21-17)mod26=4D(21 – 17) \mod 26 = 4D(2117)mod26=4 → E
Thus, the decrypted message is "TO BE OR NOT TO BE".

Scroll to Top
Scroll to Top