Skip to content

Commit a1506a9

Browse files
committed
reorg and add matrix
1 parent 9f55297 commit a1506a9

14 files changed

Lines changed: 937 additions & 416 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ Outline:
111111
- [x] NTT and polynomial multiplication
112112
- [x] Ajtai Commitment
113113
- [ ] Challenge spaces
114+
- Fold challenge (Π^fold): ternary {-1,0,1} uniform (p=1/3 each). Maximises entropy for soundness. Not a strong subtractive set — SALSAA relies on large q making non-invertible differences negligible (~2^{-94} for q≈2^50). Ref: `salsaa/src/cyclotomic_ring.rs:319` (`random_biased`)
115+
- JL projection (Π^{⊗RP}): ternary {-1,0,1} with p(0)=1/2, p(±1)=1/4 (two random bools). Only needs mean=0 + bounded variance for JL property. Sparser = faster. Ref: `salsaa/src/subroutines/project.rs:26` (`challenge_for_project`)
114116
- [ ] Sumcheck (over Rings)
115117
- [ ] MLE/LDE (over Rings)
116118
- [ ] Decomposition

src/ajtai.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rand::Rng;
22

3-
use super::poly::RqNtt;
3+
use super::ring::RqNtt;
44

55
// Generate a random matrix (kappa x m) of Rq, in evaluation form.
66
pub fn setup<const Q: u64, const D: usize>(
@@ -19,14 +19,6 @@ pub fn setup<const Q: u64, const D: usize>(
1919
mat
2020
}
2121

22-
// def commit(A: vector, z: vector) -> vector:
23-
// """
24-
// A: k x m, random matrix from setup
25-
// z: m x 1, witness
26-
27-
// return c = Az: k x 1
28-
// """
29-
// return A * z
3022

3123
pub fn commit<const Q: u64, const D: usize>(
3224
a: &[Vec<RqNtt<Q, D>>],

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
pub mod ajtai;
2+
pub mod mat;
23
pub mod ntt;
34
pub mod poly;
5+
pub mod ring;
6+
pub mod rok;
47
pub mod zq;

0 commit comments

Comments
 (0)