Virtual file for AES/SHA1 kernel side computing
1645 Репутация автора
Is there a file (in /dev perhaps) that allows me to compute AES or SHA1 on data? There are analogs like
/dev/urandom /dev/zero etc.
It would work like this: open said file, write data to it and read results out of it. Using
sendfile syscall would be useful here as well, copying data directly within kernel space.
158047 Репутация автора
Not as a device node. There is an interface to the kernel CryptoAPI, but it's through netlink (AF_ALG). More information is available in the Linux kernel documentation.
However, it is rarely useful unless you have a hardware crypto accelerator which is only available from the kernel. The overhead of system calls will often make this interface much slower than performing crypto operations directly in your process.Автор: duskwuff Размещён: 18.07.2016 04:24