Sorry, this tweet is nonsense. The implementation is in assembly because people complain about crypto performance and to avoid side channels. Code was written by competent people who should implement crypto. Language is not "safe", it's safe against some mistakes, not logic bugs.https://twitter.com/marcan42/status/946252676781748224 …
-
-
Replying to @dchest
That's my point. The usual excuse for reinventing the wheel in your pet language (it's "safe"/native/whatever) is nonsense for crypto, because your biggest threat is implementation logic bugs like this one. Even competent people fuck up. Stick to well tested implementations.
2 replies 2 retweets 0 likes -
Replying to @marcan42
I'm not sure about that. There are much more buffer overflow or similar bugs than logic bugs.
1 reply 0 retweets 0 likes -
Replying to @dchest
Not in crypto code. Crypto code usually has very well defined input/output buffers with either completely fixed or completely arbitrary sizes.
1 reply 0 retweets 0 likes -
Replying to @marcan42
Crypto code is reimplemented when people discover new ways to attack it. We'd be stuck with non-constant-time implementations, ECDSA reusing randomness, unsafe RSA if we didn't reimplement it.
1 reply 0 retweets 1 like -
Replying to @dchest
None of those are "new ways to attack", they're (severe) bugs and a symptom that the code was written by someone not qualified to do so. You want *one* implementation done *right* so we can stop worrying about screwups like those.
1 reply 0 retweets 0 likes -
This Tweet is unavailable.
-
Replying to @alfiedotwtf @dchest
Test suites are useless for crypto code. They wouldn't have caught this bug, or the ROCA bug, or side channel issues, or any of the really insidious potential problems.
1 reply 0 retweets 0 likes -
This Tweet is unavailable.
It can't. Formal verification aside (which is an entire field on its own) you need human experts writing and reviewing the code. The good news is usually there is very little reason to *change* this code once it's been written.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.