Web3-Token验证方法如何真正起作用,并且真的安全吗?

发布于 2025-01-29 16:15:39 字数 299 浏览 3 评论 0 原文

我已经阅读了Web3 Auth的工作原理,此图片显示了:

似乎Web3-token.verify方法完全同步,它是一堆base64解码并验证。但是,假设我完全重新实现前端库,以模仿以太坊API,以与我自己的公共/私人密钥对和地址生成签名。我可以冒充任何地址吗?

I have read how Web3 Auth works and this picture shows it:
enter image description here

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

西瑶 2025-02-05 16:15:39

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文