Track M31 collision probability for combined AND/XOR lookup table optimization

Open
#272 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale

Research direction

Start by reading PR #270 and the combined AND/XOR lookup-table optimization; this issue names no files or tests. Revisit the denominator collision behavior if ProveKit moves to M31 or another small field, and document or implement a sound approach for handling the resulting collision probability.

Written by the indexing model from the issue text.

Description

Context

The combined AND/XOR lookup table optimization introduced in PR #270 uses a LogUp-style lookup argument where a random Fiat-Shamir challenge γ appears in denominators of the form 1 / (γ - tᵢ) for each of the 65,536 table entries.

Current State (BN254) — No Issue

Over BN254 (p ≈ 2^254), the probability that γ collides with any table entry is:
P(collision) ≈ 65,536 / 2^254 ≈ 2^(-238)
This is cryptographically negligible.

Future Concern (M31)

If ProveKit migrates to M31 (p ≈ 2^31), the collision probability becomes:
P(collision) ≈ 65,536 / 2^31 ≈ 2^(-15) ≈ 1/32,768
This would need further investigation, a collision means γ = tᵢ for some table entry, which causes division by zero in the lookup argument and could compromise soundness. Whether this probability is tolerable depends on the target security level and usage context, but it warrants careful consideration before adopting this optimization over a smaller field.

Action Required

No action needed while using BN254. Revisit this optimization if/when migrating to M31 or other small-characteristic fields.

Dominant language
Noir
Stars
138
Forks
47
Avg merge
1d 34m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from worldfnd/provekit

All issues in worldfnd/provekit

Similar issues

More Cryptography issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.