Introduction to Cryptography
cryptology
cryptography cryptanalysis
Encryption Decryption
Encryption: Converting plaintext to ciphertext using
an encryption key
Decryption: recovering the plaintext from the ciphertext
using a decryption key
Cryptanalysis: Trying to recover the plaintext
without knowing the key
Encryption Function E( ), Encryption key=K1
P EK1( ) C C= EK1( P ),
also written as E (K1,P)
Decryption Function D( ), Decryption key=K2
DK2( C )
C DK2( ) P
also written as D(K2,C)
The E( ) and D( ) functions may be different,
but may also be the same function
Classification of cryptographic algorithms
Cryptographic Algorithms
Modern Classical
deals with binary deals with data as
Representation of a string of
Data characters
Symmetric Asymmetric One way Hashing
If K1=K2 If K1 != K2 Algorithms
Also called No key is needed
Public key
algorithms
Approaches for symmetric classical
encryption
1- Substitution
– Monoalphabetic : substitute a character for another
character according to some mapping relation, (e.g.
Caesar cipher).
– Polyalphabetic: use different characters to substitute
for one character according to a specified scheme
(e.g. vigenere tableau)
– Multi-character substitution: e.g. substitute a pair of
characters for another pair of characters, (e.g. playfair
cipher, Hill cipher)
Approaches for symmetric classical
encryption
2- Transposition (character permutation)
interchanging character positions within the character
string without changing their values, (e.g. columnar
transposition cipher).
3- Product Ciphers:
Using several stages of encryption with different
algorithm for every stage to produce a cipher which is
more difficult to cryptanalyze,
Product Cipher
P EK1( ) EK2( ) C
C= EK(P)= EK1(EK2(P))
Where K={K1 , K2}
Usually K1 and K2 are derived from K
using some function: i.e.
K1 = f1 (K)
and
K2 = f2 (K)
Caesar Cipher
Given by the monoalphabetic substitution:
C = E(k, p) = (p + k) mod 26
Where characters from a to z are assigned numerical
values from 0 to 25, i.e.
Example on caesar cipher
• With k=3, substitution is as follows:
plain: a b cde fgh i j k l mno pq r s t u vwxy z
cipher: DEFGHIJKLMNOPQRSTUVWXYZABC
plain: meet me after the class
cipher: PHHW PH DIWHU WKH FODVV