04 Dec 2026

feedPlanet Debian

Matthew Garrett: What do we do with keys?

This week the NSA released a statement that has been variously interpreted as "All cryptography is broken", "Everything is fine", or "It depends". I am not a cryptographer, and nothing that I'm going to say here should be relied upon in any way, and if you want to ask questions about cryptography then you should be talking to someone qualified and not me. Anyway.

Let's concentrate on what the NSA release does say.

Record which algorithms each system uses for key establishment, signatures,and certificates, particularly checking for algorithms not approved in CNSA 2.0 or CNSA 1.0 (e.g., DSA, elliptic curves other than P-384 or P-521 for ECDH or ECDSA, EdDSA, deprecated Diffie-Hellman groups, pairing-based cryptography).

CNSA is the "Commercial National Security Algorithm Suite", a list of algorithms and parameters that the NSA recommends. That doesn't inherently mean that the algorithm is insecure - the NSA typically only recommends one algorithm in any broad family, so having the NIST ECDH elliptic curves and not having ed25519 isn't any sort of statement on the NSA's part that ed25519 is insecure as such. But there's a slight weirdness here. CNSA 1.0 includes ECDH with P-384 or stronger, and so flagging ECDH with a weaker key makes sense. But CNSA 1.0 also includes RSA with 3072 bits or more, and there's no mention of "RSA with keys weaker than 3072 bits". This seems… odd.

We do get a mention of RSA, though. In section 3, the NSA say

Verify the use of RSA 3K³ or P-384 as the base size for roots when updating infrastructure.

where footnote 3 is

2K may be required for legacy support in certain instances.

What can we conclude from this? First, while the overall recommendation is to move to modern algorithms like ML-DSA, P-384 and RSA-3072 are still considered adequate for now. That's consistent with them being in CNSA 1.0, which has not been updated based on whatever the current threat is. And second, RSA-2048 is apparently considered acceptable if required for backwards compatibility. This is where things start getting interesting.

NIST defines the security level of a key in terms of the number of bits of security (which is, importantly, different from the bit length of the private key). Table 4 on page 48 of this document shows the current estimates of the number of bits of security for various algorithms. 128 bits of security is generally considered the minimum appropriate, and that corresponds to either RSA-3072 or P-256. In other words, in the absence of any identified weaknesses, P-256 has been considered about as secure as RSA-3072. So, if RSA-2048 is still ok for backwards compatibility, why is P-256 not also considered secure enough?

There's two obvious interpretations of this. The first is that the NSA doesn't want to encourage the use of anything weaker than they absolutely have to. RSA-2048 may be required because there's deployed code that can't handle anything else. In this universe, P-256 isn't listed because the NSA aren't aware of any code that supports P-256 but not P-384, so there's no reason to special case it.

The other obvious interpretation, of course, is that P-256 is suddenly somewhere on the scale between "Weaker than RSA-2048" or "Proper fucked", and this interpretation is backed up by Chrome and Mozilla have both announced movement away from using or trusting P-256, with Chrome's timeline for revoking trust in P-256 certs effectively meaning that CAs need to be using P-384 intermediates and roots by the end of next week, otherwise certificates they issue will still be valid at the point that Chrome stops trusting them. That's a strong indication that there's something up here. But it still doesn't answer the "Is P-256 proper fucked" question, and Chrome's indication that they'll continue trusting P-256 leaf certificates doesn't really help us there.

Compromising an intermediate means you can sign certificates for any domain, so it's important that they be secure (the eMudhra private key fuckup is a demonstration of what happens if they're not). Compromising a leaf only lets you pretend to be the site (or sites) that leaf certificate was issued to, and that's a reasonable local policy decision rather than one that has to be handled by CAs. The combination of these things does let us make some guesses. Chrome will distrust P-256 intermediates but continues to trust RSA-2048 intermediates. That's an indication that there's reason to believe P-256 is now weaker than RSA-2048. And Chrome continues to trust P-256 for leaf certificates while not trusting RSA-1024, so maybe that's a lower bound? It's almost certainly above "$5 on EC2" levels of security, but there's still a huge gulf of uncertainty there.

What about other algorithms? EdDSA was listed as one of the types of keys to flag, and maybe that's simply because it's not in the CNSA, but RSA-2048 isn't in the CNSA and wasn't listed there. If we make the assumption that P-256 is now known to be weak, every algorithm other than EdDSA in the list is known to be weak. So maybe we should be assuming EdDSA is also affected by whatever's giving us P-256 headaches, and moving away from ed25519 keys in SSH is a good plan? We don't know for sure, but if this is a weakness that affects elliptic curve algorithms in general rather than being specific to the NIST curves, it's reasonable to suspect that ed25519 is weakened to the same degree as P-256.

So, all we really know right now is P-256 is probably bad, but not how bad. ed25519 may also be bad, and if so it's probably a reasonable assumption that secp256k1 is bad (this is probably not good for bitcoin), and maybe just get away from 256-bit EC everywhere. That might be P-384. It might be RSA-3072 or higher. But if you're going to transition anyway, you should probably be doing the work to get ML-DSA supported so you don't need to go through all of this again in a few years, which means ensuring all your services support modern algorithms, all your certificate infrastructure can issue them, and everything that's consuming them works properly.

At least, that's fine for software. What do we do with cases where we don't have that flexibility? I've given a bunch of talks in the past about making use of TPMs to store private key material associated with a certificate that proves a device's identity. Most TPM's older than a couple of years only support RSA-2048 and P-256. Using RSA-2048 instead of P-256 is possible, but RSA signing is much slower than P-256 signing, and if every mTLS request is going through the TPM then that's a problem. But if breaking P-256 is now possible but expensive, maybe I don't care? The cost to extract a private key from a TPM is probably on the order of a small number of 10s of thousands of dollars at most, and as long as it costs more than that to break P-256 then I'm probably still safer keeping my weak keys in hardware than I am having strong keys on disk. Unfortunately I have no idea whatsoever how much it costs, and so I'm not able to figure that out.

There's going to be a whole lot of other cases along the same lines. Migration comes with costs. Sometimes those costs are "just" engineer time and energy. Sometimes they're the cost of replacing hardware that doesn't support stronger algorithms. Almost nobody is currently in a position to judge whether those costs are worth it given the threats they face.

And given the hype around Anthropic having broken ML-DSA and then it turning out that required an entirely implausible attack, it's understandable if people feel that the lack of information anyone's providing here means it's not worth doing anything at the moment. For what it's worth, the vibe I'm getting from cryptographers is extremely different between these two cases. I think there's strong reason to believe that P-256 is weak to a degree that matters, and unless you're dealing with weird constraints that prevent using anything else you should get on that.

But, again, I'm not a cryptographer. If you have questions, you should probably be paying one of them.

04 Dec 2026 7:42pm GMT

Jonathan Carter: My SSH Hardening Config on Debian

How SSH is vulnerable to post-quantum era attacks

If you're anything like me, then you probably rely on SSH a lot.

If you've recently (since OpenSSH 10.1, circa 2022) logged into an older host or a host that only supports algorithms that may soon be broken by quantum computing, you may have seen this message:

** WARNING: connection is not using a post-quantum key exchange algorithm.
** This session may be vulnerable to "store now, decrypt later" attacks.
** The server may need to be upgraded. See https://openssh.com/pq.html

That OpenSSH page provides some really useful information on why this matters. In short, Quantum computers may soon be able to infer a private key based on a public key, since the classical RSA / elliptic curve algorithms are especially prone to the algorithms like Shor's Algorithm.

The horizon for the time that quantum computers are able to smash through certain types of private keys seem to creep ever closer, and because of that, bad actors are storing any encrypted data they can find, in order to decrypt it later.

This could include anything that you have communicated over a protected link. Documents, passwords, other private keys, etc.

Are things about to escalate?

I don't have a crystal ball, but I don't think there's any reason to panic. Earlier this week, the NSA published an advisory to transition to post-quantum cryptography, citing AI as another potential threat. Although, it seems like there's nothing really in either the AI world or the quantum computing world that actually poses any significant threat right now. I came across this Emerald Book article which does a good job of explaining the current situation.

Better to deal with this now, than later

It seems easy enough to protect against harvest-now-decrypt-later attacks, so one might as well.

I checked my SSH server using a web utility called sshaudit.com - I have a fairly vanilla SSH config, with no additional config that should weaken my security. So I was a bit surprised when I got a big red F as a result:

Some of the reasoning behind it's score:

I would take those NIST P-curve penalties with a pinch of salt, since Anthropic did find seeds for those curves, which ended up being simple Unix time-stamps. It seems a little less unlikely that the NSA was involved in choosing a seed or planting a back-door.

For my personal machines, I don't care too much for extreme backward compatibility. I tend to use the latest Debian release (or unstable) and SSH into similar machines, so I added an SSH config that strips away most of the gunk.

Before making any changes to YOUR ssh config. Be sure to make backups, and especially if it's a remote machine, that you have some way to get back in if you lock yourself out (rescue mode, remote KVM, temporary ssh reverse tunnel, etc). This isn't any kind of official Debian advice, but it's a Works For Me™ config, so please engage your own brain. You might especially have to add another host authentication algorithm, if your keys for authenticating against that host aren't all ed25519 yet.

