Skip to content
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

Generate PublicKey and sign (ETH,BTC ,...) transactions #199

Open
Sajjad-Khoshdooni opened this issue Feb 10, 2023 · 3 comments
Open

Generate PublicKey and sign (ETH,BTC ,...) transactions #199

Sajjad-Khoshdooni opened this issue Feb 10, 2023 · 3 comments

Comments

@Sajjad-Khoshdooni
Copy link

I cant generate unique public key with different signed message r, s, v with GG20
each r s v give me different publickeys
how can i generate unique publickey for depositing coin and sign with different node private keys?

@masterEye-07
Copy link

Hi @Sajjad-Khoshdooni, You don't have to generate a public key because it gets generated when you do key generation, you can find your public key vector as "y_sum_s" in the files "localshare.json" that is generated after key generation. You can convert this buffer array into a hex string and can generate a blockchain address from that and can do the transaction process.
Note: r,s and v values are the signature values and should not be supposed to generate public keys, We have the public key first then we can have a signature.
Let me know if you have any further querries.

@anhbaysgalan1
Copy link

Can you please share the eth transaction signing with v ? i dont find the v @masterEye-07

@masterEye-07
Copy link

@anhbaysgalan1 "Signing with v" there is no such thing, you can get the value of v with your signature. Signature itself have values of r, s and v.
The last element of the signature array is the value of v which will be always 0 or 1.
i.e.,
[208, 117, 253, 19, 142, 173, 25, 79, 117, 238, 103, 221, 104, 177, 10, 99, 67, 216, 252, 58, 16, 248, 122, 199, 127, 161, 35, 200, 202, 236, 242, 145, 77, 235, 165, 165, 231, 77, 35, 92, 17, 41, 132, 243, 210, 186, 51, 164, 137, 98, 207, 97, 140, 39, 213, 173, 12, 183, 5, 207, 39, 95, 37, 139, 1]
In this signature the last element "1" is your value of v.

I hope this answers you question. if you need anything else from me, please feel free to ping me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants