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
TBH @FiloSottile https://pkg.go.dev/filippo.io/nistec is not good because it uses the 65 byte output:
https://github.com/FiloSottile/nistec/blob/64718a545e3030023407a668dfee61340809ba0d/p256_asm.go#L468-L482
where many servers still expect the standard 64 byte. to that end I found this one that still exposes X Y
https://pkg.go.dev/github.com/starkbank/ecdsa-go/v2/ellipticcurve/ecdsa
Comment From: FiloSottile
I’m not aware of 64 byte standard encodings, but assuming it’s just the concatenation of X and Y, it’s just the latter 64 bytes of the 65 bytes P-256 encoding.
Comment From: 3052
Microsoft PlayReady uses exclusively 64 byte encoding for public keys
https://wikipedia.org/wiki/PlayReady