Hashing Flashcards

1
Q

What is a hash function?

A

A hash function takes input of arbitrary length and maps it to a fixed-length value.
h(x)

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

Why is this one-way mapping useful?

A

Can be used to find when data has been altered as the hash will no longer be the same. A comparison can be done to prove this.

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

What are the properties required for a hash function to be used in security

A

Pre-image resistance
Second pre-image resistance
Collision Resistance

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

What is pre-image resistance?

A

Hash functions are one way and therefore it is computationally infeasible to find y given x, where:
y = h(x)

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

What is second pre-image resistance?

A

Given x, it is computationally infeasible to find x’ such that x is different but the hash of x and x’ is the same.

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

What is collision resistance?

A

It is computationally infeasible to find x and x’ such that x and x’ are different but the hash of each produces the same output.

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

What is a message digest?

A

‘Checksum’, sent with the message and is used by the receive to compare with their hash of the same content. Where both hashes match then the integrity of the message has been preserved

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

What are message authentication codes?

A

Hash function in which the key is also hashed. This provides authentication as the sender’s key must be known in order to produce the same hash.

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

What are the drawbacks of hashing?

A

Can’t determine what’s been changed in a given message, just that something has changed.

Hashing doesn’t provide integrity in cases where the hash itself has been compromised.

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