Cryptography Reference
In-Depth Information
Note that if we are using this type of cipher, we must be careful about how we pad the
message. We must pad enough characters so that the message is divisible by both
m
(the block size of the first and second ciphers, respectively.) Thus, we wish to ensure the size
of the message is divisible by the least common multiple of
n
and
m
and
n
.
E XAMPLE .
Suppose we are using the ordinary alphabet, and we wish to encipher the fol-
lowing message
SCOOBY DOO WHERE ARE YOU
using first the matrix cipher transformation C AP + B (mod 26) where the enciphering
matrix A is
517
415
and the shift vector
B
is
5
2
Secondly, we wish to perform a transposition C = TC , where the transposition matrix
T is
00010
10000
00001
01000
00100
.
Note that the substitution cipher uses a block size of 2 characters, whereas the transpo-
sition cipher uses a block size of 5 characters. Thus, the length of the plaintext needs to be
divisible by lcm(2, 5) = 10. Finally, we apply once again the previous matrix substitution
to get the final ciphertext.
C AC
B
+
(mod 26).
We will first group the plaintext
P
into letter pairs:
SC OO BY DO OW HE RE AR EY OU
and note that in this case, no padding is necessary. (See Table 7.1.)
ABCDE F GHI J KL MNOP QRS T UVWXYZ
0123456789 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
TABLE 7.1
 
Search WWH ::




Custom Search