bookmoons / cashshufflejs

JavaScript CashShuffle client library.
The Unlicense
1 stars 1 forks source link

Determine signing protocol #33

Open bookmoons opened 5 years ago

bookmoons commented 5 years ago

There seem to be several specifics to the signing protocol. Some of them may be variable and need conformance.

Determine what needs conformance in the signing protocol. Document details in the protocol docs.

bookmoons commented 5 years ago

For signing, a packet is first encoded by protobuf to the undelimited wire format. The result is a sequence of bytes, in Python stored in a str value.

That string is passed to the electroncash.bitcoin.EC_KEY method sign_message: https://github.com/fyookball/electrum/blob/2bda04f08f293beee5fcd68d8a8c185afeb77fa1/lib/bitcoin.py#L615

The compressed argument is False if a vk_from value starts with '04' (indicating a compressed key?), True otherwise.