Message Authentication Flashcards

1
Q

Why might we want to authenticate, but not encrypt?

A

When we are broadcasting a message to multiple destinations, when one side of the information transfer has a heavy load and cannot decrypt all incoming messages, when you are only interested in whether the information is genuine.

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

What is a MAC?

A

Message Authentication Code. A secret key is used to generate a small block of data, which is appended to the message.

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

Who knows the secret key used to generate the MAC?

A

Both sender and receiver.

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

How do MACs work?

A

Sender calculates the MAC as a function of the secret key and message. They append this to the message and send it. The receiver takes the whole message, removes the MAC, and then computes their own MAC. If the two MACs are the same, then the message has not been modified.

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

True or false, DES can be used to generate a MAC?

A

True

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

True or false, Hash functions require a secret key?

A

False

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

Describe how one way hash functions work.

A

Hash a given message, and encrypt the hash. Append this encrypted hash to the message. The receiver will then decrypt the hash, and compare it to when they hash the received message.

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

Can we do hashing without encryption?

A

Yes. We can use a secret value, S, and hash this together with the message, and then append this to the message. The receiver will then take a hash of the message and their own secret value S, and compare it to the appended hash.

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

Name the 5 requirements of a secure hash function.

A

1) Can be used on a block of data of any size. 2) Produce a fixed length output. 3) You cannot work out the input, given you know the output (preimage resistant). 4) For any block x, you cannot easily find the block y!=x if H(x) = H(y) (second preimage resistant). 5) For any block x, you cannot easily find a block y such that H(x) = H(y) (collision resistant).

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

What makes a hash function strong?

A

If it is collision resistant.

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

What is SHA?

A

Secure Hash Algorithm. Every bit of the generated hash is a function of every bit of the input.

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

True or false, hashing is slower than encrypting?

A

False

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

True or false, MAC can help you determine if your secret key has been broken?

A

False

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

True or false, MAC is also used for preventing eavesdropping?

A

False

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

True or false, MAC can be used to check the integrity of the message sent?

A

True

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

True or false, MAC can be used to verify that the sender of the message is who you think they are?

A

True

17
Q

Describe the general method for computing an HMAC.

A

Take your secret key and pad it. XOR this key with a given IV, and append this to your message. Hash this. Then, XOR your padded key from earlier with another given IV. Append this to the hashed message from earlier. Hash this final result.