how to get the final public key from the generated keys
0xbok opened this issue · comments
looks like it is y_sum_s
in the generate key file.
Hi! Is y_sum_s
the public key? Here is what I did:
-
I generated an address from this y_sum_s vector by using the following code
const pkey = ethers.utils.computeAddress("0x" + Buffer.from(y_sum_s).toString("hex"));
-
Funded the account with 0.2 ETH, and signed the transaction to send 0.001 ETH to some address.
-
When I tried to broadcast the transaction I received an error saying something like "Insufficient funds for Gas + Value".
Can you please help in this regard?
yeah, i was probably wrong. I extracted the eth address using ecrecover
:
- Follow #177 (comment). In other words, apply this change narayanprusty@0aba299 by @narayanprusty.
- Compile, and now when you sign using
gg20_sign
, supply the keccak hash as the message. - The signature will be
r,s,recid
. Getv=recid+1
. - Use ecrecover to get the eth address or you can use any web3 library to get recover the public key or the address.
Confirm using multiple signatures that you are getting the same address back.