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

Insider threats and auctions: formalization, mechanized proof, and code generation

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

result and threat model

The paper formalizes a fictitious “cocaine auction” in Isabelle/HOL to study sweetheart deals and bidder collusion. It combines Isabelle’s inductive security-protocol method with the Isabelle Insider framework. The abstract states: “We use the existing example of a fictitious cocaine auction protocol from the literature to develop and illustrate our approach.” (abstract, page 44; page numbers are the journal’s). The model includes arbitrary rounds, broadcast messages, an anonymity layer, cryptographic messages, and a Dolev–Yao-style spy. A sweetheart deal is a seller precommitting to a friend; “ringing” is bidders colluding. The model proves that traces of the specified protocol exclude the sweetheart outcome (seller announces a different winner than the last-round bidder) but cannot exclude collusion under the stated insider assumptions. A limit the paper itself notes (section 4.3.2): the Spy plays almost no role in the sweetheart proof, because a Fake event makes later rules inapplicable, so the trace cannot finish.

technique 1: inductive trace specification

Use an inductive event-set when a protocol has unbounded rounds and an attacker may interleave messages. Define cocaine_auction as the least set of event lists closed under protocol rules. The paper has five rules: Nil (empty trace); CA0 (the server sends its public key to every friend); CAi (a bidder, using the out-of-range sender address Friend friends as spoofed anonymity, sends its public key and the round bid bid i encrypted under the server key, broadcast to the server and all bidders); CAn (after a timeout, which is not modelled explicitly, the server broadcasts the bid and meeting appointment encrypted under the previous round’s winner key); and Fake. The paper omits bidder authentication in CAi; the bidder authenticates at the meeting point. The Fake rule lets the spy prepend a message X when X ∈ synth (analz (spies evsf)). Each rule extends a trace only when its preconditions hold, so malformed event sequences are outside the set.

The paper describes the result as follows: “Arbitrary numbers of rounds in an auction are enabled and yet inconsistent traces are excluded since the rule CAi can be chained up any number of times but using a natural number counter i their interleaving can be controlled.” (section 4.2, page 55). To prove a security theorem, use rule inversion (Isabelle inductive cases), a case analysis with one case per rule. For the sweetheart theorem the paper reports 6 subgoals: the empty trace is trivially true, 4 others are excluded because datatype constructors (Server, Friend j, Spy; Says arguments) are distinct, and one case matches the theorem’s premise and is closed by instantiating the existential and simplifying (section 4.3.1, page 57-58). This technique is reusable for protocol safety properties stated over every possible trace.

Verus form (Inference): represent an event list and protocol state as Rust data, define a spec fn for the inductive transition relation, and prove trace invariants by induction over a ghost sequence. Encode attacker knowledge as a set/map with explicit constructors for allowed synthesis. Verus does not provide Isabelle’s inductive-set package, so the transition closure and induction lemmas must be modeled directly. The cryptographic algebra remains an assumption unless a verified primitive and model are supplied.

technique 2: proving absence of sweetheart deals

State the property as a trace theorem no_sweetheart_deal (page 57): assuming 0 < friends (which excludes the empty set of bidders), if a trace is the server’s final broadcast of Crypt (pubK (Friend j)) {Number(bid i), Number mtng} followed by evs, then evs begins with the bidder’s round message carrying pubK (Friend j) and bid i. So the server cannot encrypt the appointment under any key other than the last bidder’s. The proof is the rule-inversion case split described under technique 1, not a separate induction. The paper’s own caveats (section 5, page 61): “The proof guarantees only that the key used by the winner of the penultimate round – after the 30 seconds have lapsed without a bid – is used for the broadcast with the secret location, so that only the winner can decrypt the location.” It also assumes that the bid acknowledgement process cannot be manipulated. Inference: this is a safety result about the specification’s traces, not a proof that a real auction implementation follows it.

technique 3: insider collusion with the homo oeconomicus assumption

