Skip to content

Latest commit

 

History

History
129 lines (98 loc) · 4.54 KB

File metadata and controls

129 lines (98 loc) · 4.54 KB

alt text


baby-lattice-folding

This is an educational project aimed at building a Rust implementation of lattice-based folding schemes, progressing through theoretical research, practical code analysis, and hands-on development to better understand lattice folding.

Our plan: 1. theoretical research, 2. practical learning, 3. coding

Getting started

Prerequisites

  • Rust (install via rustup)
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Git

Setup

Clone the repo and run the setup script. This will clone reference codebases, download papers, and verify the Rust toolchain.

mkdir baby-lattice-folding && cd baby-lattice-folding
git clone https://github.com/coset-io/baby-lattice-folding.git
cd baby-lattice-folding
./scripts/setup.sh

Or run individual steps:

# Download papers (gitignored, not committed)
./scripts/download-papers.sh

# Clone reference repos into ../references/
# (latticefold, salsaa, arkworks-algebra, kyber)
# See scripts/setup.sh for details

Build & test

cargo build
cargo test

1. theoretical research

Goal: Read recent lattice-based folding schemes: Hypernova, Latticefold, Latticefold plus, Neo, SALSAA and Cyclo. Understand how lattice-based folding schemes are designed and the current bottlenecks.

Paper list:

  1. Hypernova
  2. Latticefold
  3. Latticefold+
  4. Neo, SuperNeo
  5. SALSAA
  6. Cyclo

Product: videos or lectures or blogs

  1. Hypernova

  2. Latticefold

  3. Latticefold plus

  4. SALSAA

  5. Neo

  6. Cyclo

Timeline: 2026.01 ~ 2026.04

2. practical learning & coding

Goal: We plan to develop baby lattice folding, an educational Rust implementation of the lattice-based folding scheme (SALSAA), building upon existing theoretical and practical foundations.

Outline:

  • RoKs:
    • join
    • batch
    • decompose
    • rp
    • fold
    • norm check
  • Whole folding chain of the RoKs
  • Future:
    • R1CS support: currently only support raw LinRelation. Should have a way to support
    • Fiat–Shamir
    • Precomputed NTT twiddle table for ζ^i — src/ntt.rs recomputes powers inside the butterfly; precompute once per (Q, D).
    • rayon for data parallelism — NTT butterflies, Ajtai row sums, Rq matmul, MLE eval. Behind a feature flag so the educational path stays single-threaded

Reference:

  1. Latticefold: https://github.com/NethermindEth/latticefold
  2. SALSAA: https://github.com/lattice-arguments/salsaa
  3. Cyclo: https://github.com/osdnk/cyclo
  4. Arkworks-Rust: https://github.com/arkworks-rs/algebra

Product: codes

Timeline: 2026.04 ~ 2026.08