0% found this document useful (0 votes)
14 views

Lec 5

The document discusses modern encryption techniques including stream ciphers, block ciphers, and the Data Encryption Standard (DES). It covers the basics of how stream and block ciphers work, the structure and functions of DES, and how keys are generated in DES.

Uploaded by

am8465821
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Lec 5

The document discusses modern encryption techniques including stream ciphers, block ciphers, and the Data Encryption Standard (DES). It covers the basics of how stream and block ciphers work, the structure and functions of DES, and how keys are generated in DES.

Uploaded by

am8465821
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Lecture 4

Data Security : MODERN ENCRYPTION


Stream , Block Ciphers and the Data
Encryption Standard (DES)

Dr. Khaled Saada


Agenda
 Why Modern Encryption?
 Types of Encryption.
 Symmetric Encryption.
 Stream Cipher.
 Block Cipher.
 Block Ciphers vs. Stream Ciphers.
 Data Encryption Standard (DES).
Symmetric Encryption
Types of Symmetric Encryption

Block Stream
cipher cipher

DES RC4

Blowfish A5
Stream Cipher

6
Stream Cipher
Convert the plaintext to cipher text one bit at a time.
XOR a stream of plaintext with key stream from a pseudo-
random sequence generator.
At decryption, the same key stream is XOR with the
cipher steam bits to extract plaintext.

6
Block Cipher Principles
most symmetric block ciphers are based on a
Feistel Cipher Structure
needed since must be able to decrypt ciphertext to
recover messages efficiently
block ciphers look like an extremely large
substitution
would need table of 264 entries for a 64-bit block
instead create from smaller building blocks
using idea of a product cipher

7
Block Cipher
Divide input bit stream into n –bit sections.
No dependency/history between sections.
In a secure block cipher, each output bit is a function of all n
input bits and all K key bits.

8
Block Ciphers vs. Stream Ciphers.

Block Cipher Stream Cipher


Block ciphers can be easier Stream ciphers that only
to implement in software. encrypt and decrypt data one
bit at a time are not really
suitable for software
implementation.
Not suitable for hardware stream ciphers can be more
implementation. suitable for hardware
implementation.
Used key one time. Used key more time
Data Encryption Standard (DES)

Introduction to the DES


1974 proposed by IBM with input
from NSA.
1977 1998 US standard.
Best studied cipher in the world.
Confusion and Diffusion
Shannon : “there are two primitive operations for
encryption”.
 Confusion: Encryption operation where the relationship
between plainrtext and ciphertext is obscured.
EX. : Shift cipher – main operation is substitution.
 Diffusion: Encryption by spreading out the influence of one
plaintext letter over many ciphertext letters.
EX. : Permutations - changing the positioning of the
plaintext.

11
Data Encryption Standard (DES)

12
Initial Permutation IP
 first step of the data computation
 IP re-orders the input data bits
 even bits to LH half, odd bits to RH half
 quite regular in structure (easy in h/w)
 example:

IP(675a6967 5e5a6b5a) = (ffb2194d 004df6fb)

13
Initial Permutation IP

14
Initial Permutation IP

15
Feistel Cipher Structure

• partitions input block into two


halves
• process through multiple rounds
which
• perform a substitution on left data
half
• based on round function of right
half of sub-key
• then have permutation swapping
halves

16
Feistel Cipher Structure

17
Feistel Cipher Structure One round

18
Feistel Cipher Structure One round

implements Shannon’s substitution-permutation network


concept

19
Details of the F-function

20
Substitution Boxes S
 have eight S-boxes which map 6 to 4 bits
 each S-box is actually 4 little 4 bit boxes
 outer bits 1 and 6 (row bits) select one rows
 inner bits 2-5 (column bits) are substituted
 result is 8 lots of 4 bits, or 32 bits
 row selection depends on both data and key
 feature known as autoclaving (auto-keying)
 example:
S(18 09 12 3d 11 17 38 39) = 5fd25e03

21
22
Example:
The input to S-box I is 100011. What is the output?
Solution
If we write the first and the sixth bits together, we get 11 in binary, which is 3 in
decimal. The remaining bits are 0001 in binary, which is 1 in decimal. We look for the
value in row 3, column 1, (S-box 1). The result is 12 in decimal, which in binary is 1100.
So the input 100011 yields the output 1100.

23
24
25
DES Key agenda
Forms sub-keys used in each round
consists of:
 initial permutation of the key (PC1) which selects 56-bits in two 28-bit halves

16 stages consisting of:


selecting 24-bits from each half
permuting them by PC2 for use in function f,
rotating each half separately either 1 or 2 places
depending on the key rotation schedule K

26
Key generation

❑Rotate 100111 three bits to the left. 111100


27
28
❑Rotate 100111 three bits to the left.

29
Reversed Key Secheduler for encryption of DES

30
Decryption of DES

31
Reversed Key Secheduler for decryption of
DES

32
Block ciphers modes of operation

Modes of
Operation

Deterministic Probabilistic
enc
enc

Electronic Block cipher Stream


code CBC
cipher

book
• ECB • OFB

• CFB
(cipher feed
33
51 back)
Multiple Encryption

1.Double Encryption
Note:
The keyspace of this encryption is |k| = 2k . 2k =22k
However, using the meet-in-the-middle attack, the key
search is reduced significantly.

52
Multiple Encryption

2.Triple Encryption

53

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy