AIFeed

Minisign 2 is here

Original text(via Lobsters)

The first version of Minisign was released in 2015, almost 12 years ago.

Like a lot of projects, Minisign was born out of personal frustration. I needed a way to sign software and files (originally for dnscrypt-proxy), and PGP was the only viable option at the time.

But using PGP was painful. Even for common operations, I had to Google how to use it. PGP had everything but the kitchen sink, and it was a complicated mess.

I designed Minisign to be minimal: a tiny specification that’s easy to implement, a simple command-line interface, and small public keys that are easy to copy and paste.

There are no algorithms or parameters to choose from: Minisign uses modern cryptography and secure parameters, unconditionally.

Minisign started as a reimplementation of OpenBSD’s signify tool, but it filled an important gap: it let you attach signed, human-readable data to the payload: the “trusted comments”.

Trusted comments where specifically designed to prevent downgrade attacks, because an old version can still have a valid signature even if it contains vulnerabilities that have since been fixed. That can’t happen with an unforgeable timestamp or version number bound to the signature.

Minisign has caught on, and people have reimplemented it in several programming languages. It’s used to sign Zig releases, DNS server lists, Wasmer applications, and more.

It’s simple to implement and easy to use, and it just works.

Minisign uses Ed25519 for signatures. It has small public keys (32 bytes), is quite fast, and is widely available.

And Ed25519 has served us well. To this day, there are no proofs of a practical attack against it when it’s implemented and used correctly.

In recent years, though, there’s been growing concern about quantum computers large enough to break elliptic-curve cryptography. No one actually knows whether we’ll see one in the lifetime of the planet.

So Minisign would eventually need to support post-quantum signatures. Unfortunately, there’s no such thing as a drop-in post-quantum replacement for Ed25519.

Many post-quantum signature schemes have been developed over the past few years, but most have large public keys or large signatures, or they’re slow. And some have turned out to be insecure even against classical computers.

These schemes keep improving, but each comes with its own trade-offs.

AI is also speeding up the analysis of these schemes. An unexpected result could show that they offer much less security than we thought.

Minisign signatures should remain valid and secure for the long term.

For the past few years, I’ve been following this work closely, looking for a good post-quantum option for the next major version of Minisign.

Schemes based on isogenies are especially promising, but they are still a work in progress. The many variants of SQISign are too promising to ignore but still too academic to commit to.

Today, FAEST would be an almost perfect candidate. It has small keys and signatures, and relies only on well-known symmetric primitives.

But it’s difficult to commit to something that NIST hasn’t standardized yet. Standardized constructions lag behind the state of the art, but at least their specifications are unlikely to change.

I really wish I could use FAEST. But if Minisign adopted it today, a last-minute tweak to FAEST would leave us with a custom signature scheme.

For an internal system where updating the algorithm would be painless, I’d definitely recommend FAEST, especially after August 2027, when NIST will no longer accept tweaks.

For Minisign, though, that doesn’t sound like a good idea: version 2 needs a stable, long-term format.

My original plan was to wait for the dust to settle and see which additional signature schemes NIST would select and which ones applications would actually adopt.

Despite cryptographers’ recommendations and compliance requirements, the vast majority of companies put off migrating to post-quantum systems for as long as possible. They just didn’t care unless a large customer explicitly asked for it.

But the NSA’s recent announcement came as a surprise and changed everything: as soon as it came out, companies wanted to deploy post-quantum cryptography worldwide overnight.

So, despite the lack of ideal options, it was time to release Minisign 2. The plan had been ready for years. The signature algorithm was still undefined.

With more time, I might have chosen a different algorithm, but postponing a post-quantum version of Minisign would have been irresponsible.

As I write this, I have no idea whether AI has actually produced a breakthrough in elliptic-curve cryptography that could lead to a practical attack against Ed25519. But better safe than sorry.

So Minisign 2 is available today with support for SLH-DSA signatures.

SLH-DSA, previously known as SPHINCS+, is a conservative hash-based scheme. No known quantum algorithm can break it more efficiently than a classical algorithm can, and it’s likely to hold up very well against AI, too.

SLH-DSA also has an important property for Minisign: its public keys are small: at the 128-bit security level, they’re just 32 bytes, the same size as today’s Ed25519 public keys.

Finally, an SLH-DSA implementation can be simple and compact. And there are fewer ways to get the implementation wrong than with most other schemes, which makes it a good fit for Minisign.

SLH-DSA, as standardized by NIST, is far from perfect, though. It’s not very fast, and the fact that the standard allows only SHA2 and SHAKE as hash functions doesn’t help.

But Minisign is typically used for software updates, so the extra cost of using SLH-DSA instead of Ed25519 is negligible in practice.

Minisign 2 was designed as a simple, incremental update to Minisign 1.

If you already have a Minisign 1 implementation, you don’t need to start over to support Minisign 2. In fact, if there’s already an SLH-DSA implementation in your favorite programming language, the changes will be simple and minimal.

And if you’re starting from scratch, an implementation that supports only Minisign 2 will be smaller than a Minisign 1 implementation because it needs fewer components.

From a user’s perspective, Minisign 2 will look familiar. Signatures and keys use the same format as before, but they say “minisign2” instead of “minisign”. CLIs and libraries don’t need to change their interfaces much either.

If your implementation supports both algorithms, I recommend using different default filenames: minisign2.key and minisign2.pub for an SLH-DSA key pair, and the .minisig2 suffix for signatures.

Minisign 2 is available today in Minizign, in the original Minisign implementation and in the go-minisign package. Other implementations will follow.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by Lobsters
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