Live data from Hacker News

NeoPG – an opiniated fork of GnuPG 2

neopg.io

31–40 of 47 posts

Re: NeoPG – an opiniated fork of GnuPG 2

#31
Should the NeoPG project mention why GPGME wasn't a suitable compromise?

I understand the author wants to clean up the core and the API, but if there's already a project that cleans up the API isn't that good enough? Especially considering the standard it implements-- PGP-- is still quite complicated.

Re: NeoPG – an opiniated fork of GnuPG 2

#32
post #27

Earlier quoted context omitted.

Ada with SPARK Ada variant and careful refcounting wouldve been my baseline given it's all safe by default before Rust came along. D also had potential. Now Rust with SPARK. Im keepimg SPARK in for semi-automated verification. Just rewriting Skein's C code in SPARK automatically found an error thanks to prover. If affording specialists, then something like F star used in miTLS verified stack, Isabelle/HOL, Jasmin lan…

What do you mean by imperative ML? Using a language from the ML family, but mostly its imperative features? Can you expand on that?

Yeah, I should have. There's been prior work porting linear types and other stuff (think Rust safety) like that to ML since that's an easy-to-analyze language academics like to work in. Tolmach et al actually made a converter for it to Ada one time. ML is also the language that most formal verification extracts to by default. CakeML is a verified compiler for ML. There's flow analysis and concurrent variants for it. So, ML by itself is a good choice for correct code that will get a lot of analysis. Imperative ML, imperative for the needed efficiency gains, combined with type systems like Rust's to ensure its safety with numbers mapped to say 64-bit can go a long way.

When I wrote it, though, I was mainly thinking of recent work that converts functional, verified specs into imperative specs that extracts to ML. I think that has a lot of potential for producing a pile of verified data structures with low cost similarly to the COGENT language that was used for ext2 filesystem. Got a link for Imperative/HOL-to-ML below.

http://www.ssrg.ece.vt.edu/~lammich/pub/itp15_sepref.pdf

Re: NeoPG – an opiniated fork of GnuPG 2

#33
Hmmm, I don't think converting a 500k codebase in C to C++ has a meaningful cost/benefit ratio, especially for security critical code like this. It might be justified to do in something like Rust, but at that point I think it's better to move on from GPG entirely. The OpenPGP standard itself is showing its age (eg. no perfect forward secrecy) and is extremely complicated. I think GPG should be left as-is, and the community gradually move to something simpler, like OpenBSD's signify[0].

[0] https://www.openbsd.org/papers/bsdcan-signify.html

Re: NeoPG – an opiniated fork of GnuPG 2

#34

Should the NeoPG project mention why GPGME wasn't a suitable compromise? I understand the author wants to clean up the core and the API, but if there's already a project that cleans up the API isn't that good enough? Especially considering the standard it implements-- PGP-- is still quite complicated.

> Especially considering the standard it implements-- PGP-- is still quite complicated.

A standard without multiple independent implementations is a bit unhealthy..

Re: NeoPG – an opiniated fork of GnuPG 2

#35
post #5

Earlier quoted context omitted.

GPG is not that complex, but PGP concept, keys structures and workflows - they are really hard. And this project has to implement all those hard elements too.

GPG has a terrible user interface, and it's really hard to script too. It takes a complicated workflow and makes it unbearable.

+1, a cleanup of the GPG cli interface would do wonders..

Just reorganizing existing commands into subcommands like 'gpg encrypt' instead of 'gpg --encrypt' :)

As for key management, keyrings and trust, I think a proper UI with decent explanations would help a lot too. This isn't rocket science, but it's too hard to guess what various abbreviations mean.

Re: NeoPG – an opiniated fork of GnuPG 2

#36

Should the NeoPG project mention why GPGME wasn't a suitable compromise? I understand the author wants to clean up the core and the API, but if there's already a project that cleans up the API isn't that good enough? Especially considering the standard it implements-- PGP-- is still quite complicated.

Not exactly related to NeoPG, but GPGME in general: Doesn't GPGME assume that the user already has GnuPG 2.x installed and running on their system?

This might just be a misconception I have, but I always thought you couldn't make a batteries-included, self-contained, works-out-of-the-box app if you used GPGME. You'd first have to tell the user to go get a GnuPG implementation from somewhere.

I'd be super happy to be wrong on this.

Re: NeoPG – an opiniated fork of GnuPG 2

#38
post #21
post #9

Earlier quoted context omitted.

OpenPGP is kind of like git - if you understand the underlying concepts (in case of OpenPGP this is RFC 4880) then it is simple. GPG is very old and created in different times so it has many quirks at the implementation and UI level but I find the encoding and structures quite simple (there are some weird choices of course). I wonder what do you think is complex? Trust model maybe? Different kinds of signatures? Nego…

> I wonder what do you think is complex? For me it culminates in the way gpg feels really opinionated about key management (with keyrings). Way too often (in relative terms) I end up creating a temp dir, setting GPGHOME, then setting some permissions to quiet up gpg, then importing the keys, then actually doing the thing I wanted, and finally cleaning up[1]. I have no doubt the keyring design works wonderfully for gp…

Note that, per the blurb at hand, NeoPG is intentionally even more monolithic.

Re: NeoPG – an opiniated fork of GnuPG 2

#39
https://github.com/das-labor/neopg/blob/master/license.txt

It may be opinionated but not well thought of a fork.

How is possible to take GPL 3.0 code, say how it is "more restricted", miss to mention the point of what would happen if it is not, and to claim that any additional code to the project shall be licensed under the BSD type of the license.

The author has some serious misunderstands about licensing issues.

Re: NeoPG – an opiniated fork of GnuPG 2

#40

The switch to C++ is incredibly poorly justified. I don't care how much safer you think it is (and it really isn't), the language is way more complicated and error-prone and rewriting the code is ALWAYS going to introduce many, many bugs than would be found by simply maintaining the code. This guy also switched on -fpermissive as part of the process, which disables warnings which are there for a reason! This guy has…

Hi, I'm "this guy". Thanks for pointing out -fpermissive, which was needed during the conversion for the legacy code. Since then I fixed all the warnings, so I can remove the flag (https://github.com/das-labor/neopg/commit/5359aab7885628554c...).

I would love to do code review, but I need a second developer for that!

Thank you for your interest and taking the time to write down your criticism.

Post reply on HN