CNS-3
CNS-3
Symmetric-Key Ciphers
Dr. Bimal Kumar Meher
Associate Professor, Dept. of CSE
Silicon Institute of Technology
Symmetric Key Cipher Model
Symmetric Key Cipher Model (Contd…)
If P is the plaintext, C is the cipher text, and K is the key,
Then we represent the encryption done by Alice as:
Note
• In monoalphabetic substitution, the relationship
between a symbol in the plaintext to a symbol
in the ciphertext is always one-to-one.
Example 1
The following shows a plaintext and its corresponding
ciphertext. The cipher is monoalphabetic because both l’s
are encrypted as O’s.
Example 2
The following shows a plaintext and its corresponding
ciphertext. The cipher is not monoalphabetic because each l
is encrypted by a different character.
ABNFZ
Additive Cipher
Note
• When the cipher is additive, the plaintext,
ciphertext, and key are integers in Z26.
Additive Cipher(Contd…)
Example
Use the additive cipher with key = 15 to encrypt the
message “hello”.
Solution
We apply the encryption algorithm to the plaintext,
character by character:
Additive Cipher(Contd…)
Example
Solution
When Eve tabulates the frequency of letters in this
ciphertext, she gets: I =14, V =13, S =12, and so on. The
most common character is I with 14 occurrences. This
means key = 4.
Multiplicative Ciphers
P (C x
Note
• In a multiplicative cipher, the plaintext and
ciphertext are integers in Z26
• But, the key is an integer in Z26*.
Multiplicative Ciphers(Contd…)
Example 1
What is the key domain for any multiplicative cipher?
Solution The key needs to be in Z26*. This set has only 12
members: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25.
Example 2
Use a multiplicative cipher to encrypt the message “hello”
with a key of 7.
Affine Ciphers
• It is a combination of additive and multiplicative
ciphers with a pair of keys.
Affine Ciphers(Contd…)
Example
What is the key domain and its size in affine cipher ?
The affine cipher uses a pair of keys in which the first
key is from Z26* and the second is from Z26. The size
of the key domain is 26 × 12 = 312.
Example
Use affine cipher to encrypt the message “hello” with
the key pair (7, 2).
Affine Ciphers(Contd…)
Example
Use the affine cipher to decrypt the message “ZEBBW”
with the key pair (7, 2) in mod 26.
Note
• The additive cipher is a special case of an affine cipher in
which k1 = 1.
• The multiplicative cipher is a special case of affine cipher
in which k2 = 0.
Monoalphabetic Substitution Cipher
Example
Encrypt the plaintext “hello” using the key in above figure.
Decryption: P=CK-1,
K is invertible.
Cryptanalysis :
Because the key and the plaintext share the
same frequency distribution of letters, a statistical
technique can be applied.
Vernam Cipher
Introduced by an AT&T engineer Gilbert Vernam in
1918.
He proposed to choose a very long Key that has no
statistical relationship to the plaintext.
His system works on binary data (bits) rather than
letters.
Vernam Cipher (Contd…)