ECRECOVER
cryptoThe ECRECOVER
function allows to infer from a hash and an associated ECDSA signature a list of public keys whose associated private keys may have generated the signature. From those candidate keys and some additional information, for example a bitcoin or Ethereum address, one can identify the correct public key whose companion private key signed the hash.
The function takes as input a parameter map with the following elements:
Key | Description |
---|---|
curve | The name of the ECC curve used by the key to recover. |
hash | Byte array of the hash which was signed. |
sig | Byte array of the signature, as generated by ECSIGN . |
coords | Optional boolean flag indicating whether or not to return the coordinates of the R point. |