How kadircanyildirm-crypto/quaestor works
quaestor lets an institution commit to a private answer key before an exam, then prove grading against that key and the candidates’ answer sheets. The principal path batches a sitting, publishes reports and a Merkle root with one proof, and lets each candidate verify their own result and inclusion. A separate single-sheet guest supports per-candidate proofs; the WebAssembly bridge and explainer provide an interactive demonstration. Core modules and guest files are excerpted; some host-side proving and publication details are documented but not shown in source excerpts.
Main entry points: main.rs Batch SP1 guest · batch.rs Batch and Merkle · score.rs Score calculation · lib.rs WASM bindings
Components 17
Grading core
- Exam data models
crates/grading-core/src/model.rs - Canonical encoding
crates/grading-core/src/encode.rs - Commitments and hashes
crates/grading-core/src/commit.rs - Score calculation
crates/grading-core/src/score.rs - Batch and Merkle
crates/grading-core/src/batch.rs - Public value ABI
crates/grading-core/src/public_values.rs
Proof execution
- Batch SP1 guest
zk/program-batch/src/main.rs - Single-sheet guest
zk/program/src/main.rs - SP1 proof runtime
- Batch proof
Verification
- Published results
- Inclusion verification
crates/grading-core/src/public_values.rs
Browser demo
- WASM bindings
crates/grading-wasm/src/lib.rs - Demo engine
explainer/engine.js - Interactive explainer
explainer/src.html
Other components
- Institution
- Candidate
Connections 22
- Institution → Commitments and hashes: commits key
README.md - Commitments and hashes → Canonical encoding: encodes key
crates/grading-core/src/commit.rs - Institution → Batch SP1 guest: supplies witness
README.md - Candidate → Batch SP1 guest: submits answers
README.md - Batch SP1 guest → Canonical encoding: decodes inputs
zk/program-batch/src/main.rs - Batch SP1 guest → Batch and Merkle: grades sitting
zk/program-batch/src/main.rs - Batch and Merkle → Score calculation: scores sheets
crates/grading-core/src/batch.rs - Score calculation → Commitments and hashes: binds hashes
crates/grading-core/src/score.rs - Batch SP1 guest → Public value ABI: encodes public values
zk/program-batch/src/main.rs - Batch SP1 guest → SP1 proof runtime: executes in
README.md - SP1 proof runtime → Batch proof: produces proof
README.md - Batch and Merkle → Published results: provides reports and paths
README.md - Batch proof → Inclusion verification: proof verified
README.md - Published results → Inclusion verification: supplies report and path
README.md - Candidate → Inclusion verification: checks own result
README.md - Single-sheet guest → Score calculation: runs scoring
zk/program/src/main.rs - Single-sheet guest → Public value ABI: encodes report
zk/program/src/main.rs - WASM bindings → Batch and Merkle: calls batch grading
crates/grading-wasm/src/lib.rs - WASM bindings → Score calculation: calls scoring
crates/grading-wasm/src/lib.rs - Demo engine → WASM bindings: calls byte API
explainer/engine.js - Interactive explainer → Demo engine: uses demo engine
README.md - Canonical encoding → Exam data models: serializes data
crates/grading-core/src/encode.rs