chapter 6 contemporary symmetric ciphers
DESCRIPTION
Chapter 6 Contemporary Symmetric Ciphers. Overview. 1.Double DES 2.Triple DES(Two Key and Three Key) 3.Block Cipher Modes of Operation 4. RC5. 1. Doublie DES. Triple DES Brute-frorce ๊ณต๊ฒฉ์ DES ์ ์ ์ฌ์ ์ธ ์ทจ์ฝ์ ์ผ๋ก ์ธํด ๊ทธ ๋์์ ์ฐพ๋ ๊ฒ์ด ๊ณ ๋ ค๋จ . ์์ ํ ์๋ก์ด ์๊ณ ๋ฆฌ์ฆ ์ค๊ณ DES ์ ์๊ณ ๋ฆฌ์ฆ๊ณผ Key ๋ฅผ ์ฌ๋ฌ ๋ฒ ์ฌ์ฉ Double DES - PowerPoint PPT PresentationTRANSCRIPT
Chapter 6Contemporary Symmetric Ciphers
2Network & Information Security LabNetwork & Information Security Lab
Overview
1.Double DES 2.Triple DES(Two Key and Three Key) 3.Block Cipher Modes of Operation 4. RC5
3Network & Information Security LabNetwork & Information Security Lab
Triple DES Brute-frorce ๊ณต๊ฒฉ์ DES ์ ์ ์ฌ์ ์ธ ์ทจ์ฝ์ ์ผ๋ก ์ธํด ๊ทธ ๋์์
์ฐพ๋ ๊ฒ์ด ๊ณ ๋ ค๋จ . ์์ ํ ์๋ก์ด ์๊ณ ๋ฆฌ์ฆ ์ค๊ณ DES ์ ์๊ณ ๋ฆฌ์ฆ๊ณผ Key ๋ฅผ ์ฌ๋ฌ ๋ฒ ์ฌ์ฉ
Double DES ๋ณต์ ์ํธํ์ ๊ฐ์ฅ ๋จ์ํ ๋ฐฉ๋ฒ์ ๋๋ฒ์ ์ํธํ ๋ฐฉ๋ฒ๊ณผ ๋๊ฐ์
ํค๋ฅผ ๊ฐ์ง๋ ๊ฒ . Encryption
C = Ek2[Ek1[P]]
Ciphertext plaintext
Key
1. Doublie DES
4Network & Information Security LabNetwork & Information Security Lab
Double DES ์ ํํ
1. Doublie DES
5Network & Information Security LabNetwork & Information Security Lab
2. Triple DES
6Network & Information Security LabNetwork & Information Security Lab
Reduction to a Single Stage 2 ๊ฐ์ ํค๋ฅผ ์ฌ์ฉํ๋ DES ์ ๊ฒฝ์ฐ 56Bit Key ๊ฐ์ ๊ฐ์ง๋ ๋ Key K1 ๊ณผ K2 ๊ฐ
์ฃผ์ด์ง๋ค๋ฉด ๊ฐ๋จํ๊ฒ K3 ์ Key ๋ฅผ ์ฐพ์ ์ ์์
์ด๋ฌํ ์์ฑ ๋๋ฌธ์ , ์ด์ค ์ํธํ ๊ฒฝ์ฐ ๊ทธ ๊ฒฐ๊ณผ๊ฐ 56Bit Key ๋ฅผ ๊ฐ์ง ๋จ์ผ ์ํธํ์ ์ํธ๋ฌธ์ ๊ฐ๋๊ฐ ๊ฐ๊ธฐ ๋๋ฌธ์ ํจ๊ณผ์ ์ด์ง ๋ชปํจ
2 1 3[ [ ]] [ ]K K KE E P E P
2. Triple DES
7Network & Information Security LabNetwork & Information Security Lab
Meet-in-the-Middle Attack DIFF77 ์ ์ํ์ฌ ์ฒ์ ์๋ ค์ก์ผ๋ฉฐ , (P,C) ์ ๊ฐ์ ์๋ ค์ง ํ๋ฌธ๊ณผ ์ํธ๋ฌธ์ด ์์ผ๋ก ์ฃผ์ด์ง๋ค๋ฉด ์๋์ ๊ฐ์
๊ณต๊ฒฉ์ด ๊ฐ๋ฅ
ํ๋ฌธ P ๋ฅผ 256 ๊ฐ์ ๊ฐ๋ฅํ ๋ชจ๋ ํค K1 ์ผ๋ก ์ํธํ ํ์ฌ ์์ฑ๋ ์ํธ๋ฌธ์ ํ ์ด๋ธ์ ์ ์ฅ
์ํธ๋ฌธ C ๋ฅผ ํค K2 ์ ๊ฐ๋ฅํ ๋ชจ๋ 256 ๊ฐ์ ๊ฐ์ผ๋ก ๋ณตํธํํ ๋ณตํธ๋ฌธ์ ํ ์ด๋ธ์ ์ ์ฅ
๊ฐ๊ฐ์ ๋ ํ ์ด๋ธ์ด ์ผ์นํ๋์ง ํ์ธ ์ ๊ณผ์ ์ด ์ผ์นํ๋ค๋ฉด ์๋ก์ด (P,C) ์์ ๋ํ์ฌ ๋ Key ๊ฒ์ฌ ๋ Key ์ ํํ ์ํธ๋ฌธ์ ๋ง๋ ๋ค๋ฉด Key ๊ฒ์ถ ์ฑ๊ณต
1 2[ ] [ ]K KX E P D C
2. Triple DES
8Network & Information Security LabNetwork & Information Security Lab
Meet-in-the-Middle Attack
56( 1 , ), 1,...., 2iiA E K P i
56( 2 , ), 1,...., 2jiB D K C j
??i jA B( 2 , ( 1 , )) ??j i
New NewC E K E K P
1 1
2 2
i
j
K K
K K
2. Triple DES
9Network & Information Security LabNetwork & Information Security Lab
Triple-DES with Two-Keys Meet-in-the-middle attack ๊ณต๊ฒฉ์ ํ์คํ ๋์์ฑ
์ธ ๊ฐ์ ๋ค๋ฅธ Key ๋ก ์ธ ๋ฒ ์ํธํ
๊ธฐ๋ฒ์ ์์ ์ธ๊ธ๋ ํ๋ฌธ ๊ณต๊ฒฉ์ ํ์ํ ๋น์ฉ์ 2112 ๋ก ์ฆ๊ฐ์ํด 2 X 56 = 112 ์ ๋ค์ ํฐ ํค ๊ธธ์ด๋ฅผ ์๊ตฌํ๋ ๋จ์ ์ด ์กด์ฌํจ Tuchman ์ ๋๊ฐ์ Key ๋ฅผ ์ฌ์ฉํ๋ Triple DES ์ ์
์ด ํจ์๋ E โ D โ E ์์๋ฅผ ๊ฐ์ง๋ฉฐ , C = EK1[DK2[EK1[P]]] ๋ก ์์ํ ํ ์ ์์ .
Key ๊ด๋ฆฌ๋ ANSI X.97 ๊ณผ ISO8732 ์ฌ์ฉ์ ์ฑํ ํ์ฌ 3DES ์ ๋ํ ์ค์ง์ ์ธ ์ํธํ์ ๊ณต๊ฒฉ์ด ์กด์ฌํ์ง ์์
2. Triple DES
10Network & Information Security LabNetwork & Information Security Lab
3DES ์ ์ ์๋ ์ ํจํ ๊ณต๊ฒฉ ๊ธฐ๋ฒ Merkel and Hellman ์ ์ ์
์ฒ์ ์ค๊ฐ ๊ฐ์ ์์ฑํ๋ ํ๋ฌธ ๊ฐ์ ๋ฐ๊ฒฌํ์ฌ ํค๋ฅผ ๊ฒ์ถํ๋ ๊ธฐ๋ฒ ๋ ํค๋ฅผ ๊ฒฐ์ ํ๋ Meet-in-the-middle Attack ์ค๊ฐ ํ๋ฌธ A ์ C ๋ฅผ ์ ์ ์๋ค๋ฉด Double DES ๊ณผ ์ ์ฌํ๊ฒ ๊ณต๊ฒฉ๊ฐ๋ฅ
๋ณดํต ๊ณต๊ฒฉ์๋ 2 ๊ฐ์ ์ํธํค ์์ด๋ A ์ B ๊ฐ์ ์ ์ ์์ ๊ณต๊ฒฉ์๋ A ๊ฐ ๋ ๊ฐ๋ฅ์ฑ์ด ์๋ ๊ฐ์ ์ ํ A ๋ฅผ ์์ฑํ๋ ํ๋ฌธ / ์ํธ๋ฌธ (P,C) ์์ ๋ฐ๊ฒฌํ๋ค๊ณ ๊ฐ์
( 1) ( 2) ( 1)
) ( 1, ), ( 2, ), ( 1, )E K D K E K
A E K P B D K A C E K B
P A B C
์
2. Triple DES
11Network & Information Security LabNetwork & Information Security Lab
๊ณต๊ฒฉ์์ ๊ณต๊ฒฉ ๋จ๊ณ 1 ๋จ๊ณ
P,C ์์ ํ๋ํ๋ค๊ณ ๊ฐ์ ํ๋ฉฐ , ์ด ๊ฐ์ ํ ์ด๋ธ์ ์์น ์ํด .
2 ๋จ๊ณ A ๋ฅผ ์ฐพ๊ธฐ ์ํ ์์์ ๊ฐ a ๋ฅผ ์ ํํ๊ณ P = Di[a] ๋ก ์ ์๋ ๋ ๋ฒ์งธ
ํ ์ด๋ธ์ ์์ฑ 256 ๊ฐ์ ๊ฐ๋ฅํ ํค K1=i ์ ์ํด ์์ฑ๋ ์ ์์ด์ผ ํจ
56
( 1 , ), 1 2
Select a
P D K a K Number
( 1) ( 2) ( 1)E K D K E KP A B C a
2. Triple DES
12Network & Information Security LabNetwork & Information Security Lab
๋ค์๊ณผ ๊ฐ์ ๋ฐฉ๋ฒ์ผ๋ก B ์ ๊ฐ์ ์์ฑํ์ฌ ์ธ๋ฒ์งธ ํ ์ด๋ธ์ ์ฑ์ . B = Di[C]
B
( 1) ( 2) ( 1)E K D K E KP A B C
a
56( 1, ), 1 2B D K C K Number
2. Triple DES
13Network & Information Security LabNetwork & Information Security Lab
3 ๋จ๊ณ ํ ์ด๋ธ 2 ์์ K1 ์ ํ๋ณด ๊ฐ์ ๊ฐ์ง๊ณ ์๊ณ , K2 ์ ๊ฐ์ ์ฐพ์ ์ ์๋ค . 256 ๊ฐ์ ๊ฐ๋ฅํ ํค K2=j ๊ฐ๊ฐ์ ๋ํ์ฌ ์ ํ๋ a ์ ๊ฐ์ผ๋ก ๋ ๋ฒ์งธ
์ค๊ฐ ๊ฐ์ ๊ตฌํ๋ค . Bj = Dj [a]
56( 2 , ), 2 2B D K a K Number
B
( 1) ( 2) ( 1)E K D K E KP A B C
( 2, )E K a ????
2. Triple DES
14Network & Information Security LabNetwork & Information Security Lab
4 ๋จ๊ณ ๊ฐ 1,2,3 ๋จ๊ณ์์ ์ฐ์ถํ ํค๋ฅผ ๋ค๋ฅธ (P,C) ์์ ์ ์ฉ ํค ์์ด ์ ์์ ์ธ ์ํธ๋ฌธ์ ์์ฑ ํ๋ค๋ฉด ์์ ์๋ฃ ์ฑ๊ณตํ ์์ด ์กด์ฌ ํ์ง ์๋๋ค๋ฉด ์๋ก์ด a ๋ก 1 ๋จ๊ณ ๋ถํฐ ๋ฐ๋ณต
์์ฐ ๋๋ ๊ณต๊ฒฉ ์คํ ์๊ฐ (256)264/n = 2120-log
2n
2. Triple DES
15Network & Information Security LabNetwork & Information Security Lab
Triple-DES with Three-Keys ์์์ ์ธ๊ธ๋ ๊ณต๊ฒฉ์ ๋ํด ์ ํญ์ฑ์ ๊ฐ์ง ๋ณด๋ค ๊ฐํ ๋ณด์์ฑ์ ์ํด 3 ๊ฐ์ ์ / ๋ณตํธ์ฉ ํค๋ฅผ ์ฌ์ฉํจ ์ธ ๊ฐ์ ํฌ๊ธฐ๋ฅผ ๊ฐ์ง 3DS ๋ 168Bit ์ ํค ํฌ๊ธฐ๋ฅผ ๊ฐ์ง C = EK3[DK2[EK1[P]]]
Triple ๋ PGP ์ S/mime ๊ณผ ๊ฐ์ ์ธํฐ๋ท ๊ธฐ๋ฐ์ ์์ฉํ๋ก๊ทธ๋จ์ ์ต์ ํ ๋์ด ์์ผ๋ฉฐ ๋ณดํธ์ ์ผ๋ก ์ฌ์ฉ๋๊ณ ์๋ ์ํธ ์๊ณ ๋ฆฌ์ฆ์ ํ๋์
2. Triple DES
16Network & Information Security LabNetwork & Information Security Lab
3. Block Cipher Modes of Operration ์ํธํ ์๊ณ ๋ฆฌ์ฆ์ ํจ๊ณผ์ ์ธ ์ฌ์ฉ์ ์ํ์ฌ ๋ค์ํ ํํ๋ก ์ /
๋ณตํธํ ๋ฅผ ์ํํ ์ ์์ ECB Mode CBC Mode Feedback Mode Counter Mode
3. Block Cipher Modes of Operation
17Network & Information Security LabNetwork & Information Security Lab
ECB Mode
๋งค ์๊ฐ๋ง๋ค ๊ฐ๊ฐ์ ๋ธ๋ก์ ๋์ผํ ํค๋ก ์ / ๋ณตํธํ ์ํค๋ ๊ธฐ๋ฒ ํต์ ์ํ ์ Signal value ์ ๊ธฐ๋ฐ์ฑ์ ์ ์งํ๊ธฐ ์ํด ์ฌ์ฉํจ ๋์ผํ ํจํด์ ์ํด ์ / ๋ณตํธํ ์์ ์ด ์ํ๋๋ฏ๋ก ์ด๋ฌํ ๊ท์น์ ์ธ ํจํด์ ํ์ ,
์ํธ ํค๋ฅผ ์์๋ผ ์ ์๋ค๋ ๋ฌธ์ ์ ์ด ์กด์ฌ
Encrypt
1P
K Encrypt
2P
K Encrypt
nP
Kโฆโฆโฆโฆโฆโฆ
1Time 2Time Time n
Encrypt
1P
1C
K Encrypt
2P
2C
K Encrypt
nP
nC
Kโฆโฆโฆโฆโฆโฆ
( , ), ( 1,...., )
( , ), ( 1,...., )
i
i
C E K Pi i n
P E K Ci i n
3. Block Cipher Modes of Operation
18Network & Information Security LabNetwork & Information Security Lab
CBC Mode
์ํธ๋ฌธ ๋ธ๋ก์ ๋ค์ ๋ฒ ์ํธํ ์์ ์ Input ๋ฐ์ดํฐ๋ก ์ฌ์ฉํ๋ ๊ธฐ๋ฒ ์ผ๋ฐ์ ์ผ๋ก ๊ธด ๊ธธ์ด์ ๋ธ๋ก ๋ฐ์ดํฐ ์ ์ก ๋ฐ ์ธ์ฆ์ฉ MAC ๋ฑ์ ์ฌ์ฉ ๋ฐ์ดํฐ ์ํธํ์ ํ๋ฌธ์ ์ด์ ์ ์ํธ๋ฌธ์ XOR ์ฐ์ฐ์์ผ ์ํธํ
ํจ์ผ๋ก์จ , ๋์ผํ ํค๋ฅผ ์ฌ์ฉํ์์๋ ๋ถ๊ตฌํ๊ณ ๋ถ๊ท์นํ ํจํด์ ์ํด ์ํธ๋ฌธ ์์ฑ
Encrypt
1C
1P
K Encrypt
2C
2P
K Encrypt
nC
nP
Kโฆโฆโฆโฆโฆโฆ
1Time 2Time Time n
Encrypt
1P
K Encrypt
2P
K Encrypt
nP
Kโฆโฆโฆโฆโฆโฆ
1nC
IV
1nC
1 0( , ), ( 1,...., )i i iC E K C P i n C IV 1 0( , ), ( 2,...., )i i iP C D K C i n C IV
3. Block Cipher Modes of Operation
19Network & Information Security LabNetwork & Information Security Lab
์ฒซ๋ฒ์งธ ์ํธ๋ฌธ ๋ธ๋ก ์์ฑ์ ํ๋ฌธ ๋ฐ์ดํฐ์ IV(initialization vector) ๋ฅผ XOR ์ฐ์ฐ ํ ํ ์ํธ์ฉ ํค๋ก ์ํธํ
์ดํ ์ํธ๋ฌธ ๋ธ๋ก ์์ฑ์ ํ๋ฌธ ๋ฐ์ดํฐ์ ์ด์ ์ํธ๋ฌธ์ XOR ์ฐ์ฐ ํ ํ ์ํธ์ฉ ํค๋ก ์ํธํ
๋ณตํธํ ์์ ์ ์ํธํ ์์ ๊ณผ ๋ฐ๋๋ก ํํด์ง๋ฉฐ ๋ณตํธํ์ ์ํธํค์ IV ๊ฐ์ด ํ์ํจ
์ก ์์ ์๊ฐ์ ์๊ณ ์๋ IV ๊ฐ์ ์ 3 ์์ ์ํด ์ ์ก๋๊ฑฐ๋ , ECB Mode ๋ก ์ํธํํ์ฌ ์ ์ก๋ ์ ์์
1 1( , )C E K IV P
1( , )i i iC E K C P
1
1 1
( , )
( , )
i i iP C D K C
P IV D K C
3. Block Cipher Modes of Operation
20Network & Information Security LabNetwork & Information Security Lab
Cipher Feedback Mode(CFB)
๋ธ๋ก์ํธ๊ฐ ์คํธ๋ฆผ๋ชจ๋์ฒ๋ผ ๋์ํ๋๋ก ํจ ๋ธ๋ก ํฌ๊ธฐ๋ณด๋ค ์์ ๋ฐ์ดํฐ๋ฅผ ์ํธํ ํ ์ ์์ผ๋ฉฐ , ๋จ 1 ๊ฐ์ ๋นํธ๋ถํฐ
๋ธ๋ก๊น์ง์ ๋ค์ํ ํฌ๊ธฐ์ ๋ฐ์ดํฐ๋ฅผ ์ํธํ ํ ์ ์์ ์ผ๋ฐ์ ์ผ๋ก ๊ธด ๊ธธ์ด์ ๋ธ๋ก ๋ฐ์ดํฐ ์ ์ก ๋ฐ ์ธ์ฆ์ฉ MAC ๋ฑ์ ์ฌ์ฉ
Encrypt
1P
K
Shift register
Select Discard
IV
1C
Encrypt
2P
K
Shift register
Select Discard
2C
Encrypt
nP
K
Shift register
Select Discard
nC
1nC
3. Block Cipher Modes of Operation
21Network & Information Security LabNetwork & Information Security Lab
์ํธํ ์ด๊ธฐ ์ ๋ ฅ๋ฒํผ ๋ถ๋ถ์ IV ๋ก ์ฑ์์ง๋ฉฐ ์ํธ ํค๋ก ์ํธํ ๋จ
์ํธํ๋ ๋ฒํผ์ ์ต ์ข๋จ ๋นํธ์ ํ๋ฌธ์ XOR ์ฐ์ฐ๋๋ฉฐ , ๊ฒฐ๊ณผ๊ฐ์ ์ํธ๋ฌธ์ด ๋จ
์ํธํKey
์ํธํ ๋ ๋ฒํผ
ํ๋ฌธ
ํ๋ฌธ ๋งํผ์ ํฌ๊ธฐ
์ํธ๋ฌธ1P 1C
IV
3. Block Cipher Modes of Operation
22Network & Information Security LabNetwork & Information Security Lab
์ํธํ์ ์ฌ์ฉ๋ ๋ถ๋ถ์ ํ๊ธฐ๋๋ฉฐ ๋๋จธ์ง ๋ฒํผ๋ ๋ค์ ์ํธํ์ ์ฌ์ฉ ํ๊ธฐ๋์ด ๋น์์ง ๋นํธ๋งํผ ์ผ์ชฝ์ผ๋ก ์ฌํํธํจ
์ฌํํธ๋ก ์ธํด ๋น ๊ตฌ๊ฐ์ ์ํธ๋ฌธ์ด ๋์ ํจ , ๋จ์ ๋ฒํผ๋ ๋ค์ ์ํธํ์ ๊ณ์ ์ฌ์ฉ๋๋ฉฐ ๋์ผํ ๋ฐฉ๋ฒ์ผ๋ก ์ํธํ ์ํ , ์ด ๊ณผ์ ์ด ๊ณ์๋๋ฉด ๋ฒํผ๋ ์ํธ๋ฌธ์ผ๋ก ์ฑ์์ง
์ํธํ ๋ ๋ฒํผ ์ํธ๋ฌธ
์ํธ๋ฌธ
์ํธํ ๋ ๋ฒํผ
1C 2C 3C 4C 5C
3. Block Cipher Modes of Operation
23Network & Information Security LabNetwork & Information Security Lab
๋ณตํธํ ์ด๊ธฐ ์ ๋ ฅ๋ฒํผ ๋ถ๋ถ์ IV ๋ก ์ฑ์์ง๋ฉฐ ์ํธ ํค๋ก ์ํธํ ๋จ
์ํธํ๋ ๋ฒํผ์ ์ต ์ข๋จ ๋นํธ์ ์ํธ๋ฌธ์ XOR ์ฐ์ฐ๋๋ฉฐ , ๊ฒฐ๊ณผ๊ฐ์ ํ๋ฌธ์ด ๋จ
์ผ๋ฐ์ ์ธ ์ํธํ๋ ํน์ ๋ถ๋ถ์ ์ ๋ ฅ์ด ์ ์ฒด ์ํธ๋ฌธ์ ์ํฅ์ ๋ฏธ์น์ง๋ง CFB ๋ชจ๋์ ๊ฒฝ์ฐ ํน์ ๊ตฌ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ๋๋ผ๋ ์ํธ๋ฌธ ์ ์ฒด์ ํฐ ์ํฅ์ ๋ฏธ์น์ง ์์
์ํธํKey
์ํธํ ๋ ๋ฒํผ
์ํธ๋ฌธ
์ํธ๋ฌธ ๋งํผ์ ํฌ๊ธฐ
ํ๋ฌธ
IV
1C 2C 3C 4C 5C
1P
3. Block Cipher Modes of Operation
24Network & Information Security LabNetwork & Information Security Lab
Output Feedback Mode(OFB)
๋ธ๋ก์ํธ๊ฐ ์คํธ๋ฆผ๋ชจ๋์ฒ๋ผ ๋์ํ๋๋ก ํจ ๋ธ๋ก ํฌ๊ธฐ๋ณด๋ค ์์ ๋ฐ์ดํฐ๋ฅผ ์ํธํ ํ ์ ์์ผ๋ฉฐ , ๋จ 1 ๊ฐ์ ๋นํธ๋ถํฐ
๋ธ๋ก๊น์ง์ ๋ค์ํ ํฌ๊ธฐ์ ๋ฐ์ดํฐ๋ฅผ ์ํธํ ํ ์ ์์ CFB ๋ชจ๋์ ์ ์ฌํจ
Encrypt
1P
K
Shift register
K
Select Discard
IV
1C
Encrypt
2P
K
Shift register
Select Discard
2C
Encrypt
nP
K
Shift register
Select Discard
nC
1nC
3. Block Cipher Modes of Operation
25Network & Information Security LabNetwork & Information Security Lab
์ํธํ ์ด๊ธฐ ์ ๋ ฅ๋ฒํผ ๋ถ๋ถ์ IV ๋ก ์ฑ์์ง๋ฉฐ ์ํธ ํค๋ก ์ํธํ ๋จ
์ํธํ๋ ๋ฒํผ์ ์ต ์ข๋จ ๋นํธ์ ํ๋ฌธ์ XOR ์ฐ์ฐ๋๋ฉฐ , ๊ฒฐ๊ณผ๊ฐ์ ์ํธ๋ฌธ์ด ๋จ
์ํธํKey
์ํธํ ๋ ๋ฒํผ
ํ๋ฌธ
ํ๋ฌธ ๋งํผ์ ํฌ๊ธฐ
์ํธ๋ฌธ1P 1C
IV
3. Block Cipher Modes of Operation
26Network & Information Security LabNetwork & Information Security Lab
์ํธํ์ ์ฌ์ฉ๋ ๋ถ๋ถ์ ํ๊ธฐ๋๋ฉฐ , ๋จ์ ๊ณต๊ฐ์ ๋ค์ ์ํธํ์ ์ฌ์ฉ ํ๊ธฐ๋ ๊ณต๊ฐ๋งํผ ์ผ์ชฝ์ผ๋ก ์ฌํํธํจ
๋น ๊ตฌ๊ฐ์ด ์ํธ๋ฌธ์ผ๋ก ์ฑ์์ง๋ CFB ์ ๋ฌ๋ฆฌ ๋น ๊ตฌ๊ฐ์ 0 ์ผ๋ก ์ฑ์์ง๋ฉฐ ๋จ์ ๋ฒํผ๋ ๋ค์ ์ํธํ์ ๊ณ์ ์ฌ์ฉ๋๋ฉฐ ๋์ผํ ๋ฐฉ๋ฒ์ผ๋ก ์ํธํ ์ํ , ์ด ๊ณผ์ ์ด ๊ณ์๋๋ฉด ๋ฒํผ๋ 0 ์ผ๋ก ์ฑ์์ง
์ํธํ ๋ ๋ฒํผ 00
์ํธํ ๋ ๋ฒํผ
0000โฆโฆ
3. Block Cipher Modes of Operation
27Network & Information Security LabNetwork & Information Security Lab
Counter Mode
์ํธ๋ฌธ ์์ฑ์ IV ๊ฐ๊ณผ ์นด์ดํฐ๋ฅผ ๊ธฐ์ด๋ก ์ํธ๋ฌธ์ ์์ฑํ๋ ๊ธฐ๋ฒ ์ด๊ธฐ๊ฐ IV ๋ฅผ Counter ๋ก ์ฆ๊ฐ์ํจ ๊ฐ์ ์ํธ ํค๋ก ์ํธํ ํ ๋ค์
ํ๋ฌธ๊ณผ XOR ์ฐ์ฐํ๋ ๋ฐฉ๋ฒ์ผ๋ก , CBC ๊ธฐ๋ฒ๋ณด๋ค ๋นจ๋ผ ๋ณดํต ๋น ๋ฅธ ์ํธํ๋ฅผ ์๊ตฌํ๋ ๊ฒฝ์ฐ์ ์ฌ์ฉ๋จ
๋น ๋ฅด๋ฉฐ , ํจํด์ด ๋น๊ต์ ๋ถ๊ท์นํ๋ค๋ ์ด์ ์ด ์์ง๋ง ๋์ผํ IV ์ ์ํธํค๋ฅผ ์ฌ์ฉํ ๊ฒฝ์ฐ ์์ ์ฑ ๋ฌธ์ ๊ฐ ๋ฐ์ํ ์ ์์
Encrypt
1C
(0)IV Counter
K
1P
Encrypt
2C
(1)IV Counter
K
2P
Encrypt
nC
( 1)IV Counter n
K
nP
3. Block Cipher Modes of Operation
28Network & Information Security LabNetwork & Information Security Lab
RC5 ์ ํน์ง ๋น๊ต์ ๊ฐ๋จํ ์ฐ์ฐ์ผ๋ก ๊ฑฐ์ ๋ชจ๋ ํ๋์จ์ด์ ์ ํฉ
๋ง์ , ๋บ์ , XOR ๊ณผ ์ข / ์ฐ ๋กํ ์ด์ ๋ฑ์ ๊ฐ๋จํ ์ฐ์ ์ฐ์ฐ์ ์ฌ์ฉ
๋น ๋ฅธ ์ / ๋ณตํธํ ์ฐ์ฐ RC5 ๋ด๋ถ ๋ก์ง์ด ์ฐ์ ์ฐ์ฐ ์์ฃผ์ด๋ฏ๋ก ์ / ๋ณตํธํ ์์ ์ ๋น ๋ฅธ ์ฐ์ฐ์
์ํํจ ์๋ ๋จ์๋ก ์ฒ๋ฆฌํ๋ฉฐ ํ๋ฒ์ ์ํธํ ์์ ์ ์ํ
๊ฐ๋ณ์ ์ธ ํ๋ฌธ ํฌ๊ธฐ๋ฅผ ๊ฐ์ง ํ ์๋์ ๋นํธ์ ์๋ฅผ ๊ฐ๋ณ์ ์ผ๋ก ์ง์ ํด ์ค ์ ์์ (W)
๊ฐ๋ณ์ ์ธ ๋ผ์ด๋ ๋ผ์ด๋์ ์๋ ์ญ์ ๊ฐ๋ณ์ ์ผ๋ก ์ง์ ํด ์ค ์ ์์ ( R) ๋ผ์ด๋ ์๋ ์ํธ๋ฌธ์ ๋ณด์์ฑ์ ์ํฅ์ ์ค
5. RC5
29Network & Information Security LabNetwork & Information Security Lab
๊ฐ๋ณ์ ์ธ ํค์ ๊ธธ์ด ํค ๊ธธ์ด ์ญ์ ๊ฐ๋ณ์ ์ผ๋ก ์ง์ ์ด ๊ฐ๋ฅํจ (B). ํค์ ๊ธธ์ด๋ ์ํธ๋ฌธ์
๋ณด์์ฑ ๊ฐ๋์ ์ํฅ์ ์ค
๋ฎ์ ๋ฉ๋ชจ๋ฆฌ ์๊ตฌ์ฌํญ RC5 ๋ ์ ํ๋ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ๊ฐ์ง ์์คํ ์ ์ ํฉํจ
๋์ ๋ณด์์ฑ ๊ฐ๋ณ์ ์ผ๋ก ๋งค๊ฐ๋ณ์๋ฅผ ์ค์ ํ์ฌ ๋์ ๋ณด์์ฑ์ ์ง์ํจ
5. RC5
30Network & Information Security LabNetwork & Information Security Lab
RC5 ํ๋ผ๋ฏธํฐ
RC5 ๋ 32, 64, 128 ๋นํธ ๊ธธ์ด์ ํ๋ฌธ ๋ธ๋ก์ ๊ฐ์ ๊ธธ์ด์ ์ํธ๋ฌธ์ผ๋ก ์ถ๋ ฅํจ
ํค ๊ธธ์ด์ ๋ฒ์๋ 0 ์์ 2040 ๋นํธ RC5-w/r/b
์ )RC5-32/12/16 32 bit word(64bit plaintext and ciphertext) 12 rounds in the en/decryption algorithm,
16 bytes key length(128bits)
๋งค๊ฐ๋ณ์ ์ ์ ๊ฐ์ ๋ฒ์
w ํ๋ฌธ์ผ๋ก ์ฌ์ฉํ ์๋ ํฌ๊ธฐ 16, 32, 64
r ๋ผ์ด๋์ ์ 0, 1, ... , 255
b ๋น๋ฐํค์ ๋ฐ์ดํธ ์ 0, 1, ... , 255
5. RC5
31Network & Information Security LabNetwork & Information Security Lab
RC5 ํค ํ์ฅ
(1) ๋งค๊ฐ๋ณ์ r ๊ณผ w ์ ์ํด ์๋ธํค ์์ด S[0]~S[t-1] ์ ์ด๊ธฐํ (2) ์ ๋ ฅ ๋ฐ์ b ๋ฐ์ดํธ์ ์ํธํค K[0โฆ.b-1] ์ c ๋จ์ด๋ฐฐ์ด L[0โฆc-1]๋ฐฐ์ด๋ก ๋ณํ
(3) ์ด๊ธฐํ๋ ์๋ธํค ์์ด๊ณผ ๋จ์ด๋ฐฐ์ด์ Mix ํ์ฌ , ์ํธ์ฉ ํค ์์ด์ ์์ฑ
Initialize
Mix
Convert
S[0] S[1] S[t-1]โฆโฆ..
S[0] S[1] S[t-1]โฆโฆ..
r, wK[0] K[1] K[b-1]โฆโฆ..
L[0] L[1] K[c-1]โฆโฆ..
(1) (2)
(3)
5. RC5
32Network & Information Security LabNetwork & Information Security Lab
RC5 ๋ ์ํธ ํค๋ฅผ ์ ๋ ฅ ๋ฐ์ t=2(r+1) ์๋งํผ์ ํค ์์ด๋ก ํ์ฅํจ ํค ์์ด์ ๋ผ์ด๋ ์ ๋น๋กํ๋ฉฐ ( ์ : 12 ๋ผ์ด๋ ๋ผ๋ฉด ์ด 26 ๊ฐ์ Sub-K
ey ๋ก ๊ตฌ์ฑ๋ ํค ์์ด์ ๊ฐ์ง ), ์ด๋ฌํ ํค ์์ด ์์ฑ์๋ PW ๊ฐ๊ณผ QW
๊ฐ์ ์ฌ์ฉ
e=2.178281828459... ( ์์ฐ๋ก๊ทธ ) โฎ=1.618033988749 ...( ํฉ๊ธ๋น์จ ) = ( ) Odd[x] ๋ x ์ ๊ฐ์ฅ ๊ฐ๊น์ด ํ์์ธ ์ ์์ด๋ค .
Odd[e] = 3 ๊ณผ Odd[ ] = 1โฎ ์ผ ๋์ QW, PW ๊ฐ์ ๋ค์๊ณผ ๊ฐ๋ค .
2
51
w 16 32 64
Pw
Qw
B7E19E37
B7E151639E3779B9
B7E151628AED2A6B9E3779B97F4A7C15
[( 2)2 ]
[( 2)2 ]
wW
wW
P Odd e
Q Odd
5. RC5
33Network & Information Security LabNetwork & Information Security Lab
Pw ์ Qw ๋ฅผ ์ด์ฉํ ํค ์์ด S ์ ์ด๊ธฐํ
์ด๊ธฐํ๋ ๋ฐฐ์ด S[0]~s[t] ๋ฅผ Mixing ํ์ฌ Secret key ๋ฐฐ์ด๋ก ์์ฑํจ
0;
3 max( , ) :
[ ] ( [ ] ) 3;
[ ];
( 1) mod ( );
[ ] ( [ ] ) ( );
[ ];
( 1) mod ( );
i j X Y
do t c times
S i S i X Y
X S i
i i t
L i L i X Y X Y
Y L i
j j c
2( 1)
/ 8
/
t r
u w
c b u
w
[0] ;
i=1 to t-1 do
S[i]=S[i-1]+Q
wS P
for
5. RC5
34Network & Information Security LabNetwork & Information Security Lab
Encryption RC5 ๋ ๊ธฐ๋ณธ์ ์ธ ์ธ ๊ฐ์ง ์ฐ์ฐ์ ์ฌ์ฉ .
Addition ์ํธํ + , ๋ณตํธํ -
Bitwise execusive-OR Left circular rotation
์ํธํ : x<<<y, ๋ณตํธํ : x>>>y
5. RC5
35Network & Information Security LabNetwork & Information Security Lab
Encryption ์๊ณ ๋ฆฌ์ฆ ํ๋ฌธ ๋ฐ์ดํฐ๋ฅผ A ์ B ๋นํธ๋ก ๋๋์ด ์์ด S ๋ก ์ํธํ ์ฐ์ฐ
0
0
i i-1 i-1 i-1
i i-1 i i
LE A S[0];
RE B S[1];
for i 1 to r do
LE ((LE RE ) RE ) S[2 i];
RE ((RE LE ) LE ) [2 i 1];
i-1LE i-1RE
iLE iRE
S[2 i] S[2 i+1]
i Round
5. RC5
36Network & Information Security LabNetwork & Information Security Lab
Decryption ์ํธ๋ฌธ์ 2 ๊ฐ์ ๋นํธ๋ LDi ๊ณผ RDi ๋ผ ๊ฐ์
Decryption ์๊ณ ๋ฆฌ์ฆ
i-1 i i i
i-1 i i-1 i-1
0
0
for i r to 1 do
RD ((RD - S[2 i 1] LD ) LD ;
LD ((LD - S[2 i] RD ) RD ;
B RD - S[1];
A LD - S[0];
i-1LD i-1RE
iLD iRD
S[2 i] S[2 i+1]
i Round
5. RC5
37Network & Information Security LabNetwork & Information Security Lab
5. RC5
38Network & Information Security LabNetwork & Information Security Lab
RC5 ๋ Feistel ๊ธฐ๋ฐ์ DES ์ ๊ฐ์ ์ํธ ์๊ณ ๋ฆฌ์ฆ์ ๋นํ์ฌ ๋ง์ ๋ณด์์ , ํจ์จ์ ์ธ ์ด์ ์ ๊ฐ์ง๊ณ ์์ ๊ฐ๋ณ์ ํค ๊ธธ์ด
๋ง์ฝ ์ํธ ์๊ณ ๋ฆฌ์ฆ์ ํค ๊ธธ์ด๋ ๋ถ์๊ณต๊ฒฉ์ ๋ํ ์ ํญ์ฑ๊ณผ ๋น๋กํ๋ค . ํค๊ฐ ๊ธธ์๋ก ์ ์ฌ๊ณต๊ฒฉ์ ๊ฐํ๋ค . RC5 ๋ ์ด๋ฌํ ํค์ ๊ธธ์ด๋ ์ค์ ํ ์
์๋๋ก ๊ฐ๋ณ์ ํค ๊ธธ์ด๋ฅผ ์ ๊ณตํ๋ค . ํผํฉ๋ ์ฐ์ฐ์
๋ง์ ์ฐ์ฐ์ ์ฌ์ฉ์ ๋น์ ํ์ฑ์ ์ ๊ณตํ์ฌ ์ํธ๋ถ์์ ์ด๋ ต๊ฒํ๋ค . RC5 ์๊ณ ๋ฆฌ์ฆ์ ์ด๋ฌํ ์ด์ ์ ์ ๊ณตํ๋ค .
๋ฐ์ดํฐ ์์กด์ ์ํ ๋ณด์์ ํ์ํ ์ถฉ๋ถํ ๋ผ์ด๋ ์๋ฅผ ๊ฐ์ง๋ฉฐ ์ด๊ฒ์ ์ํธ๋ถ์์ ๋์ฑ
์ด๋ ต๊ฒ ํ๋ค . ํค ์์กด์ ๋ณด์์ฑ
DES ์์ ์ฌ์ฉ๋๋ ๊ณ ์ ๋ S-box ๋ฅผ ์ฌ์ฉํ์ง ์๋๋ค . RC5 ๋ ๋จ์ง ํค ์์ด์ ์์กดํ์ฌ ์ํธํ๋ฅผ ์ํํ๋ค .
5. RC5
39Network & Information Security LabNetwork & Information Security Lab
๊ธด ํค ์ค์ผ์ฅด ์๊ณ ๋ฆฌ์ฆ sub-key ๋ก ๊ตฌ์ฑ๋ ํค ์์ด์ ๋จ์ผ ์ํธํ๋ ๋ณตํธํ์ ๊ทธ๊ฒ๋ณด๋ค ํจ์ฌ
๊ธธ๋ค . ์ด๋ฌํ ํน์ฑ์ ์ํธ๋ฌธ ๋ถ์์ ๋์ฑ ์ด๋ ต๊ฒ ํ ์ ์๋ค .
๊ฐ๋ณ์ ํ๋ฌธ / ์ํธ๋ฌธ ๋ธ๋ก ๊ธธ์ด ํ๋ฌธ ๋ธ๋ก์ ๊ธธ์ด๋ ๋ณด์์ ๊ฐ๋์ ๋น๋กํ๋ฉฐ RC5 ๋์ด๊ฒ์ ๊ฐ๋ณ์ ์ผ๋ก
์ค์ ํ ์ ์๋ค .
๊ฐ๋ณ์ ๋ผ์ด๋ ์ ๋ผ์ด๋ ์๋ ํด๋ ๊ณต๊ฒฉ์ ๋ํ ์ ํญ์ฑ์ ๊ฒฐ์ ํ ์ ์๋ค . ์ฆ ๋ง์
๋ผ์ด๋ ์๋ฅผ ๊ฐ์ง์๋ก ๋ณด์์ฑ์ด ์ฆ๊ฐํ์ง๋ง ์ / ๋ณตํธํ์ ์ค๋ ์๊ฐ์ด ๊ฑธ๋ฆฐ๋ค . RC5 ๋ ์ด๋ฌํ ๋ผ์ด๋๋ฅผ ๊ฐ๋ณ์ ์ผ๋ก ๋ณ๊ฒฝํ ์ ์๋ค .
์ํธํ ์ ์์ชฝ ๋ฐ์ดํฐ ๋ชจ๋ ์ฐ์ฐ DES ์ ๊ฐ์ Feistel ๊ธฐ๋ฐ์ ์ํธ ์๊ณ ๋ฆฌ์ฆ์ ํ๋ฌธ์ 2 ๊ฐ์ ๋ธ๋ก์ผ๋ก
๋๋์ด ํ์ชฝ ๋ถ๋ถ์ ๋ํด์๋ง ์ฐ์ฐ ์์ ์ ์ํํ๋ , RC5 ๋ 2 ๊ฐ์ ๋ชจ๋ ๋ธ๋ก์ ๋ํด์๋ ์ฐ์ฐ์์ ์ ์ํํ์ฌ ๋ณด์ ๊ฐ๋๋ฅผ ๋์ผ ์ ์๋ค .
5. RC5