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

rangeproof: clean up legacy rangeproof code #160

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Commits on Mar 6, 2022

  1. rangeproof: add a bunch more testing

    Add two new fixed rangeproof vectors; check that various extracted
    values are correct; add a test for creating and verifying single-value
    proofs.
    apoelstra committed Mar 6, 2022
    Configuration menu
    Copy the full SHA
    d2d0068 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cb1a4bb View commit details
    Browse the repository at this point in the history
  3. rangeproof: remove rewinding ability to access the "extra" 64 bytes o…

    …f sidechannel space
    
    This space has never been usable, in the sense that rangeproof_sign would
    refuse to use it, and it complicates the rewinding logic a fair bit to
    retain the ability of the rewinder to access it.
    
    This does result in a minor API change, which is that the returned `m_len`
    variable, which indicates the total size of the rangeproof sidechannel,
    is reduced by 64 bytes for any proof that covers a multiple-of-4 number
    of bit. This change is reflected as a change in the unit tests.
    apoelstra committed Mar 6, 2022
    Configuration menu
    Copy the full SHA
    390a53d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9ddcf41 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    17037ff View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ecdf4c5 View commit details
    Browse the repository at this point in the history
  7. rangeproof: fix Jonas' bug

    Copied some more logic from the 2015-era code.
    apoelstra committed Mar 6, 2022
    Configuration menu
    Copy the full SHA
    e36d073 View commit details
    Browse the repository at this point in the history
  8. rangeproof: refactor rangeproof_genrand into two functions

    This is purely to reduce the number of arguments being passed into one
    function at once. Also improves const-correctness.
    apoelstra committed Mar 6, 2022
    Configuration menu
    Copy the full SHA
    1e5c300 View commit details
    Browse the repository at this point in the history
  9. rangeproof: split genrand into genrand_sign and genrang_rewind

    Also eliminate `prep` array from genrand_sign
    apoelstra committed Mar 6, 2022
    Configuration menu
    Copy the full SHA
    05a618b View commit details
    Browse the repository at this point in the history
  10. borromean: move k-value trickery into borromean_sign

    Reduces stack usage of rangeproof_sign by 1056 bytes, is a bit safer as
    it doesn't require the caller of borromean_sign to know which indices are
    going to be overwritten, is a net-negative code diff, and reduces
    the amount of shared data between the borrom ean logic and its callers.
    apoelstra committed Mar 6, 2022
    Configuration menu
    Copy the full SHA
    5e36b32 View commit details
    Browse the repository at this point in the history