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

Optimized ECC chip #73

Closed
wants to merge 49 commits into from
Closed

Optimized ECC chip #73

wants to merge 49 commits into from

Commits on Jun 4, 2021

  1. Add ECC chip

    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    c9331b1 View commit details
    Browse the repository at this point in the history
  2. Load ECC chip

    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    b752b92 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    46af16b View commit details
    Browse the repository at this point in the history
  4. Witness point

    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    ae288a2 View commit details
    Browse the repository at this point in the history
  5. Point doubling

    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    d6116d6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b67d1f7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    94d0cd3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d8f02af View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    13d9024 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5c4e307 View commit details
    Browse the repository at this point in the history
  11. Complete addition

    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    23bebc6 View commit details
    Browse the repository at this point in the history
  12. Witness scalar var

    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    f751555 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    7182130 View commit details
    Browse the repository at this point in the history
  14. Add ECC test

    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    05eb13c View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b58a8f5 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d9a95e9 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    8f630d8 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    eb5d829 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    62f3b3f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    71c3f99 View commit details
    Browse the repository at this point in the history
  21. Define separate configs for each operation

    This removes the need to manually rename columns for each separate context.
    Instead, each operation's config now implements From<EccConfig>, providing
    a derivation from the top-level configuration.
    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    4909a93 View commit details
    Browse the repository at this point in the history
  22. Use complete addition for last addition in fixed-base scalar mul

    This allows fixed-base scalar mul to return (0,0) for [0]B.
    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    a236f63 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    6102e45 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    70d6a56 View commit details
    Browse the repository at this point in the history
  25. Fix bugs in complete addition formulae.

    Add tests to check that points related by the cubic endomorphism are
    not constrained to add up to (0,0).
    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    46ac3f2 View commit details
    Browse the repository at this point in the history
  26. Clean up load.rs

    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    f911b70 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    9a46d1f View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    a399085 View commit details
    Browse the repository at this point in the history
  29. Move all assignments out of Option.map() scopes

    Co-authored-by: Jack Grigg <jack@electriccoin.co>
    therealyingtong and str4d committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    acfc1be View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    5497e15 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    4948479 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    b0d04f7 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    e539720 View commit details
    Browse the repository at this point in the history
  34. Remove misleading column names at top-level config.

    The EccConfig only knows about 10 generic advice columns. These
    columns are renamed by individual components (e.g. AddConfig,
    MulConfig). The mapping for each individual config is captured
    in its impl From<EccConfig>.
    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    9beaf68 View commit details
    Browse the repository at this point in the history
  35. Add check for a corner case of fixed-base scalar multiplication that …

    …requires a doubling.
    
    Signed-off-by: Daira Hopwood <daira@jacaranda.org>
    daira authored and therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    13ebe78 View commit details
    Browse the repository at this point in the history
  36. Add check for a corner case of *short* fixed-base scalar multiplicati…

    …on that requires a doubling.
    
    Signed-off-by: Daira Hopwood <daira@jacaranda.org>
    daira authored and therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    381584f View commit details
    Browse the repository at this point in the history
  37. Reduce test boilerplate

    Inline equality assertions on values to individual components
    (flagged off with #[cfg(test)].
    
    Move module-specific tests into respective modules.
    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    dbb6120 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    ffa3d6e View commit details
    Browse the repository at this point in the history
  39. Test all fixed bases

    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    db95b5b View commit details
    Browse the repository at this point in the history
  40. Remove EccLoaded struct and FixedPoint, FixedPointShort associated ty…

    …pes.
    
    We do not load the fixed bases into a single location in the circuit;
    rather, they are assigned to fixed columns at the offsets where they
    need to be used.
    
    The EccLoaded struct was not storing any references to circuit variables.
    It was holding constants in memory which the caller can instead directly
    access.
    
    Similarly, there is no need to have the FixedPoint or FixedPointShort
    associated types in the EccInstructions trait, since these types do not
    contain references to circuit variables. The corresponding get_fixed()
    and get_fixed_short() instructions are also removed.
    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    a90b7f0 View commit details
    Browse the repository at this point in the history
  41. mul_fixed: Remove MulFixed trait

    This was defining shared behaviour between the mul_fixed::short and
    mul_fixed::full_width modules. But the behaviour can be captured by
    simply sharing the same mul_fixed::Config.
    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    9a8a81b View commit details
    Browse the repository at this point in the history
  42. chip: Directly use ValueCommitV as FixedPointsShort associated type

    There is no need to enumerate FixedPointsShort or to make a newtype,
    since ValueCommitV is the only fixed base used with short signed
    scalars.
    therealyingtong committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    a4f7128 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    218efa2 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    9303f8b View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    aeee55a View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    65ac816 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    9c30463 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2021

  1. Remove unwrap() in tests

    Tests do not always use the MockProver.
    therealyingtong committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    6d1059b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    63751fa View commit details
    Browse the repository at this point in the history