7 ms·
LibreSSL, and the new libtls API
- throwaway2048 11y agoArch Linux has not switched to libreSSL I suspect this might have been a tounge slip of alpine linux, which has.
- uggedal 11y agoAlpine Linux still uses OpenSSL since LibreSSL releases is only supported for 1 year while Alpine releases is supported for 2 years. Void Linux has switched to LibreSSL though.
- alecco 11y agoNot to miss: Less code http://www.openbsd.org/papers/libtls-fsec-2015/mgp00004.html http://www.openbsd.org/papers/libtls-fsec-2015/mgp00004.html What's wrong with the OpenSSL API http://www.openbsd.org/papers/libtls-fsec-2015/mgp00007.html http://www.openbsd.org/papers/libtls-fsec-2015/mgp00007.html TLS small set of functions http://www.openbsd.org/papers/libtls-fsec-2015/mgp00009.html http://www.openbsd.org/papers/libtls-fsec-2015/mgp00009.html read() and write() semantics http://www.openbsd.org/papers/libtls-fsec-2015/mgp00011.html http://www.openbsd.org/papers/libtls-fsec-2015/mgp00011.html No need for handling errno EAGAIN/EINTR yay! http://www.openbsd.org/papers/libtls-fsec-2015/mgp00016.html http://www.openbsd.org/papers/libtls-fsec-2015/mgp00016.html There's more stuff like event/poll, but I don't want to link more. The presentation is very interesting.
- gnuvince 11y agoOne nice side benefit of their usage of MagicPoint; it's easy to link directly into a specific slide.
- deathanatos 11y ago> No need for handling errno EAGAIN/EINTR yay! Yay for EINTR, but you're still handling EAGAIN; it's just called TLS_POLLIN/TLS_POLLOUT now. (Not that this is a bad thing: this is exactly what I'd expect from such an API, as it needs to integrate with the local event loop.) The "What's wrong with the OpenSSL API" is excellent: a coworker ran into this just recently. A client was failing to connect, and had SSL23_XXX in the stack trace, and he wondered why it was using an outdated version of SSL; since we've long since disabled support for SSLv3 server-side, he figured — reasonably — that the client was failing to connect for that reason. For those wondering, from the Python docs, which have the best explanation I know of: > ssl.PROTOCOL_SSLv23 > Selects the highest protocol version that both the client and server support. Despite the name, this option can select “TLS” protocols as well as “SSL”.
- ben0x539 11y ago> Yay for EINTR, but you're still handling EAGAIN; it's just called TLS_POLLIN/TLS_POLLOUT now. I think their point is that you just have to check the return value to know how to proceed, you don't have to check the return value and errno.
- nailer 11y agoFor those on OS X, `brew install libressl`. Note the actual binary is still called `openssl`, but you can tell because it's half the size.
- scott_karana 11y agoIs `openssl` a symlink to `libressl`, which acts differently based on argv0? I'd love to get away from some of openssl's arcane flags... :-)
- nailer 11y agoIt's not a symlink, but that's a good idea. Eg, openssl has 'nodes' (no DES) which means 'dont encrypt the file you're about to make' and if you omitted it and did encrypt it wouldn't use DES anymore anyway.
- mtgx 11y agoDoesn't iOS 9 use LibreSSL, too, now?
- 0x0 11y agoOSX 10.11 seems to ship with it too; /usr/bin/ssh -V OpenSSH_6.9p1, LibreSSL 2.1.7
- raziel2p 11y agoIs it childish that I'm not able to take a "presentation" which is a collection of JPG images in static HTML pages, written in colorful comic sans, seriously?
- scott_karana 11y agoApparently not, judging by very similar comments on another OpenBSD slideshow yesterday. ;) https://news.ycombinator.com/item?id=10306611 https://news.ycombinator.com/item?id=10306611
- DanBC 11y agoThey probably do it deliberately. It's an excellent filter for people who are bikeshedding, vs people who have something to say about the actual content.
- throwaway2048 11y agoThe fact the font choice is always the biggest subthread in these stories really says a lot about HN...
- scott_karana 11y agoOr, it just means that a lot of people here are designers. :P
- GFK_of_xmaspast 11y agoOr more likely that people here have picked up on the fact that negative opinions on comic sans are a signifier for community membership.
- scrollaway 11y agoIt says there's more people who can comment on font choices than on SSL internals (I'm one of those people, btw - no shame in not knowing advanced crypto). I'm pretty sure this is the same lesson you draw from the original "bikeshed" story, so it's doing its job pretty well.
- neoCrimeLabs 11y agoI remember so many people in the open source world angry or annoyed with the OpenBSD team for forking LibreSSL. The fact is it's more than a year later, several more high-risk vulnerabilities discovered, and OpenSSL has yet to make any noticable changes. Meanwhile those same vulnerabilities were fixed in LibreSSL due to code cleanup and removal.[1] No matter how you feel about the forking or the openbsd team, there is something to be learned here. There are times when forking, deleting old code, and major clean-ups can be very useful strategies. Sunk cost bias can be an enemy of progress. [1] - https://en.wikipedia.org/wiki/LibreSSL#Security_and_vulnerabilities https://en.wikipedia.org/wiki/LibreSSL#Security_and_vulnerab...
- timcameronryan 11y agoI recall a lot of renewed energy a year ago into improving OpenSSL, including funding and support. Has that panned out as I would have hoped? LibreSSL improvements are highly visible (and exciting) but I expect I would have overlooked any OpenSSL improvements.
- Twirrim 11y agoThere has been a whole bunch of changes and cleanups in OpenSSL, it's just stuff like that doesn't seem to pick up as much traction here (they don't really have the blogging / communicating thing down so well, I guess?) This is the current roadmap. https://www.openssl.org/policies/roadmap.html https://www.openssl.org/policies/roadmap.html Picking out a few highlights: * "Objective met (2015): The FIPS code has been removed from the master branch, and will be re-integrated more cleanly during a future validation. " * "Objective met (2015): All use of dynamic memory allocation has been cleaned up and made consistent, and the internal memory pool has been removed. " Under Coding Style: * "Objective met (2015): All release branches were reformatted using a script included in the release." (so all code now adheres to a consistent style at least, which is a good starting point) And amongst their targeted goals now: * Legacy platforms that are unlikely to have wide deployment will be removed from the code. .. but .. * Non-supported platforms requiring regular maintenance activities will eventually be removed from the code after first seeking community owners to support the platforms in platform specific repositories. Not convinced that's necessarily the right route, but I can appreciate where they're coming from.
- deleted 11y ago[deleted]
- ausjke 11y agoI'm interested in this but it's in lack of documentation, worse than openssl at the moment. for example any demo code for me to try out the libtls?
- zmyrgel 11y agoWhat documentation do you need? Have you read the manual: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/tls_accept_fds.3?query=tls_init&sec=3 http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/... You can read example code use by browsing the source codes of the applications listed in the presentation such as netcat and httpd.
- sbuttgereit 11y agoI'm just curious and,yes, it's a bit off-topic AND forgetting the relevant dates, etc. that are at play here: isn't developing an SSL/TLS library the sort of thing that Rust should excel at? I see all those lines of C code (and clearly other non-C code) and am thinking of all the opportunities for bugs to come up related to pointer and memory management. Would such a library be a good use of Rust from the performance and safety perspective? Seems like it's how the language is being sold. Note: I'm not a C developer nor do I typically work at this level of the stack, thus my seeking opinions.
- msbarnett 11y agoPerhaps. But there's a significant difference between auditing, cleaning up, and fixing up an old code base (which, however crappy, contains a lot of domain knowledge and bug fixes that have built up over the years), and a project to write exciting new bugs from scratch, in whatever language.
- sbuttgereit 11y agoNo, I wouldn't suggest such a thing for the project that is the subject of this story. But in the theoretical sense or if an upstart were to take a "start-from-scratch" approach starting today or maybe some time from now; that's where I'm wondering what those with better insight than I might think.
- inquisitiveio 11y agoMozilla hosted a Rust Meetup last December on crypto you might be interested in. Tony Arcieri's talk in particular covers a lot of the areas Rust help prevent some of the recent snafus but also covers the areas Rust might be more dangerous to implement crypto in https://speakerdeck.com/tarcieri/thoughts-on-rust-cryptography https://speakerdeck.com/tarcieri/thoughts-on-rust-cryptograp... Videos: https://air.mozilla.org/bay-area-rust-meetup-december-2014/ https://air.mozilla.org/bay-area-rust-meetup-december-2014/
- sbuttgereit 11y ago
- davidgerard 11y agoAny chance of getting this into Debian?
- kzrdude 11y agoIs there a saner version of the slides, a PDF, or something with less jpg?
- btrask 11y agoThanks to the developers for LibreSSL and libtls. I'm using both in an application I'm working on. I've been meaning to post on the mailing list, but I have some requests I guess I'll try here: - For libtls, accept custom read and write callbacks. libuv has no way to poll for writable: https://github.com/libuv/libuv/issues/517 https://github.com/libuv/libuv/issues/517 - I wish they would provide (and maintain) the modern cyphersuite from here: https://wiki.mozilla.org/Security/Server_Side_TLS https://wiki.mozilla.org/Security/Server_Side_TLS ("secure", "legacy" and "high" are all lacking in various ways) These are fairly minor issues and overall LibreSSL and (especially) libtls have been a huge step forward. Thanks again.
- btrask 11y agoDoug emailed me personally to follow up with this. Couldn't be happier!
- sthustfo 11y agoHow does LibreSSL compare with boringssl (google's fork)?
- pjmlp 11y agoNice slides, but I would have liked to see how they are making sure there are no memory corruption issues.
- gpvos 11y agoI guess you need to look at the general OpenBSD coding guidelines (if they're documented anywhere). Also, they ripped out a bunch of what they called "exploit mitigation countermeasures" in OpenSSL's memory allocation code.
- pjmlp 11y agoWell it is still C anyway. For example, I find worthless the Annex K of C11 as solution for memory corruption, because the functions still require to keep track of a separate pointer and size, while making sure they match. And the Annex is anyway optional. However OpenBSD coding guidelines do look quite good: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man9/style.9?query=style&arch=i386 http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man9/... I like that they request developers to make use of static analysis.