← Back to the module

Knowledge check

Message authentication codes: HMAC, CMAC, GMAC & Poly1305

10 questions testing what you just read — no login, no tracking, just immediate feedback.

Question 1 of 10

Alice and Bob share an HMAC key. Bob receives a message with a valid tag. What can he prove to a third party?

Question 2 of 10

Why does HMAC nest two hash calls instead of computing SHA-256(key ‖ message)?

Question 3 of 10

With HMAC-SHA256, what happens to a key longer than 64 bytes?

Question 4 of 10

An attacker knows the plain CBC-MAC tag t of a one-block message m. Which message can they forge a valid tag for, without the key?

Question 5 of 10

In AES-CMAC, when is the subkey K2 used instead of K1?

Question 6 of 10

What happens if two different messages are authenticated with GMAC under the same key and the same nonce?

Question 7 of 10

How do you compute a GMAC tag with WebCrypto, which has no 'GMAC' algorithm name?

Question 8 of 10

Poly1305 does its arithmetic modulo which prime?

Question 9 of 10

In ChaCha20-Poly1305, where does the per-message Poly1305 key come from?

Question 10 of 10

A MAC uses 64-bit tags. Roughly what is an attacker's chance of forging one with a single random guess?

0 / 10 answered