taurushq-io / multi-party-sig

Implementation of protocols for threshold signatures
Apache License 2.0
311 stars 120 forks source link

Ethereum signature format #88

Closed valli0x closed 1 year ago

valli0x commented 1 year ago

I cant sign a transaction and send it to ethereum. I think this method can help folks. https://github.com/taurusgroup/multi-party-sig/pull/87

valli0x commented 1 year ago

I had a problem when I was sending a transaction to ethereum:

  1. s-values greater than secp256k1n/2 are considered invalid.
  2. Convert to Ethereum signature format with 'recovery id' v at the end.
ThantZin-develope commented 1 year ago

Same issue with the generated final signature. When I try to recover the ethereum address of generated final signature from cmp.Sing operation using web3js [ Example : web3.eth.accounts.recover("hello", final_signature_from_tarus_cmp_signing), this function return the wallet_address ], then the result address is not match with the address of public key generated from cmp.KeyGen operation. I used tool to convert Publickey to ethereum address called eth_address_dump pip3 libary.