Live data from Hacker News

Show HN: End-to-end encrypted email, based in Switzerland

protonmail.ch

51–60 of 71 posts

Re: Show HN: End-to-end encrypted email, based in Switzerland

#51
post #14

Earlier quoted context omitted.

You can serve different JS to "special" users once. If you're smart, you run checks "for the security of the browser environment" first to make sure it's something unlikely to contain debugging capabilities, e.g. an unmodified iOS device. The site even helpfully asks you to identify yourself with ANOTHER username and passphrase first, making it even safer for the attacker.

An attacker would have to (1) Gain access to the server in Switzerland (without the admins noticing) or (2) Break the SSL and execute a MITM attack. It seems ProtonMail actively scans the code on the backend for unauthorized changes. It's not 100% secure against a very determined attacker (NSA), but for the citizen that wants more privacy without the hassle of PGP, it's pretty good until we can replace SMTP.

Honestly if it is a good usability service based in Switzerland with no special sauce, but well run, I would like it. The only problem I have is that the security asserted doesn't match the reality of a decent threat model.

You can go pretty far with policy and law alone.

Re: Show HN: End-to-end encrypted email, based in Switzerland

#52
post #38
post #15

Earlier quoted context omitted.

You can't just review "openpgp.min.js". You have to review every single Javascript input and every single DOM node , and any of them can alter the behavior of any other element of the Javascript runtime in subtle ways to subvert cryptography. And you have to do this every time you load any page on the site, and any time any of those pages asynchronously load any content. So, no, contrary to popular belief, this doesn…

Why can't browsers just build crypto primitives in that can be called from js? I don't understand what people's obsession with browser crypto is...but I don't know enough about browser's to think of a reason this solution is bad. Any guidance? edit: I understand that this won't solve all the problems...but at least the problem that you are constantly being served this chunk of potentially unsafe code. edit2: I've bee…

Since you insist on a longer explanation, here goes:

You can have crypto primitives in the browser: AES, RSA, ECDSA, etc. So given a private key and cyphertext you can decrypt it and given a public key and a piece of cyphertext you can encrypt it. The actual crypto code is just a callout to libssl. In this regard, you can do this right now: simply wrap libssl from within Chrome's JS engine and you are done.

Now what? What can you actually do with this stuff? Well, you could create an email client: one that downloads a message over XHR and decrypts it. That's great, except the code to run this app is unsigned and downloaded from a remote server! I can pwn the server, add my own code that will backdoor the app and send me your private key as soon as it's in memory.

"BUT!" you say. "I can sign the code!". I say to that, how will you verify that signature? By downloading the piece of code from a remote server? I'll just pwn the server and add my own code to accept my signatures, then add the code to send me your private key.

"BUT!" you say. "I can have the signature verification code built into the browser. Look ma, no remote code download that's not signed!" I say to that, how do you know that the developer was not forced by the NSA or another powerful adversary to give up their private key or just coerced into created a backdoored package to own you specifically? You don't. You didn't grab the source and compile it. Instead, you downloaded and ran a code blob.

The solution to all of this already exists and it does not involve the web. It's called package management. Your distro already does this: multiple people review the source code that goes into every package and every step of the way is cryptographically signed. The binaries are built on trusted machines and distributed with yet more signatures. There is peer review through and through.

Compare this to a closed-source web application you are trying to secure. In this case the best you can do is say "if you trust me (the developer), and you trust that I know what I'm doing so my servers don't get pwn'ed, and you trust that I have not been coerced by the NSA/other gov't agency, then you can trust this code".

Except, you don't need client-side crypto for that. You already have HTTPS which provides the same guarantee without re-inventing a square wheel. QED.

Re: Show HN: End-to-end encrypted email, based in Switzerland

#53
post #38

Earlier quoted context omitted.

Why can't browsers just build crypto primitives in that can be called from js? I don't understand what people's obsession with browser crypto is...but I don't know enough about browser's to think of a reason this solution is bad. Any guidance? edit: I understand that this won't solve all the problems...but at least the problem that you are constantly being served this chunk of potentially unsafe code. edit2: I've bee…

Since you insist on a longer explanation, here goes: You can have crypto primitives in the browser: AES, RSA, ECDSA, etc. So given a private key and cyphertext you can decrypt it and given a public key and a piece of cyphertext you can encrypt it. The actual crypto code is just a callout to libssl. In this regard, you can do this right now: simply wrap libssl from within Chrome's JS engine and you are done. Now what?…

Funny. I typed up my edit2, hit enter, and had a reply from you basically saying the same thing. Also, I never said anything about use-cases, signing code, etc. Only "does this safely get you the primitives", not about what you can do with them. The "you say" in your explanation are not what I said.

Re: Show HN: End-to-end encrypted email, based in Switzerland

#54
post #36
post #34

Earlier quoted context omitted.

That's fair, and I do not want him to stop warning us. I recognize his expertise. I just feel that these sorts of criticisms, that are not sandwiched with at least a little positive message, are keeping people paralyzed in gmail and yahoo and msn while they wait for perfection.

What positive message are you looking for here? Are you just glad people are trying to protect people, even if they're failing?

tptacek, can you suggest a design for end-to-end email encryption delivered through a browser?

As theboss mentioned [1], is:

(a) browser crypto theoretically impossible, is it

(b) that something's practically from browsers today (like build-in crypto code) for a practical solution, or is it

(c) that existing attempts have not attempted to do something that is theoretically possible?

If I understood you correctly, you alluded verification might be possible [2] but it seems there isn't yet a clear description or understanding of what's possible and what's not.

[1] https://news.ycombinator.com/item?id=7757892

[2] https://news.ycombinator.com/item?id=7757678

Re: Show HN: End-to-end encrypted email, based in Switzerland

#55
post #53

Earlier quoted context omitted.

Since you insist on a longer explanation, here goes: You can have crypto primitives in the browser: AES, RSA, ECDSA, etc. So given a private key and cyphertext you can decrypt it and given a public key and a piece of cyphertext you can encrypt it. The actual crypto code is just a callout to libssl. In this regard, you can do this right now: simply wrap libssl from within Chrome's JS engine and you are done. Now what?…

Funny. I typed up my edit2, hit enter, and had a reply from you basically saying the same thing. Also, I never said anything about use-cases, signing code, etc. Only "does this safely get you the primitives", not about what you can do with them. The "you say" in your explanation are not what I said.

Must have crossed paths. Yes, essentially it boils down to the fact that having crypto primitives can be easily done but gives you absolutely nothing in terms of what you can actually do with it. You need a different infrastructure to deliver code/binaries to do that (such as distro packages), and the web, by its definition, is not that.

This has been discussed many a times on here, by tptacek and others. In fact, at one point I had a similar discussion with him on here. It seems like it's something that people have to think through before they see the problem (which speaks to the complexity of the issue here).

Re: Show HN: End-to-end encrypted email, based in Switzerland

#56
post #38

Earlier quoted context omitted.

Why can't browsers just build crypto primitives in that can be called from js? I don't understand what people's obsession with browser crypto is...but I don't know enough about browser's to think of a reason this solution is bad. Any guidance? edit: I understand that this won't solve all the problems...but at least the problem that you are constantly being served this chunk of potentially unsafe code. edit2: I've bee…

Since you insist on a longer explanation, here goes: You can have crypto primitives in the browser: AES, RSA, ECDSA, etc. So given a private key and cyphertext you can decrypt it and given a public key and a piece of cyphertext you can encrypt it. The actual crypto code is just a callout to libssl. In this regard, you can do this right now: simply wrap libssl from within Chrome's JS engine and you are done. Now what?…

You conflated two things.

Yes, having full source code is a sufficient condition for security. But you also implied that the hypothetical browser crypto primitives would allow one to do anything they want with the decrypted data, which might be too loose of an assumption.

For example, you could make the browser crypto primitives work so that you can only display unencrypted data (or a private key) but not be allowed to ship them off to servers.

The key idea is that you are still in control of the browser core, and that core has more control over the code shipped by the server. So you can make that core stricter than Javascript.

For example, about the problem of "other dom elements mucking with your dom elements that control the code" you can make the browser disallow this.

If I'm missing something, it's something related to these primitives. Can anyone help figure those out?

What exactly is theoretically impossible about browser crypto?

