ch6 encryption
TRANSCRIPT
-
7/27/2019 Ch6 Encryption
1/23
by Assoc. Prof. Thuong Le-Tien 1
Encryption
DIGITAL COMMUNICATIONS
Lectured by Assoc. Prof. Dr.Thuong Le-Tien
Oct, 2011
-
7/27/2019 Ch6 Encryption
2/23
by Assoc. Prof. Thuong Le-Tien 2
Data Encryption
Encryption is the transformation of plain text into ciphertext;
decryption is the inverse of this process.
The cipher is the set of transformation, and the keys are the
transformation parameter.
There are two type of ciphers: Block encryption is where
fixed blocks of plaintext are operated on in a combinatorial
Fashion, and stream encryption is similar to convolution
Encoding in that all segments of the plaintext are processed
-
7/27/2019 Ch6 Encryption
3/23
by Assoc. Prof. Thuong Le-Tien 3
Secret key system
-
7/27/2019 Ch6 Encryption
4/23
by Assoc. Prof. Thuong Le-Tien 4
Public/private key system
-
7/27/2019 Ch6 Encryption
5/23
by Assoc. Prof. Thuong Le-Tien 5
-
7/27/2019 Ch6 Encryption
6/23
by Assoc. Prof. Thuong Le-Tien 6
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
Polybius square
Plain text : N O W I S T H E T I M E
Cipher text: 33 43 25 42 34 44 32 51 44 42 23 51
-
7/27/2019 Ch6 Encryption
7/23
by Assoc. Prof. Thuong Le-Tien 7
Key: TYPETYPETYPE
Plain text : NOWISTHETIME
Cipher text : GMLMLRWIMGBITrithemius progressive key
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
0 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
1 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 A
2 C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
3 D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
4 E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
5 F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
6 G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
7 H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
9 J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
10 K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
11 L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
12 M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
14 O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
16 Q R S T U V W X Y Z A B C D E F G H I J K L M N O P17 R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
19 T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
21 V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
22 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
23 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
24 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
25 Z 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
-
7/27/2019 Ch6 Encryption
8/23
by Assoc. Prof. Thuong Le-Tien 8
Permutation examples (a) straight (b) expanded(c) compressed
Figure 13.4-3
-
7/27/2019 Ch6 Encryption
9/23
by Assoc. Prof. Thuong Le-Tien 9
S-box exampleFigure 13.4-4
-
7/27/2019 Ch6 Encryption
10/23
by Assoc. Prof. Thuong Le-Tien 10
DES flowchartFigure 13.4-5
-
7/27/2019 Ch6 Encryption
11/23
by Assoc. Prof. Thuong Le-Tien 11
-
7/27/2019 Ch6 Encryption
12/23
by Assoc. Prof. Thuong Le-Tien 12
Substitute and permute blockFigure 13.4-6
-
7/27/2019 Ch6 Encryption
13/23
by Assoc. Prof. Thuong Le-Tien 13
58 50 42 34 26 18 10 2
60 52 44 36 28 20 12 4
62 54 46 38 30 22 14 664 56 48 40 32 24 16 8
57 49 41 33 25 17 9 1
59 51 43 35 27 19 11 3
61 53 45 37 29 21 13 5
63 55 47 39 31 23 15 7
Initial permutation
-
7/27/2019 Ch6 Encryption
14/23
by Assoc. Prof. Thuong Le-Tien 14
32 1 2 3 4 5
4 5 6 7 8 9
8 9 10 11 12 1312 13 14 15 16 17
16 17 18 19 20 21
20 21 22 23 24 25
24 25 26 27 28 29
28 29 30 31 32 1
16 7 20 21
29 12 28 17
1 15 23 26
5 18 31 10
2 8 24 14
32 27 3 9
19 13 30 6
22 11 4 25
E Box
P Box
-
7/27/2019 Ch6 Encryption
15/23
15
S BoxCot
Hang 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7
S11 0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8
2 4 1 14 8 13 6 2 11 1 5 12 9 7 3 10 5 0
3 15 12 8 2 4 9 1 7 5 11 3 14 10 0 6 13
0 15 1 8 14 6 11 3 4 9 7 2 13 12 0 5 10
S21 3 13 4 7 15 2 8 14 1 2 0 1 10 6 9 11 5
2 0 14 7 11 10 4 13 1 5 8 12 6 9 3 2 15
3 13 8 10 1 3 15 4 2 11 6 7 12 0 5 14 9
0 10 0 9 14 6 3 15 5 1 13 12 17 11 4 2 8
S31 13 7 0 9 3 4 6 10 2 8 5 14 1 2 11 15 1
2 13 6 4 9 8 15 3 0 11 1 2 12 5 10 14 7
3 1 10 13 0 6 9 8 7 4 15 14 3 11 5 2 12
0 7 13 14 3 0 6 9 10 1 2 8 5 11 12 4 15
S41 13 8 11 5 6 15 0 3 4 7 2 12 1 10 14 9
2 10 6 9 0 12 11 7 13 1 5 1 3 14 5 2 8 4
3 3 15 0 6 10 1 13 8 9 4 5 11 12 7 2 14
0 2 12 4 1 7 10 11 6 8 5 3 15 1 3 0 14 9
S51 14 11 2 12 4 7 13 1 5 0 15 10 3 9 8 6
2 4 2 1 11 10 13 7 8 15 9 12 5 6 3 0 14
3 11 8 12 7 1 14 2 13 6 15 0 9 10 4 5 3
0 12 1 10 15 9 2 6 8 0 13 3 4 14 7 5 11
S61 10 15 4 2 7 12 9 5 6 1 13 14 0 11 3 8
2 9 14 1 5 5 2 8 12 3 7 0 4 10 1 13 11 6
3 4 3 2 12 9 5 15 0 11 14 1 7 6 0 8 13
0 4 11 2 14 1 5 0 8 13 3 12 9 7 5 10 6 1
S71 13 0 11 7 4 9 1 10 1 4 3 5 12 2 15 8 6
2 1 4 11 13 1 2 3 7 14 1 0 15 6 8 0 5 9 2
3 6 11 13 8 1 4 10 7 9 5 0 15 14 2 3 12
0 13 2 8 4 6 15 11 1 10 9 3 14 5 0 12 7
S81 1 15 1 3 8 10 3 7 4 12 5 6 11 0 14 9 2
2 7 11 4 1 9 12 14 2 0 6 10 13 1 5 3 5 8
3 2 1 14 7 4 10 8 13 15 12 9 0 3 5 6 11
b0, b5 for rows; b1, b2, b3, b4 for columns
-
7/27/2019 Ch6 Encryption
16/23
by Assoc. Prof. Thuong Le-Tien 16
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Key generator flowchartFigure 13.4-7
-
7/27/2019 Ch6 Encryption
17/23
by Assoc. Prof. Thuong Le-Tien 17
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
32 to 48 bit expansionFigure 13.4-8
-
7/27/2019 Ch6 Encryption
18/23
by Assoc. Prof. Thuong Le-Tien 18
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Details of 48 to 32-bit S-boxFigure 13.4-9
-
7/27/2019 Ch6 Encryption
19/23
by Assoc. Prof. Thuong Le-Tien 19
In cryptography, the Advanced Encryption Standard (AES)
is a symmetric-key encryption standard adopted by the U.S.
government.
The standard comprises threeblock ciphers, AES-128, AES-
192 and AES-256, adopted from a larger collection originally
published as Rijndael. Each of these ciphers has a 128-bit
block size, with key sizes of 128, 192 and 256 bits,
respectively.
The AES ciphers have been analyzed extensively and are nowused worldwide, as was the case with its predecessor, the Data
Encryption Standard (DES).
AES
-
7/27/2019 Ch6 Encryption
20/23
by Assoc. Prof. Thuong Le-Tien 20
Description of the cipherAES is based on a design principle known as a Substitution
permutation network. It is fast in both software and
hardware.[6] Unlike its predecessor, DES, AES does not use a
Feistel network.
AES has a fixedblock size of 128bits and a key size of 128,192, or 256 bits, whereas Rijndael can be specified with
block and key sizes in any multiple of 32 bits, with a
minimum of 128 bits. The blocksize has a maximum of 256
bits, but the keysize has theoretically no maximum.
AES operates on a 44 array of bytes, termed the state
(versions of Rijndael with a larger block size have additional
columns in the state). Most AES calculations are done in a
special finite field.
-
7/27/2019 Ch6 Encryption
21/23
by Assoc. Prof. Thuong Le-Tien 21
High-level description of the algorithm
KeyExpansionround keys are derived from the cipher key using Rijndael's key schedule
* Initial Round
AddRoundKeyeach byte of the state is combined with
the round key using bitwise xor
* RoundsSubBytesa non-linear substitution step where each
byte is replaced with another according to a lookup table.
ShiftRowsa transposition step where each row of the
state is shifted cyclically a certain number of steps.
MixColumnsa mixing operation which operates on the
columns of the state, combining the four bytes in each column.AddRoundKey
* Final Round (no MixColumns)
SubBytes
ShiftRows
AddRoundKey
-
7/27/2019 Ch6 Encryption
22/23
by Assoc. Prof. Thuong Le-Tien 22
-
7/27/2019 Ch6 Encryption
23/23
by Assoc. Prof. Thuong Le-Tien 23