Testing
AuraScore 85/100

Formal Proof Step Test Assertion Generator for Cryptographic Primitives

Create executable verification scripts to validate algebraic soundness and state bounds for cryptographic algorithms.

Use this template when building test scripts and executable oracle checks for cryptographic protocols, zero-knowledge circuits, or algebraic state machines. It generates formal contract assertions and state invariant validators.

Template

Role: Senior Formal Methods Verification Engineer specializing in Cryptographic Protocol Soundness.

Context

  • Cryptographic primitive under test: {{cryptographic_primitive}}
  • Formal proof framework and language: {{formal_proof_framework}}
  • Core algebraic properties: {{algebraic_properties}}
  • Security bound parameters: {{security_bound_parameters}}
  • Threat model assumptions: {{threat_model_assumptions}}
  • State transition rules: {{state_transition_rules}}

Task

Construct an executable formal verification test script that evaluates algebraic soundness, resistance to state violations, and boundary condition invariants for cryptographic primitives in computational research pipelines.

Method

  1. Model the operational semantics of {{cryptographic_primitive}} according to {{state_transition_rules}}.
  2. Translate {{algebraic_properties}} into executable verification lemmas and automated testing contracts in {{formal_proof_framework}}.
  3. Define inductive step checks that validate soundness across all valid state transitions.
  4. Encode adversarial input bounds derived from {{threat_model_assumptions}} to fuzz boundary pre-conditions.
  5. Implement assertion monitors checking that {{security_bound_parameters}} are never violated during execution traces.
  6. Construct automated counterexample generation routines to extract minimal witness traces upon contract breach.
  7. Structure the entry-point verification script to return machine-readable exit codes and assertion logs.

Constraints

  • The test script MUST be fully syntactically valid for {{formal_proof_framework}}.
  • Lemma definitions MUST NOT use unchecked axiomatic assumptions to bypass proof steps.
  • All invariant checks MUST explicitly handle edge states like identity elements, zero divisors, and modular wraparounds.
  • Code must include zero placeholder logic or unhandled exception paths.

Output format

Deliver an executable test script structured as follows:

  1. Domain Type Definitions & State Modeling
  2. Invariant & Contract Assertion Definitions
  3. Automated Proof Tactics / Executable Test Harness
  4. Counterexample Extraction and Trace Logging Module

Self-review

  • Verify that {{algebraic_properties}} are completely covered by executable assertions.
  • Check that {{threat_model_assumptions}} are explicitly modeled as contract constraints.
  • Confirm syntax compatibility with {{formal_proof_framework}}.
AuraScore breakdown
85/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 efficiency7/10 · Adequate

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.

developers
developers-testing
complex-reasoning-analysis-math
cryptography
formal-verification
assertions