lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260131073636.65494-1-mcaju95@gmail.com>
Date: Sat, 31 Jan 2026 09:36:36 +0200
From: Mihai-Drosi Câju <mcaju95@...il.com>
To: linux@...ssschuh.net
Cc: arnd@...db.de,
	arnout@...t.net,
	atomlin@...mlin.com,
	bigeasy@...utronix.de,
	chleroy@...nel.org,
	christian@...sel.eu,
	corbet@....net,
	coxu@...hat.com,
	da.gomez@...nel.org,
	da.gomez@...sung.com,
	dmitry.kasatkin@...il.com,
	eric.snowberg@...cle.com,
	f.gruenbichler@...xmox.com,
	jmorris@...ei.org,
	kpcyrd@...hlinux.org,
	linux-arch@...r.kernel.org,
	linux-doc@...r.kernel.org,
	linux-integrity@...r.kernel.org,
	linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-modules@...r.kernel.org,
	linux-security-module@...r.kernel.org,
	linuxppc-dev@...ts.ozlabs.org,
	lkp@...el.com,
	maddy@...ux.ibm.com,
	mattia@...reri.org,
	mcaju95@...il.com,
	mcgrof@...nel.org,
	mpe@...erman.id.au,
	nathan@...nel.org,
	naveen@...nel.org,
	nicolas.bouchinet@....cyber.gouv.fr,
	nicolas.schier@...ux.dev,
	npiggin@...il.com,
	nsc@...nel.org,
	paul@...l-moore.com,
	petr.pavlu@...e.com,
	roberto.sassu@...wei.com,
	samitolvanen@...gle.com,
	serge@...lyn.com,
	xiujianfeng@...wei.com,
	zohar@...ux.ibm.com
Subject: Re: [PATCH v4 00/17] module: Introduce hash-based integrity checking

> The current signature-based module integrity checking has some drawbacks
in combination with reproducible builds. Either the module signing key
is generated at build time, which makes the build unreproducible, or a
static signing key is used, which precludes rebuilds by third parties
and makes the whole build and packaging process much more complicated.

I think there is a middle ground where the module signing key is generated
using a key derivation function that has as an input a deterministic value
on the build host, such as /etc/machine-id . The problem with this approach
is that only hosts knowing the value will be able to reproduce the build.

Maybe this is a solution to NixOS secret management? Introduce minimal
impurity as a cryptographic seed and derive the rest of the secrets using
something like Argon2(seed, key_uuid).

There might be another approach to code integrity rather than step-by-step
reproducibility. One may exploit the very cryptographic primitives that make
reproducibility hard to ensure that reproducibility is most  likely valid.

For example, the module signing issue, the build host publishes four artifacts:
* The source-code
* The compiled and signed binary
* The build environment
* Its public key

Now, we don't need to sign with the private key to know that building the source
code using the specific build environment and signing the result with the private
key will result in the claimed binary. We can just compile and verify with the
public key.

So a traditional workflow would be:
compiled_module + module_signature == module

In this case we build the module, sign it with whatever key, distribute the
builds and the private key to whoever wants to reproduce the build. Or we build
locally and the key stays with the end-user.

While the cryptographic approach would be:
verify(compiled_code, module.signature) is True

In this case we distribute the builds, source code and the public key. While
everyone can ensure that the compiled code is the result of the build
environment and source code. The signature is verified using cryptographic
means.

As long as no one cracks RSA or an algorithm of our choosing/has an absurd
amount of luck, the cryptographic approach would be just as good as the traditional
approach at ensuring that a program has stopped with a certain output.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