124k views
5 votes
Listed below is an example for encrypting text using a Cipher. Assumptions The letters in the alphabet correspond to their counterparts in arithmetic notation mod 26. So the letters of the alphabet A-Z are represented by the numbers 0-25 respectively. S A M P L E is initially coded as 18 0 12 15 11 4 Next a random stream of numbers is combined with the letter codes: 76 48 03 83 44 16 Encoding the message: 18 00 12 15 11 04 76 48 03 83 44 16 Add 94 48 15 98 55 20 Sum 16 22 15 20 03 20 Mod 26 Now convert into cipher text: Q W P U D U Given the set of random numbers below, convert the word S E C R E C Y into cipher text: Random number stream 18 10 88 65 40 22 25

1 Answer

4 votes

Answer:

See the explanation section

Step-by-step explanation:

The general representation of alphabet encoding is given as:

A = 0, B = 1, C = 2, D = 3, E = 4, F = 5, G = 6, H = 7, I = 8, J = 9, K = 10, L = 11,

M = 12, N = 13, O = 14, P = 15, Q = 16, R = 17, S = 18, T = 19, U = 20, V = 21,

W = 22, X = 23, Y = 24, Z = 25.

Based on the sample:

Cipher = E(p, k) = (p + k) mod 26

We want to encrypt SECRECY:

Using a key of 18 10 88 65 40 22 25

S = (18 + 18) mod 26 = 36 mod 26 = 10 =K

E = (4 + 10) mod 26 = 14 mod 26 = 14 = O

C = (2 + 88) mod 26 = 90 mod 26 = 12 = M

R = (17 + 65) mod 26 = 82 mod 26 = 4 = E

E = (4 + 40) mod 26 = 44 mod 26 = 18 = S

C = (2 + 22) mod 26 = 24 mod 26 = 24 = Y

Y = (24 + 25) mod 26 = 49 mod 26 = 23 = X

Therefore, the cipher will be written as: KOMESYX.

Note: p = plaintext and k = key.

User Jab
by
5.5k points