Closed 3052 closed 4 days ago
Related Issues
Related Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
the x509 marshal/unmarshal will get you an ecdsa key.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions
Proposal Details
I am seeing no way to return the public X,Y from a fixed private key. this creates a fixed private key:
https://pkg.go.dev/crypto/ecdh#Curve.NewPrivateKey
then you can get the public key:
https://pkg.go.dev/crypto/ecdh#PrivateKey.PublicKey
but it stops after that because they X,Y are not available. you can create a private key like this:
https://pkg.go.dev/crypto/ecdsa#GenerateKey
then get X,Y via
but I see no way to create a fixed private key. even if you constructed a deterministic rand:
it seems it wouldnt matter:
for prior art, you can do this with Python:
https://pycryptodome.readthedocs.io/en/latest/src/public_key/ecc.html#Crypto.PublicKey.ECC.EccKey