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: add a "net blinding factor" API for Elements #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

apoelstra
Copy link
Contributor

Our original API for Confidential Assets transaction balancing was the single function secp256k1_pedersen_blind_generator_blind_sum which attempts to take a complete list of vbfs and abfs and modifies a single abf at the end. However this API has a number of shortcomings:

  • it is really confusing
  • it assumes that the user has all the abfs and vbfs in convenient arrays, requiring marshalling on the C++ side
  • it does not support partial computations, as are needed by PSET
  • there is no easy/sensible way to extend this API to allow more interesting of transaction balancing (e.g. by blinding only an asset, leaving the value explicit)

The hope is that by exposing the arithmetic at a more fine-grained level, these issues will be fixed. These methods can be abused to do arithmetic on arbitrary scalars, but this is already possible (in an ugly manner) by using secp256k1_seckey_tweak_add and explicit 0-checks.

@apoelstra
Copy link
Contributor Author

I may add more commits to this but I think it's ready for review as-is.

Our original API for Confidential Assets transaction balancing was the
single function `secp256k1_pedersen_blind_generator_blind_sum` which
attempts to take a complete list of vbfs and abfs and modifies a single
abf at the end. However this API has a number of shortcomings:

   * it is really confusing
   * it assumes that the user has all the abfs and vbfs in convenient
     arrays, requiring marshalling on the C++ side
   * it does not support partial computations, as are needed by PSET
   * there is no easy/sensible way to extend this API to allow more
     interesting of transaction balancing (e.g. by blinding only an
     asset, leaving the value explicit)

The hope is that by exposing the arithmetic at a more fine-grained
level, these issues will be fixed. These methods can be abused to do
arithmetic on arbitrary scalars, but this is already possible (in an
ugly manner) by using secp256k1_seckey_tweak_add and explicit 0-checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant