worldfnd / worldfnd/provekit

`playground/cm31_ntt/src/cm31`: figure out why it doesn't work when

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

Nobody has claimed this yet.

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

Description

On 2025-11-05 in ac42e37 “Merge pull request #227 from worldfnd/sl/duplicate-witness”:

figure out why it doesn't work when
v equals CF { a: RF { val: 53cd1db6 }, b: RF { val: 5ac2fbb3 } }

        }
    }

    #[test]
    fn test_sqrt() {
        // TODO: figure out why it doesn't work when
        // v equals CF { a: RF { val: 53cd1db6 }, b: RF { val: 5ac2fbb3 } }
        let mut rng = ChaCha8Rng::seed_from_u64(1);
        let v: CF = rng.r#gen();
        let v = v.reduce();
        let v2 = (v * v).reduce();
        let s = v2.try_sqrt().unwrap();

From playground/cm31_ntt/src/cm31.rs:504

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.

Research direction

Start in playground/cm31_ntt/src/cm31.rs at the test_sqrt test and reproduce the seeded value shown in the issue. Trace the reduced CF value through multiplication and try_sqrt, then identify the cause of the failure. Done means the cause is explained and the behavior is covered by a passing regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cryptography
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.