签名并验证信息

达世币钱包借助被称作区块链的分布式帐目创建可公开预览的地址并安全地保管交易创建所需的私钥。在某些情况下,用户需要验证地址才能证明对个人资金的掌控,证明可以使用该地址接收款项,或者向此前已从该地址上浏览到交易资讯的交易平台证明个人身份。为了避免网络上的钓鱼攻击,用户在向不熟悉的对象发送签名信息时要特别谨慎,因为对方可能使用含糊不清的信息冒名顶替该用户。

Signing messages requires a private key. Verifying messages requires a public address. In this way, you can write an arbitrary message and generate a signature that could only have been created by a user with control of the private key for this address. Any user with the message, the public address and the signature can easily verify that only you could have created the signature. Messages are not stored on the blockchain. Instead, you must send these three text snippets (message, address and signature) to your intended recipient using another communication channel, such as email. As an example, you can test the following message and signature and verify that it was signed by the given address:

Message: Documentation test signature
Address: XwHihwiQzheVKbT76e7ZhPkujDCQGEZC6P
Signature: IKaEt7MTb4Y57WIde5TLUkm1vbVsjk/L9eG+TE2tdQhMeK9vGgTsqcVOTmXXQ6QA0/WQtxqPURH2qZG27YR2VE0=

签名消息

以下截图显示了不同的消息签名途径,其中包括Dash Core钱包( 文件 > 为消息签名 )、Trezor网页钱包( 签名及验证 > 为消息签名 )和DMT( 工具 > 使用HW为当前的主节点地址提供消息签名 ):

../_images/sign-dashcore.png ../_images/sign-trezor.png ../_images/sign-dmt.png

在Dash Core、Trezor网页钱包和DMT中进行消息签名

验证消息

以下截图显示了不同的消息验证途径,其中包括Dash Core钱包( 文件 > 为消息签名 )和 Trezor网页钱包( 签名及验证 > 为消息签名 ):

../_images/verify-dashcore.png ../_images/verify-trezor.png

Dash Core钱包和Trezor网页钱包中的消息验证。请注意,Dash Core钱包的验证消息是在Trezor网页钱包中生成的,反之则反之