Professional Documents
Culture Documents
Chapter 2
Cryptographic Techniques
Web Security: Theory & Applications
School of Software, Sun Yat-sen University
Chapter 2 - Outline
2.1 Cryptology Introduction
Introduction
History
Concepts & Items
2.2 Symmetric Key Cryptographic Algorithms
Introduction
Types & Modes
Data Encryption Standard (DES)
Advanced Encryption Standard (AES)
2 / 41
Chapter 2 - Outline
2.3 Asymmetric Key Cryptographic Algorithms
Introduction
The RSA Algorithm
Digital Signatures
2.4 Hashing Algorithms
Introduction
Message-Digest Algorithm (MD5)
2.5 Typical Applications
3 / 41
Chapter 2 - Outline
2.1 Cryptology Introduction
Introduction
History
Concepts & Items
2.2 Symmetric Key Cryptographic Algorithms
2.3 Asymmetric Key Cryptographic Algorithms
2.4 Hashing Algorithms
2.5 Typical Applications
4 / 41
Definition
Cryptography (or cryptology; from Greek krypts,
"hidden, secret"; and grphein, "writing", or -logia,
"study", respectively) is the practice and study of
techniques for secure communication in the presence
of third parties (called adversaries). More generally, it
is about constructing and analyzing protocols that
overcome the influence of adversaries and which are
related to various aspects in information security such
as data confidentiality, data integrity, authentication,
and non-repudiation.
5 / 41
6 / 41
7 / 41
Cryptosystem Services
Cryptographic Methods
Symmetric, Asymmetric
Confusion, Diffusion
8 / 41
Chapter 2 - Outline
Introduction
Types & Modes
Data Encryption Standard (DES)
Advanced Encryption Standard (AES)
9 / 41
10 / 41
Algorithm Types
Block Cipher
E(M,K)=E(M1,K)E(M2,K) ..E(Mn,K)
MM1M2 Mn
Stream Cipher
11 / 41
12 / 41
Algorithm Modes
13 / 41
Source
ECB mode
non-ECB mode
14 / 41
CBC - Encryption
15 / 41
CBC - Decryption
16 / 41
CFB - Encryption
17 / 41
CFB - Decryption
18 / 41
OFB - encryption
19 / 41
OFB - Decryption
20 / 41
Feistel function
21 / 41
Introduction
2001, FIPS PUB 197
Rijndael - Joan Daemen & Vincent Rijmen
Properties
Block length = 128 bit
Key length = 128/192/256 bit
Steps
AddRoundKey
SubBytes
ShiftRows
MixColumns
22 / 41
Chapter 2 - Outline
Introduction
The RSA Algorithm
Digital Signatures
23 / 41
Definition
Scenery
Property
It is important that the public and private keys are related in such
a way that only the public key can be used to encrypt messages
and only the corresponding private key can be used to decrypt
them. Moreover, it is virtually impossible to deduce the private key
from the known public key.
24 / 41
Introduction
25 / 41
26 / 41
Encryption
n e c(mod N ), or c n e mod N
Then Bob can send c to Alice through an unsafe channel.
Decryption
c d n(mod N ) , or n c d mod N
and recover the m from n.
27 / 41
Principle of RSA
n k ( N ) 1 n mod N
in another hand, ed 1 (mod (N)), or ed = k (N)+1, so
ned n mod N
Now we have
c n e mod N , n c d mod N
So
n c d mod N (n e ) d mod N
n ed mod N n mod N
28 / 41
Example of RSA
For continent, we select small p,q and e.
Suppose A want to sent a string key to B by RSA
encryption.
Compute (e,N) and (d,N)
Let p=3, q=11, N=pq=311=33
f(N)=(p-1)(q-1)=210=20
We take e=3 (3 is prim to 20) and try to get d such that
ed1 mod f(n)3d1 mod 20
We get d by trial:
29 / 41
ed
12
12
15
15
18
18
21
24
27
From the table, we find that when d=7, ed 1 mod f(n) holds.
Web Security : Theory And Applications
30 / 41
31 / 41
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
By the Code Table, the code values of the string key M1,M2,M3
are 11,05,25
Note that the max value of any code is 26 (it can not over N=33).
32 / 41
33 / 41
34 / 41
Chapter 2 - Outline
Introduction
Message-Digest Algorithm (MD5)
35 / 41
Hashing
Hashing value
Hashing algorithms
Data fingerprint
36 / 41
Whats MD5
Message-Digest Algorithm 5
128-bits length
37 / 41
Assignments of Sec.2.4
38 / 41
Chapter 2 - Outline
39 / 41
References
1. William Stallings, Cryptography and Network Security: Principles and
Practice (5th Edition), Prentice Hall 2010
2. http://en.wikipedia.org/wiki/
Birthday attack
Cryptography
Data Encryption Standard
DiffieHellman key exchange
Digital signature
Hash function
Information_security
MD5
Public-key cryptography
RSA
40 / 41
Thank you!
41 / 41