[ECDSA Home][Home]
With ECDSA we create a signature with a private key, and then prove with a public key. A special feature of ECDSA is that we can recover the public key from the signature. Overall we have a signature value of \((r,s,v)\) and can use these values to recover the public key. In this case we will create a random private key, and then derive the public key. Next we will generate an ECDSA signature for a given data value, and then recover the public key using two methods (SigToPub and Ecrecover) from github.com/ethereum/go-ethereum/crypto.