Closed jaspervdm closed 5 years ago
And you also add secp256k1_pedersen_blind_commit
function in this PR.
What's it for?
Yeah haven't updated the PR description yet, will do soon. It is to calculate commitment x*G + v*H
where v
is a secret key instead of a 64 bit integer
I added some tests for the secp256k1_pedersen_blind_commit
function, the PR is ready for final review!
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