Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MLKZG support (Nova forward port) #172

Merged
merged 7 commits into from
Dec 19, 2023
Merged

Add MLKZG support (Nova forward port) #172

merged 7 commits into from
Dec 19, 2023

Commits on Dec 18, 2023

  1. Support for multilinear KZG commitments (#269)

    * multilinear KZG PCS as a provider; builds
    
    * fix two tests
    
    * fix third test; cut duplicate code
    
    * Tidy up source code comments
    
    Signed-off-by: Greg Zaverucha <[email protected]>
    
    * impl PairingGroup for bn256
    
    * remove unneeded imports
    
    * simplify CommitmentKey
    
    * fix build; migrate G1Affine
    
    * fmt
    
    * checkpoint
    
    * migrate G2Affine and pairing
    
    * fix clippy; use unimplemented!
    
    * switch to affine form for compressed commitments
    
    * add a test with mlkzg
    
    * cargo fmt
    
    * cleanup
    
    * go back to compressed group
    
    * address clippy
    
    * rename
    
    * cleanup
    
    * add an alias
    
    * deduplicate
    
    * Revert "add an alias"
    
    This reverts commit 97cade6c8751deacbc8b5b0e0df1579e3baa1477.
    
    * Use an alias for PreprocessedGroupElements
    
    Signed-off-by: Greg Zaverucha <[email protected]>
    
    * cargo fmt
    
    * update README.md
    
    ---------
    
    Signed-off-by: Greg Zaverucha <[email protected]>
    Co-authored-by: Greg Zaverucha <[email protected]>
    2 people authored and huitseeker committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    5a675ea View commit details
    Browse the repository at this point in the history
  2. refactor: clean up the needed scaffolding in MLKZG

    Summary:
    
    - THe MLKZG implementation re-implements some group traits, so as to give it maximum generality and depende maximally on the Nova traits.
    - However, the way in which it imports a pairing (using pairing::Engine) already implicitly constrains perfrectly usable group implementations to be available on the same types.  This commit therefore removes the boilerplate and uses those external traits.
    - Finally, so as to mutualize part of the pairing implementation, this commit also leverages the MultiMillerLoop trait, a subtrait of `pairing::Engine`.
    - In sum, this commit only moves types - no actual data was harmed in its making.
    
    In detail:
    
    - Removed the `PairingGroup` trait and its related implementations from the `traits.rs` and `bn256_grumpkin.rs` files.
    - Simplified the imports from `halo2curves::bn256` in `bn256_grumpkin.rs` and removed unused types such as `pairing`, `G2Affine`, `G2Compressed`, `Gt`, and `G2`.
    - Deleted substantial amount of code associated with `G2` from `bn256_grumpkin.rs`.
    huitseeker committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    f618173 View commit details
    Browse the repository at this point in the history
  3. make Minroot example generic over the supported curve cycles (#272)

    * make Minroot example generic over the supported curve cycles
    
    * upgrade version
    srinathsetty authored and huitseeker committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    2e3de78 View commit details
    Browse the repository at this point in the history
  4. refactor: Refactor and enhance point infinity handling in `to_transcr…

    …ipt_bytes`
    
    - Enhanced the functionality of `to_transcript_bytes` method in `TranscriptReprTrait` for `Affine` in both `pasta.rs` and `traits.rs`.
    - Combined the x and y coordinates with the `is_infinity_byte` into a single byte stream for ease of handling.
    - Integrated additional checks for 'infinity' conditions to ensure accurate extractions of coordinate values.
    huitseeker committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    f796b4e View commit details
    Browse the repository at this point in the history
  5. refactor: Relocate multi-scalar multiplication module

    - Restructure the `provider` module by moving `msm` to the `util` subdirectory.
    huitseeker committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    5e726de View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    624cbb9 View commit details
    Browse the repository at this point in the history
  7. refactor: Apply univariate polynomial evaluation

    - chore: move comment
    - fix: standardize power sequences computation
    - fix: parallelize several poly computations
    
    refactor: Refactor `EvaluationArgument` struct in mlkzg.rs
    
    - Renamed several fields in `EvaluationArgument` struct within `src/provider/mlkzg.rs` for increased clarity.
    - Adjusted the `prove` and `verify` methods in `src/provider/mlkzg.rs` to reflect these name changes.
    - Modified test code to align with the updates in the `EvaluationArgument` structure.
    huitseeker committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    0ccb6c8 View commit details
    Browse the repository at this point in the history