ZenGo-X / multi-party-ecdsa

Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Sajjad-Khoshdooni opened this issue · comments

commented

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?

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.

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

@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