block cipher principles
DESCRIPTION
[email protected]. Block Cipher Principles. Stream Ciphers and Block Ciphers. stream cipher A symmetric encryption algorithm in which ciphertext output is produced bit-by-bit or byte-by-byte from a stream of plaintext input. block cipher - PowerPoint PPT PresentationTRANSCRIPT
![Page 2: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/2.jpg)
Stream Ciphers and Block Ciphers stream cipher
A symmetric encryption algorithm in which ciphertext output is produced bit-by-bit or byte-by-byte from a stream of plaintext input.
block cipher A symmetric encryption algorithm in which
a block of plaintext bits (typically 64 or 128) is transformed as a whole into a ciphertext block of the same length.
![Page 3: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/3.jpg)
Stream cipher
เป็�นวิ�ธี�การเข้ ารหั�สที่��ละตั�วิ
EncryptionThis is a Message
EWRKLIH……..
Key
![Page 4: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/4.jpg)
Stream cipher
ข้ อดี�ข้อง stream cipher ควิามเร�วิในการเข้ ารหั�สและถอดีรหั�ส ควิามผิ�ดีพลาดีตั!�า
ข้ อเส�ยข้อง stream cipher เก�ดีการซ้ำ!$าก�นข้องตั�วิอ�กษร ง&ายตั&อการวิ�เคราะหั' ง&ายตั&อการเป็ล��ยนแป็ลงแก ไข้ข้ อม)ล เช่&นจำ!านวิน
เง�น
![Page 5: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/5.jpg)
Block cipher
เป็�นการเข้ ารหั�สแบบกล-&ม ที่!าการแบ&งข้ อม)ลออกเป็�น block แล วิน!าไป็เข้ ารหั�ส
Encryption
This is a Message
EWRKLIH……..
Key
This isa Mesage
![Page 6: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/6.jpg)
Block cipher
ข้ อดี�ข้อง Block cipher การกระจำายควิามซ้ำ!$าก�นข้องตั�วิอ�กษร ตั&อตั านการดี�ดีแป็ลงตั&อเตั�มข้ อม)ลใดี
ข้ อเส�ยข้อง Block cipher ใช่ เวิลาในการเข้ ารหั�สนานกวิ&า ม�การเก�ดีควิามผิ�ดีพลาดีตั&อเน.�อง
![Page 7: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/7.jpg)
Characteristics of good Cipher
ควิามป็ลอดีภั�ยข้องการเข้ ารหั�สแป็รผิ�นตัรงก�บควิามยากข้องการเข้ ารหั�ส
ไม&ควิรม�ข้ อจำ!าก�ดีข้องการเล.อกใช่ ก-ญแจำเข้ ารหั�ส
กระบวินการน!าวิ�ธี�การเข้ ารหั�สไป็ใช่ ตั องสะดีวิกและง&าย
ควิามผิ�ดีพลาดีที่��จำ-ดีใดีจำ-ดีหัน1�งตั องไม&ข้ยายไป็ส)&ส&วินอ.�นๆ
Cipher text ตั องม�ข้นาดีไม&ใหัญ&กวิ&าPlaintext
![Page 8: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/8.jpg)
Secret key Encryption
การเข้ ารหั�สที่��ใช่ ก-ญแจำเข้ ารหั�สและก-ญแจำถอดีรหั�สตั�วิเดี�ยวิก�น
EncryptionPlaintext Ciphertext
KeyA
DecryptionPlaintext
KeyB
KeyA=KeyB
![Page 9: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/9.jpg)
Secret key Encryption
DES(Data Encryption Standard) เข้ ารหั�สแบบ Block Cipher พ�ฒนาโดีย US Federa Standard Key size >58 Bit ควิามเร�วิในการเข้ าและถอดีรหั�ส
![Page 10: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/10.jpg)
Secret key Encryption
Triple DES พ�ฒนาตั&อจำาก DES ม�ควิามป็ลอดีภั�ยมากกวิ&า DES Key ข้นาดีมากกวิ&า DES
AES(Advanced Encryption Standard) ม�ควิามป็ลอดีภั�ยในการเข้ าและถอดีรหั�สมากกวิ&า
DES
![Page 11: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/11.jpg)
Secret key Encryption
ข้ อดี�ข้อง Secret key การเข้ ารหั�สและถอดีรหั�สที่!าไดี เร�วิ วิ�ธี�การพ�ฒนาการเข้ ารหั�สและถอดีรหั�สที่!าใหั ง&าย
ข้ อเส�ยข้อง Secret key การกระจำายก-ญแจำที่!าไดี ยาก ม�โอกาสที่��จำะถ)กข้โมยก-ญแจำในการข้�$นตัอนการส&งก-ญแจำ
![Page 12: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/12.jpg)
Public key Encryption
การเข้ ารหั�สที่��ใช่ ก-ญแจำเข้ ารหั�สและก-ญแจำถอดีรหั�สคนละตั�วิเดี�ยวิก�น
EncryptionPlaintext Ciphertext
KeyA
DecryptionPlaintext
KeyB
KeyA<>KeyB
![Page 13: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/13.jpg)
Public key Encryption
RSA พ�ฒนาโดีย Rivest,Shamir,Adleman Key>1028 Bit ก-ญแจำเข้ ารหั�สและถอดีรหั�สคนละตั�วิ
![Page 14: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/14.jpg)
Public key Encryption
ข้ อดี�ข้อง Public key การกระจำายก-ญแจำที่!าไดี ง&าย การข้โมยก-ญแจำในการข้�$นตัอนการส&งก-ญแจำไม&ม�ผิลตั&อการถอดีรหั�ส
ข้ อเส�ยข้อง Public key การเข้ ารหั�สและถอดีรหั�สที่!าไดี ช่ า ไม&เหัมาะในการเข้ ารหั�สที่��ม�ข้ อม)ลที่��ม�ข้นาดีใหัญ&
![Page 15: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/15.jpg)
DES(Data Encryption Standard)
![Page 16: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/16.jpg)
DES เบ.$องตั น
P10
ShiftIP
fK
SW
fk
IP-1
IP-1
fk
SW
fK
IP
P8
Shift
P8
8 bit plaintext 8 bit plaintext
8 bit ciphertext 8 bit ciphertext
10 bit key
![Page 17: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/17.jpg)
DES เบ.$องตั น S-DES Key Generation ป็ระกอบดี วิย
P10 Shift P8
![Page 18: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/18.jpg)
DES เบ.$องตั น P10(Permutation)
ที่!าหัน าที่�� สล�บและเป็ล��ยนตั!าแหัน&งบ�ที่ P10(k1,k2,k3,k4,k5,k6,k7,k8,k9,k10)=(k3,k5,k2,k7,k4,k10,k1,k9,k
8,k6)
P10
3 5 2 7 4 10 1 9 8 6
1101101001 P10 0111111000
![Page 19: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/19.jpg)
DES เบ.$องตั น Shift ที่!าการเล.�อนบ�ที่ไป็ที่างซ้ำ าย
LeftShift 1 LeftShift 1
5 bit 5 bit
5 bit 5 bit
10000 01100 LeftShift 00001 11000
![Page 20: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/20.jpg)
DES เบ.$องตั น P8(Permutation) ที่!าหัน าที่�� สล�บและเป็ล��ยนตั!าแหัน&งบ�ที่
และลดีข้นาดีข้อง บ�ที่ ลงเหัล.อ 8 บ�ที่P8
6 3 7 4 8 5 10 9
00100 00011 P8 01000011
![Page 21: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/21.jpg)
• The Function fK
fK(L,R)=(LF(R,SK),R)
![Page 22: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/22.jpg)
E/P(Expansion/permutation) ที่!าหัน าที่�� ข้ยายบ�ที่และสล�บตั!าแหัน&งบ�ที่ใหัม&
E/P
4 1 2 3 2 3 4 1
1001E/P 11000011
![Page 23: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/23.jpg)
S-box ลดีข้นาดีบ�ที่ x x x x P0 P1 P2 P3 0111 P0=0,P1=1,P2=1,P3=1
![Page 24: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/24.jpg)
S-box
0 1 2 3
0 1 0 3 21 3 2 1 02 0 2 1 33 3 1 3 2
P0,3
P1,2 0 1 2 3
0 0 1 2 31 2 0 1 32 3 0 1 03 2 1 0 3
P0,3
P1,2
S0= S1=
0100 S0 11
![Page 25: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/25.jpg)
P4(Permutation) ที่!าหัน าที่�� สล�บและเป็ล��ยนตั!าแหัน&งบ�ที่
P4
2 4 3 1
1001P4 0101
![Page 26: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/26.jpg)
The switch Function ที่!าหัน าที่��สล�บ 4Bit บน ก�บ 4 Bit ล&าง
10010110 switch 01101001
![Page 27: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/27.jpg)
IP(Initial Permutation) เป็�นการเอาข้ อม)ลมาสล�บบ�ที่ก&อน IP(x)
IP
2 6 3 1 4 8 5 7
00110011 IP 00101101
![Page 28: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/28.jpg)
IP-1 (Inverse Permutation) สล�บบ�ที่ข้ อม)ลกล�บ IP-1(IP(X))=X
IP-1
4 1 3 5 7 2 8 6
01100110IP-100101101
![Page 29: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/29.jpg)
General n-bit-n-bit Block Substitution (shown with n = 4)
Plaintext Ciphertext0000 11100001 01000010 11010011 00010100 00100101 11110110 10110111 10001000 00111001 10101010 01101011 11001100 01011101 10011110 00001111 0111
![Page 30: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/30.jpg)
The Data Encryption Standard
DES Encryption
![Page 31: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/31.jpg)
DES Encryption
![Page 32: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/32.jpg)
Single Round of DES Algorithm
![Page 33: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/33.jpg)
Permutation Tables for DES
![Page 34: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/34.jpg)
![Page 35: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/35.jpg)
![Page 36: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/36.jpg)
Calculation of F(R, K)
![Page 37: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/37.jpg)
โดียการสล�บ และแป็ลงข้ อม)ล 6 บ�ที่เหัล.อ 4 บ�ที่
S
1 2 3 4 5 6
Bit 1,6 เล.อก RowBit 2,3,4,5 เล.อก Column
![Page 38: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/38.jpg)
![Page 39: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/39.jpg)
![Page 40: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/40.jpg)
ข้ อม)ล 110010 เข้ า S1 10 = Row 2 1001=Column 9 เป็5ดีตัาราง S1
110010 S1 1100 (12)
![Page 41: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/41.jpg)
![Page 42: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/42.jpg)
แป็ลง key 64 Bit เป็�นข้นาดี 56 Bit
![Page 43: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/43.jpg)
แป็ลง key 56 Bit เป็�นข้นาดี 48 Bit
![Page 44: Block Cipher Principles](https://reader036.vdocument.in/reader036/viewer/2022062309/5681406f550346895dabf021/html5/thumbnails/44.jpg)
brute-force attack ค นหัา key