vocdoni / dvote-js

Javascript/Typescript library to interact with the Vocdoni Open Stack
GNU General Public License v3.0
13 stars 7 forks source link

bug: ECDSA signature has v=27, while vocdoni-node uses v=0 #102

Open randomshinichi opened 2 years ago

randomshinichi commented 2 years ago

A signature made with dvote-js currently makes the go node derive a different public key. Example of a SetAccountInfo transaction with blank chainID

Vocdoni signed transaction:

4773a54f510852032e288a256da444d67c263fe176b9781923746b889aa97a58

becomes

JS
12c78429794bb0876a196bc4e1d5a01c6c247607a75ad2845452b2261152342e2ab60af589127a8dbf667e3f1bf9a861286680fc5456aa0f5223f8f55c2465ef1b
GO
12c78429794bb0876a196bc4e1d5a01c6c247607a75ad2845452b2261152342e2ab60af589127a8dbf667e3f1bf9a861286680fc5456aa0f5223f8f55c2465ef00

1b is 27 base 10. MyCrypto's guide to ECDSA signatures Why 27 EIP-155