Remix.run Logo
mkesper 5 days ago

The nil key case really makes me wonder how sane it is to support these cases. You will be forced to lug this broken behavior with you forever, like the infamous A20 line (https://en.wikipedia.org/wiki/A20_line).

FiloSottile 5 days ago | parent [-]

> You will be forced to lug this broken behavior with you forever

Yep, welcome to my life.

atsjie 5 days ago | parent | next [-]

Wouldn't that broken behaviour be a potential security issue by itself?

I do remember Go making backwards incompatible changes in some rare scenarios like that.

(and technically the loopvar fix was a big backwards incompatible change; granted that was done with a lot of consideration)

whizzter 5 days ago | parent | prev [-]

Wouldn't a nil ECDSA key be a security risk?

unscaled 5 days ago | parent [-]

If a private key is available, the public key can be derived from the private key using scalar multiplication. This is how ecdsa.GenerateKey works by itself - it first generates a private key from the provided random byte stream and then derives a public key from that private key.

I don't see how this can be a security risk, but allowing a public key that has a curve but a nil value is definitely a messy API.