我已经阅读了Web3 Auth的工作原理,此图片显示了:
似乎Web3-token.verify方法完全同步,它是一堆base64解码并验证。但是,假设我完全重新实现前端库,以模仿以太坊API,以与我自己的公共/私人密钥对和地址生成签名。我可以冒充任何地址吗?
I have read how Web3 Auth works and this picture shows it:

It seems that the web3-token.verify method is completely sync and it is a bunch of base64 decode and verify. But hypothetically if I completely re-implement the front end library to mimic the Ethereum API to generate signature with my own public/private key pairs and address. Would I be able to impersonate any address?
发布评论
评论(1)
如 eip-4361 标准(目前在2022年5月未完成)。
其实际签名部分使用不对称的加密术 - 使用签名者的私钥签名消息,并使用其公共密钥验证签名。
假冒地址的唯一方法是绕过验证并将签名人视为0x123,即使它们实际上是0x456。但是,如果您不知道他们的私钥,就不可能绕过密码学背后的数学并为他们签署信息。
这是一个很棒的文章 更深入地描述签名机制。
As stated in the web3-token
package.json
, this package implements the EIP-4361 standard (which is currently unfinished in May 2022).Its actual signature part uses asymmetric cryptography - signing the message with the signer's private key, and verifying the signature with their public key.
The only way to impersonate an address is to bypass the verification and treat the signer as 0x123 on the application level even though they are in fact 0x456. But it's not possible to bypass the math behind the cryptography and sign a message for them if you don't know their private key.
Here's a great article describing the signature mechanics in more depth.