Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Keccak Challenge-API integration #925

Merged
merged 13 commits into from
Nov 30, 2022
Merged

Keccak Challenge-API integration #925

merged 13 commits into from
Nov 30, 2022

Commits on Nov 28, 2022

  1. remove: Unnedeed TODO

    CPerezz committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    f89ce99 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b502efc View commit details
    Browse the repository at this point in the history
  3. Fix: Add dummy advice colum to prevent Phase error

    Currently, halo2 prevents the user from adding `Advice<PhaseN>` columns
    if no column of the previous phase was defined before.
    
    Since the first thing we need are the `Challenges` and these are placed
    with `Phase2` we no longer can compile the code.
    Therefore, a dummy column is added so that halo2 does not complain.
    This should be solved in the future if the challenge API polishes this.
    CPerezz committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    fa99f2c View commit details
    Browse the repository at this point in the history
  4. feat: Port KeccakBit impl to challenge API

    This introduces the challenge API inclusion into the Keccak Bit
    implementation.
    This carries 2 different challenges. one for the inputs and another for
    the table-exposed value.
    
    The changes consists on:
    1- Swap the meta.advice_column for meta.advice_column_in(SecondPhase).
    2- Replace the randomnes hardcoded now in the circuit by the Challenges.
    Including it in the configure and witness_generation functions.
    3- Test with a custom Challenges which has a fixed value.
    CPerezz committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    3bb4c8d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b4da1b9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    66c5606 View commit details
    Browse the repository at this point in the history
  7. fix: Add extract_field to utils

    I made an effort to migrate `Part<F>` and `PartValue<F>` to use the
    `Value<F>` halo2 API. But since the struct doesn't implement `PartialEq`
    it's challenging to do it. As I do need to operate with it quite a lot.
    
    Also, there's another caveat which is that it feels really tricky to
    extract the byte representation from a `Value<F>`. It feels like if
    you're cheating to the API constrantly (using `.map()` to gain access to
    the underlying F so that you can do extra things with it such as
    decompose it into bytes).
    
    For these reasons, right now `extract_field` was added. An issue will be
    filled to track the tech-debt left here and pay it once we maybe we add
    the required functionalities to `halo2::Value<F>`.
    CPerezz committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    cc1a21e View commit details
    Browse the repository at this point in the history
  8. update: Adapt SuperCircuit to new keccak APIs

    Now that all the three keccak implementations use the challenge API,
    it's time to update the SuperCircuit to adapt to these new APIs.
    CPerezz committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    d064ec9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    62ed6c0 View commit details
    Browse the repository at this point in the history
  10. fix: Clippy lints

    CPerezz committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    e77a5f0 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1714688 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2022

  1. Configuration menu
    Copy the full SHA
    59b6778 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    70ba478 View commit details
    Browse the repository at this point in the history