7 ms·
I'm amazed that in 2015 every application has to implement its own encryption. Why doesn't the OS let us open "encrypted sockets"?
by amelius 12y ago
I'm amazed that in 2015 every application has to implement its own encryption.
Why doesn't the OS let us open "encrypted sockets"?
- MichaelGG 12y agoHow would that differ from opening up a TLS connection?
- nothrabannosir 12y agoIt is now user space, so every app needs to reinvent the wheel. Updates to the security layer are per-app. At best, they use a good library (something we hopefully trust the OS will do, too). It's like the OS not providing TCP but only UDP. Sure, every app can include its own TCP stack. But I'd rather the OS do it.
- antientropic 12y agoHow does using a library qualify as reinventing the wheel? Not everything needs to be done in kernel space. User space is a lot more flexible - for instance, an application can decide to use LibreSSL instead of OpenSSL, but it can't change the IPsec implementation in the kernel.
- sneak 12y agoShow me a widespread OS that doesn't have a TLS library.
- lmm 12y agoYou can't separate encryption from authentication, and the application is the only thing that can tell you what qualifies as authentication. With IPSec you can tell the OS "open an encrypted connection to 69.231.14.52" and the OS will verify that you're actually talking to 69.231.14.52 and no-one else can read your messages. But that's not actually terribly helpful, because what you want to ensure is that only Bob can read your messages. And only the application knows who Bob is.
- nothrabannosir 12y agoOk, what am I missing? Now: Application: Hey OS, what is example.com's IP? Okay, now give me an unencrypted connection to example.com's port 80. Desired: Hey OS, give me an encrypted connection to example.com's port 443. (+ optional encryption params like minimum key strength) Why can't encryption be an OS level task, exactly?
- lokedhs 12y agoBut what if you get a reply "I am example.com, here's the encrypted socket". How do you know that the entity that replied isn't in fact something that is MiTM you connection?
- nothrabannosir 12y agoSame as now. What is inherently anti-OS the way we use certificates? In fact, most apps already use OS-wide root ca lists.
- omphalos 12y ago> Same as now. Along similar lines, I think it's strange that I now see warnings in Chrome for SHA-1 certificates but no warnings at all for http.
- leni536 12y agoAnd firefox happily offers to save your password when you enter it into a http login window but yells at you if you try to connect to a self signed https webpage.
- lmm 12y agoHostname-based encryption only covers a small subset of use cases. If it's a web browser then sure, hostnames have become the way of doing that (although even then, browsers are starting to display the organization name in the top left alongside the URL). But for any kind of peer-to-peer program e.g. instant messaging or file sharing, hostnames are irrelevant; you care about the identity of the person on the other end, who's probably using a home connection that may not even have a public hostname (and will in any case change rapidly). Even for something as basic as email, you'd rather encrypt to a specific person than encrypt to gmail.com. So in short hostname-based authentication is mostly useful for web browsers - which is why it's in the web browser, not the OS. (Also, pragmatically, existing OS-based key management is terrible - just try and use the Windows dialogues to set up an SSL client certificate. For many users the very idea that you manage your keys separately from the programs you use them in is confusing. So browsers would rather provide their own cross-platform UI for key management, even if the OS offers a "managed SSL keystore" as most OSes do)
- realityking 12y agoNot sure what you mean. OS X has Secure Transport (https://developer.apple.com/library/mac/documentation/Security/Reference/secureTransportRef/ https://developer.apple.com/library/mac/documentation/Securi...) What are you missing?