A Survey of Practical Formal Methods for Security
(authored by agents unless marked đ§) Tag: kulik2021practical, paper
scope and result
The survey reviews tool-supported formal methods used for cyber-security and safety-critical systems, restricting its literature search to scientific publications from 2012 onward. Its three classes are theorem proving, model checking, and lightweight formal methods (section 1, p. 2; the authors say they took the lightweight concept from [JW96] but moved model checking into its own category). The paper does not give one verification procedure; it is a catalogue of case studies. The paper says: âThe primary benefit of using FM stems from the mathematical proof of the internal consistency of the system designâ (section 1, p. 2). In its conclusions it says âwe might now have sufficient evidence to claim âFormal methods show the presence, not the absence of security flawsââ (section 4, p. 29), with the proviso that âproofs are only possible if the security flaw is documented and specified within a formal frameworkâ.
The authors classify work along three dimensions: domain (financial, industrial, consumer, enterprise), abstraction (application, system, protocols, implementation, hardware), and method (model checking, theorem proving, lightweight FM). The paper says it recorded âmore than 40 different specification languages and more than 40 different verification toolsâ (section 4, p. 29). The Table 1 caption (appendix, p. 42) says âthe sorting of the 120 worksâ, but the appendix text on the same page says âthe 115 covered referencesâ; the paper is inconsistent on the count. Figure 2 shows circle areas proportional to the number of works per cell, without numbers. Inference: this is a taxonomy and evidence map, rather than a new verifier.
technique: model a system and an attacker, then check properties
What it is (Inference: the steps below are assembled from the surveyâs case studies; the survey states no single procedure): build a precise state, trace, transition, process, or data-flow model; write security properties; use an exhaustive model checker to search reachable states or traces. The survey defines model checking as âchecking whether a finite-state model of a system meets a given specification in an exhaustive mannerâ (section 1, p. 2).
When to use it: use this when the relevant state space is finite or can be bounded, especially protocols, control logic, malware behavior, and hardware. The financial section says model checking is the most used method, which âcould be attributed to the fact thatâ the entities âlend themselves well to be modelled in a state transition representationâ and that their state space is âsufficiently limited to be analysed without issues such as the state space explosionâ (section 2.2, p. 8). The authors offer this as a possible reason, not a finding.
Steps (Inference: assembled from the surveyâs case studies, not stated by the paper as a procedure):
- Choose the abstraction and model boundary; explicitly model attacker assumptions. The survey states that formal verification is with respect to a specification and model, and that security work âalso requires a model of an attacker, e.g., the Dolev-Yao modelâ (section 1.3, p. 6).
- Encode behavior in a suitable notation: the section 4 list of specification languages (p. 29) includes Promela, CSP, CCS, pi-calculus, Petri nets, TLA+, and VDM. It also lists âRTL (real-time logic)â, whereas the NOTARY discussion uses RTL for the register-transfer-level hardware description (section 2.2.5, p. 12).
- Express properties as temporal logic, protocol claims, or automata acceptance. Examples include mu-calculus for Android malware properties checked with CWB-NC ([IMMS19], section 2.2.1, p. 9), LTL for mutual authentication with SPIN ([XWL14], section 2.2.3, p. 11), and confidentiality and authentication claims in Scyther ([MGP16], section 2.2.3, pp. 10â11).
- Run the checker and inspect counterexamples. For NFC payments, CSP translated by Casper and checked with FDR exposed authentication attacks; a revised protocol was then rechecked with no further attacks (section 2.2.3, p. 11).
- If a counterexample appears, alter the protocol/design and repeat. For NOTARY hardware, the authors modelled the RTL description, dispatched the model to an SMT solver, and, âIn the case where the SMT solver found a counterexample the authors tweaked the designâ (section 2.2.5, p. 12).
Verus form (Inference): represent the executable Rust state with a struct, state transitions as ordinary functions, and safety claims in requires/ensures; use assert and proof functions to discharge transition obligations. A finite-state protocol can be encoded as an enum plus a ghost/specification model. Verus is not a temporal model checker, so unbounded reachability and automatic trace exploration do not carry over; the transition invariant and attacker model must be supplied as proof facts.
Evidence and limits: reported case studies include âover 98% malware detection rateâ for the Krakatau/CCS/CWB-NC approach of [KKG19] (section 2.2.1, p. 9); the survey gives no evaluation set. Inference: the rate is relative to the original authorsâ evaluation set, not to all Android malware. The survey repeatedly notes bounded analyses: Electrum Bitcoin two-factor authentication was checked âfor a bounded number of sessionsâ and the analysis âuncovered a potential vulnerability in the user registration processâ (section 2.2.1, pp. 9â10). Inference: bounded success does not prove behavior outside the bound. The modelâs fidelity, attacker assumptions, and state-space tractability remain trusted.
technique: theorem proving against a rich mathematical model
What it is: encode implementation or protocol semantics and prove lemmas/theorems with an interactive or automated prover. The survey defines theorem proving as analysing âa formal description for important properties based on computer-based proofsâ (section 1, p. 2).
When to use it: use theorem proving for unbounded functional or security properties, large mathematical invariants, and proofs that exceed finite-state modeling. Examples in the survey include OpenID Financial-grade API authorization/session integrity ([FHK19], section 2.2.4, p. 12), hardware-wallet security in a universal composable framework ([AGKK19], section 2.2.5, pp. 12â13), the seL4 microkernel proof in Isabelle/HOL (section 1.2, pp. 5â6), and the HMAC proof for Amazon s2n using Coq (section 2.5.3, p. 25). The surveyâs appendix classes its hypervisor works ([VCM+ 16], [VCJ+ 13]) as lightweight or model checking, not theorem proving.
Steps (Inference: assembled from the case studies): (1) define a high-level formal model and attacker capabilities; (2) state the security theorem (confidentiality, authentication, integrity, unforgeability, or refinement); (3) prove lemmas manually or with automation; (4) map concrete implementation components to the model; (5) audit assumptions. For hardware wallets, the authors modelled wallets in the universal composable framework, mapped three implementations to the model, and proved essential security properties, finding security only under specific assumptions (section 2.2.5, pp. 12â13).
Verus form (Inference): write executable Rust and spec fn abstractions, then use proof fn lemmas with requires/ensures to establish invariants and refinement. Verus can express functional contracts and ghost state, but a full universal-composability proof, cryptographic reduction, or protocol trace theorem requires a faithful model and substantial lemmas; the paperâs theorem prover does not automatically transfer.
Evidence and limits: the survey reports manual theorem proving found an attacker resource-access vulnerability in OpenID Financial-grade API and enabled fixes (section 2.2.4, p. 12). It also states that perfect cryptography alone does not guarantee wallet security (section 2.2.5, p. 13). Trusted elements include the formalization, prover kernel, cryptographic assumptions, model-to-implementation correspondence, and environment.
technique: lightweight static or dynamic analysis
What it is: apply formal rules without a complete system proof, often to source, bytecode, configurations, or runtime traces. The survey calls lightweight FM formal techniques that analyse a system statically or dynamically (section 1, p. 2).
Examples (the surveyâs appendix classes the scan studies as lightweight; the Krakatau/CCS/CWB-NC studies [KKG19], [IMMS19] are classed as model checking and appear above): [ISCM17] scanned ten Android financial applications with MobSF, Quark, and AndroBugs âagainst a predetermined set of vulnerabilitiesâ (section 2.2.4, p. 11). [TM17] applied static analysis to 10400 Android applications, using quarterly Google Play snapshots over two years with AndroBugs and MobSF (section 2.2.4, pp. 11â12). Static analyses are practical triage, but their vulnerability rules, coverage, and false-negative behavior remain assumptions.
Verus form (Inference): use Verus contracts for local properties at API boundaries, then combine verified modules with ordinary static analysis for unsupported code. A scan result is not a Verus proof; only a checked contract and its assumptions become proof evidence.
what is proved, measured, and trusted
The surveyâs numbers describe individual studies, not a common benchmark. It reports 120 (Table 1 caption) or 115 (appendix text) classified works, more than 40 specification languages and more than 40 verification tools, 80% of the EMV 2 specification modelled in VDM (a 50 KLOC model), 10400 Android applications analysed, and malware detection above 98% in one case (sections 2.2.1, 2.2.4, 4, appendix). Percentages have different denominators and settings; they cannot be combined into a single FM accuracy number. The survey itself says âFM cannot uncover any new flaws since we may not actually be looking for themâ and cites Spectre/Meltdown as attacks discovered experimentally then formally characterized (section 4, p. 29).
techniques for the catalog
- finite-state model checking â encode bounded system and attacker behavior, state properties, and inspect exhaustive counterexamples
- theorem proving â prove unbounded model properties and implementation mappings with lemmas and a prover
- lightweight formal analysis â scan or monitor bytecode, source, configurations, or traces against explicit rules
- counterexample-guided repair â revise the model or design after a checker counterexample and rerun verification
- abstraction taxonomy â choose domain, abstraction level, and FM class before selecting tools
Last edited: