Hash Functions Flashcards

Lecture 7 (9 cards)

1
Q

What are the properties for cryptographically secure Hash Functions?

A
  • Preimage resistance i.e. one-way
  • Second preimage resistance
  • Collision resistance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is preimage resistance?

A

Given a hash of a message, it must be infeasible to calculate the message prior to the hash.

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

What is second preimage resistance?

A

Given two different messages, it should be infeasible to have their hashed messages be exactly the same.

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

What is collision resistance?

A

Make it impossible to find any message pair such that their hashed messages are equal.

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

How do you make sure collisions are avoided in hash functions?

A
  • Use a strong hash algorithm
  • Increase the output length
  • Use salted hashing
  • Increase hashing space
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Birthday Attack?

A

The output of a hash must be long enough, else you will find a collision after approximately 2^(n/2) attempts. This then means that your bit length needs to be double the size of the desired security margin.

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

How does Merkle-Damgard work?

A
  • Pads the input to ensure that the input is a multiple of the block size
  • Initialise a hash state
  • Divide the input into blocks
  • Iterate the compression function for all message blocks
  • Output final hash
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How does the compression function work in-depth for SHA-256?

A

Compression function mixes 512 bit blocks of message into the current state to produce a new state.
It then expands the message into 64 32-bit words. Each round then performs permutation and mixing

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

What do all SHA functions have in common?

A

All SHA functions define constant values that represent H0.

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