-
Notifications
You must be signed in to change notification settings - Fork 52
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
canonical signature support for secp256k1 #11
Comments
@ceeji thanks for submitting an issue! Somehow I hadn't encountered that use case before – thanks for the info! I didn't spend a lot of time tinkering with the There's a note about it here, and that's the file that would need to be modified. (Here's the code that calls the compiled WASM method.) I'm not sure how/if Emscripten supports providing that parameter, so it might take some experimenting. Here's where we build the WebAssembly in the I didn't explicitly remove or disable, the parameter, so I think the WASM still accepts a Looks like this might be helpful too: Function Pointer Issues I won't be able to look into this for a while, but I'd love to take a pull request enabling it! Or if someone could just figure out how the |
Great! I will refer to the links and see if it works |
Hello! I've wanted to share my success on making C code in WASM call a JS function. Implementing this isn't necessary for my needs, but I've got something that should point someone who's willing to do the grunt work in the right direction. First, we can add Next we store a callable pointer in C like what I've done here After that, we call the set function and set the pointer to Now, when compiling Since the calls to secp256k1Wasm are synchronous, you can store the callback function provided by consumers for It does seem that |
I'm submitting a ...
[ ] bug report
[*] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
For steem, EOS and everiToken blockchain, a canonical signature is needed for transactions. By calling
libsecp256k1
directly I can make it by passing anoncefn
parameters for signing and in passed function I can return a series of incresed nonces until generated signature iscanonical
(that is, bothr
ands
of the signature have a length of 32 byte. that is, in ader
signature array, der[3] == der[37] == 32 ).But I can't do it with
bitcoin-ts
. There is no way to passnoncefn
, and the signature produced bybitcoin-ts
is not canonical.The requirements are widespread for developers of these blockchains, therefore I think it's necessary to add it to the library. If it couldn't be done in the near future, is there a way to modify the code to achieve this by myself?
The text was updated successfully, but these errors were encountered: