2.1 Cryptography Introduction
2.1 Cryptography Introduction
Mr S. D Kanengoni
Masters in International
Computer Science
Cryptography
Goal Of This Lecture
1. Cryptography basics
• History -
• Cipher and Deciphering
DES, RSA)
Cryptology = science of
secrecy. How :
encipher a plaintext into a ciphertext to protect its secrecy.
The recipient deciphers the ciphertext to recover the plaintext.
A cryptanalyst shouldn’t complete a successful
cryptanalysis. Attacks [6] :
• known ciphertext : access only to the ciphertext
• known plaintexts/ciphertexts : known
pairs (plaintext,ciphertext) ; search for the
key
•
chosen plaintext : known cipher, chosen cleartexts
; search for the key
Cryptography
What is Cryptography
• Cryptography or cryptology
(from Ancient Greek: κρυπτός, romanized:
kryptós "hidden, secret"; and γράφειν graphein, "to write", or -
λογία -logia, "study", respectively)
Cryptography
Study of methods, mathematic technics related to security
concept
Cryptosystem
Set of algorithm, key and secured protocol
Cryptanalysis
Study of existing cryptosystem
1 2 3
4 5
1 a b c d
e
2 f g h ij
k
3 l m n o
p
4 q r s t
u
5 v w x y
z
• Yesterday :
) for strategic purposes
(the enemy shouldn’t be able to read messages)
) by the church
) diplomacy
cipher
simple (monoalphabetical)
polyalphabetical
homophone
polygramme
Symmetrical ciphers
Made of [1] :
• plaintext alphabet : A M
• ciphertext alphabet : A C
• keys alphabet : A K
• encipher ; application E : AK٨ × A٨M → ٨C
A ;
decipher ; application D : AK × A٨ → ٨
• ٨ C M
A ٨
E and D are such that ∀K ∈ A K , ∀M ∈ ٨
AM :
D (K , E (K , M )) = M
Monoalphabetical ciphers
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
V W X Z C R Y P T A N L S I B E D F G H J K M O Q
U
Cryptanalysis
∀i, 0 ≤ i < 0 f : A M → A M
η : Zn → Zn
c i = f (mi ) = mη(i)
Simple array transposition
Example
M = 0011, K = 0101
C = 0011 ⊕ 0101 = 0110
M = K ⊕ C.
C ⊕ C J = (M ⊕ K ) ⊕ (M J ⊕ K ) = M ⊕ M J
Pr (M = m | C = c) = Pr (M = m)
Pr (M | C ) = Pr (M )
The interception of the ciphertext does not provide
any information to the crypto-analyst.
Conclusion
C i = g(C i− 1 , K i ) i=
1, . . . , r
X , Y , Z ›→ (Y , F (Y , Z ) ⊕ X )
g function of 2n × m bits into 2n bits and ⊕ denoting the n bit
XOR
Operation mode
Given a plaintext P = (P L , P R ) and r round keys K 1 , . . . , Kr ,
Let
the Cciphertext
L = P L and LC R =
0 (C , 0C R )PisR obtained
and we compute for i =
after r rounds.
1, . . . , r
(C L , C R ) = (C R , F (C R , K i ) ⊕
CL )
i i i−1 i−1
i−1
with C i = (C L , C R ) and C R = C L and C L =
i i r
C R round keys K 1 , . . . , Kr , are obtained by a key
The r
scheduling algorithm on a master key K .
Block ciphers modes of
operation
Modes of operation
pictured
http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation
E C B : electronic codebook
mode
x1 x2
IV=y0
eK eK
y1 y2
C B C – Deciphering
y1 y2
dK dK
IV=y0
x1 x2
O F B (output feedback mode) and
C F B (cipher feedback mode)
x1 x2
IV=y0 eK eK
y1 y2
C F B deciphering
y1 y2
IV=y0 eK eK
x1 x2
M AC-MDC