with Go 1.26, these will be deprecated:
https://pkg.go.dev/crypto/ecdsa@go1.25rc1#PrivateKey.D https://pkg.go.dev/crypto/ecdsa@go1.25rc1#PublicKey.X https://pkg.go.dev/crypto/ecdsa@go1.25rc1#PublicKey.Y
the issue is that if I want to avoid deprecated items, it will be impossible to do Elliptic Curve Arithmetic. this is needed for example with ElGamal ECC:
https://wikipedia.org/wiki/ElGamal_encryption https://github.com/lc6chang/ecc-pycrypto/blob/master/ecc/cipher.py
Comment From: seankhliao
as the comment notes, low level operations should use third party modules.
closing as working as intended.
Comment From: 3052
elliptic.Curve.ScalarBaseMult
is still used by x509.parseECPrivateKey
:
https://github.com/golang/go/blob/988a20c8c5e2c9eb49f8749e5ee94ce3c964fe59/src/crypto/x509/sec1.go#L133
which is then called by x509.ParsePKCS8PrivateKey
:
https://github.com/golang/go/blob/988a20c8c5e2c9eb49f8749e5ee94ce3c964fe59/src/crypto/x509/pkcs8.go#L28-L38
and x509.ParseECPrivateKey
:
https://github.com/golang/go/blob/988a20c8c5e2c9eb49f8749e5ee94ce3c964fe59/src/crypto/x509/sec1.go#L34-L37
neither of which are currently deprecated - so until that changes I guess continuing to use the deprecated functions is fine