Ethereum Asked by Anh Dũng Lê on December 27, 2021
If I understand correctly when we send a transaction, we send an unsigned part m and a signature consisting of v, r, s. Each node verifies the signature by checking:
hash(m,r) * publicKey + r = s * generator
the generator is known, where as the public key cannot be restored from the address and has to be computed. This is where the v part of the signature comes in. Can someone explain how is v defined and how does it help us retrieve the public key? Thanks a lot.
Your r
here is calculated as the X co-ord of some point R % the curve order n.
Due to the nature of the curve, there are however 4 valid points that could all have this X co-ord, and so the v
is used to define which one of those it is. It saves us having to calculate (up to) all 4 possibilities in order to recover the correct signing key.
Further, w/r/t ethereum, that extra byte of data is used to encode a small measure of replay protection, as defined in EIP155, about which you can read more here.
Answered by gskapka on December 27, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP