You are on page 1of 15

Lecture No.

1
Cryptography
Basic concepts
• Cryptology
– kryptos=secret + logos=(word, language, meaning,
science)
• Cryptology = Cryptography + Cryptanalysis
– Opposite and complementary at the same time
Basic concepts
• Cryptography
– develops methods of encipherment in order to
protect information.
• Cryptanalysis
– breaks these methods in order to reconstruct the
original information.
The general cryptographic procedure

KEY KEY

Plaintext Ciphertext Plaintext


encipher decipher
A B

Cryptanalysis

decrypt
Classification of cryptosystems
• Secret key cryptography (symmetric)
– Shared key (secret), delivered to both parties in
advance via a secure channel.
– Classification of symmetric ciphers
• Stream ciphers
• Block ciphers
Classification of cryptosystems

• Public key cryptography (asymmetric)


– The key is reconstructed from the secret part and
the public part.
– The secure channel is not needed.
Symmetric cryptography

• Stream ciphers
– The transformation is applied to every symbol of
the original message (e.g. to every bit of the
message).
• Block ciphers
– The transformation is applied to a group of
symbols of the original message (e.g. to groups of
128 bits).
Symmetric cryptography

• Stream ciphers
– Can be very fast
– Used mainly in government applications (military,
police etc.)
– Civilian applications, too (e.g. in Web browsers)
– Export limitations often make good stream ciphers
unsuitable for public use.
Symmetric cryptography

• Block ciphers
– Slower and less secure than stream ciphers (in
general)
– No implementation and export limitations
– It is possible to build a stream cipher starting from
a block cipher
– There exists a “standard” block cipher - AES
– Used a lot in practice.
Classical cipher systems

• Transposition
– A fixed permutation of n letters of the plaintext
– The plaintext is divided into groups (blocks!) of
length n
– The permutation is applied to each group
– This is a primitive block cipher
• The permutation is fixed – the permutation is the key
• Statistics of the plaintext are preserved on output - bad!
Classical cipher systems

• Transposition - example
Groups of 4
letters (n=4)
Transposition: ( 1
4
2
3
3
2 )
4
1

Plaintext: CLASSICAL SYSTEMS


Ciphertext: SALCACISS YSLSMET
Classical cipher systems

• Substitution
– Monoalphabetic
• Each occurrence of the same symbol of the plaintext is
substituted with the same symbol.
– Polyalphabetic
• Each occurrence of the same symbol of the plaintext is
substituted with a different symbol that depends on the
key.
Classical cipher systems

• Substitution – example
A B C D E F G H I J K L M N O P Q R S T U V WX YZ
P L O K N M J U I B V G Y T F C X D R E S Z W A QH

Plaintext: THIS IS AN EXAMPLE


Ciphertext: EUIR IR PT NAPYCGN

• This is a monoalphabetic substitution


– Example: an “A” is always substituted with a “P”.
Classical cipher systems
Gaius Julius
• Caesar’s cipher (monoalphabetic) (1st
Caesar,
century B.C.) 100-44 B.C.

– The substitution is obtained by a cyclic shift of the


original Roman alphabet (26 letters) by 3 to the
left.
A B C D E F G H I K L M N O P Q R S T V X Y Z
D E F G H I K L M N O P Q R S T V X Y Z A B C
Classical cipher systems

• Caesar’s cipher
– Mathematical representation:
y = (x+3) mod 26
y- ciphertext
x- plaintext
– Example: homework

You might also like