Skip to content

Conversation

@Chausseaumoine
Copy link
Contributor

This PR introduces a set of robustness tests to ensure the verifier rejects tampered or invalid proofs.

It covers:

  • bit-level mutations (bit flips, byte corruption, trailing bytes),
  • incorrect witness substitutions

Apply these to DLog, Pedersen with both BLS and Ristretto proofs.

GOURIOU Lénaïck and others added 25 commits June 16, 2025 10:13
…nipulations (on BLS) on dlog and pedersen proofs

- flip LSB
- add trailing bytes
- flip bytes at the GroupEncoding index (also for Ristretto)
…l cases

- bitflips for dlog bls, pedersen bls, and dlog ristretto
- extra-bytes for dlog bls and dlog ristretto
Move to the keccak crate
Change visibility and implementation of some structures
Add from_iv for codecs to initialize directly the sponge

---
Co-Authored-By: nougzarm <[email protected]>
Closes sigma-rs#46.
Adds tests for inter-operability with other implementations.

Co-authored-by: Michele Orrù <[email protected]>
Co-authored-by: nougzarm <[email protected]>
Signed-off-by: Michele Orrù <[email protected]>
…nipulations (on BLS) on dlog and pedersen proofs

- flip LSB
- add trailing bytes
- flip bytes at the GroupEncoding index (also for Ristretto)
@Chausseaumoine
Copy link
Contributor Author

The conflict is debug_assert (old) vs throwing an Error (new) if the fiat-shamir prove() is done with a wrong witness. I'm unsure which design is the proper one.

If we keep the old design, just remove the test discrete_log_invalid_witness_should_fail() in tests/robustness_tests.rs

@Chausseaumoine
Copy link
Contributor Author

Removed this branch and replace with a new one with clean history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants