Live data from Hacker News

Ask HN: Why doesn't someone provide JS encrypted webmail

news.ycombinator.com

21–30 of 65 posts

Re: Ask HN: Why doesn't someone provide JS encrypted webmail

#21
Because we've already got pgp, and when we can get the people we communicate with to use it, we don't mind using a command-line program (or a browser plugin, though we don't even really trust that) to decrypt. We definitely wouldn't trust some webapp's javascript to decrypt for us, unless we'd written it ourselves.

Then there's the question, which someone alluded to, of how to distribute new credentials to a browser that hasn't logged on before, and how to make sure they're deleted securely after I leave. Do you store the private keys encrypted and send them to the browser so they can be decrypted with my passphrase? I probably don't trust you to store even an encrypted version of my private keys, but I guess I can use a throwaway key for your service.

What I'm most worried about is the question: who is doing the encrypting? Are people sending mail to this address required to encrypt email to me? If not, are you going to encrypt my email as soon as it hits your servers? Not good enough, you may as well leave it in plaintext and use it to serve me ads.

The biggest problem with encrypted email today is that nobody uses it, and this doesn't fix that. It makes it easier (if it works, and I'm still not convinced it does) for people who already use it to do so, but it doesn't convince people that don't use the service (which is going to be a vast percentage of the people that don't use pgp now) that they should want encrypted mail.

Re: Ask HN: Why doesn't someone provide JS encrypted webmail

#22
post #20

Our webmail installation encrypts the password on the client side, it's never sent in plain and we never know what it is. It's not hard, various crpyto libs are available for Javascript. I've written multiple HTML based login systems that never require knowledge of the plain text Is that what you mean ? Edit: Oh, you mean we never know the plaintext of the email. You mean like this : http://www.hanewin.net/encrypt/ h…

No, the OP is talking about encrypting the data (the mail), not the credentials (the password).

EDIT: oh, you caught on

Re: Ask HN: Why doesn't someone provide JS encrypted webmail

#23
post #6
post #3

I suspect because nobody can be bothered to encrypt mail anyway? I've tried to establish pgp links with friends several times, but eventually we always fell back to unencrypted mails. Of course some super-companies might require encrypted mail, but that might not be a good enough use case to base a business on.

I think people don't use pgp because you have to install a client. People want to be able to access their mail from their home PC, work PC, laptop, friend's laptop and the library. Also, we want to remember our own pass-phrase rather than a private/public key.

But then the described service is useless, because you can only trust the confidentiality of your mail in so far as you can trust the honesty of the service provider not to hide backdoors in the js they send to your browser. But then you can just do away with the clunky client side cryptograpy and talk plain https with their server that does the encryption.

Re: Ask HN: Why doesn't someone provide JS encrypted webmail

#24
post #5

What keeps the webmail company from supplying you with modified client-side JS code which forwards the keys you enter to $three_letter_agency?

Right, and they only have to give it to you once to steal the passphrase, and only have to give it to one or two persons of interest, not necessarily everyone, so it can be very difficult to detect. If they were smart, they'd also check headers and other info to try to prevent serving the trojaned page to someone who might be auditing.

Re: Ask HN: Why doesn't someone provide JS encrypted webmail

#27
The conscientious/paranoid people who care enough to engage in encrypted correspondence will want to run their own client software.

(Typing their passphrase into the hoster's provided JS/DOM, even in a browser under their own control, is essentially the same as sending it to their server. Maybe you could work out something with a bookmarklet, which scrapes ciphertext from one page but then displays the plaintext in another window entirely, but at that point, are you still enjoying the convenience of webmail?)

Re: Ask HN: Why doesn't someone provide JS encrypted webmail

#28
post #16

A GnuPGP-extension for Firefox (or Chrome), enabling encrypting or signing any text boxes. Sounds possible, don't know how well it would react with rich editing forms. edit: complemented with a web-service storing your keys in the 'cloud'.

There's FireGPG. It's kinda meh in practice. I ended up going back to using Thunderbird for signed emails (invoices, generally) because it was so fiddly and sometimes just didn't want to work, especially with attachments.

Re: Ask HN: Why doesn't someone provide JS encrypted webmail

#29
Because crypto in JavaScript would likely be vulnerable to side channel attacks (timing, processor use analysis, power analysis, etc). Even FIPS certified java and .net libraries call into c code. There's a reason.

Also, the number of people who even know what you're talking about is vanishingly small, and few of them would pay.

Re: Ask HN: Why doesn't someone provide JS encrypted webmail

#30
I have thought about this, and I would pay for a well engineered solution for which the operators are open about the inevitable limitations.

The issue of JavaScript being manipulated by the operator to steal your passphrase/key is tricky, as mentioned by others. You might be able to do the crypto part in a separate scripting context via code stored in HTML5 local storage after you've reviewed it once, and using window.postMessage() in some way? The plaintext could be displayed in an IFrame running in that local context.

Then there's the issue of unencrypted incoming mail. You'd need to trust the SMTP server operator to encrypt any incoming mail with your public key and then destroy any record of the plaintext.

Metadata is also an issue: you'd want to encrypt headers as well as the body, as knowing when you communicate with whom is almost as valuable as knowing the content of said communication. Encrypting it is easy, indexing it for efficient access less so.

Still, this could exist as a self-hosted package for the more paranoid as well as SaaS.

Post reply on HN