校验签名:
ECDSA(Elliptic Curve Digital Signature Algorithm)
用来对特定的数据进行密码学上的计算,运行数据的签名者(signer
)签名封装数据,签名公钥(verifier
)可以校验解封数据
- 签名数据被篡改的话,公钥无法解封出正确的数据
- 签名公钥和私钥不配对的话,数据无法解封
Signing
- Create message to sign
- Hash the message
- Sign the hash (off chain, keep your private key secret)
Verify
- Recreate hash from the original message
- Recover signer from signature and hash
- Compare recovered signer to claimed signer