When Messages Are Keys: Is HMAC a Dual-PRF?
Matilda Backendal, Mihir Bellare, Felix Günther, Matteo Scarlata
Abstract
In Internet security protocols including TLS 1.3, KEMTLS, MLS and Noise, HMAC is being assumed to be a dual-PRF, meaning a PRF not only when keyed conventionally (through its first input), but also when "swapped" and keyed (unconventionally) through its second (message) input. We give the first in-depth analysis of the dual-PRF assumption on HMAC.
For the swap case, we note that security does not hold in general, but completely characterize when it does; we show that HMAC is swap-PRF secure if and only if keys are restricted to sets satisfying a condition called feasibility, that we give, and that holds in applications. The sufficiency is shown by proof and the necessity by attacks. For the conventional PRF case, we fill a gap in the literature by proving PRF security of HMAC for keys of arbitrary length.
Our proofs are in the standard model, make assumptions only on the compression function underlying the hash function, and give good bounds in the multi-user setting. The positive results are strengthened through achieving a new notion of variable key-length PRF security that guarantees security even if different users use keys of different lengths, as happens in practice.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
4 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Shadowfax: Hybrid Security and Deniability for AKEMs cites Post-Quantum TLS Without Handshake Signatures
- Post-Quantum TLS Without Handshake Signatures cites Post-quantum WireGuard
- Efficient Schemes for Committing Authenticated Encryption cites The Multi-user Security of GCM, Revisited: Tight Bounds for Nonce Randomization
Cited by top-tier papers4
- Obfuscated Key ExchangeFelix Günther, Douglas Stebila, Shannon VeitchCCS 2024 · 1 citation
- Shadowfax: Hybrid Security and Deniability for AKEMsPhillip Gajland, Vincent Hwang, Jonas JanneckUSENIX Security 2026
- The SecureDrop Protocol: End-to-End Encrypted Whistleblowing for AllGiulio Berra, Felix Linker, Luca Maier, Cory Francis Myers et al.CCS 2026
- iSeal: Encrypted Fingerprinting for Reliable LLM Ownership VerificationZixun Xiong, Gaoyi Wu, Qingyang Yu, Mingyu Derek Ma et al.AAAI 2026
Builds on6
- Post-Quantum TLS Without Handshake SignaturesPeter Schwabe, Douglas Stebila, Thom WiggersCCS 2020 · 162 citations
- Post-quantum WireGuardAndreas Hülsing, Kai-Chun Ning, Peter Schwabe, Florian Weber et al.S&P 2021 · 73 citations
- Efficient Schemes for Committing Authenticated EncryptionMihir Bellare, Viet Tung HoangEUROCRYPT 2022 · 54 citations
- The Multi-user Security of GCM, Revisited: Tight Bounds for Nonce RandomizationViet Tung Hoang, Stefano Tessaro, Aishwarya ThiruvengadamCCS 2018 · 39 citations
- Security Analysis of the MLS Key DerivationChris Brzuska, Eric Cornelissen, Konrad KohbrokS&P 2022 · 26 citations
Related papers
- On the Concrete Security of TLS 1.3 PSK ModeHannah Davis, Denis Diemert, Felix Günther, Tibor JagerEUROCRYPT 2022 · 19 citations
- Verified Models and Reference Implementations for the TLS 1.3 Standard CandidateKarthikeyan Bhargavan, Bruno Blanchet, Nadim KobeissiS&P 2017 · 233 citations
- Key Derivation Functions Without a Grain of SaltMatilda Backendal, Sebastian Clermont, Marc Fischlin, Felix GüntherEUROCRYPT 2025 · 5 citations
- Stealth Key Exchange and Confined Access to the Record Protocol Data in TLS 1.3Marc FischlinCCS 2023 · 7 citations
- Quantifying the Security Cost of Migrating Protocols to PracticeChristopher Patton, Thomas ShrimptonCRYPTO 2020 · 2 citations
