News for hackers. Stuff that matters.
Re:ProtonMail now offers elliptic curve cryptography by KirinDave on Thursday April 25, 2019 @10:18AM (#19748370)
This announcement is an example of why I am not using ProtonMail anymore. There are a lot of things they do that sound very good on marketing materials, but upon examination are security theater.

For example, they claim, "We have chosen a particular elliptic curve system known as X25519, which is fast, secure, and particularly resistant to timing attacks. It’s simple to implement".

However, previously they've said that they use Indutny's library [0]. This library is somewhat infamous because its leadership deciding to discard any pretense of defending against timing attacks on the grounds that would make the library "too slow." [1]

There are other options. They could have used something with good timing attack resistance from WebCrypto. Those options exist. Folks with more skill than I have recommended P-256 as an option.

[0]: https://protonmail.com/blog/openpgpjs-3-release/

[1]: https://github.com/indutny/elliptic/issues/128#issuecomment-...

Re:ProtonMail now offers elliptic curve cryptography by bartbutler on Thursday April 25, 2019 @02:50PM (#19751322)
We are aware of the the issues brought up in [0] and [1]. As suggested in [2], we are already considering to switch to an implementation in WebAssembly to mitigate the possibility of timing attacks on the web platform.

In our mobile and desktop apps, where timing attack resistance is easier to achieve, the X25519 implementation is already constant-time.

Once they are generated, keys are controlled by our users and not easily updated, so we wanted to make our choice of default curve as future-proof as we could while balancing speed and interoperability.

[0]: https://github.com/indutny/elliptic/issues/128

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861639#10

[2]: https://github.com/openpgpjs/openpgpjs/issues/720

Re:ProtonMail now offers elliptic curve cryptography by arghwhat on Thursday April 25, 2019 @11:14AM (#19749019)
NIST curves like P-256 is generally not considered trustworthy, which is why the general consensus is to use Ed25519 for any elliptic curve cryptography.

Using Ed25519 is by popular opinion the right choice.

However, the concern about their use of indutny's library and the comment you link to is entirely separate. Choosing to have timing attacks for performance in a cryptographic library seems absolutely absurd, and if this is still the case (the comment is from 2017), then that library should be avoided at all cost.

Re:ProtonMail now offers elliptic curve cryptography by tptacek on Thursday April 25, 2019 @11:57AM (#19749452)
That is not at all the case. P-256 is widely used and no cryptographer seriously believes there's anything "untrustworthy" about it. Rather, the problem with P-256 is that it's easy to misuse, like most curves. It's hard to implement in constant time and the NIST P-curves generally lend themselves to invalid curve attacks, which need to be guarded against.

Curve25519 avoids these problems. But then, if you're using a naive Javascript library, you've thrown out one of the main benefits of Curve25519 already, and are left essentially with invalid curve attacks, which are not especially hard to defend against and not always even relevant to a given protocol (who could be bothered to go look at what OpenPGP.js is doing with them, I don't know).

Ed25519 is the signing curve equivalent to Curve25519/X25519. It's what you'd use to generate and verify signature, but not what you'd use for ECDH.

Re:ProtonMail now offers elliptic curve cryptography by arghwhat on Thursday April 25, 2019 @01:46PM (#19750639)
I'm sorry, I misworded myself:

There is general distrust in NIST, not any known issues with those curves. However, it is general consensus to prefer Ed25519 over NIST curves, specifically preferring it over P-256. The benefits of its implementation are a cherry on top. I have yet to see any suggestion or reason to pick P-256 when Ed25519 is available.

And yes, Ed25519 is the defacto standard. Hell, I don't even recall the last time I heard P-256 mentioned. It surprises me every time I stumble upon it. Picking anything other than Ed25519 means deviating from the norm, which would normally cause worry. Granted, P-256 is fine, but there is absolutely no argument for claiming Ed25519 was the wrong choice of algorithm.

And yes, I specifically refer to Ed25519 because it is the one relevant here. We're talking about signing, not key exchanges.

Re:ProtonMail now offers elliptic curve cryptography by tptacek on Thursday April 25, 2019 @03:24PM (#19751618)
The article itself talks about X25519, which is Curve25519, not Ed25519.

Ed25519 is not in fact the de facto standard for signing on curves; that's clearly P-256 ECDSA. You're saying that Ed25519 is better, and I agree, but P-256 is much more prevalent.

Again, people don't use Ed25519 because they distrust NIST (although many people do distrust NIST). They use it because:

1. It's easier to implement in constant time.

2. It's derived (if that's the word) from a curve that was selected to avoid invalid curve attacks.

3. They want a more modern, Schnorr-based signature construction, and Ed25519 gives you that and a better curve at the same time.

For signatures, as opposed to key exchange, I think the tradeoffs are pretty much the same: by using a goofy JS library, you're giving up the implementation and side-channel advantage. You're left with the superior signing construction, but you can just use Pornin's deterministic DSA and neutralize most of that problem as well.

Re:ProtonMail now offers elliptic curve cryptography by arghwhat on Sunday April 28, 2019 @07:59PM (#19774708)
> The article itself talks about X25519

Seems like they made a mistake. They're referring to your private key (which is used for signing) as "X25519", but X25519 is meant for key exchanges.

Nothing but Ed25519 makes sense in this particular context, unless they've gone out of their way to do something very non-standard.

> Ed25519 is not in fact the de facto standard for signing on curves; that's clearly P-256 ECDSA.

Having never been confronted with anyone having chosen P-256 ECDSA, I question the validity of this statement.

It is important to remember that this also requires use. I have a few times stumbled upon things where only NIST curves where supported, but in those cases, RSA remained the choice of the users.

> Again, people don't use Ed25519 because they distrust NIST (although many people do distrust NIST).

None of these arguments make sense to those not implementing the cryptographic libraries on their own (which, while fun, is not recommended).

For the integrator and the user, it's simply a case of reading the docs and picking.

Re:ProtonMail now offers elliptic curve cryptography by a1369209993 on Thursday April 25, 2019 @02:10PM (#19750921)
Actually, Ed25519 is the Edwards curve isomorphic to Curve25519 (which IIRC is a Montgomery curve). Edwards is faster than Montgomery for signature, but not significantly slower for key agreement.

You can use it for ECDH, and unless I've missed some non-obvious attack (which is of course, entirely possible) you probably should, since that allows you to use (mostly) the same elliptic curve math primitives for key agreement as for signature.

(That is, you should use Edwards form points as shared-secret output. It's possible to implement Curve25519 using Ed25519 internally, but probably not a good idea.)

Re:ProtonMail now offers elliptic curve cryptography by tptacek on Thursday April 25, 2019 @03:22PM (#19751605)
My understanding is that Ed25519 is birational to Curve25519, not actually isomorphic, but also that the difference between the two ("almost" vs "perfectly" isomorphic) is not really all that interesting. I thought Ed25519 was better for multiple-base operations used in signing, but slower for variable-base operations in ECDH.
Re:ProtonMail now offers elliptic curve cryptography by a1369209993 on Friday April 26, 2019 @03:59PM (#19761256)
> that Ed25519 is birational to Curve25519, not actually isomorphic

That might be the case, I only meant isomorphic in the programming sense of f(x) = h⁻¹(g(h(x))) for relatively trivial h.

> I thought Ed25519 was [...] slower for variable-base operations in ECDH.

My understanding is that Ed25519 requires replacing several of Curve25519's field squarings with general multiplications, but isn't actually any slower if you use a general multiply for everything. I'm not sure how much optimization you can get out of squaring though, so it might be a easy 10% bonus you're passing up there.

Re:ProtonMail now offers elliptic curve cryptography by dchest on Thursday April 25, 2019 @12:36PM (#19749833)
I tweeted "They would have been better off with P-256, since that uses WebCrypto" after I inspected OpenPGP.js code because it's already implemented there (since it needs to support decryption from senders that use different curves) and uses WebCrypto API implementation. To me, it's a safer choice than the `elliptic` npm package that they use for X25519.

If WebCrypto supported X25519, their choice would be a no-brainer, as 25519 is a safer curve (https://safecurves.cr.yp.to/). But P-256 is definitely not considered untrustworthy — see tptacek's reply — and at least Chrome implementation (BoringSSL) is good. (Browsers use the same implementation for TLS and P-256 is the most popular curve for TLS right now. In fact, delivery of their JavaScript code to browsers already depends on P-256 due to TLS.)

Regardless of the choice, my main concern is that they advertise X25519 as timing safe, while not having a timing safe implementation. This is a red flag.

Disclaimer: I ported TweetNaCl (which uses 25519) to JavaScript. The port intends to be "algorithmically" constant-time, but doesn't guarantee real-life timing safety due to JS.

Re:ProtonMail now offers elliptic curve cryptography by arghwhat on Thursday April 25, 2019 @01:30PM (#19750459)
I unfortunately implemented and maintained several cryptographic algorithms (block ciphers, UMACs, key exchanges, whatnot, a bunch of it proprietary for extra awfulness) and compression algorithms in JavaScript as part of a previous job. It was awful, and I broke the JIT more times than I could count. JS is not well-suited for this.

I still find the argument to be wrong, in the sense that picking Ed25519 is an entirely correct decision to make. Picking that library is not a correct decision, and that might lead to needing a different algo (I'd argue that WebCrypto needs to pick up its pace for common algorithms, rather than picking picking up whatever dropped fruit is available).

We shouldn't slander them for Ed25519 (although you are right that such claim about timing safety is borked—maybe that got lost in marketing). We should only target the library choice.

Plus, with WASM widely available, we should be able to port a constant-time of Ed25519 with good performance without much work. WebCrypto is just a cherry on top.

Re:ProtonMail now offers elliptic curve cryptography by KirinDave on Thursday April 25, 2019 @11:53AM (#19749411)
I have found no evidence that the author has changed their stance on this issue. You can find other issues that have also been closed with a brief explanation.

If the author wants to show up and say otherwise, I'm happy to take correction.

But, I'd rather have a robust implementation of a speculatively less secure scheme then have the undelivered promise of a more secure scheme papering over an insecure implementation.

Re:ProtonMail now offers elliptic curve cryptography by bogomipz on Thursday April 25, 2019 @12:37PM (#19749847)
>"There are a lot of things they do that sound very good on marketing materials, but upon examination are security theater."

Indeed like still pushing the trope that since their datacenters are located in Switzerland they are able to provide more privacy protections. This is even mentioned on their homepage, and of course this hasn't been true in a few years now.[1]

[1] https://www.bbc.com/news/world-europe-37465853

Re:ProtonMail now offers elliptic curve cryptography by glaurung_ on Thursday April 25, 2019 @11:29AM (#19749153)
Out of curiosity, what did you switch to? I'd like to leave Gmail and Proton Mail seems to be pretty well recommended. Is Fast Mail a better option?
Re:ProtonMail now offers elliptic curve cryptography by KirinDave on Thursday April 25, 2019 @12:00PM (#19749482)
I use Gmail for most things, because in terms of account security it's probably the best in the world.

I do not use email for discussing sensitive topics. It is not the right tool for the job.

Re:ProtonMail now offers elliptic curve cryptography by JudgeWapner on Thursday April 25, 2019 @01:42PM (#19750597)
Does anyone use gmail + PGP ? if the two parties understand how to send encrypted messages over web clients, isn't that still secure ? I haven't heard much about PGP for the past 5+ years. I realize PGP itself isn't a protocol, but there used to be a system where you'd publish your public key (irrespective of what protocol (RSA, ECDSA, etc) you use) somewhere and anyone could send you encrypted messages and paste the base64 text into insecure clients.
Re:ProtonMail now offers elliptic curve cryptography by fghtr on Friday April 26, 2019 @09:21AM (#19757121)
> if the two parties understand how to send encrypted messages over web clients, isn't that still secure ?

It is secure, except that metadata are open go Google. And metadata is the new data nowadays.

Re:ProtonMail now offers elliptic curve cryptography by _eht on Thursday April 25, 2019 @11:53AM (#19749413)
Fastmail is a great service, the caveat is that they are based in Australia. Take that for what it's worth.
Re:ProtonMail now offers elliptic curve cryptography by wtmt on Friday April 26, 2019 @02:54AM (#19755346)
Fastmail the company is based in Australia, while Fastmail's servers are located in the US. Take that for what it's worth, considering Five Eyes!
Re:ProtonMail now offers elliptic curve cryptography by _eht on Friday April 26, 2019 @03:09PM (#19760856)
That’s a double whammy IMO
Re:ProtonMail now offers elliptic curve cryptography by xxpor on Thursday April 25, 2019 @12:10PM (#19749575)
I moved to fastmail from gmail to slightly de-google my life.

The biggest issue i've had so far is the search is terrible, and the spam filtering has many more false positives.

Re:ProtonMail now offers elliptic curve cryptography by detritus on Thursday April 25, 2019 @12:54PM (#19750057)
I agree that the search in Fastmail is fairly bad - it does have an 'advanced' menu option that isn't immediately obvious, but it's still not super great.

You made me panic when you mentioned Spam false positives, as I've never really bothered checking that folder!

Thankfully I don't appear to have any so far. Better than bloody GMail arbitrarily deciding that subscriptions and emails I've long-since received from various sources being suddenly spam... .

Re:ProtonMail now offers elliptic curve cryptography by xxpor on Thursday April 25, 2019 @01:47PM (#19750661)
> Better than bloody GMail arbitrarily deciding that subscriptions and emails I've long-since received from various sources being suddenly spam... .

That's in fact my exact issue. The newsletter from the mayor of Seattle regularly gets tagged, for example.

Re:ProtonMail now offers elliptic curve cryptography by rmdashrfstar on Thursday April 25, 2019 @11:36AM (#19749235)
I've been using fastmail for 2 years and haven't had any problems with it, but I've no input on security or similar concerns.
Re:ProtonMail now offers elliptic curve cryptography by fghtr on Thursday April 25, 2019 @12:24PM (#19749697)
I am happy with posteo.de.
Re:ProtonMail now offers elliptic curve cryptography by qqn on Thursday April 25, 2019 @01:39PM (#19750569)
I've been using Tutanota for almost a year now and it's pretty good. I'm no expert on encryption but that part also seems pretty solid [0,1]. NordVPN "leans towards" TN over PM, but only for convenience and not security (that's more or less equal between the two)[2]. However, PM is based in Switzerland (not bound by GDPR), while TN is in Germany (bound by GDPR and other privacy laws that the EU is really progressive in pushing, compared to the rest of the world)[2]. That said, PM is what Cambridge Analytica was using to overthrow governments so I suppose that has to be pretty secure[3].

PM pricing is €48-288/y while TN is €12-60/y[4,5]. Both have freemium options too; I'm paying €12/y for TN just to receive support (more to be able to message them with feedback, really).

My only complaints w/TN is that it's a bit slow; notifications will remain even seconds after I'd read the mail, and sometimes (especially in the beginning) I would hit "Del" twice or more for the same email because it would remain in my inbox, ultimately accidentally deleting the emails after it in my inbox (something I noticed only after refreshing the tab, which -- annoyingly but also securely -- would cause me to have to log in again).

I ultimately went with TN because of one thing, however: I can export emails. Yes, it's a hassle, and yes, I have to generally do it by hand, bundle by bundle, but I love being able to have all my emails archived offline. Plus, with their new (beta) desktop client, this should be even easier[6]. I'm staying with them for now because they're the only ones (that I know of) who encrypt both your emails and your contacts, as well as the subjects, contents, and attachments of all the emails you send[7]. This is HUGE for me. However, the moment a better service comes along who does all this and who is smoother, faster, I won't mind switching ship. Especially because the name is so annoying to tell people, especially over the phone ("Puta? Duda? T like Dom or like Tom?"). Yes, I get it means "secure message" in Latin, but come on now. Just use a simple word already. Or do what PM did and enable a neat shorthand domain (pm.me, how neat is that?[8]). Though they also do offer custom domain names so I suppose this isn't too much of an issue, I just haven't had time to properly look into this yet.

After reading this thread though I'm curious to find out more about FastMail. But Australia, uhhh... Five Eyes, no thank you.

[0]: https://tutanota.com/security

[1]: https://tutanota.com/blog/posts/innovative-encryption

[2]: https://nordvpn.com/blog/tutanota

[3]: https://reddit.com/r/ProtonMail/comments/85vgca/cambridge_an...

[4]: https://protonmail.com/pricing

[5]: https://tutanota.com/pricing

[6]: https://tutanota.com/blog/posts/desktop-clients

[7]: https://tutanota.com/faq/#what-encrypted

[8]: https://pm.me

Re:ProtonMail now offers elliptic curve cryptography by protonmail on Friday April 26, 2019 @12:56PM (#19759533)
ProtonMail actually has a dedicated export tool: https://protonmail.com/support/knowledge-base/export-import-...

ProtonMail also encrypts emails, contacts, contents, attachments, of all emails you send and receive, with end-to-end encryption.

However, the most important differentiator is the trust model. ProtonMail has Address Verification, which means it is trust on first use, which is significantly more secure than the trust on every use model Tutanota uses for key distribution. Details here: https://www.reddit.com/r/ProtonMail/comments/b84kd3/why_is_p...

Re:ProtonMail now offers elliptic curve cryptography by wtmt on Friday April 26, 2019 @03:02AM (#19755381)
My biggest issue with Tutanota is there's no IMAP support. I don't wish to jump through hoops to get my mail out easily and in standard formats if I want to leave a service. That's why I won't use it. Same goes for ProtonMail, which is slightly better but has a tedious IMAP bridge to be installed and used for paid accounts.
Re:ProtonMail now offers elliptic curve cryptography by anticensor on Friday April 26, 2019 @02:25AM (#19755251)
Switzerland has its own GDPR-like privacy act.
Re:ProtonMail now offers elliptic curve cryptography by anfedorov on Thursday April 25, 2019 @10:26AM (#19748464)
Re:ProtonMail now offers elliptic curve cryptography by KirinDave on Thursday April 25, 2019 @10:32AM (#19748537)
I don't know OSX very well these days. Is that... is that actually installing a new global SSL trust root? Doesn't that mean ProtonMail now can seamlessly MitM all SSL connections on that machine?

Please tell me I'm reading that wrong, because I don't recall doing this for ProtonVPN on linux.

Re:ProtonMail now offers elliptic curve cryptography by deagle50 on Thursday April 25, 2019 @10:48AM (#19748714)
In the instructions they ask the user to "always trust" the cert for all use cases, including SSL. If you do that, any app that uses OS certs can be MITMed. It should be enough to trust the cert for IPSec only.
Re:ProtonMail now offers elliptic curve cryptography by TimTheTinker on Thursday April 25, 2019 @02:05PM (#19750865)
My knowledge is limited in crypto, but I'm pretty sure you should never trust a root cert (even for "IPSec only") unless it carries responsibility and public scrutiny equal to or greater than a standard CA. (Unless it's the owner of the device [including you] or a close associate you trust.)
Re:ProtonMail now offers elliptic curve cryptography by protonmail on Friday April 26, 2019 @12:57PM (#19759553)
Indeed, it is enough to trust the cert just for IPSec, and we have updated the article to reflect that. We also have native applications on macOS so the manual IKEv2 setup is not the recommend method of usage of ProtonVPN.
Re:ProtonMail now offers elliptic curve cryptography by deagle50 on Thursday May 02, 2019 @04:30PM (#19812516)
Cheers!
Re:ProtonMail now offers elliptic curve cryptography by storrgie on Thursday April 25, 2019 @11:58AM (#19749460)
what provider, or self hosted software do you suggest as alternative?