3des and block cipher modes of operation l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
3DES and Block Cipher Modes of Operation PowerPoint Presentation
Download Presentation
3DES and Block Cipher Modes of Operation

Loading in 2 Seconds...

play fullscreen
1 / 68

3DES and Block Cipher Modes of Operation - PowerPoint PPT Presentation


  • 502 Views
  • Uploaded on

3DES and Block Cipher Modes of Operation. CSE 651: Introduction to Network Security. Abstract. We will discuss 2DES and 3DES AES (Advanced Encryption Standard) How to use block ciphers? RC4: a widely used stream cipher Problems with WEP’s use of RC4. Multiple Encryption with DES.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '3DES and Block Cipher Modes of Operation' - andrew


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
3des and block cipher modes of operation

3DES and Block Cipher Modes of Operation

CSE 651: Introduction to Network Security

abstract
Abstract
  • We will discuss
    • 2DES and 3DES
    • AES (Advanced Encryption Standard)
    • How to use block ciphers?
    • RC4: a widely used stream cipher
    • Problems with WEP’s use of RC4
multiple encryption with des
Multiple Encryption with DES
  • DES is not secure enough.
  • The once large key space, 256, is now too small.
  • In 2001, NIST published the Advanced Encryption Standard (AES) as an alternative.
  • But users in commerce and finance are not ready to give up on DES.
  • Solution: to use multiple DES with multiple keys
double des
Double-DES
  • Consider 2-DES with two keys:

C = EK2(EK1(P))

  • Decryption: P = DK1(DK2(C))
  • Key length: 56 x 2 = 112 bits
  • This should have thwarted brute-force attacks?
  • Wrong!
meet in the middle attack on 2des
Meet-in-the-Middle Attack on 2DES
  • 2-DES: C = EK2(EK1(P))
  • So, X = EK1(P) = DK2(C)
  • Given a known pair (P, C), attack as follows:
    • Encrypt P with all 256 possible keys for K1.
    • Decrypt C with all 256 possible keys for K2.
    • If EK1’(P) = DK2’(C), try the keys on another (P’, C’).
    • If works, (K1’, K2’) = (K1, K2) with high probability.
    • Takes O(256) steps; not much more than attacking 1-DES.
triple des with two keys
Triple DES with Two Keys
  • A straightforward implementation would be:

C = EK1(EK2(EK1(P)))

  • In practice: C = EK1(DK2(EK1(P)))
    • Also referred to as EDE encryption
  • Reason: if K1=K2, then 3DES = 1DES. Thus, a 3DES software can be used as a single-DES.
  • Standardized in ANSI X9.17 & ISO8732
  • No current known practical attacks
    • What about the meet-in-the-middle attack?
meet in the middle attack on 3des
Meet-in-the-Middle Attack on 3DES

K1 K2 K1

  • For each possible key for K1, encrypt P to produce a possible value for A.
  • Using this A, and C, attack the 2DES to obtain a pair of keys (K2, K1’).
  • If K1’ = K1, try the key pair (K1, K2) on another (C’,P’).
  • If it works, (K1, K2) is the key pair with high probability.
  • It takes O(255 x 256) = O(2111) steps on average.

A B

P C

E D E

triple des with three keys
Triple DES with Three Keys
  • Encryption: C = EK3(DK2(EK1(P))).
  • If K1 = K3, we have 3DES with 2 keys.
  • If K1 = K2 = K3, we have the regular DES.
  • So, 3DES w/ 3keys is backward compatible with 3DES w/ 2 keys and with the regular DES
  • Some internet applications have adopted 3DES with three keys.
    • E.g. PGP and S/MIME.
finite fields

Finite Fields

Some mathematics used in AES

aes advanced encryption standard20
AES: Advanced Encryption Standard
  • In1997, NIST began the process of choosing a replacement for DES and called it the Advanced Encryption Standard.
  • Requirements: block length of 128 bits, key lengths of 128, 192, and 256 bits.
  • In 2000, Rijndael cipher (by Rijmen and Daemen) was selected.
  • An iterated cipher, with 10, 12, or 14 rounds.
  • Rijndael allows various block lengths.
  • But AES allows only one block size: 128 bits.
how to use a block cipher
How to use a block cipher?
  • Block ciphers encrypt fixed size blocks
    • E.g. DES encrypts 64-bit blocks
  • We need some way to encrypt arbitrary amounts of data
    • E.g. a message of 1000 bytes
  • NIST defines five ways to do it
    • Called modes of operations
    • Including block and stream modes
five modes of operation
Five Modes of Operation
  • Electronic codebook mode (ECB)
  • Cipher block chaining mode (CBC) – most popular
  • Output feedback mode (OFB)
  • Cipher feedback mode (CFB)
  • Counter mode (CTR)
electronic code book ecb
Electronic Code Book (ECB)
  • The plaintext is broken into blocks, P1, P2, P3, ...
  • Each block is encrypted independently of the other blocks

