VIP | Title | Category | Author | Status | CreatedAt |
---|---|---|---|---|---|
190 |
Personal Sign Standard |
Interface |
Kevin Britz <[email protected]> |
Final |
2019-02-05 |
The below VIP-190 standard outlines an interface for personal sign when using web3
to sign messages for VechainThor dApps. This standard is based on Ethereum's eth_sign RPC call, and modified to fit Vechain's signature standards.
This standard is already in use in the Ledger Hardware Wallet application and Comet's implementation of web3
personal sign. Standardization will ensure that dApps may support multiple clients with a single signature implementation.
A prefix is necessary to ensure that a malicious dApp cannot sign or recover arbitrary messages.
prefix = "\x19VeChain Signed Message:\n" + len(message)
To obtain the final payload for signature, we append the message to the prefix and hash with blake2b256
signature = sign(blake2b256(prefix + message))