Crypto Module 1
Crypto Module 1
If both sender and receiver use the same key, the system is
referred to as symmetric, single-key, secret-key, or conventional
encryption.
plain: a b c d e f g h i j k l m n o p q r s t u v w x y z
cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Let us assign a numerical equivalent to each letter:
PlainText: "instruments"
After Split: 'in' 'st' 'ru' 'me' 'nt' 'sz'
Or
C=PK mod 26
where C and P are row vectors of length 3
representing the plaintext and ciphertext, and K is a 3 *
3 matrix representing the encryption key.
Operations are performed mod 26.
For example, consider the plaintext
“paymoremoney” and use the encryption key
This is demonstrated as
It is easily seen that if the matrix K-1 is applied to the ciphertext, then
the plaintext is recovered.
In general terms, the Hill system can be expressed as
C = E(K, P) = PK mod 26
P = D(K, C) = CK-1 mod 26 = PKK-1 = P
Polyalphabetic Ciphers
Another way to improve on the simple
monoalphabetic technique is to use different
monoalphabetic substitutions as one proceeds through
the plaintext message.
The general name for this approach is polyalphabetic
substitution cipher.
All these techniques have the following features in
common:
1. A set of related monoalphabetic substitution
rules is used.
2. A key determines which particular rule is chosen
for a given transformation.
VIGENÈRE CIPHER
The best known, and one of the simplest, polyalphabetic
ciphers is the Vigenère cipher.
In this scheme, the set of related monoalphabetic
substitution rules consists of the 26 Caesar ciphers with
shifts of 0 through 25.
Each cipher is denoted by a key letter, which is the
ciphertext letter that substitutes for the plaintext letter a.
Thus, a Caesar cipher with a shift of 3 is denoted by the
key value 3.
We can express the Vigenère cipher in the following
manner.
Assume a sequence of plaintext letters P = p0, p1, p2, ..,
pn-1 and a key consisting of the sequence of letters
K = k0, k1, k2,.., km-1, where typically m < n.
The sequence of ciphertext letters C = C0, C1, C2, .., Cn-1 is
calculated as follows:
Thus, the first letter of the key is added to the first
letter of the plaintext, mod 26, the second letters are
added, and so on through the first m letters of the
plaintext.
For the next m letters of the plaintext, the key letters
are repeated.
This process continues until all of the plaintext
sequence is encrypted.
A general equation of the encryption process is
We now show two different decryptions using two different keys:
Suppose that a cryptanalyst had managed to find these two keys.
Two plausible plaintexts are produced.
How is the cryptanalyst to decide which is the correct decryption
(i.e., which is the correct key)?
If the actual key were produced in a truly random fashion, then
the cryptanalyst cannot say that one of these two keys is more
likely than the other.
Thus, there is no way to decide which key is correct and
therefore which plaintext is correct.
The security of the one-time pad is entirely due to the
randomness of the key.
If the stream of characters that constitute the key is truly
random, then the stream of characters that constitute the
ciphertext will be truly random.
In theory, we need look no further for a cipher.
The one-time pad offers complete security but, in practice, has
two fundamental difficulties:
1. There is the practical problem of making large quantities of
random keys.
Supplying truly random characters in this volume is a significant
task.
2. Even more daunting is the problem of key distribution and
protection. For every message to be sent, a key of equal length
is needed by both sender and receiver.
TRANSPOSITION
TECHNIQUES
Transposition cipher performs some sort of permutation on the
plaintext letters.
The simplest such cipher is the rail fence technique, in which the
plaintext is written down as a sequence of diagonals and then
read off as a sequence of rows.
For example, to encipher the message “meet me after the toga
party” with a rail fence of depth 2, we write the following:
The encrypted message is