Use the Insider framework when a participant may behave strategically while honest participants remain constrained by the protocol. Define Insider a C ≡ tipping_point (astate a) −→ (∀ b ∈ C. UasI a b), where UasI a b ≡ (Friend a = Friend b) expresses impersonation and C is a set of identities. Formalize homo_oeconomicus for this protocol as: a bidder that is the highest bidder in the trace so far does not bid in the next round (the paper’s formalization uses the functions CAtl, highest_bidder and cur_round). Prove homo_economicus_one_bidder (with friends = 1 the final bid is bid 1) and then Insider_homo_oeconomicus: assuming homo_oeconomicus, tipping_point(astate 0) and Insider 0 {i. i < friends}, every final server broadcast has i = 1, the “reserve price” (bid 0 is specified to be 0). The paper reports, “The collusion exhibits that the assumption homo oeconomicus suffices to prove that rational insiders may use collusion to force the reserve price.” (section 5, page 62). The same list says: “The inductive approach can only deal with insider threats by abstracting from its agent datatype that prevents good agents from behaving badly.” The paper also states that a redefinition with all agents abstract (the seller also a Friend k) could not exclude the sweetheart deal (section 5, page 62). The conclusion calls the general homo oeconomicus assumption inside an Insider definition “disputable” (section 7, page 69).

Verus form (Inference): make actor strategy and insider assumptions explicit spec fns over traces, and state economic objectives as ghost predicates. Prove attack existence as a witness trace under requires assumptions; prove prevention as an invariant only for honest strategy constraints. Do not encode an insider assumption as executable behavior or treat it as a universal security guarantee. The paper’s strategic reasoning is outside ordinary Rust safety proofs.

technique 4: constructive refinement and verified code generation

The inductive definition cannot be exported directly: the checker CA_i uses the abstract constant pubK (no definition) and an existential over j, whose key domain (natural numbers) is potentially infinite (section 6.2, pages 63-65). Refine in stages. First define CA_i, a primitive recursive per-round checker (non-constructive, kept as an intermediate step for the proof structure), together with CA_f0, CA_fi, CA_fn and CA_n. Then define CA_i''' with an explicit list kl of all bidders’ public keys. Replace the existential search with winner_i, a partial function (via option) that returns Some K when the head event is a message to the server of the form Crypt SK {Key K, N}; require List.member kl K. Define CA_n''' from CA_fn and CA_i'''. Prove CA_f0_CA0, forall_CA_i_imp_CA, CA_fn_CAn, CAn_CA, then CA_i'''_CA_i (assuming kl = [pubK (Friend k). k <- [0..<friends]]) and finally CAn'''_CA (section 6.3, pages 66-67). Invoke export code CA_f0 CA_fi CA_fn CA_i''' CA_n''' in Scala; the generated code is in the Appendix.

The paper gives the practical sequence: “We provide an Isabelle definition of a constructive test predicate for correct cocaine auction traces.” Then, “We generate executable code for this test predicate in the programming language Scala using Isabelle’s code generation mechanism [25].” Finally, “We prove correctness of the test predicate: we additionally provide proofs that a trace of events that is accepted by the test function is also in the set of all cocaine auction traces defined in its specification in Section 4.2.” (section 6.1, page 63). The paper says the parameter kl requires “the additional assumption that the parameter kl is the list of all public keys of all bidders” (section 6.2, page 66); it avoids the existential but shifts responsibility to key-list completeness. The paper also admits it does not know whether CA_n and CA_n''' correctly implement the protocol apart from the informal argument and the proofs that accepted traces are in the specification (section 6.3).

Verus form (Inference): write an executable Rust checker over a finite key slice and a separate spec fn describing valid traces. Prove checker(trace, keys) == true implies the specification predicate, with a lemma requiring every legitimate bidder key occurs in keys. Keep cryptographic operations behind verified contracts; generated Rust is not correct merely because a checker accepts its own traces.

techniques for the catalog

  • inductive trace closure: specify all protocol executions as the least event-set closed by normal and attacker rules
  • inversion security proof: prove trace properties by rule inversion, a case split on each protocol rule, eliminating impossible cases by constructor distinctness
  • insider framework: model colluding rational actors with an impersonation predicate and an explicit rationality assumption
  • constructive predicate refinement: replace abstract keys and infinite existential choices with a finite key list and a computable winner function
  • proved-sound checker extraction: prove the executable checker accepts only traces of the inductive specification, then export Scala code

Last edited: