zorch.testkit.transcript¶
A fast, deterministic transcript for unit tests.
cheap_transcript returns a real DuplexTranscript over CheapPermutation — a
genuine Fiat-Shamir sponge whose challenges derive from observations, but cheap
enough for unit tests and gated fusion_path=GENERIC so prove keeps it
on the unmarked path (no zorch.sumcheck marker).
CheapPermutation ¶
A deterministic, NON-cryptographic fixed-width permutation for tests only.
Implements the Permutation seam so a DuplexTranscript runs a real
(sound-shaped) Fiat-Shamir sponge in unit tests without a full poseidon2
permute. fusion_path is GENERIC, so prove keeps such a transcript
on its unmarked path (no zorch.sumcheck marker). The mixing is not a secure
permutation and need not be bijective — never use outside tests.
Source code in zorch/testkit/transcript.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
cheap_transcript ¶
cheap_transcript(
dtype: Any, *, width: int = 8, rate: int = 4
) -> DuplexTranscript
A fresh DuplexTranscript over CheapPermutation for tests — a real sponge
whose challenges derive from observations (no preset stream).
Source code in zorch/testkit/transcript.py
68 69 70 71 | |