> written in C Stopped reading there.
What would be a better language for creating a small, portable crypto library that works on embedded systems? Would you really put your trust in a brand new language?
BearSSL – Smaller SSL/TLS
31–40 of 206 posts
Re: BearSSL – Smaller SSL/TLS
#32One of the cliches about crypto is that you should not implement your own crypto. Not to suggest that the authors don't know what they are doing, but they mention 'alpha' quality themselves on the site. I wonder, how long does it take until a new library is deemed secure? What does the process look like? Trial and error? Or do they compare notes with vulnerabilities found in e.g. openssl?
I was skeptical, but then saw: author Thomas Pornin Yeah, "should not implement your own crypto" doesn't apply to him.
Re: BearSSL – Smaller SSL/TLS
#33Earlier quoted context omitted.
A lot of people are arguing that new projects like this should use Rust. Like https://github.com/ctz/rustls .
Only because they don't know Ada and they wanna reinvent the wheel again /s
Re: BearSSL – Smaller SSL/TLS
#34Earlier quoted context omitted.
I used to think that; but I'm following Dan Boneh's crypto course on Coursera at the moment, and he specifically notes that you should not even try to implement known algorithms yourself (for production; you could do it ofcourse for the learning experience). The reason is that there are subtle attacks on the implementation, such as timing attacks, which can leak information.
This thinking is why Heartbleed was such a disaster. Everyone left it to someone else, and the end result was OpenSSL being the only serious choice. Yet even the 'experts' got it wrong -- way wrong. I'm not advocating everyone and their mother implement their own crypto. But some software diversity is a good thing. These algorithms aren't quite as scary or fickle as the documentation and existing implementations make…
Wouldn't you say DJB (et al) did that themselves? https://tweetnacl.cr.yp.to/
Re: BearSSL – Smaller SSL/TLS
#35Earlier quoted context omitted.
Why? Crypto in a memory-managed language is not just a bad idea but a horrifically bad idea because you expose yourself to every single bug in the runtime's memory management.
A lot of people are arguing that new projects like this should use Rust. Like https://github.com/ctz/rustls .
Re: BearSSL – Smaller SSL/TLS
#36However, it seems it's been developed "in secret" and the only public commit is a huge import of all of it. :/
Too bad, the development history would have been very interesting to read, digesting it all at once is harder.
Re: BearSSL – Smaller SSL/TLS
#37Earlier quoted context omitted.
A lot of people are arguing that new projects like this should use Rust. Like https://github.com/ctz/rustls .
Are there mature versions of rust for the hundreds of microcontrollers that people are in production right now? Most of them have a decent GCC port and C works on all of them..
Re: BearSSL – Smaller SSL/TLS
#38> written in C Stopped reading there.
What would be a better language for creating a small, portable crypto library that works on embedded systems? Would you really put your trust in a brand new language?
Also, when I say that BearSSL is written in C, it is partly a lie: some of it (especially X.509 certificate decoding, and handling of handshake messages) is done in T0, a new Forth-like language that I invented for the task (compiler is provided, and produces C code), specifically to have coroutines (incidentally, it means that most of that code read things byte by byte, with relatively few accesses to buffers, thus less potential buffer overflows).
Re: BearSSL – Smaller SSL/TLS
#39Re: BearSSL – Smaller SSL/TLS
#40Edit: http://www.bolet.org/~pornin/cv-en.html Disregard me.
Says who? Maybe the cruft of the old ones means its impractical to fix. Maybe the leadership of the old ones means it can't be fixed due to incompetence or toxic politics. Sometimes rolling your own or forking is the smart move. There's a reason you use x.org and not xfree86 for example. The idea that no one should ever roll their own cryptography is a cutesey warning for amateurs, but not an absolute rule. If no one…
But generally, "says who" is answerable as "says any reputable applied cryptographer, established audit/research team, etc. who's thoroughly cut their teeth on crypto and security in general."