-
Notifications
You must be signed in to change notification settings - Fork 42
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
Functions to inverse and negate private key, commit with 2 blinding factors #39
Conversation
And you also add |
Yeah haven't updated the PR description yet, will do soon. It is to calculate commitment |
I added some tests for the |
Could you provide some general direction as to what those could be used for? |
@jaspervdm doing some secret dev work by the looks of it. |
These 3 methods are useful in a secret sharing scheme. In particular, the inverse and negate functions are used in calculations for Lagrange basis polynomials. |
This PR adds 3 new convenience functions (and corresponding tests):
secp256k1_ec_privkey_tweak_inv
- inverts the private key (x
🡒x^(-1)
)secp256k1_ec_privkey_tweak_neg
- negates the private key (x
🡒-x
)secp256k1_pedersen_blind_commit
- pedersen commitment with 2 blinding factors instead of blinding factor and u64