The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
TossPig

请问 ecdsa.GenerateKey 使用同样的 seed 会生成两种密钥对是正常的吗?

  •  
  •   TossPig · Oct 9, 2023 · 1066 views
    This topic created in 967 days ago, the information mentioned may be changed or developed.

    RT

    在 1.20 之前的版本,用同样的seed只会生成一种密钥对,1.20 开始就出现这个现象了。

    完整代码在下面,因为 go.dev 有缓存,做了两个缓存结果,两个的代码是一样的,只有第 45 行的打印文字不同。

    这段是和预期一样的 https://go.dev/play/p/-xTC8xOiFtp

    这段不符合预期 https://go.dev/play/p/_rY-hh0sEze

    2 replies    2023-10-09 21:38:32 +08:00
    TossPig
        2
    TossPig  
    OP
       Oct 9, 2023
    @0o0O0o0O0o 感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2773 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 15:49 · PVG 23:49 · LAX 08:49 · JFK 11:49
    ♥ Do have faith in what you're doing.