Re: Show HN: End-to-end encrypted email, based in Switzerland

#57
post #56

Earlier quoted context omitted.

Since you insist on a longer explanation, here goes: You can have crypto primitives in the browser: AES, RSA, ECDSA, etc. So given a private key and cyphertext you can decrypt it and given a public key and a piece of cyphertext you can encrypt it. The actual crypto code is just a callout to libssl. In this regard, you can do this right now: simply wrap libssl from within Chrome's JS engine and you are done. Now what?…

You conflated two things. Yes, having full source code is a sufficient condition for security. But you also implied that the hypothetical browser crypto primitives would allow one to do anything they want with the decrypted data, which might be too loose of an assumption. For example, you could make the browser crypto primitives work so that you can only display unencrypted data (or a private key) but not be allowed…

Sure, if you want to break JS the language. JS doesn't have a concept of "here have a variable with data inside of it but you cannot touch it". Ask yourself: "what does 'display' unencrypted data mean?"You are describing a different system entirely from what an HTML renderer + JavasScript engine can do.

Re: Show HN: End-to-end encrypted email, based in Switzerland

#58
post #38
post #15

Earlier quoted context omitted.

You can't just review "openpgp.min.js". You have to review every single Javascript input and every single DOM node , and any of them can alter the behavior of any other element of the Javascript runtime in subtle ways to subvert cryptography. And you have to do this every time you load any page on the site, and any time any of those pages asynchronously load any content. So, no, contrary to popular belief, this doesn…

Why can't browsers just build crypto primitives in that can be called from js? I don't understand what people's obsession with browser crypto is...but I don't know enough about browser's to think of a reason this solution is bad. Any guidance? edit: I understand that this won't solve all the problems...but at least the problem that you are constantly being served this chunk of potentially unsafe code. edit2: I've bee…

I agree we need to move toward being able to build secure client apps in the browser. It's clearly "important", in that a lot of people want it, for meaningful and good reasons, and this is likely to continue. It's just not possible today.

Signed extensions are a decent step today (although installing an extension is potentially about as heavy as installing a client app, depending on how locked down your environment is).

CSP and some future extensions can be helpful.

There's server-side stuff which can help, too.

WebCrypto is a useful step.

The problem is it's going to be a long process involving a lot of parts, controlled by different parties. So it's responsible to say "we're going to build a webapp which is as secure as we can make it today; these are the known vulnerabilities". Some users are in a good position to evaluate the risks, others aren't. I care a lot more about things doing what they say they're doing than what in particular they say they're doing. The scary thing is when the people building something don't seem to know the well-known vulnerabilities.

Re: Show HN: End-to-end encrypted email, based in Switzerland

#59
post #54
post #36

Earlier quoted context omitted.

What positive message are you looking for here? Are you just glad people are trying to protect people, even if they're failing?

tptacek, can you suggest a design for end-to-end email encryption delivered through a browser? As theboss mentioned [1], is: (a) browser crypto theoretically impossible, is it (b) that something's practically from browsers today (like build-in crypto code) for a practical solution, or is it (c) that existing attempts have not attempted to do something that is theoretically possible? If I understood you correctly, you…

Verification isn't possible in modern browsers. This is an inherently hard problem, one that has caused some people who've launched carefully-designed encrypted mail systems to abandon the effort.

Re: Show HN: End-to-end encrypted email, based in Switzerland

#60
post #17

Anyone that values their privacy should never trust a service like this. The idea of in-browser encryption and decryption is nothing new, and it always suffers from the fact that the server can replace the client side software at any time without warning. If you must use a browser, find a plugin that you trust that works with any webmail service. Better yet, use an actual mail client and encrypt/decrypt in that.

I think the idea of ProtonMail is to serve the part of the population that mostly uses the browser. Obviously if you wanted to be super secure, there are more sophisticated methods out there, but they aren't exactly accessible to the non-HN population. I don't think we should say, just because a perfect browser based solution isn't possible, this shouldn't exist at all. It's like saying, do something only if you can…

Even if I thought this was a sensible way to describe the value of the service (I don't): that's not remotely what this site says. It makes expansive claims about security, which it can't possibly back up. Why should ordinary people be expected to trust them with secrets?
Post reply on HN