以太坊橢圓曲線Specp256k1經過消息的hash和簽名(對消息的hash的簽名)來恢復出公鑰和計算r值

源代碼 https://github.com/ethereum/go-ethereum/blob/master/crypto/secp256k1/secp256.go git

// RecoverPubkey returns the the public key of the signer.
// msg must be the 32-byte hash of the message to be signed.
// sig must be a 65-byte compact ECDSA signature containing the
// recovery id as the last element.
RecoverPubkey(msg []byte, sig []byte)

其中」sig must be a 65-byte compact ECDSA signature containing the recovery id as the last element.「,說明了最後一個recovery id指的是 rG的x座標。github

 

 

。。。細節以後解釋。element

相關文章
相關標籤/搜索