Schnorr correctness and soundness checks

The hinted BIP340 implementation has native differential tests, adversarial proof tests and an installed-Wasm test suite. The radix certificate remains an experimental cryptographic construction. Passing these tests establishes the tested behavior; the full deterministic batch and Fiat–Shamir composition still need independent cryptographic review.

The dated qualification records actual outcomes, source identities, failed test-runner attempts and raw canister evidence. Preferred choices keeps performance contracts separate from this correctness assessment.

Layer What is checked
BIP340 inputs Canonical scalar/field bounds, even P/R lifts, original challenges, all hints and row ordering. The nonce x coordinate uses the field bound p; s uses the scalar bound n.
SIMD arithmetic Seeded comparisons against independent projective sums, carries, bounds, identities, cancellation, masks, scratch capacity and reuse after failure, under both coordinate features.
Outer batch Full ordered input commitment and weights freshly recomputed from the final transcript. Cancellation fixtures include two invalid signatures that cancel with all-one or stale weights.
Radix certificate Both the exact reconstruction and indexed random relation are required. Tests include validly encoded forgeries preserving either equation separately, every column/checkpoint position and malformed encodings.
Checkpoints Every recurrence and both endpoints are checked. For fixed columns these determine the saved points uniquely, even though the suffix is outside the original challenge seed.
IC boundary Independent host-produced packets are submitted directly to fresh canisters. Malicious typed inputs must return a rejection. Only explicitly malformed Wire envelopes may cause the expected SDK argument-decoding trap; recovery calls must still succeed.

For a fixed statement and incorrect columns committed before independent uniform t-bit challenges, with 2^t < n in the prime-order group, the inner relation accepts with probability at most 2^-t. Our implementation derives its challenges deterministically. Its security assessment must account for adaptive queries, grinding, transcript hashing and the outer batch policy; replicas do not provide independent randomness. The design and frozen review state these assumptions explicitly. The primary protocol discussion also distinguishes verifier randomness from Fiat–Shamir use.

Use the build environment, then run:

cargo test --manifest-path cdk-rsx/Cargo.toml -p cdk-rsx-crypto-batch -p cdk-rsx-crypto-secp256k1 \
  --features cdk-rsx-crypto-batch/wasm-msm-xyzz --locked --offline
cargo test --manifest-path cdk-rsx/Cargo.toml -p cdk-rsx-crypto-batch \
  --features wasm-msm-simd --locked --offline
node --test benches/crypto/radix-security.test.mjs
python3 benches/crypto/radix-soundness-model.py

The Python program exhaustively checks small-group mathematical models. Its counterexamples describe deliberately weakened designs, and its toy grinding experiment uses a tiny challenge. They do not establish real-parameter security or an attack against the implementation.

Run the actual Wasm checks against a canonical artifact and explicitly select its identity. Give each run a fresh output directory:

node benches/crypto/radix-security.mjs \
  --artifact /absolute/artifact --expected-wasm SHA256 \
  --out /absolute/new-security-run --pocket-ic /absolute/pinned-pocket-ic

The suite uses the pinned SDK/server contracts and retains every submitted packet, terminal response and native execution trace. It makes no performance claim. The verdict reports signature-verifier acceptance; applications still define authorization and replay policy.