Go Proposal: Secret Mode
Posted by enz 13 hours ago
Comments
Comment by fsmv 11 hours ago
One thing that makes me unsure about this proposal is the silent downgrading on unsupported platforms. People might think they're safe when they're not.
Go has the best support for cryptography of any language
Comment by fastest963 7 hours ago
I'm not sure there's a realistic alternative. If you need to generate a key then it has to happen somehow on unsupported platforms. You can check Enabled() if you need to know and intend to do something different but I assume most of the time you run the same function either way you'd just prefer to opt into secret mode if it's available.
Comment by awithrow 5 hours ago
Why not just panic and make it obvious?
Comment by samdoesnothing 10 hours ago
Does it? I'm not disputing you, I'm curious why you think so.
Comment by dpifke 10 hours ago
Related: https://pkg.go.dev/crypto/subtle#WithDataIndependentTiming (added in 1.25)
And an in-progress proposal to make these various "bubble" functions have consistent semantics: https://github.com/golang/go/issues/76477
(As an aside, the linked blog series is great, but if you're interested in new Go features, I've found it really helpful to also subscribe to https://go.dev/issue/33502 to get the weekly proposal updates straight from the source. Reading the debates on some of these proposals provides a huge level of insight into the evolution of Go.)