Chapter 20 Symmetric Encryption and Message Confidentiality.
Chapter 2 Symmetric Encryption and Message Confidentiality
-
Upload
blodwyn-perez -
Category
Documents
-
view
118 -
download
1
description
Transcript of Chapter 2 Symmetric Encryption and Message Confidentiality
Chapter 2Symmetric Encryption and Message Confidentiality
Slides by H. Johnson & S. Malladi- Modified & Translated by Sukchatri P.Slides by H. Johnson & S. Malladi- Modified & Translated by Sukchatri P.ICT, University of Phayao, ThailandICT, University of Phayao, Thailand
Overview•Conventional Encryption Principles
•Conventional Encryption Algorithms
•Cipher Block Modes of Operation
•Location of Encryption Devices•Key Distribution
2Network Security
Encryption
•เครื่��องมื�ออตโนมืต ที่��สำ��คญที่��สำ�ดสำ��หรื่บก�รื่รื่กษ�คว�มืปลอดภัยเครื่�อข่ �ยและก�รื่สำ��อสำ�รื่ค�อก�รื่เข่#�รื่หสำ
•รื่$ปแบบข่องก�รื่เข่#�รื่หสำสำ วนใหญ เป&นแบบ :•conventional or symmetric encryption •public-key or asymmetric encryption.
3Network Security
Conventional Encryption Conventional Encryption PPrinciplesrinciples•รู�ปแบบการูเข้ารูหั�สมี�ด้วยก�น 5 ส�วนคื�อ
▫Plain text▫Encryption algorithms▫Public and private keys▫Cipher text▫Decryption algorithm
•Private keys จะมี�แหัล่�งก�าเน�ด้ที่� เป!นเจาข้อง
•Public keys จะถู�กใช้แล่ะเก%บอย��ที่� ส�วนกล่าง
•การูรู�กษาคืวามีปล่อด้ภั�ยข้()นอย��ก�บคืวามีล่�บข้อง key ไมี�ใช้� algorithm
4Network Security
Conventional or symmetric Encryption
Algorithm Components•Plain Text- original data or input•Encryption Algorithm- performs
substitutions or transformations on the plaintext
•Public and Private Keys- also input determines the substitutions/transpositions
•Cipher Text- scrambled message or output•Decryption Algorithm- encryption algorithm
run backward, taking the cipher text and producing the plain text.
5Network Security
Network Security 7Conventional or symmetric Encryption
• More rigorous definition (ข้อก�าหันด้ที่� เข้มีงวด้เพิ่� มีเติ�มี)
• Five components to the algorithm– A Plaintext message space, M
– A family of enciphering transformations, EK:M C, where KK
– A key space, K– A ciphertext message space, C
– A family of deciphering transformations, DK: C M, where KK
Network Security 8Conventional or symmetric Encryption
M EK DK MC
EK defined by an encrypting algorithm EDK defined by an decrypting algorithm D
For given K, DK is the inverse of EK, i.e., DK(EK(M))=M
for every plain text message M
CryptographyCryptography ( (การูอ�านรูหั�ส)
•Classified according to three independent dimensions:▫The type of operations used for transforming
plaintext to ciphertext (ปรูะเภัที่ข้องการูที่�างานส�าหัรู�บในการูเปล่� ยน plaintext ไปเป!น ciphertext)
▫The number of keys used (จ�านวนข้องคื�ย-ที่� ใช้) symmetric (single key or secret- key or private-key) asymmetric (two-keys, or public-key encryption)
▫The way in which the plaintext is processed (ว�ธี�การูที่� plaintext ถู�กปรูะมีวล่ผล่)
9Network Security
Cryptanalysis•Process of attempting to discover the plaintext or
key (ข้�)นติอนคืวามีพิ่ยายามีที่� จะคืนพิ่บ plaintext or key)
•รู�ปแบบการูเข้ารูหั�สเป!น computationallySecure ซึ่( งใหั ciphertext ติรูงติามีเกณฑ์-อย�างใด้อย�างหัน( ง
•cost of breaking the cipher exceeds the value of the information (มี�คื�าใช้จ�ายในการูเป3ด้เผยรูหั�สส�งกว�าคื�าข้องข้อมี�ล่)
• time requires to break the cipher exceeds the useful lifetime of the information (ติองใช้เวล่าในการูเป3ด้เผย ciphertext เก�นอาย4การูใช้งานข้องข้อมี�ล่)
10Network Security
Network Security 11
Cryptanalysis• The process of attempting to discover
the plaintext or key Alan Turing broke the Enigma Code in WWII
Cryptanalysis
•A brute force approach involves trying every possible key until the translation is obtained.
(ใช้ว�ธี�การู brute force ในการูพิ่ยายามีที่4กคื�ย-ที่� เป!นไปได้จนกว�าจะพิ่บ)
•Some new low cost chips have made this approach more reasonable. (chips รู4 �นใหัมี�รูาคืาถู�กได้บรูรูจ4ว�ธี�การูน�)ไวด้วยแล่ว)
•Greatest security problem is maintaining the security of the key (ป5ญหัาด้านคืวามีปล่อด้ภั�ยมีากที่� ส4ด้คื�อการูรู�กษาคืวามีปล่อด้ภั�ยข้องคื�ย-)
•See types of attacks in Stallings pp.31-32 summarized on next slide.
12Network Security
Computationally Secure
An encryption scheme is said to be computationally secure if: (รู�ปแบบการูเข้ารูหั�สจะกล่�าวจะได้ว�ามี�นเป!น computationally Secure ถูา)
•The cost of breaking the cipher exceeds the value of the encrypted information or (คื�าใช้จ�ายข้องการูที่�าล่าย Cipher ส�งกว�าคื�าข้องการูเข้ารูหั�สข้อมี�ล่หัรู�อ)
•The time required to break the cipher exceeds the useful lifetime of the information. (รูะยะเวล่าที่� ที่�าล่าย cipher เก�นกว�าอาย4การูใช้งานข้องข้อมี�ล่)
14Network Security
Average time required for exhaustiveAverage time required for exhaustive key key searchsearch
15
2.15 milliseconds232 = 4.3 x 10932
5.9 x 1030 years2168 = 3.7 x 1050168
5.4 x 1018 years2128 = 3.4 x 1038128
10 hours256 = 7.2 x 101656
Time required at 106 Decryption/µs
Number of Alternative Keys
Key Size (bits)
Network Security
Enigma
16
The Enigma was a wooden box with a keyboard and a bank of lettered lights corresponding to the keys. To encrypt a message, a plaintext character was typed in, and after scrambling, the appropriate light was turned on to give the ciphertext character. See
http://www.vectorsite.net/ttcodep.html#m9
Network Security
Classical ciphers (is an algorithm for performing encryption or decryption)
•Substitution- “units” of plain text are replaced with cipher text (" units "ข้อง plain text จะถู�กแที่นที่� ด้วย ciphertext)▫Polyalphabetic substitution- different for each
character•Transposition- “unit” of plaintext are
rearranged, usually in complex order (" units "ข้อง plain text จะถู�กจ�ด้เรู�ยงใหัมี�โด้ยปกติ�แล่วจะอย��ในรู�ปแบบที่� ซึ่�บซึ่อน)
•See (http://en.wikipedia.org/wiki/Cipher)
17Network Security
Network Security 18
Caesar Cipher
cipher: PHHW PH DIWHU WKH WRJD SDUWBplain: MEET ME AFTER THE TOGA PARTY
plain: abcdefghijklmnopqrstuvwxyz
key: defghijklmnopqrstuvwxyzabc
“Rail-Fence” Cipher
Network Security 19
DISGRUNTLED EMPLOYEE
D R L E O
I G U T E M L Y E
S N D P E
DRLEOIGUTE MLYESNDPE
Simple Cipher Examples
•Substitution ciphers - Caesar (การูแที่นที่� )http://starbase.trincoll.edu/~crypto/historical/caesar.html
•Transposition ciphers – Rail Fence (การูเปล่� ยนยายติ�าแหัน�ง)http://starbase.trincoll.edu/~crypto/historical/railfence.html
•Codes and Ciphers Primer http://www.vectorsite.net/ttcodep.html
20Network Security
Feistel Cipher StructureFeistel Cipher Structure•Virtually all conventional block
encryption algorithms, including DES have a structure first described by Horst Feistel of IBM in 1973
•The realization of a Feistel Network depends on the choice of the following parameters and design features:
(see next slide)
21
Network Security
Feistel Cipher StructureFeistel Cipher Structure•Block size: larger block sizes mean greater
security (ข้นาด้ข้องบล่%อกที่� ใหัญ�หัมีายถู(งการูรู�กษาคืวามีปล่อด้ภั�ยที่� มีากข้()น)
•Key Size: larger key size means greater security•Number of rounds: multiple rounds offer
increasing security•Subkey generation algorithm: greater
complexity will lead to greater difficulty of cryptanalysis. (คืวามีซึ่�บซึ่อนมีากข้()นจะน�าไปส��คืวามียากล่�าบากมีากข้()น cryptanalysis)
•Fast software encryption/decryption: the speed of execution of the algorithm becomes a concern (คืวามีเรู%วข้องการูที่�างานข้อง algorithm จะกล่ายเป!นคืวามีก�งวล่)
22Network Security
Feistel CipherFeistel Cipher
• The plain text block is divided into two halves Lo and Ro (บล่%อกข้อคืวามีธีรูรูมีด้าแบ�งออกเป!นคืรู( งออกเป!นสองส�วน Ro แล่ะ Lo)
• The two halves pass through n rounds of processing and then combine to produce the cipher text block. (แบ�งเป!นสองส�วนเที่�า ๆ ก�นผ�านการูปรูะมีวล่ผล่ n รูอบ แล่วน�ามีารูวมีก�นเป!นบล่%อกข้อคืวามี cipher)
• At each round a substitution is performed on the left half of the data by applying a round function F to the right half of the data and then XORing it with the left half (ในแติ�ล่ะรูอบการูแที่นที่� จะถู�กที่�าในคืรู( งซึ่ายข้องข้อมี�ล่โด้ยการูใช้รูอบฟั5งก-ช้� น F ไปย�งคืรู( งข้วาข้องข้อมี�ล่แล่ว XOR(exclusive-OR) ก�บคืรู( งซึ่าย)
23Network Security
Conventional Symmetric Encryption Conventional Symmetric Encryption AlgorithmsAlgorithms
•Data Encryption Standard (DES)▫The most widely used encryption scheme▫The algorithm is reffered to the Data
Encryption Algorithm (DEA)▫DES is a block cipher▫The plaintext is processed in 64-bit blocks▫The key is 56-bits in length▫No longer used for government transmissions
25Network Security
Data Encrytion Standard Data Encrytion Standard (DES)(DES)•The overall processing at each
iteration:
▫Li = Ri-1
▫Ri = Li-1 F(Ri-1, Ki)•Concerns about:
▫The algorithm and the key length (56-bits)
28Network Security
Time to break a code Time to break a code (10(1066 decryptions/µs) decryptions/µs)
29Network Security
Triple DEATriple DEA
•Use three keys and three executions of the DES algorithm (encrypt-decrypt-encrypt)
C = ciphertext P = Plaintext EK[X] = encryption of X using key K DK[Y] = decryption of Y using key K
•Effective key length of 168 bits
30
C = EK3[DK2[EK1[P]]]
Network Security
Other Symmetric Block Other Symmetric Block CiphersCiphers• International Data Encryption
Algorithm (IDEA)▫128-bit key▫Used in PGP
•Blowfish▫Easy to implement▫High execution speed ▫Run in less than 5K of memory
32Network Security
Other Symmetric Block Other Symmetric Block CiphersCiphers• RC5 (algorithm) (is a block cipher notable for its
simplicity. Designed by Ronald Rivest in 1994)▫ Suitable for hardware and software▫ Fast, simple▫ Adaptable to processors of different word lengths▫ Variable number of rounds▫ Variable-length key▫ Low memory requirement▫ High security▫ Data-dependent rotations
• Cast-128 (by Carlisle Adams and Stafford Tavares in1996)▫ Key size from 40 to 128 bits▫ The round function differs from round to round
33Network Security
Cipher Block Modes of Cipher Block Modes of OperationOperation
•Cipher Block Chaining Mode (CBC)▫The input to the encryption algorithm is the XOR
of the current plaintext block and the preceding ciphertext block. (ป:อนข้อมี�ล่เข้าส�� encryption algorithm เป!น XOR ข้อง current plaintext block แล่ะ ciphertext block ก�อนหันาน�))
▫Repeating pattern of 64-bits are not exposed (รู�ปแบบการูที่�าซึ่�)าข้อง 64 บ�ติ แติ�จะไมี�มี�การูเป3ด้เผย)
34
ii1i1iiK1i
i1iiK
i1iKKiK
i1iki
PPCC][CDC
)P(C][CD
)]P(C[ED][CD
]P[CEC
Network Security
Location of Encryption Location of Encryption DeviceDevice
•Link encryption:▫A lot of encryption devices▫High level of security▫Decrypt each packet at every switch
•End-to-end encryption▫The source encrypt and the receiver decrypts▫Payload encrypted (สามีารูถูจ4รูหั�สได้มีาก)▫Header in the clear (มี�ส�วนหั�วที่� ช้�ด้เจน)
•High Security: Both link and end-to-end encryption are needed
36Network Security
Key DistributionKey Distribution• A key could be selected by A and physically delivered
to B. (Key ถู�กเล่�อกโด้ย A แล่ะส�งมีอบถู(ง B โด้ยติรูง)• A third party could select the key and physically
deliver it to A and B. (บ4คืคืล่ที่� สามีสามีารูถูเล่�อก key แล่ะส�งไปย�ง A แล่ะ Bได้)
• If A and B have previously used a key, one party could transmit the new key to the other, encrypted using the old key. (ถูา A แล่ะ B ได้ใช้ key ก�อนหันาน�)แล่ว หัน( งในน�)นติองส�ง key ใหัมี�ใหัก�บบ4คืคืล่อ� นติ�อไปโด้ยใช้การูเข้ารูหั�สจากคื�ย-เด้�มี)
• If A and B each have an encrypted connection to a third party C, C could deliver a key on the encrypted links to A and B. (ถูา A แล่ะ B มี�การูเช้� อมีติ�อที่� เข้ารูหั�สแติ�ล่ะช้น�ด้ก�น ถู(งบ4คืคืล่ที่� สามี C, C ก%สามีารูถูส�งก4ญแจในการูเข้ารูหั�สล่�บการูเช้� อมีโยงไปย�ง A แล่ะ Bได้)
38Network Security
Key Distribution Key Distribution (See Figure 2.10)(See Figure 2.10)•Session key: (is a single-use symmetric key used
for encrypting all messages in one communication session or traffic encryption key or TEK)▫Data encrypted with a one-time session key. At the
conclusion of the session the key is destroyed (ข้อมี�ล่ที่� เข้ารูหั�สด้วยคื�ย-เซึ่สช้� นแล่วคืรู�)งเด้�ยว ในที่� ส4ด้ก%จะถู�กที่�าล่าย)
•Permanent key:▫Used between entities for the purpose of
distributing session keys (การูใช้รูะหัว�างหัน�วยงานกเพิ่� อว�ติถู4ปรูะสงคื-ในการูกรูะจาย ก4ญแจเซึ่สช้� น)
39Network Security