I created a file on my ssh host called /etc/ssh/sshd_config.d/00-hardening.conf:

# Use Ed25519 only: 
HostKeyAlgorithms ssh-ed25519

# Use hybrid post-quantum key exchange algorithms:
KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com

# Use 128-bit-or-better tags and encrypt-then-MAC:
MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com

On my hetzner nodes deployed with their Debian image, I found that the following line wasn't present in /etc/ssh/sshd_config, so I had to add it:

Include /etc/ssh/sshd_config.d/*.conf

I restarted sshd, et voila, a big green A:

It deducts 5 points since I have chacha20-poly1305 enabled, which had some risks associated with it that's already been fixed in Debian ages ago (Terrapin / CVE-2023-48795 / BTS#1059004), so I'm not going to remove it just to appease some online tool.

What about my website or app?

So that's SSH, you might also be wondering about websites and apps that use TLS.

There's also a website called "Is my website post-quantum?" where you can enter your domain name for a quick analysis.

Modern browsers and TLS implementations are increasingly adopting ML-KEM for hybrid post-quantum key exchange, which prevents current known harvest-now-decrypt-later attacks.

I wrote this while struggling with the flu for more than a week, so if you find anything that looks like a hideous typo or nonsense, please let me know and I'll fix it!

04 Dec 2026 6:32pm GMT

Kentaro Hayashi: dh-bazel has been accepted into the Debian archive

Introduction

dh-bazel, a debhelper buildsystem for packaging software that uses Bazel, has been accepted into the Debian archive. Version 0.10.1 is now available in Debian unstable.

With dh-bazel now available in unstable, I can update Mozc's Debian packaging to use it for the Bazel build.

I have been developing dh-bazel for several months as part of my effort to package newer versions of Mozc with Bazel. The project has gone through several iterations since the initial prototype. Before the first upload, I asked the Debian Bazel community for feedback on the mailing list; see the November 2026 archive. I wrote about the early work and later improvements in these posts:

Building Mozc with dh-bazel, buildsystem support for debhelper - ひとりしずかに。

Building with dh-bazel, buildsystem support for debhelper experiment updates - ひとりしずかに。

What dh-bazel does

Debian package builds commonly use debhelper commands. dh-bazel adds Bazel support to that workflow, allowing dh_auto_build to run Bazel during a package build.

The package rules do not need to invoke bazel directly. They use the standard dh_auto_build interface, and dh-bazel takes care of running Bazel as part of the debhelper workflow.

Bazel projects declare external dependencies as modules, which are usually fetched from the Bazel Central Registry (BCR). For Debian packaging, dh-bazel can redirect these dependencies to modules packaged by Debian or to adapters bundled with dh-bazel. An adapter tells Bazel to use a Debian system library for a dependency. This helps build packages without downloading those dependencies from the BCR.

For example, add the following to debian/rules to select the Bazel buildsystem and build a target:

#!/usr/bin/make -f

%:
    dh $@ --buildsystem=bazel

override_dh_auto_build:
    dh_auto_build -- //:hello

//:hello is an example Bazel target label; replace it with a target from the project being packaged. dh-bazel provides a common interface for this integration, so each Debian package does not need to implement the same build logic from scratch.

Limitations

dh-bazel cannot resolve every Bazel dependency automatically. It detects modules installed by Debian packages and bundled adapters that include a MODULE.bazel file. but it is not good enough.

For these cases, package maintainers may need to configure DH_BAZEL_OVERRIDE_MODULES to select an adapter, or DH_BAZEL_PKGCONF_MODULES to resolve a module to Debian system libraries through pkgconf.

dh-bazel handles the build step, but does not install the resulting files into the Debian package. Maintainers must still list the build artifacts to install, for example in debian/*.install.

Installing dh-bazel

Version 0.10.1 is available in Debian unstable. The package is maintained by the Debian Bazel Team, and its initial upload closed intent-to-package (ITP) bug #1154961.

On a Debian unstable system, install it with:

sudo apt install dh-bazel

See the Debian Package Tracker and the Salsa repository for package details and source code.

Conclusion

Getting dh-bazel into the archive is a milestone in my effort to package Mozc with Bazel. I hope it will also help others packaging Bazel-based software for Debian.

However, I have realized that demand for dh-bazel is still limited, so I will move it into maintenance mode. I will continue developing features needed for Mozc packaging; outside that work, I will focus on bug fixes and necessary updates.

04 Dec 2026 11:23am GMT