Ci = EK(Pi)

  • For a given key, this mode behaves like we have a gigantic codebook, in which each plaintext block has an entry, hence the name Electronic Code Book
remarks on ecb
Remarks on ECB
  • Strength: it’s simple.
  • Weakness:
    • Repetitive information contained in the plaintext may show in the ciphertext, if aligned with blocks.
    • If the same message (e.g., your SSN) is encrypted (with the same key) and sent twice, their ciphertexts are the same.
  • Typical application: secure transmission of short pieces of information (e.g. an encryption key)
remarks on cbc
Remarks on CBC
  • The same key is used for all blocks.
  • A ciphertext block depends on all blocks before it.
  • So, repeated plaintext blocks are encrypted differently.
  • Initialization Vector (IV)
    • Must be known to both the sender & receiver
    • Typically, IV is either a fixed value
    • Or is sent encrypted in ECB mode before the rest of message.
message padding
Message Padding
  • The last plaintext block may be short of a whole block and needs padding:
  • Possible padding:
    • Known non-data values (e.g. nulls)
    • Or a number indicating the size of the pad
    • Or a number indicating the size of the plaintext
    • The last two schemes may require an extra block.
cipher feedback mode basic version
Cipher feedback mode (basic version)
  • Plaintext blocks: p1, p2, …
  • Key: k
  • Basic idea: construct key stream k1, k2, k3, …
  • Encryption:
remark on cfb
Remark on CFB
  • The block cipher is used as a stream cipher.
  • Appropriate when data arrives in bits/bytes.
  • s can be any value; a common value is s = 8.
  • A ciphertext segment depends on the current and all preceding plaintext segments.
  • A corrupted ciphertext segment during transmission will affect the current and next several plaintext segments.
    • How many plaintext segments will be affected?
slide52

Cipher Feedback

Output Feedback

remark on ofb
Remark on OFB
  • The block cipher is used as a stream cipher.
  • Appropriate when data arrives in bits/bytes.
  • Advantage:
    • more resistant to transmission errors; a bit error in a ciphertext segment affects only the decryption of that segment.
  • Disadvantage:
    • Cannot recover from lost ciphertext segments; if a ciphertext segment is lost, all following segments will be decrypted incorrectly.
  • IV should be generated randomly each time and sent with the ciphertext.
counter mode ctr
Counter Mode (CTR)
  • A counter T is initialized to some IV and then incremented by 1 for each subsequent plaintext block.
  • Encryption:

T1 = IV

Ti = Ti-1 + 1

Ci = Pi XOR EK(Ti)

remark on ctr
Remark on CTR
  • Strengthes:
    • Needs only the encryption algorithm (so do CFB and OFB)
    • Fast encryption/decryption; blocks can be processed (encrypted or decrypted) in parallel; good for high speed links
    • Random access to encrypted data blocks
  • As in OFB, IV should not be reused.
the rc4 stream cipher
The RC4 Stream Cipher
  • Designed by Ron Rivest in 1987 for RSA Security.
  • Kept as a trade secret until leaked out in 1994.
  • The most popular stream cipher.
  • Simple and fast.
  • With a 128 bits key, the period is > 10100 .
  • Used in the SSL/TLS standards (for secure Web communication), IEEE 802.11 wireless LAN standard, Microsoft Point-to-Point Encryption, and many others.
security of rc4
Security of RC4
  • The keystream generated by RC4 is biased.
    • The second byte is biased toward zero with high probability.
    • The first few bytes are strongly non-random and leak information about the input key.
  • Defense: discard the initial n bytes of the keystream.
    • Called “RC4-drop[n-bytes]”.
    • Recommended values for n = 256, 768, or 3072 bytes.
  • Efforts are underway (e.g. the eSTREAM project) to develop more secure stream ciphers.
problems with wep s use of rc4
Problems with WEP’s use of RC4
  • WEP is a protocol using RC4 to encrypt packets for transmission over IEEE 802.11 wireless LAN.
  • WEP requires each packet to be encrypted with a separate RC4 key.
  • The RC4 key for each packet is a concatenation of a 24-bit IV (initialization vector) and a 40 or 104-bit long-term key.

RC4 key: IV (24) Long-term key (40 or 104 bits)

l

802 11 frames using wep
802.11 frames using WEP

l

Header IV Packet ICV FCS

encrypted

  • ICV: integrity check value
  • FCS: frame check sequence
  • Both use CRC32
slide67

Fluhrer, Mantin, and Shamir showed that:

  • If the same secret key is used with numerous IVs, and the attacker can obtain the first word of RC4 output (keystream) corresponding to each IV, then he can construct the secret key with little effort.
  • The first word is known for many plaintext packets.
  • Recall: Ciphertext = plaintext XOR keystream
  • So, the first word of RC output (keystream) can be obtained.
slide68

Tews, Weinmann, and Pyshkin wrote an article, “Breaking 104 bit WEP in less than 60 seconds,” discussing how to discover the RC4 key by analyzing the easily identified ARP packets.

  • ARP: Address Resolution Protocol.