Signify instead of GnuPG for LibreSSL releases
Summary
In 2014 the OpenBSD team signed the releases of its new OpenSSL fork LibreSSL not with GnuPG but with signify, a tool of its own. The reasoning: signify comprised only around 1,300 lines of C code, and there was not enough energy to clean up two poorly written crypto code bases. Felix von Leitner then ported signify to Linux and pointed out a weakness: the public key was on the same server as the signed files.
What signify is
signify creates and verifies digital signatures with the modern Ed25519 algorithm. It deliberately does only that: generate keys, sign, verify. GnuPG, on the other hand, offers encryption, key management, a web of trust and many formats, is correspondingly large and has repeatedly had security problems. For simply verifying software packages, a small tool that can be fully understood is enough.
LibreSSL itself was created in April 2014 after the Heartbleed vulnerability, when the OpenBSD team began radically cleaning up OpenSSL.
The weak point of key distribution
A signature is only useful if you obtain the public key in a secure way. If it sits next to the tarball, an attacker who controls the server can replace both. OpenBSD solves this for its own system by having each release ship the keys for the next one. For users of other systems, the question remains where to obtain the key in a trustworthy way.
Ideas
- A small tool with exactly one task can be fully reviewed.
- Ed25519 allows short keys and fast signatures.
- Each release can ship the keys for the next release.
Insights
- A signature is only worth as much as the way the public key is distributed.
- Less code means less attack surface, even for security tools.
Facts
- According to the OpenBSD team, signify comprised around 1,300 lines of C code.
- Felix von Leitner’s Linux port came to almost 8,000 lines including helper code.
- LibreSSL was created in 2014 after Heartbleed as a fork of OpenSSL.
References
Remarks
- minisign is a related tool that is available on many systems.
Recommendations
- Verify signatures of downloads and obtain the public key through a second, independent channel.
- For simple tasks, prefer small, manageable security tools.
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.