Amazon's New SSL/TLS Implementation In 6,000 Lines of Code
bmearns writes: Amazon has announced a new library called "s2n," an open source implementation of SSL/TLS, the cryptographic security protocols behind HTTPS, SSH, SFTP, secure SMTP, and many others. Weighing in at about 6k lines of code, it's just a little more than 1% the size of OpenSSL, which is really good news in terms of security auditing and testing. OpenSSL isn't going away, and Amazon has made clear that they will continue to support it. Notably, s2n does not provide all the additional cryptographic functions that OpenSSL provides in libcrypto, it only provides the SSL/TLS functions. Further more, it implements a relatively small subset of SSL/TLS features compared to OpenSSL.
I'm first royal poster!
Then this is not tls.
>Further more, it implements a relatively small subset of SSL/TLS features compared to OpenSSL.
Why does it take 6k lines of code to imålement this? Someone needs to rethink the standard. If it's not doable in 1000 lines of easy to read C, start over again.
Will they deliver it to me by drone?
The story summary got it wrong - SSH uses it's own distinct protocol to establish an encrypted connection and SFTP is a subsystem of SSH.
Standards have a notorious habit of becoming bloated with rarely used features that never do get properly tested. Rethinking what is actually useful and needed is great for pruning code and handling the majority of use cases. Sure there will be edge cases it can't handle, but that's the whole point: they're edge cases that most programmers aren't going to need to use.
I do not fail; I succeed at finding out what does not work.
eh ?
Seems like it might be useful in embedded systems, but I don't see any mention of that in any of the articles.
Without knowing how much Amazon have left out of their implementation I'd guess it's possible to still slash that by a factor of 2 or 3. I started yet another TLS implementation for a current project about two weeks ago after reading comments like this one: http://security.stackexchange.com/a/3213. I don't expect to need more than 2klOC at this point.
Finally, a quality implementation implemented and backed by a real company. I've had enough of these freelance pet projects get over adopted and used by millions, only to cause some of the worst security breaches in the internet ever!
Good, then start debugging. Because I got compile errors on both Linux and MacOS X.
It doesn't have to be like this. All we need to do is make sure we keep talking.
I hope this takes over as the defacto standard for HTTPS. I'm tired of constantly seeing SSL and OpenSSL vulnerabilities.
Ironically the https version of blogs.aws.amazon.com uses the relatively weak 3DES.
stu4iNd. To the is the worst off
Did anybody notice that it doesn't, for example, do client mode at all yet? Or it does, but it doesn't implement cert validation at all which makes it useless as a client at the moment and therefore client mode is disabled. That along with delegating all the actual crypto to other libraries means the entire thing doesn't actually *do* much. No wonder it's only 6kLOC.
30+ words? Bad. Restart if over 10 words.
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
Does it support SSLv2 and weak ciphers like NULL? or is it hardened out of the box?
... fewer lines means better software right? Why not write it in Python and get it down to one line. That would clearly be the best implementation.
Seriously though, has s2n been audited independently? Who has been involved in its development (Amazon and...)? You can't wheel out the line count and claim a revolutions has happened.
Summary is misleading at best. A brief inspection of the source code reveals this is still using OpenSSL's crypto functions. So you're not getting 6k lines of source code to replace OpenSSL, as the summary implies. You're getting 6k worth of wrapper code that still uses OpenSSL and needs to be linked against OpenSSL libraries.
Ok so firstly it still uses large chunks of OpenSSL (all the crypto stuff) and is still vulnerable to any security holes in that stuff. So its no good on that score.
Also, it disables DHE (which is supposed to be good for ensuring forward secrecy) claiming its a "security risk" (to be fair, maybe there is some security flaw with DHE that I haven't read about yet and that is why its turned off)
Oh and it still supports horridly broken things like RC4, 3DES, SSLv3 and TLS1.0 (all of which contain known unfixable security flaws making them unsuitable going forward)
... it's just a little more than 1% the size of OpenSSL...Notably, s2n does not provide all the additional cryptographic functions that OpenSSL provides in libcrypto, it only provides the SSL/TLS functions....
So then, aren't size comparisons between OpenSSL and s2n at best useless, and at worst intentionally misleading?
6,000 lines of code that DO NOT replace OpenSSL. Only partially replace. A sub-set.
Notably, s2n does not provide all the additional cryptographic functions that OpenSSL provides in libcrypto, it only provides the SSL/TLS functions. Further more, it implements a relatively small subset of SSL/TLS features compared to OpenSSL.
This is the kind of really important detail that is often left out of summaries and winds up making my eye twitch. Thanks OP and/or editors for rising above the common dross.
Stop-Prism.org: Opt Out of Surveillance
6000 lines of code, that's the good news. The bad news is that it's written in perl and makes heavy use of regular expressions.
How does Amazon's implementation compare to LibreSSL? http://www.libressl.org
If you cannot implement all of these in 6-10KLOC then you are an idiot! I wouldn't hire you!
its not much of anything:
https://github.com/awslabs/s2n...
contains #include <openssl/...>
...maybe we need to replace OpenSSL (and now s2n) with OpenTLS and be rid of all the insecure SSL mess.
Nicely done, Amazon!
You just implemented SSLv3 that has been deprecated and appeared on divided-by-decimal one day prior to your announcement.
http://tech.slashdot.org/story/15/06/30/1457204/rfc-7568-deprecates-sslv3-as-insecure