Information Security CS 526 Lecture 5 - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Information Security CS 526 Lecture 5

Description:

Message is broken into independent block; ... the same data block gets encrypted ... Somewhat malleable: reordering ciphertext results in reordered plaintext. ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 20
Provided by: NINGH7
Category:

less

Transcript and Presenter's Notes

Title: Information Security CS 526 Lecture 5


1
Information Security CS 526Lecture 5
  • Block Cipher Encryption Modes and Cryptographic
    Hash Functions

2
Block Cipher Encryption Modes ECB
  • Message is broken into independent block
  • Electronic Code Book (ECB) each block encrypted
    separately.
  • Encryption ci Ek(xi)
  • Decrytion xi Dk(ci)

3
Properties of ECB
  • Deterministic
  • the same data block gets encrypted the same way,
  • reveals patterns of data when a data block
    repeats
  • when the same key is used, the same message is
    encrypted the same way
  • Somewhat malleable reordering ciphertext results
    in reordered plaintext.
  • Usage not recommended to encrypt more than one
    block of data

4
DES Encryption Modes CBC
  • Cipher Block Chaining (CBC) next input depends
    upon previous output
  • Encryption Ci Ek (Mi?Ci-1), with C0IV
  • Decryption Mi Ci-1?Dk(Ci), with C0IV

M1
M2
M3
?
?
?
IV
Ek
Ek
Ek
C1
C2
C3
C0
5
Properties of CBC
  • Randomized encryption repeated text gets mapped
    to different encrypted data.
  • can be proven to be secure assuming that the
    block cipher has desirable properties and that
    random IVs are used
  • A ciphertext block depends on all preceding
    plaintext blocks reorder affects decryption
  • Usage chooses random IV and protects the
    integrity of IV

6
Encryption ModesCTR
  • Counter Mode (CTR) A way to construct PRNG
    using DES
  • yi Ekcounteri
  • Sender and receiver share counter (does not need
    to be secret) and the secret key.

7
Properties of CTR
  • Gives a stream cipher from a block cipher
  • subject to limitations of stream ciphers (what
    are they?)
  • Randomized encryption
  • when starting counter is chosen randomly
  • Random Access decryption of a block can be done
    in random order, very useful for hard-disk
    encryption.

8
Data Integrity and Source Authentication
  • Encryption does not protect data from
    modification by another party.
  • Need a way to ensure that data arrives at
    destination in its original form as sent by the
    sender and it is coming from an authenticated
    source.

9
Cryptographic Hash Functions
  • A hash function maps a message of an arbitrary
    length to a m-bit output
  • output known as the fingerprint or the message
    digest
  • if the message digest is transmitted securely,
    then changes to the message can be detected
  • A hash is a many-to-one function, so collisions
    can happen.

10
Security Requirements for Cryptographic Hash
Functions
  • Given a function hX ?Y, then we say that h
    is
  • preimage resistant (one-way)
  • if given y ?Y it is computationally
    infeasible to find a value x ?X s.t. h(x) y
  • 2-nd preimage resistant (weak collision
    resistant)
  • if given x ? X it is computationally
    infeasible to find a value x ? X, s.t. x?x and
    h(x) h(x)
  • collision resistant (strong collision resistant)
  • if it is computationally infeasible to find
    two distinct values x,x ? X, s.t. h(x) h(x)

11
Uses of hash functions
  • Message authentication
  • Software integrity
  • One-time Passwords
  • Digital signature
  • Timestamping

12
Bruteforce Attacks on Hash Functions
  • Attacking one-wayness
  • Goal given hX?Y, y?Y, find x such that h(x)y
  • Algorithm
  • pick a random value x in X, check if h(x)y, if
    h(x)y, returns x otherwise iterate
  • after failing q iterations, return fail
  • The average-case success probability is
  • Let Y2m, to get ? to be close to 0.5, q ?2m-1

13
Bruteforce Attacks on Hash Functions
  • Attacking collision resistance
  • Goal given h, find x, x such that h(x)h(x)
  • Algorithm pick a random set X0 of q values in
    X for each x?X0, computes yxh(x) if yxyx
    for some x?x then return (x,x) else fail
  • The average success probability is
  • Let Y2m, to get ? to be close to 0.5, q ?2m/2
  • This is known as the birthday attack.

14
Well Known Hash Functions
  • MD5
  • output 128 bits
  • collision resistance completely broken by
    researchers in China
  • SHA1
  • output 160 bits
  • no collision found yet, but method exist to find
    collisions in less than 280
  • considered insecure for collision resistance
  • one-wayness
  • SHA-256, SHA-384, SHA-512
  • outputs 256, 384, and 512 bits, respectively
  • NIST is requesting submissions of new SHA1
    functions

15
Choosing the length of Hash outputs
  • Because of the birthday attack, the length of
    hash outputs in general should double the key
    length of block ciphers
  • SHA-256, SHA-384, SHA-512 to match the new key
    lengths (128,192,256) in AES

16
Iterative Construction of Hash Functions
  • A hash function needs to map a message of an
    arbitrary length to a m-bit output
  • h 0,1?0,1m
  • The iterative construction
  • use a compression function that takes a
    fixed-length input string and output a shorter
    string
  • f0,1mt ?0,1m
  • a message is divided into fixed length blocks and
    processed block by block

17
Iterative Construction of MD5
18
Readings for This Lecture
  • Cryptographic Hash Function on wikipedia
  • http//en.wikipedia.org/wiki/Cryptographic_hash_fu
    nction

19
Coming Attractions
  • Providing integrity MAC
Write a Comment
User Comments (0)
About PowerShow.com