Week 5: Hash Functions Flashcards

1
Q

What does a cryptographic hash do?

A

A cryptographic hash maps a string into a new shorter string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some applications of Hash Functions?

A
  • Secure password storage.
  • Integrity Checks
  • Fingerprinting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an Ideal Cryptographic Hash?

A

Input: Arbitrary-length string
Output: Fixed length string
Each repeated input gives same output as before. Each output is unique.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the Security Properties of a Hash Function?

A
  1. Pre-image resistance
  2. Second pre-image resistance.
  3. Collision resistance.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In Hash Functions, what is Pre-image resistance?

A

Given hash [h(x)], it should be hard to find a message [x] that produces that hash [h(x)].

Given h(x), hard to find x.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In Hash Functions, what is Second pre-image resistance?

A

Given message [x1], it should be hard to find another message [x2] that produces same hash.

Given x1, h(x1) hard to find x2 where h(x1) == h(x2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In Hash Functions, what is Collision resistance?

A

It should be hard to find any two messages x1, x2 that produce same hash.

Hard to find any messages x1, x2 where h(x1) == h(x2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Given a hash length, how many messages do you need to look through to have collision?

A

Collision will occur after 2^(k/2) attempts. Where k is hash key length.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does Merkle-Damgard Construction work?

A
  1. Initial Value and first message block is fed into compression function.
  2. Output from 1 and second message block is fed into compression function.

    Final output is the hash.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does a SHA-1 Compression Function work?

A
  1. Pads input message if necessary.
  2. Split input message into 32 bit chunks.
  3. Start with 5 input constants (IV) and modify each through bitwise operations as you loop through chunks.
  4. Output final (32*5) 160 bit message.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly