Andrei Ivasko
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Introduction to Latticefold Lattice-based cryptography is a branch of cryptography that builds secure cryptographic primitives using the mathematics of lattices—discrete, grid-like structures in high-dimensional vector spaces. It is particularly notable because it's considered a strong candidate for post-quantum cryptography—i.e., cryptographic systems secure against both classical and quantum computers. Some SNARKs yield the entire proof at once, while others split the task of constructing a proof into small steps and prove each step separately. The latter approach called IVC(incrementally verifiable computation). This approach reduces memory consumption of SNARK. However, it requires to apply a SNARK verifier at the statement being proven at every step and this introduces additional overhead. Folding mitigates this issue by folding SNARK verification work at each step into SNARK verification work for all previous steps at once. There exist many folding schemes such as HyperNova, ProtoStar etc. However, most of them are not quantum secure. They also require a large finite field (256 bit) which makes arithmetic operations quite costly. This post is a gentle introduction into [Latticefold](https://eprint.iacr.org/2024/257.pdf), a novel folding scheme that is quantum secure and can operate over a small field (64 bit). I give a credit to Nethermind research team for Latticefold presentation given at [ZKProof](https://zkproof.org/) conference at March 2025. ## Background ### Folding Folding reduces the task of proving 2 instance-witness to proving 1 instance-witness ### $(w_1,x_1) \in R$ and $(w_2,x_2) \in R$ are folded into $(w_3,x_3) \in R$ **Statement 1**: If a witness-instance pair $(w_3,x_3)$ is valid, than initial instances $(w_1,x_1)$ and $(w_2,x_2)$ are valid as well. * [Commitments](https://hackmd.io/VpgY5zopToi_lkZRlRF0Bg?both) play a crucial role in folding schemes. * Instances $x_1, x_2, x_3$ contain a commitment to $w_1,w_2,w_3$, respectively. $(x_i, w_i)$ = $(x_i', Com(w_i); w_i)$ ### $(x_1,Com(w_1); w_1) \in R$ and $(x_2, Com(w_2); w_2) \in R$ are folded into $(x_3, Com(w_3); w_3) \in R$ Usually, the commitment is **homomorphic** $Com(w_1 + w_2)$ = $Com(w_1) * Com(w_2)$ but in [Arc](https://eprint.iacr.org/2024/1731.pdf) it is not the case --- ### Commitments in folding schemes ### $(x_1,Com(w_1); w_1) \in R$ and $(x_2, Com(w_2); w_2) \in R$ are folded into $(x_3, Com(w_3); w_3) \in R$ Usually, Commitment is Pedersen or KZG scheme (or similar) Drawbacks: * witness lives in a big field >= 250 bits * expensive commitment if a commited vector is large * expensive recursion: proving that folding has been performed correctly is complex due to arithetization in a foreign field ## An alternative: lattice-based commitments A cyclotomic ring has a form: $R = F_q[X] / (f(X))$ = [ all polys of degree < d ] * $F_q[X]$ is a ring of polynomials with coefficients in a field * $f(X)$ is cyclotomic polynomial, $f(X) = X^{2^t} + 1$ #### NTT isomorphism This ring $R$ is isomorphic to a product of $\tau$ field extensions $F_{q^t}$ $R = F_{q^t} * ... \tau .. * F_{q^t}$ $t$, $\tau$ depend on $f(X)$ and $q$ #### Ring packing Relevant for assessing performance of lattice-based folding Goal: pack $\tau$ $a_1....a_{\tau}$ field elements into a ring element $NTT^{-1}(a_1....a_{\tau})$ The NTT is an analogue of the Fast Fourier Transform (FFT) but works over finite fields. It transforms a polynomial into a pointwise representation where multiplication is faster. After multiplication in the NTT domain, one applies the inverse NTT to bring it back. Hence, each ring element encodes $\tau$ field elements ### Ajtai commitment * Setup: random sampled matrix $A \in R^{k*n}$ k is a parameter (number of rows in A) n is size of a commited vector * Commitment: Input $v \in R^n$, Output: $A*v^T \in R^k$ * **Big caveat: only binding if v has a norm $||v||$ < B for certain B = $O(2^{root(k)})$** **Norm of v** is largest coefficient in v, seen as polynomial in R * To commit to a vector v with large norm, decompose it into several chunks, where each chunk <= B $v = v_1 + Bv_2 + .. + B_{t-1}v_t, ||v_i|| <= B$ and commit $v_is$ **Tradeoff between $k$, $B$ and number of chunks** 1. if you have smaller number k (number of rows in A), you get smaller B, you have to decompose v in more chunks 2. If you would like to pay more when you commit, you increase k, you get larger B, and have to decompose v in less chunks **Homomorphism** Aitaj commitment is only homomorphic in some sence $A*(v+u)^T = Av^T * Au^T$ but maybe be $||v+u|| > B$ ### Advantages of Ajtai commitment * $F_q$ has a smaller field 32 or 64 bit (e.g. Goldilocks or Babybear) * Each ring pack $\tau$ field elements * commit computations should be easy arithmetizable over $F_q$ * Post quantum secure * Commitments can be cheap ### Efficiency of Ajtai Configuration: $F_q$ = Goldilocks field (64 bit) $R = F_q[X] / (X^{24} + X^{12} + 1)$ $F_{q^3} *..8..*F_{q^3}$ $\tau$ = 8, $t$ = 3 Set $k$ = 10, $B= 2^8$ Commitment $A*V^T = R^k$ Nethermind implementation $|v| = 2^{16}$ size of the vector The performance findings of Nethermind research team: 1. if v has a small norm, Aitaj is 2x faster MT-Keccak(Merkle tree commitment using Keccak) 2. if v has a large norm, Aitaj is 2-3x time slower than MT-Keccak --- ## Latticefold [Latticefold](https://eprint.iacr.org/2024/257.pdf) (Boneh, Chen, 2024) Folding scheme over Compressed Constrained System(CCS) relations over R (cyclotomic ring). CCS is a compact representation of constraints. * Uses Aitaj commitment * Consists of three parts: * Linearization (analogues to [HyperNova](https://eprint.iacr.org/2023/573.pdf)) * Decomposition * Norm bound enforcement ### Linearization Transform CCS about evaluations of certain multilinear polynomial. Essentially, it runs the [sumcheck protocol](https://hackmd.io/@aiv768/ryFnB1Flgg) on CCS relation to reduce it into the set of claims about evaluations of multilinear polynomials on random points. ### Decomposition Random linear combination is used to fold 2 witnesses $w_1, w_2$ into $w_3$ $w_3$ = $w_1 + \alpha*w_2$, $\alpha$ is random **Problem**: Maybe $||w_1 + \alpha*w_2|| > B$ even if $||w_1||, ||w_2|| <= B$, where $||w_1||$ is a norm(largest coefficient) of $w_1$, $||w_2||$ is a norm of $w_2$ **Solution**: split $w_1, w_2$ into chunks with small norm <= B, commit to them and take random linear combination of these chunks ### Norm bound enforcement To fold two witnesses $w_1, w_2$ one takes a random linear combination $w_1 + \alpha*w_2$ **Idea**: Add range check per chunk to enforce $|| w_1 ||, || w_2 ||$ <= B by running a sumcheck over $F_q$ committed in decomposition step. ## Latticefold+ [Latticefold+](https://eprint.iacr.org/2025/247.pdf) is enhancement of Latticefold scheme. Major contribution is the new way of adding range proof during a folding step which makes the prover significantly faster, the verification circuit simpler, and the folding proofs shorter. ## Overall costs summary Nethermind research team has found out, that Latticefold+ seems competitive to [HyperNova](https://eprint.iacr.org/2023/573.pdf)(Sonobe implementation), but Latticefold is significantly slower than HyperNova.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully