News for hackers. Stuff that matters.
Re:Modern Alternatives to PGP by tptacek on Friday February 15, 2019 @03:50PM (#19174586)
Yes, as the article says, it's a 1990s-style ultra-configurable do-everything design which, in practice, almost always gets deployed in a lowest-common-denominator set of constructions that are themselves mired in 1990s crypto.

No modern cryptographic engineer looking at any problem PGP solves would design a system that looked like PGP.

PGP used to make some sense as a simple at-rest storage format, but in the era of Nacl and libsodium, even that use case is a poor fit.

Re:Modern Alternatives to PGP by tyingq on Friday February 15, 2019 @04:55PM (#19175078)
I believe "gpg -c" remains a better idea than encrypted zip files and "openssl enc" due to better defaults/ciphers/kdf.

The article mentions magic wormhole, but sometimes you need plain old symmetric file encryption with a password.

Re:Modern Alternatives to PGP by tptacek on Friday February 15, 2019 @06:40PM (#19175833)
Yes, PGP is better than the Bass-o-matic ZIP cipher many implementations of ZIP use. PGP clears that very, very low bar.
Re:Modern Alternatives to PGP by tyingq on Friday February 15, 2019 @06:48PM (#19175872)
I did mention "openssl enc" as well. Is there some other common bundled utility I missed?

Or it's not useful to compare what's at hand?

Not sure I'm getting the message behind the jab.

Re:Modern Alternatives to PGP by tptacek on Friday February 15, 2019 @07:40PM (#19176166)
"openssl enc" requires you to select from over 105 different cipher constructions, virtually all of which are terribly insecure.
Re:Modern Alternatives to PGP by tyingq on Friday February 15, 2019 @08:11PM (#19176312)
Okay, so "gpg -c" is better than other commonly installed command line tools for encrypting a file with password?
Re:Modern Alternatives to PGP by tptacek on Friday February 15, 2019 @11:12PM (#19177020)
PGP, which is something you have to explicitly install, is a badly flawed way to encrypt files; it has a poor password KDF and you should look at how it authenticates data.

Install something better.

Re:Modern Alternatives to PGP by tyingq on Saturday February 16, 2019 @07:40AM (#19178333)
"PGP, which is something you have to explicitly install"

Gnupg is a default package for Ubuntu[1], so not always.

"Install something better"

That's a bit mysterious. Various Google searches don't suggest anything obvious.

[1] See http://releases.ubuntu.com/bionic/ubuntu-18.04.2-live-server... ctrl-f, search for gnupg

Re:Modern Alternatives to PGP by bmn__ on Saturday February 16, 2019 @02:39AM (#19177577)
Well, what is better? You're the expert, why aren't you telling us outright?
Re:Modern Alternatives to PGP by xorcist on Saturday February 16, 2019 @04:48AM (#19177935)
No, it's not "badly flawed". Your files won't be compromised.

GnuPG could do with better defaults, but that is true for every system good enough to have aged. A more modern KDF would also be welcome but it won't impact end user security. Just to put things in perspective.

Re:Modern Alternatives to PGP by DanBC on Saturday February 16, 2019 @04:50AM (#19177941)
> Your files won't be compromised.

...if you use it correctly. It appears that many people can't do this.

Re:Modern Alternatives to PGP by xorcist on Saturday February 16, 2019 @09:01AM (#19178572)
No, that's the point. For long term encrypted storage, GnuPG is one of few options and perfectly good best practice.

Telling users that it's broken without pointing to a clear alternative is counter productive as they are likely to end up much worse.

A more modern KDF would be welcome, but it is also important to communicate the benefit to an end user: You get comparable security with a shorter password. There are other things to consider when choosing an encrypted file format.

Re:Modern Alternatives to PGP by tyingq on Saturday February 16, 2019 @11:00AM (#19179172)
Interesting that the comment above is off-and-on turning grey.

It's pragmatic, informative, and highlights that bashing gpg for this specific use case, without naming something better...is arguably worse than saying nothing.

Why downvote it instead of just naming a better choice? What's the big secret?

Re:Modern Alternatives to PGP by tptacek on Saturday February 16, 2019 @11:31AM (#19179352)
I downvoted it for making the unhinged argument that a poor KDF is a feature because it encourages users to select better passwords.

I downvote lots of things. On Hacker News, we're explicitly encouraged to downvote disagreement, especially when verbalizing that disagreement will just clutter up the thread. Everyone gets downvoted. I've been downvoted all over this thread. You were just downvoted a minute ago.

The one thing we're not supposed to do is complain about downvoting. That's in the guidelines for the site.

Re:Modern Alternatives to PGP by tyingq on Saturday February 16, 2019 @11:56AM (#19179509)
"making the unhinged argument that a poor KDF is a feature because it encourages users to select better passwords."

Where does it say that? It says a better kdf would improve the security of shorter passwords. I don't see anything that suggests a poor kdf is a feature.

The kdf used for "gpg -c" also seems better than "openssh enc". And we've still not heard what the reasonable alternative is for symmetric/password file encryption is. So, I'm sticking with gpg for that use case.

Re:Modern Alternatives to PGP by tptacek on Saturday February 16, 2019 @12:08PM (#19179560)
I think you're right, and that I misread the comment. I fixed my vote. Thanks! See! The system works!
Re:Modern Alternatives to PGP by e12e on Saturday February 16, 2019 @10:28AM (#19178976)
... And the secure constructs like aes gcm/aex are unavailable on the command line - only usable as library functions.
Re:Modern Alternatives to PGP by _wldu on Friday February 15, 2019 @10:22PM (#19176852)
tptacek - What would you consider a good modern way to replace encrypting large text files to multiple PGP keys? That's my main automated use case for OpenPGP in Go. If there is a simpler, more modern way, I'd like to try it... thanks.

Edit: We do this, then push the files to a S3 bucket and users can get the files and decrypt them without having to deal with remembering/forgetting static passwords.

Re:Modern Alternatives to PGP by w8rbt on Monday February 18, 2019 @02:30PM (#19193531)
Replying to myself... I think I could actually use nacl/box to accomplish this. I'd just have to take care and break the large files into smaller chunks and find a way for users to easily generate and manage keys. OpenPGP sort of makes key mgt easy.
Re:Modern Alternatives to PGP by sa2ajj on Saturday February 16, 2019 @03:08AM (#19177650)
sorry, I misremembered the tool. there's one that serves your purpose, however I do not remember the name at this time.
Re:Modern Alternatives to PGP by mikegerwitz on Friday February 15, 2019 @10:42PM (#19176925)
PGP is still widely deployed, whether you like it or not. "I don't like it" isn't a valid argument for considering something "legacy", when it works just fine for certain cases.
Re:Modern Alternatives to PGP by tptacek on Friday February 15, 2019 @11:10PM (#19177016)
"I don't like it" isn't my argument for OpenPGP being legacy, and there's nothing in this thread to suggest otherwise.
Re:Modern Alternatives to PGP by Quekid5 on Friday February 15, 2019 @04:20PM (#19174823)
Fair enough, I suppose.

I'm not sure it's just me being behind the times, but it seems that quite a few of the ideas behind PGP (specifically: asymmetric encryption) aren't really being exploited seriously. Instead there's lots of halfhearted "oh, let's just encrypt thing X with a password stored in thing Y" where Y is presumably more 'secure'. This is a bit of a tangent, but I find it interesting and depressing that industry has learned very little, if anything.

Re:Modern Alternatives to PGP by tptacek on Friday February 15, 2019 @04:22PM (#19174848)
This article explicitly points out modern alternatives to PGP's clunky, 1990s implementation of asymmetric encryption.

But, tangentially, it's a bad idea to use asymmetric encryption when you don't absolutely need it. Modern symmetric AEAD ciphers, which are implicated in pretty much all serious public-key designs anyways, are safer to use that asymmetric cryptography.

Seeing a public key in a design that doesn't demand public keys is a cryptographic engineering code smell.