Professional Documents
Culture Documents
Lecturer:
Houshyar Honar Pajooh
Room Number : AE-3-28 (University Building - East)
Email: houshyarh@sunway.edu.my
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
NET3106 – Network Security
WEEK (5)
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
Symmetric Encryption
(2)
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
Learning Objectives
✓Random Numbers
✓Stream Cipher
✓RC4
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
Advanced Encryption Standard (AES)
• AES is used to replace with DES (very slow and only 64-bit
block size).
• A block size of 128 bits and key sizes of 128, 192, and 256
bits.
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
AES Operation
• Data block of 4 columns of 4 bytes is state
• Four different stages are used, one of substitution and three of
permutation (except the last round):
• byte substitution (1 S-box - used on every byte)
• shift rows (3 P-box -permute bytes between groups/columns)
• mix columns (subs using matrix multiply of groups)
• add round key (XOR state with key material)
• Only the Add Round Key stage makes use of the key
• Has 9/11/13 rounds
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
AES Operation (one round)
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
AES Operation (N rounds)
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
AES Structure
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
Random Numbers
Many uses of random numbers in cryptography
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
Pseudorandom Number
Generators
Often use deterministic algorithmic techniques to create
random numbers.
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
Pseudorandom Number Generators
True random number generator (TRNG) : input is a random value (system
time).
Pseudorandom number generator (PRNG) : input is a fixed value + feedback
Pseudorandom function (PRF) : input is a fixed value + feedback + specific
value (e.g. user ID)
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
Stream Cipher
Block cipher processes one block of elements at a time.
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
Stream Cipher Structure
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
Stream Cipher Structure…
The key is input to pseudorandom byte generator.
The key is unpredictable.
The output of pseudorandom byte generator is called
keystream.
Keystream will combine with plaintext stream using
XOR.
E.g. :
En :11001100 plaintext 01101100 Keystream = 10100000 Ciphertext
De : 10100000 Ciphertext 01101100 Keystream = 11001100 plaintext
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
Stream Cipher Properties
Some design considerations are:
Properly designed, can be as secure as a block cipher with same size key
But usually simpler & faster
Data communication channel and web : stream cipher
File transferring, email and database : block cipher
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
RC4
Its stream cipher.
◦ Encrypt one bytes at a time
◦ Almost random number: Period of cipher is greater than 10100
◦ Can use as a random number generator
◦ Very fast and simple
◦ Popular method, including WEP, WPA and SSL
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
RC4 Structure
Contain Key Scheduling Algorithm (KSA) and
Pseudorandom Generation Algorithm (PRGA) steps:
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
RC4…
Key scheduling algorithm (KSA):
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
RC4…
The steps for RC4 encryption algorithm is as
follows:
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
RC4 Example
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE
01010001
&
01000001
Sunway University | NET3106 Network Security | Houshyar Honar Pajooh | Aug 2022
SENSITIVE