Crypto - 3. Hashing Flashcards

1
Q

What is the primary function of a cryptographic hash function?

A

To produce a fixed-length digest from an input of any size for secure data representation.

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

Fill in the blank: A cryptographic hash function transforms an input message into a ______.

A

Fixed-length digest.

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

What are common applications of cryptographic hash functions?

A

Digital signatures, key derivation, bit commitment, and message authentication.

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

Why are digital signatures combined with hash functions?

A

Hashing a message before signing reduces data size and improves efficiency.

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

Define an Extendable Output Function (XOF).

A

An XOF is a hash function that can produce outputs of any desired length.

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

Fill in the blank: XOFs are often used in applications requiring ______ length outputs.

A

Variable.

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

What is preimage resistance in a hash function?

A

It means finding an input that maps to a given output should be computationally difficult.

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

Explain second preimage resistance in hash functions.

A

It should be hard to find a different input that produces the same hash as a given input.

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

What is collision resistance?

A

Collision resistance means it should be hard to find two distinct inputs with the same hash output.

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

How does the birthday paradox relate to collision resistance?

A

The paradox shows that collisions are more likely than expected; 23 people have a high chance of sharing a birthday.

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

What is MD5 and why is it considered insecure?

A

MD5 is an older 128-bit hash function with known vulnerabilities to collision attacks.

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

Fill in the blank: SHA-1 was standardized by ______ in 1995 but is now considered insecure.

A

NIST

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

Name a secure hash function family that replaced SHA-1.

A

SHA-2

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

Describe the SHA-3 standard and its basis.

A

SHA-3 is based on the KECCAK algorithm and includes SHA3-{224, 256, 384, 512} and SHAKE{128, 256} functions.

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

What is the Merkle-Damgård construction?

A

A method used in hash functions to process messages in blocks and chain intermediate hash values.

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

Explain the purpose of HMAC.

A

HMAC combines a hash function with a key to provide secure message authentication, addressing length extension attacks.

17
Q

What is a length extension attack?

A

An attack on hash functions where an attacker can forge a hash by appending data to the original message.

18
Q

Fill in the blank: The ______ construction in SHA-3 allows flexible and secure hashing with resistance to preimage and collision attacks.

A

Sponge

19
Q

Describe sponge construction in SHA-3.

A

The sponge construction iterates a permutation on absorbed input, outputting a secure hash digest.

20
Q

What role does the KECCAK-f permutation play in SHA-3?

A

It performs non-linear mixing, diffusion, and symmetry-breaking to secure the hashing process.

21
Q

List the five steps in the KECCAK-f permutation process.

A

θ (mixing), ρ (rotation), π (reordering), χ (non-linearity), and ι (symmetry-breaking).

22
Q

How does the θ step contribute to security in KECCAK-f?

A

It mixes bits by computing parity and adding neighboring column values to increase diffusion.

23
Q

Fill in the blank: The χ step in KECCAK-f adds ______ by flipping bits based on neighboring patterns.

A

Non-linearity

24
Q

What is indifferentiability in the context of hash functions?

A

A measure of how closely a hash function behaves like a random function, ensuring security in hash constructions.

25
Q

What is the purpose of customized SHAKE functions (cSHAKE)?

A

cSHAKE provides custom output for specific applications, allowing added flexibility in SHA-3.

26
Q

Why is SHAKE categorized as an XOF?

A

Because SHAKE can produce outputs of variable lengths.

27
Q

What is KMAC and how does it differ from HMAC?

A

KMAC is a message authentication code based on SHAKE, avoiding the length extension issues of HMAC.

28
Q

Fill in the blank: ______ is a form of hash-based parallel processing introduced in SHA-3.

A

ParallelHash

29
Q

Explain why cryptographic hash functions should behave like random mappings.

A

To ensure security properties like preimage resistance and collision resistance are met.