Closed garyyu closed 6 years ago
hi @garyyu Thanks for taking this on, and from what I can tell it looks like it's doing the right thing. We need to test this within Grin and integrate it end-to-end, but since I'm working on libsecp a bit right now I can slip this in and test via the PR I'm working on at the moment.
Thanks!
Nice!
To complete the TODO item: need an API in secp to convert commitments to public keys safely. a commitment is prefixed 08/09 and public keys are prefixed 02/03.
A new function
secp256k1_pedersen_commitment_to_pubkey
is added into reposecp256k1-zkp
and have sent pull request #15 on reposecp256k1-zkp
.Related ffi function
secp256k1_pedersen_commitment_to_pubkey
is added, functionto_pubkey
is modified and that workaround functionto_two_pubkeys
is removed.tests runs OK for 10 times.
test result: ok. 46 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out