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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a7f1ea63-4bdb-489b-a3d2-139e151786d1Cited 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
