2-safety hyperproperty verification
2-safety hyperproperty verification is a formal verification technique used in the setting of leakage-contract-based hardware security analysis. It was introduced by Bloem et al. [BGG+22] and is reused in subsequent work on glitch-aware leakage contracts.
Origin and purpose
The technique was originally proposed to verify that, for every observable leak emitted by a hardware circuit, there is a corresponding leak emitted by a software-level leakage contract that the hardware complies with. The hardware/contract compliance property can be expressed as an SMT problem over bitvector theories [BGG+22], and 2-safety hyperproperty verification is the concrete encoding used to discharge it [1].
How it is encoded
In the leakage-contract verification flow, the verification of each gate modeled by a single leak statement in the contract is performed by:
- Encoding the 2-safety hyperproperty as two instances of the hardware and the contract.
- Unrolling the hardware for each cycle of the instruction execution.
- Issuing an SMT query per combination of gate, cycle, and leak statement [2].
In practice, the SMT encoding of the contract is obtained with the CBMC frontend [CKL04] and checked against the SMT encoding of the CPU circuit using the Boolector SMT solver [NPWB18] [1].
Computational cost
The encoding requires at most one SMT query per combination of gate, cycle, and leak statement [2].
Application to glitch-aware leakage models
2-safety hyperproperty verification is not tied to a single leakage model. It was reused to verify a tighter glitch-propagation model in which leakage is described per CMOS gate through a notion of signal stability and a notion of detectable difference. Applying the detectable-difference notion recursively to a hardware netlist captures potentially occurring glitches, and the resulting security notion is checked using the same 2-safety hyperproperty verification technique [1].
Position in the end-to-end flow
The technique is the hardware-verification step of an end-to-end toolchain in which:
- Hardware verification (via 2-safety hyperproperty verification and SMT) is performed once.
- Software verification against the contract is then performed separately, using a Fourier-coefficient-based approximation approach [BGI+18] discharged with modern SAT solvers [1].
This separation is reported to make the overall verification significantly faster than approaches that directly verify software against hardware netlists [1].