| The issue is like this. I load https://webmail.example.com. I see my email. My ISP doesn't see my email. The NSA (or anyone else who can MITM https, such as my workplace, college, etc.) can effectively turn it into http, and see the content. We need to fix that. So I write an encryption library in JS, loaded from https://webmail.example.com . It loads the email through an AJAX call from https://webmail.example.com, decrypts it, and displays it. The only issue is that whoever can MITMed the connection can also modify the JS file to send the key to a C&C server. So: "Dumb" ISP can't read #1 mail "MITM" ISP can read #2 mail So what's the gain? The only concern is that it's an active attack vs a passive attack, so no plausible deniability. But in most MITM scenarios, you don't need plausible deniability. 1. Your workplace computer and the connection is owned by them, so they can do what they want with it. 2. Dictatorships give themselves whatever powers they want 3. The NSA has enough side-channel attacks to exploit. So in which situation will a "JS" encryption help? |
To be clear, unless NSA has some massive capabilities we haven't dreamed off, properly implemented HTTPS cannot be MITM'ed (via SSL stripping, or other means) by anyone who lacks access to your local machine. Specifically, by properly-implemented SSL, I mean:
1. Serving https only, no http
2. HSTS
3. Certificate pinning
The situation you mention regarding workplace computers is a little different from the NSA, since they have the explicit authority and ability to install root certificates on your local work computer. Without those root certs (like if you use a personal computer at work), they lack the ability to MITM your connection, assuming the above.