140 points · by glass- · 11y ago · 81 comments
Teaching people how to use the tool, from the point of generating keys, to generating signature manifests for a packages, to signing, and verifying takes < 3 minutes for someone who already knows what a hash is.
And, the complete absence of CA architecture, or web-of-trust - and an focus on sharing their (really short) public keys in a visible and widely distributed manner just makes the system so much simpler to understand.
For example - this literally is all you have to do on OS X to have a complete end-end signing/manifest/verification system:
Generate your keypair:
signify -G -p pub -s sec
Your public key is tiny, and can be shared anywhere/everywhere: RWRGNg6NU+JAt9ju3ItQfOMmDhXmEkHp28mej8ickx4lOJjE2Tg2DxEO
Created your manifest (On OpenBSD you just go "sha256 file* ") shasum -a 256 file* | awk '{print "SHA256 ("$2") = "$1}'> manif
Sign your manifest, and embed the signature in the resulting sig file: signify -S -e -s sec -m manif -x manif.sig
And now, anybody who has your public key, can verify that manifest: signify -C -p pub -x manif.sig
That's it, that's the entire system from beginning to end.The main addition is a "trusted comment" line, that can be used to verify metadata, instead of just the content, for example to verify a timestamp and prevent unwanted downgrades. This is not an issue with packages, but it can be an issue with files that don't contain any version/timestamp.
And since keys are very short, they can also directly be given on the command-line, making the verification very simple from a user perspective. For example the list of public resolvers compatible with DNSCrypt can be verified with a oneliner: https://github.com/jedisct1/dnscrypt-proxy#dnscrypt-enabled-...
OpenWRT is now also leveraging Ed25519 signatures to sign their packages, using a slightly modified version of signify. The result is way smaller than GPG, and a better fit for embedded systems. Unfortunately, they sign `sha512(message)` instead of the message itself, making the signature incompatible with signify.
But even though they only do one thing, these tools are overall way easier to use than GPG, way smaller, and having short keys is really great.
At one place I worked, we had USB security dongles for license management. We started sending them out in envelopes, and found that few reached their destination intact - the envelope would arrive, with a hole in the corner. Someone was raiding the envelopes for USB sticks, for whatever reason.
> There was a PGP usability study conducted a few years ago where a group of technical people were placed in a room with a computer and asked to set up PGP. Two hours later, they were never seen or heard from again.
This argument doesn't hold ground. If "technical people" can not setup a new GnuPG key in 20 minutes, they are obviously not "technical" in this context. I'm 100% sure OpenBSD is absolutely NOT fit for people who find GnuPG confusing enough to avoid usage.
> Or as Prof. Green put it, "Can someone who built GnuPG 2.1.1 on Debian/Ubuntu give me a hint on which libgpg-error you used?" If he doesn't which libgpg-error to use, I doubt I'm going to pick the right one.
I can, here:
$ pkg info|grep libgpg-error
libgpg-error-1.19_1 Common error values for all GnuPG components
Given that this is @tedu, I'm sure I missed the point/joke.The only real argument here is that it's at least 10 times easier to write code than to read another mans code. So I give him that... Which one is more secure, GPG or signify remains to be seen.
It almost certainly contains fewer bugs than gnupg.
I imagine very few people have set up PGP without the help of a search engine.
$ man gpg | pr | grep Page | awk '{print $6}' | tail -1
58
$ man signify | pr | grep Page | awk '{print $6}' | tail -1
2http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/
Been working fine so far. I'm sure there's all kinds of complicated ways to use it but it just takes a few commands to do most of the work. I only use two these days: one for sending and one for receiving. I scripted the more complicated one (send) where I type an alias and a text file with it doing the rest. The decrypt command, -d (file), is easy to remember. Pretty simple compared to trying to learn OpenBSD.
Not to say they're wrong for making something easier or the interface couldn't be way better. Just that me using this thing with almost no thought argues against all this difficulty people are bringing up.
On top of that the interface is atrocious, go find someone with an image in their pubkey and try to display it from the command line.
Good luck.
These days I'm leaning towards bundling encrypted files along with the C code that encrypted it and that works better if the latter is small and self-contained.
It would definitely be possible to do the equivalent for encryption. The main problem† being that while compression algorithms get outmoded, encryption algorithms break. This is true of all encryption, but it's especially scary when you can just scan a disk and signature-identify crackable files by the embedded algorithm.
So, if you were going to do something like this, you'd probably want a higher-level abstraction than "self-describing encrypted file"; maybe something more like a "self-describing encrypted mutable volume." Mutable so that it would (hopefully) get an update() operation called on it at least every so often (even if just from a fsck-during-mount), letting it start a background process to change out an old-and-broken backing-store encryption algorithm for a new-and-trusted one (think of how bcrypt handles strength changes.)
---
† There's also the performance problem: if you have a stable ABI, and it was frozen 20 years ago, how would you ever do something like elliptic-curve operations efficiently? Heck, doesn't using a frozen ABI mean you couldn't make use of a modern processor's native instructions for RSA ciphering et al?
The answer to this, I think, is VM-runtime instruction-level pattern-recognition ala urbit's "jets". The new version of the encryption program would prepend a program for the stable ABI, that tells the old version how to (inefficiently) implement elliptic-curve decryption in terms of things it understands. However, running this program against a new version of the decryption VM would recognize the signature/pattern of "what elliptic-curve decryption instructions encoded in [this VM]'s ABI" looks like, and execute a native procedure with the same preconditions and postconditions as that instruction-sequence instead. Sort of like typehints for a JIT, but where the instruction-sequences themselves are the hints, since they have canonical forms.
One more thing they forgot to mention: GPG is apparently so secure that Snowden leaks show that NSA hates running into it and even uses it internally. Biggest endorsement one can get. I'd replace the interface for sure, though, where users would never see it.
http://sourceforge.net/projects/slackdepot/files/signify/
Files signified on OpenBSD will verify on Linux and vice versa.
Given the leaked BULLRUN slide, I'd rather not be in a position of NSA showing up with plans for my product along with a legal claim on it. RSA or DH it is, then! Or clever symmetric schemes that avoid that stuff entirely. I do that, too. I haven't missed not using ECC as I rarely need to transmit asymmetric keys.
EDIT: The few legitimate responses to this showed NSA patents are expired, Certicom's 130+ still require license from new owner Blackberry, and Bernstein's curves might be exempt. I appreciate those updates. Status quo: forms of ECC are covered by patents and you need to consult an attorney if doing it commercially.
You should prefer state-of-the-art elliptic curve systems to RSA and finite field DH.
NSA has a patent on ECC, expects licenses for commercial use, and has some kind of conditions you must adhere to
My presumption was that you were referring to patents assigned to NSA. NSA had patents relevant to number theoretic crypto. They're long-expired.
Apparently, what you actually meant was:
NSA has licensed a patent now owned by Blackberry.
What this has to do with open source ECC software, you have not made clear. Nobody is talking about using MQV.
It had never occurred to me that I'd sold a company that came within a factor of 7 of the value of Certicom's ECC patents. I did better than I thought I did! Woohoo!
RSA is significantly less safe than ECC alternatives. The situation is not as clear with DH, but it is if you just use Curve25519; Curve25519 is much safer than multiplicative group DH.
Wow, I was not aware that it was even possible for government agencies to hold patents.
Is there any reasonable justification for that?
http://foreignpolicy.com/2014/07/30/the-nsas-patents-in-one-...
Also, from https://www.nsa.gov/research/tnw/tnw193/articles/pdfs/TNW193... (PDF):
> You may be surprised to hear that NSA seeks patents. However, many of the technologies developed by NSA not only satisfy mission requirements, but also have great potential for commercial use. Following extensive review, NSA may seek patent protection for such technologies as a way to protect and build on the US government’s (USG) investment in research and development.
It depends on what one does with a patent. I would think making it free for anyone use, if that were indeed the case, would be appropriate though.
So, next time ECC patents come up, those replying like they don't exist hopefully will not mislead HN readers again. (sdevlin's fair comment being an exception) I mean, if there are no patents, we wouldn't have people griping about licensing costs [2] or companies dropping $100+mil on the company for its ECC patents, would we?
[1] https://en.wikipedia.org/wiki/ECC_patents
[2] http://seekingalpha.com/article/2554945-blackberry-make-cert...