Re: AF_ALG deprecation fallout

Richard Weinberger <[email protected]> Sun, 26 Jul 2026 13:12:32 +0200
Newsgroups org.kernel.vger.linux-crypto
Message-ID <4065668.hXSD6JRtRq@nailgun>
On Mittwoch, 8. Juli 2026 03:11 Eric Biggers wrote:
> Note that cryptsetup 2.8.7 will further reduce the cases in which it
> even needs AF_ALG at all.  So just because you are using a particular
> algorithm doesn't necessarily mean you need it in AF_ALG.
> 
> No algorithms have been proposed to be dropped from dm-crypt (which is
> *not* the same thing as AF_ALG), by the way.  Given that dm-crypt allows
> some "interesting" algorithms like RC4, DES-ECB, and even the null
> cipher, I do think we can expect an allowlist for it at some point as
> well.  But that would be separate.
> 
> I'd indeed like to remove AF_ALG entirely eventually.  But that's a long
> term thing that would be many years from now and would occur only after
> iwd, bluez, cryptsetup etc. have all fully migrated to userspace crypto.

Since I got already mails from alerted clients, I'd like to highlight
one particular use case on (deeply) embedded systems and make sure
this use case is known.

On systems with very little space, like a few megabytes of flash,
utilizing dm-crypt with LUKS can be a challenge. Adding a crypto
library to userspace (e.g. initramfs) is a huge burden.

cryptsetup's --with-crypto_backend=kernel helps a lot here.
So, by completely removing AF_ALG these systems would unnecessarily
suffer. Please keep both AF_ALG and --with-crypto_backend=kernel around.

Thanks,
//richard