6 ms·
How does SSL work?
- AndrewNCarr 14y agoIt doesn't, according to Moxie Marlinspike and others. http://www.theregister.co.uk/2011/04/11/state_of_ssl_analysis/ http://www.theregister.co.uk/2011/04/11/state_of_ssl_analysi... If you haven't seen any of Marlinspikes presentations, you are missing out on some fascinating stuff. Moxie @ Defcon 19: http://www.youtube.com/watch?v=xIiklPyS8MU http://www.youtube.com/watch?v=xIiklPyS8MU
- tptacek 14y agoThat's a misstatement of Moxie's position, which is unfortunate because Moxie's position is important, probably correct, and needs all the credibility it can get. What's broken about SSL/TLS is the current CA model. Since SSL/TLS was introduced, we've been running with almost exactly the same trust "UX": a hidden browser config panel listing a series of complicated-sounding trusted root CAs, each with the authority to sell or transfer their business to some other entity, or even to delegate the authority to sign certificates to other organizations. That's absurd; it's a security model that clearly can't work in the real world --- and, more, demonstrably hasn't worked. SSL CA's have been caught red-handing selling their authority for dubious reasons. For instance, Trustwave sold a CA=YES certificate to an undisclosed third-party corporation solely for the purpose of making it easier (not "possible" but merely easier) for that corporation to monitor their own users. We need a radical rethinking of the UI/UX and trust model behind SSL/TLS, and Moxie's idea of decentralizing that trust --- so that, say, the ACLU could operate a sort of CA root that would vouch for Verisign's signatures on core ecommerce sites but not accept a crazy delegation from Iran. The protocol, on the other hand, is for all its warts the best-tested crypto protocol in possibly the history of computing. Baby & bathwater, and all that.
- StavrosK 14y agoI remember seeing an interview where someone asked a Chrome team member if they had plans to support Moxie's idea. They said, roughly, that if Chrome supported it, Google would have to run some notary servers, and people would rest assured that Google is running them and not be bothered to run their own, leaving Google with having to support this for the entire internet. It's too bad, it sounds like a very good idea.
- tptacek 14y agoThankfully, the world does not depend on Google to move decentralized trust for TLS forward; since it's mostly a UX change, and it's confined to a very small part of the TLS stack (the verification of server certificates), it can be retrofit over existing infrastructure with neither changes in server software nor major changes to browsers. We can probably do it via plugins.
- StavrosK 14y agoThat's what the Perspectives plugin for Firefox (http://perspectives-project.org/ http://perspectives-project.org/) does, but, as with all these things, it probably won't see wide adoption until it's implemented in a browser by default (and it's good enough that it will have very few false positives or negatives).
- andrewcooke 14y agojust to add that perspectives also has a chrome alpha - https://chrome.google.com/webstore/detail/lnppfgdnjafeikakadfopejdpglpiahn https://chrome.google.com/webstore/detail/lnppfgdnjafeikakad... [kinda frustrating that the solution to many of these issues is sitting here at the bottom of the thread!]
- StavrosK 14y agoOh, thanks, I looked for that on the site but didn't spot it.
- stanleydrew 14y agoWhat can those of us who like this decentralized CA whitelist idea do to help it gain adoption? Can I start telling Chrome right now to use a whitelist maintained by an external source? Should I just pick someone's whitelist (e.g. ACLU, EFF, yours) and trim my browser and OS whitelists to only use those? Also how does this affect SSL certificiate "pinning" as implemented in Chrome? I guess it doesn't since even if you have a pinned cert for a specific domain Chrome will still verify the trustworthiness of the CA that signed it?
- tptacek 14y agoRoughly: 1. C & S exchange messages to agree on versions, ciphersuites, and nonces. 2. S->C certificate, which includes an RSA public key. 3. C verifies certificate against its local cache of CA roots. 4. C->S random secret encrypted under the RSA key (the "pre-master secret"). 5. C & S derive (the same) set of MAC keys, crypto keys, and crypto parameters. 6. C & S verify every message of the handshake with the MAC keys. Other useful things to know: * SSL/TLS operates over a "record layer" of TLV-style messages. The TLS record layer itself supports fragmentation, which is a little crazy. * The server can ask the client to send a certificate too; this is common on backend connections and unfortunately not common with browsers, because the UI is terrible. * Less commonly, C & S can opt for a "DHE" (ephemeral Diffie-Hellman) key exchange, in which the RSA key from the certificate is used to sign a DH key exchange (DH allows both sides to use random public keys instead of long-term fixed keys, but suffers from exposure to MITM attacks --- the RSA key from the cert "breaks the tie" in a MITM situation, making the exchange secure). This has the advantage of ensuring that even if an attacker has been recording all your traffic for years, she can't compromise a server's private key and then decrypt older connections. This is called "forward secrecy". * The two common cipher suites used on most connections are AES in CBC mode and RC4. AES-CBC chunks plaintext into 16 byte blocks, padding the last block if there are insufficient bytes to fill it. Until TLS 1.1, TLS ran CBC in a continuous stream over the whole connection, using the last block of the most recent message as the IV for the next, which gave rise to the BEAST flaw. RC4 is a stream cipher that encrypts byte-at-a-time --- but nobody trusts RC4 much. * TLS 1.2 (IIRC) introduces AES-CTR, which runs AES as a stream cipher.
- lucb1e 14y agoHow about posting that on the site? Quite concise, and looks like a good answer to me.
- tptacek 14y agoI agree with the commenters on SE that say "Thomas Pornin will have the best answer". While I absolutely understand the utility of SE's competition to produce the best message, I find it destroys any interest I have in contributing to the site.
- mitchellh 14y agoI just finished reading this book: "SSL and TLS: Designing and Building Secure Systems"[1] and I now have a _much_ better understanding of how SSL works, what security it provides, how it provides it, and when and where to use it. It is a thorough read and not the easiest, but you can always pick and choose what chapters you're interested in. I highly recommend it. You can buy it from Amazon here (not an affiliate link): http://www.amazon.com/gp/product/0201615983/ http://www.amazon.com/gp/product/0201615983/ [1]: http://www.amazon.com/gp/product/0201615983/ http://www.amazon.com/gp/product/0201615983/
- philhippus 14y ago>(not an affiliate link) Heaven forbid anyone but Amazon gains financially from your recommendation.
- k-mcgrady 14y agoPeople like to point this out to make it clear they are actually recommending the product because it is useful and not for financial gain.
- RegEx 14y agoWow. 8 bucks used AND recommended by an SSL v3 architect. I keep telling myself to stop buying books but...I must...
- ta12121 14y agoI will never understand why random articles describing well documented commonplace things make it to the front page.
- mgummelt 14y agoWell documented -\-> Easily understandable. I'd rather read this than an RFC. Can you point me to a better summary of SSL?
- lucb1e 14y agoThanks by the way, HN moderators, for expanding the short URL generated by the site to share. Now it didn't keep track of how many people visited the URL, and I missed the Announcer badge. May I ask why?
- madsushi 14y agoBecause the purpose of linking something on HN should be to share it, not to personally gain from it.
- autocracy 14y agoIf it's all about sharing, why do we attribute anything here? Might as well make the submission and all the comments anonymous here as well. Reputation is mark of making _good_ contributions, and is something that every site has utility for, including HN.
- lucb1e 14y agoI don't see links to sites with ads being removed, even when submitted by the author itself.
- tptacek 14y agohttp://www.hnsearch.com/search#request/all&q=shortener+by%3Apg http://www.hnsearch.com/search#request/all&q=shortener+b...
- lucb1e 14y agoI didn't use an url shortener, stackexchange just gives me a short link when I click the share button. And if they're banned, how could I have posted this...
- ryanwhitney 14y agoAza Raskin posted this on twitter a while back: The private-public key encryption concept explained through mixing paint: http://www.youtube.com/watch?v=6NcDVERzMGw#t=147s http://www.youtube.com/watch?v=6NcDVERzMGw#t=147s (Starts at about 2:20.)