Proof Certificates
On this page
- Core Principle
- What Auditors Can Verify
- Certificate Generation
- CLI Usage
- Programmatic Usage
- Certificate Format
- Verification Workflow
- 1. Generate Fresh Certificate
- 2. Compare With Committed Certificate
- 3. Verify Theorem Count
- 4. Check Proof Status
- CI Integration
- Security Properties
- 1. Spec Hash Binding
- 2. Theorem Completeness
- 3. Proof Status Accuracy
- Certificate Lifecycle
- Auditor Checklist
- Compliance Impact
- Related Documentation
Kimberlite generates verifiable proof certificates that bind formal specifications to implementations, allowing auditors to verify correctness claims.
Core Principle
Traditional databases claim compliance without proof. Kimberlite provides cryptographic evidence:
Certificate = {
spec_hash: SHA-256(TLA+ spec), // Binds to specification
theorems: Vec<Theorem>, // Extracted from THEOREM declarations
verified_count: usize, // Theorems with actual proofs
signature: Ed25519(certificate), // Cryptographic signature
}
Result: Auditors can independently verify that formal specifications match the deployed code.
What Auditors Can Verify
Spec Hash: SHA-256 hash of TLA+ specification
- Recompute hash from spec file
- Compare with certificate
- Detects any changes to formal specification
Theorem Count: Number of theorems extracted
- Parse TLA+ file for
THEOREMdeclarations - Verify count matches certificate
- Parse TLA+ file for
Verification Status: Actual proofs vs. sketches
PROOF OMITTED= Sketched (counted separately)PROOF <proof_body>= Verified (full proof)
Signature: Ed25519 signature over certificate
- Verifies certificate hasn’t been tampered with
- Binds certificate to issuer
Certificate Generation
CLI Usage
# Generate certificate for HIPAA
# Generate all certificates
Programmatic Usage
use generate_certificate;
use ComplianceFramework;
let cert = generate_certificate?;
println!;
println!;
Certificate Format
Note: The hash above is the actual SHA-256 of the HIPAA compliance specification at verification time. Regenerate using the CLI (
--regenerate) to get the hash for your current specification files.
Verification Workflow
1. Generate Fresh Certificate
2. Compare With Committed Certificate
# Compare spec hashes
# Should match if specifications haven't changed
3. Verify Theorem Count
# Extract theorems from TLA+ spec
|
# Compare with certificate
4. Check Proof Status
# Count verified proofs (those with proof bodies, not PROOF OMITTED)
CI Integration
Add to .github/workflows/verify.yml:
- name: Verify Proof Certificates
run: ./tools/compliance/verify_certificate.sh --check
This fails CI if:
- Certificates are stale (spec changed but cert not updated)
- Certificates contain placeholder hashes
- Certificates are missing
Security Properties
1. Spec Hash Binding
Property: Certificate binds to specific version of TLA+ spec
Attack prevented: Cannot claim formal verification for spec that was never verified
Verification: Recompute SHA-256(spec_file), compare with cert.spec_hash
2. Theorem Completeness
Property: Certificate includes all THEOREM declarations from spec
Attack prevented: Cannot hide unverified theorems
Verification: Parse spec for THEOREM, count, compare with cert.total_requirements
3. Proof Status Accuracy
Property: Only theorems with actual proofs counted as verified
Attack prevented: Cannot claim verification for sketched proofs
Verification: Check for PROOF OMITTED vs actual proof bodies
Certificate Lifecycle
Spec Change → Regenerate Cert → CI Validation → Commit Updated Cert
↓ ↓ ↓ ↓
HIPAA.tla verify_cert.sh Check hash match Git commit
Critical: Certificates must be regenerated whenever:
- TLA+ specifications change
- THEOREM declarations added/removed
- PROOF bodies added (sketched → verified)
Auditor Checklist
- Certificate exists for each framework
-
Spec hash starts with
sha256:(notplaceholder) -
Spec hash matches recomputed
SHA-256(spec_file) -
Theorem count matches
grep "^THEOREM" | wc -l - Verified count ≤ total requirements
- Signature verifies (Ed25519)
- Certificate timestamp reasonable
- Toolchain version documented
Compliance Impact
Kimberlite proof certificates provide cryptographic evidence that formal specifications match the deployed code:
- Spec hashes bind certificates to specific specification versions (
sha256:83719cbd...) - Auditors can independently recompute hashes and verify signatures
- Every theorem and proof status is recorded — no unverified theorems can be hidden
- Ed25519 signatures prevent tampering after issuance
Related Documentation
- Formal Verification - Overview of 6-layer verification
- Compliance Overview - Multi-framework compliance
- RBAC - Role-based access control
Key Takeaway: Proof certificates aren’t documentation—they’re cryptographic evidence that formal specifications match deployed code.