Professional Documents
Culture Documents
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
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
• 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
• 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
• Caesar’s cipher
– Mathematical representation:
y = (x+3) mod 26
y- ciphertext
x- plaintext
– Example: homework