News for hackers. Stuff that matters.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by baby on Monday May 14, 2018 @09:03AM (#17065087)
Matt Green gave a pretty good summary of this: https://twitter.com/matthew_d_green/status/99598925414360678...

Some of these thoughts are echoed by Filippo:

> No, in 2018 you don’t get to claim the high ground and blame users and implementations if your crypto API returns the plaintext on a decryption error.

from https://twitter.com/FiloSottile/status/996010161427935233

So yeah, most clients seem vulnerable but since the command line utility that pretty much no lambda users use is not broken HN is saying that this is a joke?

As for contacting the PGP team, I've tried reaching out Werner Koch many time for a vuln in libgcrypt without success. That was 2 years ago, the vuln is still there.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by scandox on Monday May 14, 2018 @10:28AM (#17065822)
I think what people are saying is that this has been represented as an intrinsic flaw in PGP and that this may cause the media to basically say PGP is broken.

I agree that this is significant because it affects many users and the potential effect is extremely negative.

On the other hand if the headlines on this were more focused I think people on HN would not have reacted so negatively.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by baby on Monday May 14, 2018 @10:40AM (#17065911)
When almost all implementation of PGP are broken, can we say PGP is broken?
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by LinuxBender on Monday May 14, 2018 @11:31AM (#17066329)
Is PGP broken? Or the plugins that make PGP easier to use email, that are rendering HTML, or those perhaps what is really broken?
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @11:49AM (#17066487)
Pretty much the whole cryptography field has been saying PGP is broken for something close to a decade now; the attack published today is an applied refinement of theoretical tools we've had for a very long time.

The MAC of a PGP message is the SHA-1 of its plaintext appended to the message.

There are coherent ways to downplay today's announcement, but "PGP isn't broken" isn't one of them. The best you can do is "PGP is broken but we already knew that".

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by xoa on Monday May 14, 2018 @12:45PM (#17066986)
>Pretty much the whole cryptography field has been saying PGP is broken for something close to a decade now; the attack published today is an applied refinement of theoretical tools we've had for a very long time.

Yes. But unless I've missed something no one has bothered to even attempt any modernized, improved replacement, so we continue to muddle along. I've certainly heard complaints about existing secure email technologies for well over a decade, but at the same time the cryptography field has never offered an upgrade. Instead it's always been "completely give up on the concept of email (which in no way needs to be insecure) for these modern hip non-federated often proprietary clunky slow kitchen sink instant messenger things instead". To which the answer has and continues to be "no".

Maybe we live in a world where the creation and upgrading of a technology like email is no longer feasible and that's just how it is. If so though I foresee email as it is existing into the foreseeable future, and in turn it'll be useful to have some sort of crypto bolted on top, as a marginal improvement vs entirely plain text. Hopefully there will be enough security oxygen that OpenPGP could at least modernize the foundations a little even if it meant some breaking changes to old implementations.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @12:49PM (#17067022)
No, contrary to what you're saying, virtually all the work done in retail cryptography over the last several years has been in secure messaging. Don't send secrets over email; use a cryptographically secure messaging application, like Signal or Wire.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by xoa on Monday May 14, 2018 @01:18PM (#17067319)
>No, contrary to what you're saying, virtually all the work done in retail cryptography over the last several years has been in secure messaging.

That is not contrary to what I'm saying, that is exactly what I'm saying. Much of the world, both corporate and private, do not want "messaging", they want "email". I use scare quotes for the latter because I want to distinguish between email as in existing technical standards dating all the way back to RFC 561 and email as-in that kind of information transfer service and format, distinct from messaging. Messaging has its place too, but there is clearly a desire for an electronic version of sending a piece of mail. It fits human and cultural psychology. It produces a different kind of consideration and formatting, which has both its merits and demerits. But messaging is not a replacement for email. You can insist that it is but I don't think you will be successful, and you should know better then most that security which isn't used isn't useful security.

>Don't send secrets over email

Back here on Planet Earth sending all sorts of secrets over email and using it for authentication of incredibly important accounts is the regrettable rule, not the exception. Like use of passwords. It is the reality in which we live. I see no sign of it changing either unless there is a direct in-place upgrade available. Which there is not.

>replace email with this thing that requires a phone number and is not like email

No.

>replace email with this thing that didn't even bother to add e2e crypto until 2016, claims to be agpl/gplv3 but then adds a bunch of other random crap on top, etc. Also not email.

No.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by baby on Monday May 14, 2018 @01:34PM (#17067478)
The problem with emails is that you have to deal with a thousand different clients implementing things differently. There is no win there.
[dead]
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by xoa on Monday May 14, 2018 @02:17PM (#17067980)
Your argument is "everybody on the planet including all corporations and governments should instantly abandon email for an instant messenger thing instead of which there are many and no federation" which is a bullshit argument and you damn well know it. FFS, how often over the decades in security have we had to make do with highly suboptimal solutions that were the lesser of evils? When did you of all people become a head-and-feet-in-the-clouds pure idealist?

It's like coming into a global warming discussion and demanding everyone forgo personalized point-to-point mechanized transportation because of inherent inefficiencies vs mass transport. Or saying IRC is shit and therefor everyone should move to mailing lists or whatever. It's worse then even suggesting moving to something that's still "groups in 'rooms' with instant messaging" which at least is a technical feature match, it's suggesting dropping an entire UX. It's not happening. Path dependency is a thing, and so are specific desirable features that can be used alongside other channels for different tasks.

I gave reasons. You're the one implying everyone who doesn't dump a straight forward, desirable UX global standard for a bunch of silo'd different formats are idiots/old fogies/don't care about security/privacy at all. The very simple fact that even accepting dumping that UX for messaging service you still couldn't simply say "switch to this only" but had to list a couple of things further highlights the whole problem. Is every individual and organization on the planet also supposed to support every single secure messenger? If not what is the winner vs the losers tptacek? Saying I had no argument but"no" and ignoring everything else is insulting sure, but I also think it's not a helpful attitude to making the world a more secure place period.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @02:34PM (#17068149)
Yes, us head-in-the-clouds idealists with our pie-eyed demands that encrypted message protocols not leak the contents of our messages to anyone who can intercept them. What will we demand next, forward secrecy? We should climb down from our ivory towers.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by xoa on Monday May 14, 2018 @02:47PM (#17068284)
>Yes, us head-in-the-clouds idealists with our pie-eyed demands that encrypted message protocols not leak the contents of our messages to anyone who can intercept them.

That's not what you're demanding. You're demanding the end to a UX. That's entirely orthogonal to security, and my whole point is that's very different from pushing people to go from an insecure version of a UX to a more secure version of a UX (or at least a strict superset of that UX). It's straight forward to argue "don't use HTTP, use HTTPS", or "don't use SMS, use {secure messenger}"[1], or "don't use POP, use POPS or IMAPS" or even "don't use an 8 character password that is the name of your dog on a website, use something random and preferably a password manager".

But that's not your argument.

1. Though again, the basic fact that I can't just tell anyone in the world, on any device at all, what {secure messenger} vs "SMS" should be is inherently suboptimal though less so.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by AnaniasAnanas on Monday May 14, 2018 @02:50PM (#17068306)
> not leak the contents of our messages to anyone who can intercept them

Already a thing, next?

> forward secrecy

There is https://tools.ietf.org/html/draft-brown-pgp-pfs-03 but to be honest forward secrecy in general does not make much sense in the context of email or backups.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @03:55PM (#17068885)
Forward secrecy doesn't make sense in the context of email? Please, go on.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by loup-vaillant on Monday May 14, 2018 @07:36PM (#17070383)
If you know of a way of ensuring forward secrecy without a response from the recipient, I'm all ears. Considering that NaCl's crypto_box() interface doesn't provide forward secrecy, I feel somewhat safe in believing it's flat out impossible.

Sure, the sender can generate a temporary key pair, and immediately toss out the private half. A passive recipient however cannot do the same. We need a handshake of some sort.

If you want that handshake for email, I don't know how to do that without giving the long term keys to the mail server, which in most cases is operated by a third party that reads your emails for a living. I'd love to have a solution for that, but I don't believe there is any.

Simply put, forward secrecy doesn't make much sense in the context of email.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @07:43PM (#17070418)
I don't understand any part of this argument. What wouldn't make sense would be for crypto_box() to provide forward secrecy, since it isn't a messaging protocol, but rather a simple primitive for authenticated public key encryption --- a low-level building block from which you build protocols.

It's obviously not impossible to build basically any peer-to-peer end-to-end protocol using email as a transport. But, if you were right, and it was, that wouldn't mean "forward secrecy doesn't make sense for email"; it would mean "cryptographic security doesn't make sense for email".

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by loup-vaillant on Monday May 14, 2018 @08:57PM (#17070755)
Thomas, you're frightening me. I'm talking about relatively basic stuff here. I almost hope I'm wrong.

The only way one could ensure forward secrecy for everyone (sender and recipient), is with a handshake (typically a hail-challenge-response). This handshake can only happen when the recipient is online.

If the recipient is not online, as is expected of asynchronous communication applications such as email, an intermediate server has to hold the message for him. At this point, you either give up on the handshake, or hand over the secret key to the server.

Good luck setting up a trustworthy server. Even if I hosted my stuff at home, I might not be too keen on leaving it on where it could be examined by forensics while I am away. It's not bad, but it's not perfect either. And forget about third party servers, they are untrusted by default. I'd rather give up forward secrecy instead, and keep my private key on an encrypted file on my personal laptop.

So we can't have that hand shake. The protocol has to look like: (i) Alice and Bob know of each other's long term public keys. (ii) Alice encrypts then send a message to Bob. (iii) Bob receives then decrypt that message.

If I knew of a protocol that followed those constraints and still preserves forward secrecy, you could be damn sure I'd put it in Monocypher—one less thing the user could screw up. (Actually, I'd love to be proven wrong there, it would improve my crypto library right away.)

> It's obviously not impossible to build basically any peer-to-peer end-to-end protocol using email as a transport.

You'd still have to give the long term keys to a machine that is online when the message is sent. For asynchronous protocol, this means always online, and we're back to square one.

> But, if you were right, and it was, that wouldn't mean "forward secrecy doesn't make sense for email"; it would mean "cryptographic security doesn't make sense for email".

Are you implying that forward secrecy is required for "security"?

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @09:09PM (#17070808)
All of the first part of your message constitutes much of the rationale behind Signal Protocol, which is asynchronous, does not assume participants are online at the same time, and does not involve you handing secret keys to a server. But, of course, Signal isn't the only way to accomplish forward secrecy.

Am I "implying" that forward secrecy is required for message security? No, I'm saying it directly.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by loup-vaillant on Tuesday May 15, 2018 @02:52AM (#17072136)
> All of the first part of your message constitutes much of the rationale behind Signal Protocol

OK, I'll look it up, thanks. Though I suspect I already have (the 3-DH the Wikipedia mentions looks familiar, I suspect it is X3DH). Better than nothing, but not quite perfect.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by smsm42 on Monday May 14, 2018 @06:00PM (#17069822)
Yeah right. "How can we communicate this piece of secret info?" - "Oh, that's simple. You just need to a) switch to your mobile device, if you don't have one, buy one. If you don't have mobile phone line, buy that one too while you're at it b) install a software you've never heard about before - trust me, it's ok because nobody ever had any trouble with software downloaded from internet c) send your private information - namely, your private phone number - to it d) send your private information to me e) receive my private information about my phone number - trust me, it doesn't have to be communicated securely f) get secret information sent to your mobile device g) figure out how to get this information to your desktop device now securely, it's not my problem anymore, figure it out h) figure out how to remove this information from your private mobile device. You see, much simpler than sending an email!"
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by rocqua on Monday May 14, 2018 @01:03PM (#17067185)
It woulds still be great to get some sort of protocol that will work over email. This is still the de-facto way of communication. If we can secure it, it would be a massive win. Much like the wide-spread use of HTTPS over HTTP was a massive win.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @01:07PM (#17067211)
Why would that be a good thing? You'd still be left with a system that leaks immense amounts of metadata, which is often all government adversaries really care about, where the majority of the installed base isn't encrypted and you have to interoperate, and the vast majority of users gets access to messages through a web browser and so is hamstrung on secure delivery of encryption in the first place.

Just stop using email to deliver secrets.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by xoa on Monday May 14, 2018 @02:59PM (#17068393)
>Just stop using email to deliver secrets.

At the least I'm not sure this is legally feasible under ERISA electronic delivery requirements, to name a single one amongst a host of other often incredibly complex regulations. It might be ok under the UETA, but either way that wouldn't be my call.

I am 100% sure that it wouldn't be ok with coworkers, customers, and in turn bosses, so demanding to cease all usage of email would get me fired. I mean, even entirely plain text email isn't sufficient to get anyone to stop using it to deliver secrets. It's been a real improvement just to have the MUA<>Server connection be encrypted, and even that is probably still not universal!

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by dasil003 on Monday May 14, 2018 @01:37PM (#17067511)
I think the GP's desire is not email per se, but rather an open and federated protocol like email so we aren't dependent on a single commercial vendor. I'm not really sure how practical that is since it's really hard to get broad adoption of a new protocol on today's internet.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by e12e on Monday May 14, 2018 @01:52PM (#17067693)
Sure, email leaks meta-data.

But at its core, the promise of pgp/gpg is the promise of encrypted and authenticated file transfer.

The file might come from ftp, samba/cifs, Dropbox/Google drive/etc, from tape or HD backup - or come attached to an email.

It may come from yourself, or from a friend.

But the promise is that between the encryption and signing - and the verification and decryption - the file remain the same. The zip file is as (Un)safe to extract, the font as (Un)safe to render - the installer or the executable as (Un)safe.

If you have (authenticated) file encryption, you have encrypted email.

If you want to use authenticated file encryption as a secure messaging platform, you should probably invest in a more sane format for your plaintext file than email. And a better wrapping transport than email.

The fundamental problems with email+pgp as a secure messaging platform isn't pgp alone - but the intersection of email-the-format, email-the-protocol mixed with the mail user agents and their 80s trusting file handling (ok, that's unfair to the 80s, we're still too trusting when it comes to files in general and transclusion in particular).

In short, I don't think we should give up all of pgp as such (open, secure, authenticated file encryption and Web of trust).

But it's probably true that newer protocols are better for "real-time" messaging, and perhaps usenet is better for hold-and-forward.

[ed: I'd love to hear some current informed discussion about: https://saltpack.org/ mentioned in this discussion here. From the previous hn discussion it seems reasonable; a sane format (message pack), authenticated encryption primitives - but I worry a bit about public key handling - is there Web of trust/certificate support - and if so, is it sane? I'm not saying pgp/gpg wot is sane. But neither is ssh (certs) in practice. I'd much prefer wot - were for some applications I could choose arbitrary key/certs as authorative CAs and give out short-lived "certs" (signed public keys with valid from-to).]

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by smsm42 on Monday May 14, 2018 @06:25PM (#17069994)
> a system that leaks immense amounts of metadata

Doesn't Signal require you to publish your actual phone number, which reveals your RL identity in the network pretty much completely controlled by government?

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @07:13PM (#17070249)
No.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by comex on Monday May 14, 2018 @08:05PM (#17070522)
Explain? I Googled it and it seems that Signal still doesn’t support having an account that isn’t tied to a phone number. Some of the results suggest working around the limitation by obtaining a phone number just for Signal from third parties, but that’s not a particularly reasonable alternative.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @09:50PM (#17071001)
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by smsm42 on Tuesday May 15, 2018 @01:29AM (#17071846)
This article explains how to create a second phone number, for usage for Signal. Which confirms my assertion that you need phone number, and makes your statement of "no" completely false. Among options offered:

The desk phone at your office.

A free Google Voice phone number, if you live in the United States (this is what I do).

Any phone number from any online calling service, like Skype.

A cheap pre-paid SIM card for a few dollars a month (and temporarily put it on your phone to register your second Signal number).

Twilio, a cloud service that allows developers to write software that makes and receives phone calls and SMS messages.

Obviously, each of those still requires registration within government-controlled phone network, and additionally also may require you to entrust your security to a third party - such as your employer, Google, Microsoft or Twilio. So in fact, you refutation of my assertion "you need to publish a phone number" is "you can have two phone numbers". This is not serious.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by smsm42 on Tuesday May 15, 2018 @01:44AM (#17071901)
As an added bonus, some of these creative solutions also make MITM-ing the whole scheme as trivial as "our corporate phone tree has changed, please use new number 1-555-666-666 to contact me from now on". You have no way to verify it, nobody knows how corporate trees and phone prefixes look like. And of course if the person is fired or reassigned or leaves the job (which never happens!), their account is now under control of some unknown third person.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by twr on Tuesday May 15, 2018 @07:31AM (#17073173)
Signal doesn't entrust security to carriers. Messages are sent E2E encrypted to the registered device over the internet. If someone MitMs a device, the safety numbers would not match on either end.

Signal, and the Signal server operators, malicious or not, do not know the phone numbers of people you are communicating with (presuming the secure enclave on the server isn't cracked). Signal does know your phone number, so someone could figure out if you use Signal. If you're worried about that, or personal sharing of your number, you could falsify information to create an anonymous phone number, or you can just use Matrix or Wire.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by jkaplowitz on Tuesday May 15, 2018 @10:24AM (#17074103)
My experience of Signal is that people don't reliably follow up on safety number changes, yet keep using it in a MITM-vulnerable way. Including myself, honestly, because people change or reset phones frequently. Is your experience different?

At least with GPG I can factory reset all of my computers and phones and not have to re-establish trust if I take the right steps to preserve the secret key information.

Even if I don't preserve that correctly, people change computers less often than phones.

On the other hand, I'll admit that my GPG key is newer than my Signal number (which I've owned for 15 years), due to upgrading crypto algorithms.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by twr on Tuesday May 15, 2018 @06:46PM (#17078575)
It isn't. I rarely send sensitive messages, however, so I feel that some surveillance potential is acceptable, to save time and effort. The few times where I did, I first verified both ends.

I perform the safety number verifications in exchange for forward and backward secrecy. GPG isn't enough to establish a truly confidential communication channel, I think. (Unless you erase keys after every sent message, maybe.)

I'm not happy with Signal's dependence on a phone. Ideally I'd like to use a pocket-sized SBC for secure messaging. Come to think of it, that sounds rather like a phone. Just, uh, without the cellular hardware, and with a user-installed OS.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by smsm42 on Tuesday May 15, 2018 @04:56PM (#17077797)
It entrusts the identity to carriers. What use of having perfect peer-to-peer security if you can't be sure who you are talking to? So you will send the data to Eve in a perfectly secure way, while thinking you're talking to Bob - and that's better than Eve breaking the encryption? I say it's much less work for Eve - instead of employing vast resources to exploit a tiny vulnerability in encryption, she would just need to take over a phone number. And if she works for the government, it's not even a hard thing to do.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by twr on Tuesday May 15, 2018 @06:50PM (#17078605)
Again, you can be sure, by comparing the safety numbers. It's the same as comparing SSH or GPG key fingerprints. If someone else masquerades as Bob, the numbers won't match. See section III-D3, key fingerprint verification: https://www.ieee-security.org/TC/SP2015/papers-archived/6949...
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by smsm42 on Wednesday May 16, 2018 @03:20PM (#17085562)
That would be true if people routinely verified fingerprints of their contacts. I don't think it happens more often than any other commonly ignored security precautions. Also, what happens if the phone is lost/damaged/replaced with a newer model? I assume new key and thus new fingerprint?
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by twr on Wednesday May 16, 2018 @04:43PM (#17086294)
Signal, WhatsApp, Matrix et al. show notifications when the participant’s device keys change. You’re right that most users don’t verify. The opportunity for detection or prevention of common forms of surveillance is better than none at all.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by acct1771 on Monday May 14, 2018 @01:37PM (#17067515)
Not ready to recommend Riot/Matrix?
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @01:42PM (#17067577)
I do not recommend it, but it's very probably better than PGP email.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by yacn on Monday May 14, 2018 @02:45PM (#17068271)
Why don't you recommend it?
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @02:48PM (#17068296)
Wouldn't a bunch of secure messenger drama be fun right now?
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by yacn on Monday May 14, 2018 @03:03PM (#17068431)
Sorry, I'm just not nearly as familiar with the intricacies and differences between them, know that you definitely know your stuff on crypto, and always thought Matrix seemed cool/interesting.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by cvwright on Monday May 14, 2018 @12:58PM (#17067126)
At some point, all the recent work that tptacek mentioned on encrypted messengers is going to percolate up into email.

Taking something like megolm [1] and running it over SMTP is such an obvious answer that, eventually, somebody will give it a go. Until then, we get to keep having this argument on the internet every few weeks...

[1] https://git.matrix.org/git/olm/about/docs/megolm.rst

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by Natanael_L on Monday May 14, 2018 @01:06PM (#17067204)
It does exist, but has approximately zero users

https://saltpack.org/

No PFS, though

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by xoa on Monday May 14, 2018 @01:38PM (#17067538)
FWIW thank you for that, even without PFS and no adoption it's at least interesting to see a more recent effort to work within the flawed existing email system but do a bit better then PGP. Like OpenPGP or S/MIME themselves I guess, simply made with something beyond 90s era crypto experience. Although even for something at that stage I'm surprised they don't have anything I can see about what the identities they use are like in the FAQ at least. That's a significant practical difference in PGP and S/MIME for example.

Now that I think about it there is also a modest effort to simply enhance the UI of the whole deal through transparent embedding vs as an attachment. I think modest efforts of that nature that are evolutionary vs revolutionary around existing installed base will like it or not continue to serve an important practical role.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by marbu on Tuesday May 15, 2018 @05:04AM (#17072630)
> Pretty much the whole cryptography field has been saying PGP is broken for something close to a decade now

Do you mean that gpg is broken for non email use cases as well? Eg. encrypting tarball with backups using gpg and then storing it on some cloud service?

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by LinuxBender on Monday May 14, 2018 @12:07PM (#17066655)
What would be the most sensible steps forward for the PGP maintainers? Is this a rewrite, or can they iterate though and make incremental improvements around the flaws that have been discussed over the past decade?
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by Natanael_L on Monday May 14, 2018 @01:11PM (#17067246)
A bit of both. We can fix a few bits in compatible ways, but it's not a reliable long term solution.

Long term, we really need an upgrade that breaks compatibility with old unfixable clients

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by John_KZ on Tuesday May 15, 2018 @10:25PM (#17079557)
>Pretty much the whole cryptography field has been saying PGP is broken for something close to a decade now;

No they don't. Also PGP works just fine. It could use some improvements, but it's doing well.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by smsm42 on Monday May 14, 2018 @05:20PM (#17069564)
In this particular case, some implementations of one of the use cases are broken. This is completely incorrect to say PGP is broken as it implies all (or most) use cases and not only particular scenario.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by ComodoHacker on Monday May 14, 2018 @11:29AM (#17066307)
But in MOV SS/POP SS case we don't say Intel chips are broken, we fix the OSes and the docs.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by Natanael_L on Monday May 14, 2018 @01:12PM (#17067252)
Why not both? Documentation can also be faulty
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by aepiepaey on Monday May 14, 2018 @09:32AM (#17065317)
So what would you expect GPG to do when invoked to operate on a pipe (rather than a file¹)? Buffer (possibly) gigabytes of decrypted data in memory, just to be able to discard it once DECRYPTION_FAILED is detected?

¹: where GPG does the right thing

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by sp332 on Monday May 14, 2018 @10:57AM (#17066078)
Relevant comment from Werner Koch: https://twitter.com/FiloSottile/status/996011473112576000

Either GPG buffers the data and checks for DECRYPTION_FAILED, or the application depending on GPG does. Of the two options, it makes much more sense for GPG to handle this.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @11:03AM (#17066128)
This is shades of the curl maintainer rationalizing CURL_SSL_VERIFYHOST=1 not doing any checking, because CURL_SSL_VERIFYHOST=2 does.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by slrz on Monday May 14, 2018 @04:41PM (#17069258)
The application is likely better equipped to do something reasonable if temporarily storing lots of data is in order.

Still, GnuPG could do the buffering automatically for small messages and force explicit configuration otherwise. The latter might not be realistically enforcable given the compatibility constraints.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by jwildeboer on Monday May 14, 2018 @04:33PM (#17069187)
DECRYPTION_FAILED should always result with an empty return. Not with the decrypted content.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by eigengrau on Monday May 14, 2018 @11:18AM (#17066228)
It might be prudent to have GnuPG return an error exit code instead of just printing a warning on stderr. Currently, it seems that clients (at least when using the shell interface) are supposed to parse the error stream. And even when they do (which many probably don’t), it’s not necessarily obvious that the presence of warnings indicates to the client that the data should not be used.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @10:42AM (#17065934)
Yes. It has one job!
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by shinigami on Monday May 14, 2018 @11:46AM (#17066452)
It should split it in chunks and authenticate each one of them. Then the worst attack would be the ability to truncate the file, and it could be at least detected.

Unfortunately this is not supported by the PGP spec, or any other well established spec.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @12:40PM (#17066930)
What's happened here is that GPG has used the OpenPGP spec as excuse to support extremely insecure default behavior. In reality, GPG can simply buffer and check before writing to stdout, and, in the rare cases where messages are too large to buffer, a flag can be used to override the secure default.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by shinigami on Monday May 14, 2018 @01:38PM (#17067537)
I agree they should have done that as a stopgap measure, but we should push for security in all cases (e.g. streaming AEAD with STREAM or CHAIN https://github.com/miscreant/miscreant/wiki/STREAM )
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @01:41PM (#17067569)
I'm not super psyched to see 1990s crypto vulnerabilities used as an opportunity to promote hipster schemes that literally nobody uses. Virtually all modern cryptosystems handle this problem already.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by shinigami on Monday May 14, 2018 @03:01PM (#17068416)
AEAD was also a hipster scheme that literally nobody used. That's the whole point.

In Twitter you even linked to Adam Langley's post where he suggests something exactly like STREAM/CHAIN!

Which modern cryptosystems handle this problem? Tahoe-LAFS is the only one that comes to mind. Not being snarky here, I'm genuinely interested in knowing this.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by cyphar on Monday May 14, 2018 @08:07PM (#17070535)
Modern TLS uses AEAD in the form of ChaCha20-Poly1305 as well as AES-GCM. I believe that the current standards in AEAD for ciphers are GCM-mode, EAX-mode and OCB-mode (CCM-mode is also used but only because it has no patents while OCB does -- CCM is more complicated and doesn't have some nice properties that OCB has).
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by shinigami on Monday May 14, 2018 @10:03PM (#17071069)
Yes, but that's an online protocol. The problem here is data at rest...
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by cyphar on Monday May 14, 2018 @10:39PM (#17071211)
All of the cipher suites I mentioned can be used with at-rest data (including ChaCha20-Poly1305, and AES-{GCM,EAX,OCB}), which means that there's nothing stopping PGP from adding support for them.

But since you asked, the offline backup software restic[1] uses AEAD (though it's a mix of AES-256-CTR and Poly1305 rather than AES-GCM[2] -- but it's still an AEAD construction). I also recently started working on a paper-backup project, and used ChaCha20-Poly1305 over PGP because of the lack of AEAD (and also because it is vulnerable to surreptitious forwarding -- something that AEAD also solves[3]).

There are distinctions between online and offline protocols (mainly related to PFS), but whether or not AEAD-capable cipher suites can be used is not one of them.

[1]: https://restic.net/ [2]: https://blog.filippo.io/restic-cryptography/ [3]: https://www.usenix.org/legacy/publications/library/proceedin...

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by shinigami on Tuesday May 15, 2018 @07:11AM (#17073098)
AEAD is not enough. How do you decrypt/verify a 100 GB file with AEAD, without disclosing unauthenticated plaintext in a single pass? You need streaming AEAD like STREAM or CHAIN.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by cyphar on Tuesday May 15, 2018 @07:43AM (#17073223)
Doesn't OCB allow you to stream and verify in a single-pass (because the MAC is embedded in the 128-bit blocks of the underlying cipher blocks)?
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by shinigami on Wednesday May 16, 2018 @08:57AM (#17081982)
I'm not sure I understand. In OCB (or any other AEAD) there is a single MAC for the entire ciphertext. You can't decrypt&verify large data in a single pass.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by cyphar on Wednesday May 16, 2018 @10:43AM (#17082774)
You are completely right that for some constructions (such as ChaCha20-Poly1305, AES-CCM, and possible AES-GCM) there is only a single MAC for the entire ciphertext.

However that is not true for other constructions. AES-OCB is a single-pass cipher that has a MAC for each block (this is actually the main selling feature of OCB). (AES-EAX also has a MAC for each block too, but is two-pass.)

Also, STREAM/CHAIN are also AEAD, so your generalisation can't be always true.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by shinigami on Thursday May 17, 2018 @08:11AM (#17090620)
I don't see it. From https://www.rfc-editor.org/rfc/rfc7253.txt :

Function name: OCB-ENCRYPT Input: K, string of KEYLEN bits // Key N, string of no more than 120 bits // Nonce A, string of any length // Associated data P, string of any length // Plaintext Output: C, string of length bitlen(P) + TAGLEN bits // Ciphertext

Only a single tag, exactly like CCM and GCM. Am I missing something?

It depends on what you call "AEAD", of course. For me it's something that generates a single MAC. STREAM/CHAIN can then be used with an underlying AEAD (GCM, CCM, OCB, SIV) to create a "streaming AEAD" that generates multiple chunks, each one of them with a MAC.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by cyphar on Thursday May 17, 2018 @09:12PM (#17097825)
I'll be honest, I was going off the Wikipedia description of the algorithm.

But looking at the RFC you're right that there's only one authentication tag (I also looked at the GPG implementation as well as the proposed OpenPGP RFC for AEAD -- and it looks like they implement chunking on top of OCB/EAX/GCM for this reason). I stand corrected.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by rocqua on Monday May 14, 2018 @01:23PM (#17067364)
If the message is too large to buffer, one might also first just decrypt and stream the plaintext into sha-1.

Once the MDC clears, you can just decrypt again, this time writing to stdout.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tedunangst on Monday May 14, 2018 @02:33PM (#17068145)
This is difficult if the input is a nonseekable stream, but that doesn't excuse producing bad output.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @02:35PM (#17068167)
That's why I didn't suggest it, but to be fair, you could tee the stream into an intermediate file for a two-pass scheme.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by Xylakant on Monday May 14, 2018 @10:45AM (#17065957)
Aren’t modern ciphers checksummed and authenticated blockwise? If so, you could just abort the moment you see a broken block. Anything before that block would not be under the attackers control and harmless.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by tptacek on Monday May 14, 2018 @10:54AM (#17066038)
Modern AE schemes are designed to make it easy to quickly abort the whole decryption operation as soon as an error is detected. But the PGP protocol is from the 1990s, and uses vanilla CBC or CFB and then tacks the SHA-1 hash of the plaintext to the end of the message in a separate record.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by Xylakant on Monday May 14, 2018 @10:56AM (#17066064)
So the reasonable answer for me would be “go forth and use a modern scheme by default.”
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by rocqua on Monday May 14, 2018 @01:05PM (#17067196)
The issue there is that if you call something PGP, people expect backwards compatibility, but if you switch to a different mode of encryption that becomes a massive pain.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by Xylakant on Monday May 14, 2018 @01:36PM (#17067508)
Good old SSH managed to update ciphers. This is certainly easier if Server and client can negotiate, but it’s not impossible for GPG. You could start by adding better modes as an option, later make them default and ask for confirmation when decrypting an old message format. If I read the vulnerability description correctly, it allows stripping the message authentication signature and then trick the client into decoding it. So any message sent with a modern cipher or just requiring message authentication by default would have substantially mitigated the attack.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by rocqua on Monday May 14, 2018 @05:29PM (#17069620)
It is possible, but note that SSH is interactive and always had multiple ciphers. On PGP, as far as I can tell, there is no field for the cipher used. So you somehow need to introduce that field somewhere, but be able to deal with files that do not have that field. Possible but very tedious. The non-interactivity seems like it makes it harder to 'negotiate' a version. As there is no way to get clarification.

At the same time, you need to be careful against downgrade attacks.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by Xylakant on Tuesday May 15, 2018 @01:58AM (#17071948)
Sure, as I mentioned, it’s easier if you can negotiate ciphers. But on the upside, there’s no downgrade attack. If the sender uses a modern cipher, the receiver either supports it or can’t decode the message. Still, that’s not a hard reason to not introduce protocol changes like new ciphers and a new field. Funny that you mention that since currently GPG on my Ubuntu spits out warnings about some feature it does not understand in files encrypted with a newer GPG on my fedora. This actually trips up some of my tooling.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by julian37 on Monday May 14, 2018 @12:15PM (#17066718)
It could also buffer the ciphertext, doubling CPU time but meaning that message size is constrained by disk space rather than available RAM.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by Natanael_L on Monday May 14, 2018 @01:16PM (#17067294)
Yes. Show me the right message or nothing at all.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by eyeareque on Monday May 14, 2018 @12:52PM (#17067059)
It’s known that remote image loading is bad. Why is this even enabled? I think they get a pass on this, it’s definitely a bit over blown.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by rocqua on Monday May 14, 2018 @12:59PM (#17067138)
The issue is apparently that pgp outputs the plain text to a pipe before checking the MAC in the message. Instead, they provide an error code when the MAC doesn't fail. Apparently a lot of implementations don't check for this error. In general, this leads to message malleability. Malleability is always bad. It just so happens that in this example, they used malleability to sneak in <img> tags.

So the issue here is that PGP outputs plain text even when the message fails the MAC check.

Re:EFail – Vulnerabilities in end-to-end encryption technolo... by dangerface on Monday May 14, 2018 @11:34AM (#17066354)
No, in CURRENT_YEAR you don't get to not handle errors, and blame the api when theres errors.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by segmondy on Monday May 14, 2018 @09:36AM (#17065354)
Just curious, why didn't you submit a patch?
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by jakobegger on Monday May 14, 2018 @09:46AM (#17065443)
Not the OP, but finding a vulnerability is a very different skill compared to fixing a vulnerability.
Re:EFail – Vulnerabilities in end-to-end encryption technolo... by baby on Monday May 14, 2018 @10:44AM (#17065951)
I can't remember but I was probably too swamped back then, I should do it though.