In: Computer Science
1. Bob wants to use DES to make a secured communication with Alice using DES key ‘Kb’ to encrypt and decrypt data. Bob uses PKI method to distribute the DES key to Alice. If Alice private key is ‘Kpa’, and her public key is ‘Kpb’. Please describe the process that Bob can send his DES key ‘Kb’ to Alice securely.
2. You receive a message that was encoded using a block encoding scheme with the encoding matrix
M=3275
(remember to wrap around if a value is > 25.)
2)
step: 1 of 6
Decode the block of letters using the Block cipher
Block cipher:
• The Block cipher is used to encrypt the block or group of plaintext letters into block or group of ciphertext letter and decrypt the group or block of ciphertext letter to block or group of plaintext letters. But, it does not apply the same character for each letter.
• For encoding:
o Step 1: Apply the S mapping to the block of plaintext.
• It the simple substitution, that is, mapping. The “S” maps the characters into integer numbers such as S(A) = 1, S(B) = 2,….S(Z) = 26.
• The simple substitution for S-Mapping is shown below:
o Step 2: Multiply the , and it gets wrapped around, that is, use modulo 26 to get the remainder value if any value in the matrix is more than 25.
o Step 3: Apply to the result of encoding.
• For decoding:
o Step 1: Apply the S mapping to the block of ciphertext.
• It the simple substitution, that is, mapping. The “S” maps the characters into integer numbers such as S(A) = 1, S(B) = 2,…. S(Z) = 26.
• The simple substitution for S-Mapping is shown below:
o Step 2: Multiply the, and it gets wrapped around, that is, use modulo 26 to get the remainder value if any value in the matrix is more than 25.
o Apply to the result of encoding.
step: 2 of 6
a). Compute the :
• The value for encoding matrix is and another matrix value is .
• Calculate the :
o Here, all the values in the matrix 183, 130, 78, and 53 are more than the integer value 25. So, modulo 26 is used to find the remainder for those values.
o Apply modulo 26 is given below:
Therefore, the is .
step: 3 of 6
b). Decode the ciphertext message “MXOSHI” using the Block cipher:
• The ciphertext contains 6 characters of message, that is, “MXOSHI” and takes two characters to first decode, then it takes next two characters to decode and finally it decodes the last two characters.
• To decode the received message, first, break the two characters into two-character block and so on.
o Here, first two character form block is (M X), next two character form block is (O S), and last two character form block is (H I).
step: 4 of 6
Decode the first two character form block (M X):
• Step 1: Apply the S-Mapping to the two-character form of block (M X).
o The simple substitution for S-Mapping is shown below:
o From the S-Mapping, the value for M = 13 and X = 24 is mapped. Then, the S mapping gets the value for (M X) is (13 24).
• Step 2: Multiply the , and it gets wrapped around, that is, use modulo 26 to get the remainder value if any value in the matrix is more than 25.
o Here, all the values in the matrix 521 and 384 are more than the integer value 25. So, modulo 26 is used to find the remainder for those values.
o Apply modulo 26 as given below:
• Hence, the for first two character form block (M X) is .
step: 5 of 6
Decode the next two character form block (O S):
• Step 1: Apply the S-Mapping to the two-character form of block (O S).
o The simple substitution for S-Mapping is shown below:
o From the S-Mapping, the value for O = 15 and S = 19 is mapped. Then, the S mapping gets the value for (O S) is (15 19).
• Step 2: Multiply the , and it gets wrapped around, that is, use modulo 26 to get the remainder value if the any value in the matrix is more than 25.
o Here, all the values in the matrix 436 and 417 are more than the integer value 25. So, modulo 26 is used to find the remainder for those values.
o Apply modulo 26 as given below:
• Hence, the for next two character form block (O S) is .
step: 6 of 6
Decode the last two character form block (H I):
• Step 1: Apply the S-Mapping to the two-character form of block (H I).
o The simple substitution for S-Mapping is shown below:
o From the S-Mapping, the value for H = 8 and I = 9 is mapped. Then, the S mapping gets the value for (H I) is (8 9).
• Step 2: Multiply the , and it gets wrapped around, that is, use modulo 26 to get the remainder value if the any value in the matrix is more than 25.
o Here, all the values in the matrix 211 and 219 are more than the integer value 25. So, modulo 26 is used to find the remainder for those values.
o Apply modulo 26 as given below:
• Hence, the for last two character form block (H I) is .
• The result of the for,
o First two character form block (M X) is
o Next two character form block (O S) is ,
o Last two character form block (H I) is .
• The simple substitution for S-Mapping for number is given below and maps the numbers into plaintext letters:
o For first two character form block (M X) is .
o For next two character form block (O S) is .
o For last two character form block (H I) is .
o Combine the all the characters of ciphertext “MXOSHI” and decoded characters “ATTACK”.
Therefore, the characters of ciphertext “MXOSHI” are decoded into plaintext .