Re: [PATCH] fscrypt: don't use hardware offload Crypto API drivers

Theodore Ts'o
2025-06-25T17:36:43Z

On Tue, Jun 24, 2025 at 11:32:52PM -0700, Eric Biggers wrote:
>
> That was the synchronous throughput. However, submitting multiple requests
> asynchronously (which again, fscrypt doesn't actually do) barely helps.
> Apparently the STM32 crypto engine has only one hardware queue.
>
> I already strongly suspected that these non-inline crypto engines
> aren't worth using. But I didn't realize they are quite this bad.
> Even with AES on a Cortex-A7 CPU that lacks AES instructions, the
> CPU is much faster!

I wonder if the primary design goal of the STM32 crypto engine is that
it might reduce power consumption --- after all, one of the primary
benchmarketing metrics that vendors care about is "hours of You Tube
watch time" --- and decryptoing a video stream doesn't require high
performance.

Given that the typical benchmarketing number which handset vendors
tend to care about is SQLite transactions per second, maybe they
wouldn't be all that eager to use the crypto engine. :-)

- Ted