Hacker News new | ask | show | jobs
by nwallin 37 days ago
I like the idea of keeping stuff out of the kernel as much as possible, but in this case, there are good reasons why cryptography has to live in the kernel.

We need on disk encryption, and we need to be able boot from an encrypted disk. So we need encryption for that.

We need network filesystems, and we need the traffic over the network to be encrypted. So we need encryption.

IPsec, for better or for worse, is authenticated and partially encrypted at the transport layer, so if we want a linux machine to speak IPsec, we need encryption.

Fixing/changing this would require a huge restructuring of the kernel; it would basically require switching to a microkernel. Given the fact that nobody's ever written a microkernel that doesn't completely suck ass, I don't know that it would be worth the effort.

2 comments

What about having a way to run the same crypto code but in userspace? Or perhaps turn it into a library that can be used from userspace.
For encrypted disks, you've now got high-performance data shuffling between userspace and kernel space - a massive new attack surface
Sure. But it would probably still be a good thing if the kernel maintainers could tear out AF_ALG.