||In this thesis we discuss the exact security of message authentications codes HMAC,<br/> NMAC, and PMAC. NMAC is a mode of operation which turns a fixed input-length keyed<br/> hash function f into a variable input-length function. A practical single-key variant of<br/> NMAC called HMAC is a very popular and widely deployed message authentication code<br/> (MAC). PMAC is a block-cipher based mode of operation, which also happens to be the<br/> most famous fully parallel MAC.<br/> NMAC was introduced by Bellare, Canetti and Krawczyk Crypto’96, who proved it to<br/> be a secure pseudorandom function (PRF), and thus also a MAC, under two assumptions.<br/> Unfortunately, for many instantiations of HMAC one of them has been found to be wrong.<br/> To restore the provable guarantees for NMAC, Bellare [Crypto’06] showed its security<br/> without this assumption.<br/> PMAC was introduced by Black and Rogaway at Eurocrypt 2002. If instantiated with<br/> a pseudorandom permutation over n-bit strings, PMAC constitutes a provably secure<br/> variable input-length PRF. For adversaries making q queries, each of length at most ` (in<br/> n-bit blocks), and of total length σ ≤ q`, the original paper proves an upper bound on<br/> the distinguishing advantage of O(σ 2 /2 n ), while the currently best bound is O(qσ/2 n ). In<br/> this work we show that this bound is tight by giving an attack with advantage Ω(q 2 `/2 n ).<br/> In the PMAC construction one initially XORs a mask to every message block, where the<br/> mask for the ith block is computed as τ i := γ i · L, where L is a (secret) random value,<br/> and γ i is the i-th codeword of the Gray code. Our attack applies more generally to any<br/> sequence of γ i ’s which contains a large coset of a subgroup of GF (2 n ).<br/> As for NMAC, our first contribution is a simpler and uniform proof: If f is an ε-secure<br/> PRF (against q queries) and a δ-non-adaptively secure PRF (against q queries), then<br/> NMAC f is an (ε + `qδ)-secure PRF against q queries of length at most ` blocks each. We<br/> also show that this ε + `qδ bound is basically tight by constructing an f for which an<br/> attack with advantage `qδ exists.<br/> Moreover, we analyze the PRF-security of a modification of NMAC called NI by An and<br/> Bellare that avoids the constant rekeying on multi-block messages in NMAC and allows<br/> for an information-theoretic analysis. We carry out such an analysis, obtaining a tight<br/> `q 2 /2 c bound for this step, improving over the trivial bound of ` 2 q 2 /2 c .<br/> Finally, we investigate, if the security of PMAC can be further improved by using τ i ’s<br/> that are k-wise independent, for k > 1 (the original has k = 1). We observe that the<br/> security of PMAC will not increase in general if k = 2, and then prove that the security<br/> increases to O(q 2 /2 n ), if the k = 4. Due to simple extension attacks, this is the best<br/> bound one can hope for, using any distribution on the masks. Whether k = 3 is already<br/> sufficient to get this level of security is left as an open problem.