[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251106195142.GB3318@quark>
Date: Thu, 6 Nov 2025 11:51:42 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: Harald Freudenberger <freude@...ux.ibm.com>
Cc: linux-crypto@...r.kernel.org, David Howells <dhowells@...hat.com>,
Ard Biesheuvel <ardb@...nel.org>,
"Jason A . Donenfeld" <Jason@...c4.com>,
Holger Dengler <dengler@...ux.ibm.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
linux-arm-kernel@...ts.infradead.org, linux-s390@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 00/15] SHA-3 library
On Thu, Nov 06, 2025 at 09:54:59AM +0100, Harald Freudenberger wrote:
> > Also, I'm wondering what your plan to add support for these instructions
> > to QEMU is? The status quo, where only people with an s390 mainframe
> > can test this code, isn't sustainable.
> >
> > I already have s390 in my testing matrix; I run the crypto and CRC tests
> > on all architectures with optimized crypto or CRC code. But most of the
> > s390 optimized crypto code isn't actually being executed.
> >
> > - Eric
>
> Well, there are no plans. However, there has been a decision some while ago
> that "we" may support this in the future. But as there are currently no
> human resources available and working there I suspect a qemu CPACF support
> in general will not come soon.
Great to hear that you might have someone work on this in the future.
It should be noted that this is a significant gap that puts s390 behind
all the major architectures (x86_64, arm64, arm32, riscv, etc.) and
makes it much more likely that s390 specific bugs be introduced.
We need to have higher standards for cryptography code.
As I've mentioned before, I don't plan to accept code that uses new
instructions without QEMU support. The SHA-{1,2,3} code is allowed only
because the instructions were already being used by arch/s390/crypto/.
I see that Jason actually added support for CPACF_*_SHA_512 to QEMU a
few years ago
(https://github.com/qemu/qemu/commit/9f17bfdab422887807cbd5260ed6b0b6e54ddb33).
So clearly it's possible to support these instructions in QEMU.
Someone just needs to add support for the other SHA algorithms.
> Please note also that this is really an implementation of crypto
> algorithms then and as such it needs to apply to some regulations with
> regards of the EAR of the US Bureau of Industry and Security...
Like Linux, QEMU is an open source project, published publicly, and
which already contains many cryptographic algorithms. Check out
https://www.linuxfoundation.org/resources/publications/understanding-us-export-controls-with-open-source-projects
- Eric
Powered by blists - more mailing lists