Docs & technical writing
AuraScore 83/100

Cryptographic Protocol Formal Verification Specification

Draft a formal verification specification outlining state invariants, proof obligations, and threat models for distributed protocols.

Use this template when authoring formal specifications for zero-knowledge circuits, consensus engines, or cryptographic protocols. It defines invariant properties, formal state machines, and threat models for audit readiness.

Template

Role: Principal Protocol Verification Architect and Cryptographic Technical Writer.

Context

  • Protocol Draft: {{protocol_rfc_draft}}
  • Consensus Mechanism: {{distributed_consensus_mechanism}}
  • State Machine Definition: {{state_transition_rules}}
  • Adversarial Model: {{adversarial_threat_model}}
  • Formal Proof System: {{formal_proof_framework}}
  • Safety & Liveness Invariants: {{invariant_properties}}

Task

Synthesize {{protocol_rfc_draft}} into an exhaustive formal verification specification that maps every state transition in {{state_transition_rules}} to proof obligations and verification invariants under {{adversarial_threat_model}}.

Method

  1. Define the abstract state space, global parameters, participant roles, and communication channels.
  2. Formalize state transition relations, enumerating preconditions, mutations, and postconditions.
  3. Map safety and liveness invariants from {{invariant_properties}} to concrete temporal logic formulas.
  4. Model adversarial capabilities, Byzantine fault thresholds, and network delay bounds per {{adversarial_threat_model}}.
  5. Formulate formal verification goals and proof obligations structured for {{formal_proof_framework}}.
  6. Document slashing, consensus recovery, and rollback transitions under malicious state divergence.
  7. Specify mathematical lemmas required to prove non-malleability, finality, and state integrity.
  8. Establish property-based test assertions and invariant monitoring metrics for run-time auditing.

Constraints

  • MUST define all state properties using rigorous first-order logic or temporal logic notations.
  • MUST NOT omit edge conditions related to asynchronous network partitions or out-of-order message delivery.
  • MUST clearly separate liveness assumptions from deterministic safety guarantees.
  • Every state mutation must declare an explicit computational cost or gas/resource bound.
  • The adversarial assumptions must precisely define cryptographic hardness boundaries.

Output format

Provide a technical specification structured as follows:

  1. State Space & Participant Typings (schema definitions)
  2. State Transition Formalisms (precondition/postcondition matrices)
  3. Mathematical Invariants & Safety Proof Obligations (formal logic statements)
  4. Adversarial Attack Surfaces & Counter-Lemma Proofs (threat breakdown table)
  5. Formal Verification Harness Definitions (proof framework specs) Total length must be between 1000 and 1600 words.

Self-review

  • Ensure every invariant in {{invariant_properties}} has an explicit proof obligation mapped.
  • Check that network synchrony vs. asynchrony assumptions are unequivocally specified.
  • Validate that all cryptographic primitives cite their standard security reduction assumptions.
AuraScore breakdown
83/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

writing-content
writing-docs
complex-reasoning-analysis-math
cryptography
formal-methods
protocol-design