3 ms·
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 infamou
by mkesper 2y 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 https://en.wikipedia.org/wiki/A20_line).
- FiloSottile 2y ago> You will be forced to lug this broken behavior with you forever Yep, welcome to my life.
- atsjie 2y agoWouldn'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 2y agoWouldn't a nil ECDSA key be a security risk?
- unscaled 2y agoIf 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.