Upcoming SlideShare
×

# Lecture3a symmetric encryption

3,027 views

Published on

Published in: Technology, Education
2 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
3,027
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
0
0
Likes
2
Embeds 0
No embeds

No notes for slide
• Every block cipher involves a transformation of a block of plaintext into a block of cipher text, where the transformation depends on the key. The mechanism of diffusion seeks to make the statistical relationship between the plaintext and cipher text as complex as possible in order to thwart attempts to deduce the key. Confusion seeks to make the relationship between the statistics of the cipher text and the value of the encryption key as complex as possible, again to thwart attempts to discover the key. So successful are diffusion and confusion in capturing the essence of the desired attributes of a block cipher that they have become the cornerstone of modern block cipher design.
• ### Lecture3a symmetric encryption

1. 1. Symmetric Encryption and Message ConfidentialityRAJA M KHURRAM SHAHZAD
2. 2. Cryptography • Why do we need cryptography? – Requirements - must be sure that: – Be sure our confidential information can’t be understood by anyone than the intended – Protect against interception 2 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
3. 3. Cryptography • Classified along three independent dimensions: 1. The type of operations used for transforming plain-text to cipher text  Substitution: each element is mapped to another element  Transposition: elements are rearranged 2. The number of keys used  symmetric (single key)  asymmetric (two-keys, or public-key encryption) 3. The way in which the plain-text is processed  block cipher  stream cipher 3 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
4. 4. Big picture 4 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
5. 5. Conventional Encryption Principles • An encryption scheme has five ingredients: 1. Plain-text 2. Encryption algorithm (Strong) 3. Secret Keys (Shared and kept secretly) 4. Cipher text 5. Decryption algorithm (Cipher Text: result of encryption performed on plaintext using an algorithm, called a cipher) • Security depends on the secrecy of the key, not the secrecy of the algorithm • Most important algorithm: Data Encryption Algorithm (DEA) 1. Data Encryption Standard – DES 2. Triple DEA – TDEA 3. International Data Encryption Algorithm - IDEA 5 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
6. 6. Example 6 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
7. 7. Average Time for Exhaustive Key Search Key Size (bits) Number of Alternative Keys Time required at 106 Decryption/µs 32 232 = 4.3 x 109 2.15 milliseconds 56 256 = 7.2 x 1016 10 hours 128 2128 = 3.4 x 1038 5.4 x 1018 years 168 2168 = 3.7 x 1050 5.9 x 1030 years 7 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
8. 8. Fun Work : Zodiac’s “My Name is” cipherhttp://www.opordanalytical.com/articles/Zodiac3.htm 8 ET2437 - Network Security
9. 9. CryptanalysisType of attack Known to cryptanalystCiphertext only Encryption algorithm Ciphertext to be decodedKnown plaintext Encryption algorithm Ciphertext to be decoded One or more plaintext-ciphertext pairChosen plaintext Encryption algorithm Ciphertext to be decoded Plaintext chosen by cryptanalyst with ciphertext pairChosen ciphertext Encryption algorithm Ciphertext to be decoded Ciphertext chosen by cryptanalyst with plaintextChosen text Encryption algorithm Ciphertext to be decoded Plaintext chosen by cryptanalyst with ciphertext pair Ciphertext chosen by cryptanalyst with plaintext 9
10. 10. Substitution-Permutation Networks • In 1949 Claude Shannon introduced idea of Substitution- Permutation (SP) networks  SP Networks is a series of linked mathematical operations used in block cipher algorithms  Modern Substitution-Transposition product cipher • These form the basis of modern block ciphers • SP networks are based on the two primitive cryptographic operations:  Substitution (S-box)  Permutation (P-box)  Provide confusion and diffusion of message 10 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
11. 11. Substitution-Permutation Networks• Takes a block of the plaintext and the key as inputs• Applies several alternating "rounds" or "layers" of substitution boxes (S-boxes) and permutation boxes (P-boxes) to produce the ciphertext block.• S-box substitutes a small block of bits (the input of the S-box) by another block of bits (the output of the S-box).• A P-box is a permutation of all the bits: it takes the outputs of all the S-boxes of one round, permutes the bits, and feeds them into the S-boxes of the next round. 11
12. 12. Confusion and Dif fusion • Cipher needs to completely obscure statistical properties of original message  A one-time pad does this • More practically Shannon suggested combining elements to obtain:  Diffusion – dissipates statistical structure of plain-text over bulk of cipher-text – output bits should depend on the input bits in a very complex way  Confusion – makes relationship between cipher-text and key as complex as possible – make it very hard to find the key even if one has a large number of plaintext-ciphertext pairs produced with the same key. Therefore, each bit of the ciphertext should depend on the entire key, and in different ways on different bits of the key. 12 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
13. 13. Feistel 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 Fesitel Network depends on the choice of the following parameters and design features:  Block size: larger block sizes mean greater security  Key Size: larger key size means greater security  Number of rounds: multiple rounds offer increasing security  Sub-key generation algorithm: greater complexity will lead to greater difficulty of cryptanalysis.  Fast software encryption/decryption: the speed of execution of the algorithm becomes a concern • implements Shannon’s substitution-permutation network concept 13 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
14. 14. Classical Feistel Network 14 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
15. 15. DES • Data Encryption Standard (DES)  The most widely used encryption scheme  The algorithm is referred to the Data Encryption Algorithm (DEA)  DES is a block cipher  The plain-text is processed in 64-bit blocks  The key is 56-bits in length • 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) 15 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
16. 16. Triple DEA • Use three keys and three executions of the DES algorithm (encrypt-decrypt-encrypt)  C = Cipher-text C = EK3[DK2[EK1[P]]]  P = Plain-text  EK[X] = encryption of X using key K  DK[Y] = decryption of Y using key K • Effective key length of 168 bits 16 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
17. 17. Other Symmetric Block Ciphers • 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 • RC5  Suitable for hardware and software, Low memory requirement  Fast, simple  Adaptable to processors of different word lengths  Variable number of rounds  Variable-length key  High security  Data-dependent rotations 17 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
18. 18. Cipher Block Modes of Operation • Procedure of enabling the repeated and secure use of a block cipher under a single key • Primarily been defined for encryption and authentication • Cipher Block Chaining Mode (CBC)  The input to the encryption algorithm is the XOR of the current plain- text block and the preceding cipher text block.  Repeating pattern of 64-bits are not exposed 18 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
19. 19. Cipher Block Modes of Operation 19
20. 20. Location of Encryption Device • 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  Header in the clear • For High Security both link and end-to-end encryption are needed 20 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
21. 21. Key Distribution 1. A key could be selected by A and physically delivered to B. 2. A third party could select the key and physically deliver it to A and B. 3. If A and B have previously used a key, one party could transmit the new key to the other, encrypted using the old 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. • Session key  Data encrypted with a one-time session key. At the conclusion of the session the key is destroyed • Permanent key  Used between entities for the purpose of distributing session keys 21 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD
22. 22. The End 22 ET2437 - Network SecurityRAJA M KHURRAM SHAHZAD