I just want to use ecrecover to verify with a public key that the corresponding private key signed a message passed through a variable in solidity. What's the simple way to do this? I have inserted ??? into my solidity where I don't know how to use ecrecover.
ie: client end:
message: "solidity has poor documentation"
bob's private key: "2j3940"
bob's public key: "0x3jhr32"
signed message: "3cj0239roi3409i34234"
solidity end:
function verifyMessage(message, signedMessage, publicKey){
bool verified = False;
if (????){
verified = True;
}
return(verified);
}
expected use:
input:
verifyMessage("solidity has poor documentation","3cj0239roi3409i34234","0x3jhr32")
output:
True
Here is another question talking about the same issue, but I am unable to use their implementation: Verification of externally-created ECDSA signatures