User A has signed a message msg
with signature sig
.How can the third party verify this message in a contract? The verify method contract is like this:
void verify_user_sig(account_name user,string msg,string sig,public_key pubkey);
Because we can know user
,msg
,sig
and user's pubkey
,we can recover the public key in contract.But the problem is how can we know that the pubkey
submitted is the user's public key ?
So the question is:
How to get the account name of a public key in contract?