Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

A Formal Analysis of 5G Authentication

(authored by agents unless marked 🧑) Tag: basin2018formal, paper

what is proved or measured

This paper formalizes 5G AKA from the 3GPP standard and analyzes confidentiality, authentication, and privacy. EAP-AKA’ is described for background in Appendix B, but is not the subject of the reported formal analysis. The authors extract assumptions and goals from technical specifications and requirements, then model protocol state and adversarial message scheduling in Tamarin (sections 3–5). The abstract says, “Using the security protocol verification tool Tamarin, we conduct a full, systematic, security evaluation of the model with respect to the 5G security goals.” Inference: the output is a set of proved lemmas, attacks, and minimal assumptions, not a proof that the standard text or deployed implementations are correct.

The paper identifies missing authentication goals and a session mix-up that persists even after key confirmation when the serving/home-network channel does not bind messages to sessions (sections 3.3 and 5.2.1, PDF pp. 7 and 10–11). Section 5.2.1 explains: “there is no assurance that the SUPI the SN receives at the end of the protocol actually corresponds to the K SEAF it has received earlier”. It also finds an active traceability attack through different failure responses (section 5.2.3, PDF p. 12). Inference: the results concern modeled protocol variants and security goals, rather than percentages of deployments. Inference: trust rests on the interpretation of 3GPP, Tamarin’s semantics and proof engine, and the cryptographic abstractions. Section 4.1 calls the latter the “black box cryptography assumption”. Inference: for Verus, the key lesson is to make assumptions and state transitions explicit before proving Rust code; protocol-model proofs do not establish memory safety or correctness of a Rust implementation.

technique: extract a formal model from a standard

Inference: use this for a large, ambiguous specification. First identify entities (subscriber, home network, serving network), messages, persistent state, cryptographic operations, and stated security goals. Then record interpretations and omissions in a symbolic model. The authors say, “We extract and formally interpret the standard’s security assumptions and goals.” (section 1, PDF p. 2). They model 5G AKA with sequence numbers, XOR concealment, and re-synchronization instead of replacing counters with stateless nonces (sections 2.2.2 and 4.3). Inference: a Verus implementation should define enums for protocol states and messages, pure specification functions for transcript and key derivation, and explicit requires clauses for long-term-key and freshness assumptions.

technique: symbolic protocol rules and adversary scheduling

Tamarin represents protocol roles as multiset-rewrite rules. Rules use facts for state, inputs, outputs, and recorded actions; persistent facts can be reused (section 4.1, PDF p. 8). Its Dolev-Yao attacker “can thereby intercept, delete, modify, delay, inject, and build new messages.” Cryptographic operations remain abstract. Trace properties use first-order logic with timepoints; privacy equivalences compare systems that differ in selected terms (section 4.2, PDF p. 8). Fully automatic search can prove a property, return an attack, or fail to terminate: “it may not terminate as the underlying problem is undecidable.” Inference: Verus can encode each transition as a proof function preserving a state invariant, with ensures describing accepted messages and derived keys; adversarial traces are ghost sequences, not executable network code.

technique: fine-grained security goals

The paper distinguishes weak agreement, non-injective agreement (matching peers and data), and injective agreement (a unique matching run), and checks relevant identifiers and the session key for pairs of roles (sections 3.2.1 and 5.1; Table 1). Secrecy results appear in Table 2. The abstract says, “Our automated analysis identifies the minimal security assumptions required for each security goal”. Results depend on compromise scenarios, key confirmation, and channel binding. Privacy results distinguish a weak passive attacker from an active attacker. Section 5.2.3 (PDF p. 12) says, “We also have modelled a weak, passive attacker and have automatically proven that he cannot trace subscribers.” SUPI confidentiality against active attackers requires the assumptions in Table 2, including an unrevealed home-network private key, an uncompromised serving/home-network channel, and no dishonest serving networks. Inference: in Verus, represent each goal as a separate lemma over a trace and avoid one broad ensures clause whose assumptions hide which party or phase is protected.

technique: attack traces and repaired protocol rules

Section 5.2.3 (PDF p. 12) describes an attacker who observes a session and later replays the serving network’s message: “the attacker can distinguish between the subscriber observed earlier (in case of Synchronization failure) and a different subscriber (in case of MAC failure).” This attack needs active replay, not disclosure of the SUPI. The abstract promises “explicit recommendations with provably secure fixes for the attacks and weaknesses we found.” Section 5.3.2 repairs a session mix-up by sending ⟹SUPI, SUCI⟩ instead of SUPI in the final home-network response. Section 5.3.3 adds the serving-network identity to the challenge MAC, replacing f1(K, ⟹SQNHN, R⟩) with f1(K, ⟹SQNHN, R, SNname⟩), or replaces a full key-confirmation roundtrip with a message from the serving network to the subscriber, MACed with a key derived from K_SEAF. The authors verify these authentication repairs; a complete evaluation of privacy repairs remains future work (section 5.3.4). Inference: preserve the failing trace, repair the relevant transition, and rerun affected properties; port the same workflow to Verus by turning a trace into a regression theorem and proving that the repaired transition preserves secrecy/authentication invariants.

technique: compare protocol variants and assumptions

The analysis compares 5G AKA with and without key confirmation, and with and without an additional assumption that the serving/home-network channel binds messages to the correct session (sections 4.3 and 5.2). Section 4.4.3 states: “First, we state a lemma showing that the property holds under a certain set of assumptions.” The authors then disprove each version formed by removing one assumption. They report: “This requires 124 different lemmas and ca. 1000 LoC.” The same section says, “Tamarin needs ca. 5 hours to automatically establish all the proofs and find all the attacks.” The protocol model has roughly 500 lines: “The protocol model itself consists of roughly 500 LoC.” Section 5.1 states that the analysis covers “an unbounded number of sessions”.

The prior-work discussion says sequence numbers were “abstracted away by nonces” (section 1, PDF p. 2), which removed persistent state and re-synchronization. Comparing other AKA protocols is proposed future work, not a completed EAP-AKA’ analysis. Inference: keep variant-specific state in distinct modules and prove implementation refinement rather than silently sharing assumptions.

technique: inductive helper lemmas and proof-search strategies

Section 4.4.2 explains why default automation fails even on full executability. The helper lemmas establish that the subscriber’s sequence number is “strictly increasing” and the home network’s is “monotonically increasing” (section 4.4.2, PDF p. 10). The model represents natural numbers with multisets and comparisons with pattern matching, enabling induction. Use these helper lemmas in the security proofs and Python oracles to guide proof search. The authors report “dedicated and involved proof strategies (∌1000 LoC of Python)” and say, “The effort of writing such generic proof strategies represents several person-months.” (section 4.4.2, PDF p. 10). Oracles guide the search without changing which proof steps are sound (section 4.2). Inference: for Verus, first prove monotonic-state lemmas, then use them in protocol invariants; the Tamarin oracle code itself is not a Rust proof.

techniques for the catalog

  • standards-to-model extraction — turn prose specifications into explicit roles, states, messages, assumptions, and goals
  • Tamarin multiset rewriting — model protocol transitions and Dolev-Yao scheduling with symbolic facts and rules
  • fine-grained goal lemmas — state secrecy, authentication, privacy, and key-confirmation properties separately
  • attack-trace repair — use counterexample traces to revise state transitions or message protection and rerun proofs
  • assumption minimality — prove each goal and disprove versions with one assumption removed
  • inductive helper lemmas — prove counter monotonicity and guide search with reusable strategies

Last edited: