1. Trang chủ
  2. » Công Nghệ Thông Tin

Bài giảng Mật mã học: Mã hóa DES - Huỳnh Trọng Thưa

31 12 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 31
Dung lượng 1,19 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Bài giảng Mật mã học: Mã hóa DES cung cấp cho người học các kiến thức: Data encryption standard (DES) and alternatives, modern block ciphers, DES block cipher, descryption of DES,... Mời các bạn cùng tham khảo nội dung chi tiết.

Trang 1

Mã hóa DES Data Encryption Standard

Huỳnh Trọng Thưa htthua@ptithcm.edu.vn

Trang 2

Part 1 - Encryption of DES

• Feistel structure of DES

• S-boxes

• Key Schedule

2

Trang 3

Data Encryption Standard (DES)

and Alternatives

• Basic design ideas of block ciphers, including

confusion (xáo trộn) and diffusion (khuếch

tán), which are important properties of all

modern block ciphers

• The internal structure of DES, including Feistel networks, S-boxes and the key schedule

• Alternatives to DES, including 3DES

3

Trang 4

Confusion and Diffusion

• Confusion: the relationship between key

and ciphertext is obscured.

– for achieving confusion: substitution , which

is found in both DES and AES.

• Diffusion: the influence of one plaintext

symbol is spread over many ciphertext

symbols with the goal of hiding

statistical properties of the plaintext.

– A simple diffusion element is the bit

permutation , which is used frequently

within DES.

4

Principle of an N round

product cipher, where

each round performs a confusion and diffusion operation

Trang 5

Modern block ciphers

• Changing of one bit of plaintext results on

average in the change of half the output bits,

i.e., the second ciphertext looks statistically

independent of the first one

5

Principle of diffusion of a block cipher

Trang 6

DES block cipher

• DES is a cipher which encrypts blocks of length

of 64 bits with a key of size of 56 bits

• DES is a symmetric cipher

• An iterative algorithm

6

Trang 7

Round structure of DES

• For each block of plaintext,

encryption is handled in 16

rounds which all perform the

identical operation.

• In every round a different

subkey is used and all subkeys ki

are derived from the main key k.

7

Trang 8

The Feistel structure of DES

8

Trang 9

The Feistel structure of DES (cont.)

9

Trang 10

Internal Structure of DES

• Initial and Final Permutation

• f – function

• Key Schedule

10

Trang 11

Initial and Final Permutation

• are bitwise permutations

11

bit swaps of the initial permutation bit swaps of the final permutation

read from left to right, top to bottom

Trang 12

f - function

12

Trang 13

Bit swaps of the expansion

function E

13

Trang 14

• Each S-box contains 2 6 =64 entries.

• Each entry is a 4-bit value.

14

Decoding of the input

1001012 by S-box 1

• Ex: The S-box input b =(100101)2 indicates the row

112 = 3 (i.e., fourth row, numbering starts with 002)

and the column 00102 = 2 (i.e., the third column) If the input b is fed into S-box 1, the output is S1(37 =

1001012)= 8 = 10002.

Trang 15

S-boxes table for Ref.

15

Trang 16

The permutation P within the f

-function

16

Trang 17

Key Schedule

• PC-1: ignoring every eighth bit

(64-bit key -> 56 bits )

• 56-bit key is split into two

halves C0 and D0

• The two 28-bit halves are

cyclically shifted, i.e., rotated,

left by one or two bit positions

depending on the round i.

17

Initial key permutation PC−1

In rounds i = 1,2,9,16, the two halves are rotated left by one bit

In the other rounds i 1,2,9,16, the two halves are rotated left by two bits.

Trang 18

Key schedule for DES encryption

18

Round key permutation PC−2

Trang 19

Part 2 - Descryption of DES

• Descryption of DES

• Security of DES

• DES Alternatives

19

Trang 20

Block diagram for DES decryption

20

y

Trang 21

Block diagram for DES decryption (cont.)

21

Trang 22

Reversed Key Schedule

• k16 can be directly derived after PC−1

22

• Round 1, the key is not rotated.

• Rounds 2, 9, and 16 the two halves are rotated right by one bit.

• Other rounds 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 and 15 the two halves are rotated right by two bits.

Trang 23

Reversed key schedule for decryption of DES

23

Trang 24

Why is the decryption function essentially the same as the encryption function?

24

Trang 25

Why is the decryption function essentially the

same as the encryption function? (cont.)

25

where i = 0,1, ,16 In particular, after the last decryption round:

Finally, at the end of the decryption process, we have to reverse the initial permutation:

Trang 26

Security of DES

• The key space is too small, i.e., the algorithm

is vulnerable against brute-force attacks

• The design criteria of the S-boxes was kept

secret and there might have existed an

analytical attack that exploits mathematical

properties of the S-boxes, but which is only

known to the DES designers

26

Trang 27

DES Alternatives

• Advanced Encryption Standard (AES) and the AES Finalist Ciphers

• Triple DES (3DES) and DESX

• Lightweight Cipher PRESENT

27

Trang 28

Advanced Encryption Standard (AES) and the AES Finalist Ciphers

• AES is with its three key lengths of 128, 192

and 256 bit secure

• Against brute-force attacks for several decades

• There are no analytical attacks with any

reasonable chance of success known

28

Trang 29

Triple DES (3DES) and DESX

• 3DES consists of three subsequent DES encryptions with different keys

29

Another version of 3DES is

A different approach for strengthening DES is to use key whitening

Trang 30

Lightweight Cipher PRESENT

30

Trang 31

Next class

• Advanced Encryption Standard (AES)

31

Ngày đăng: 21/05/2021, 12:38

🧩 Sản phẩm bạn có thể quan tâm

w