Linux kernel crypto API
Linux kernel interface for cryptography
Crypto API is a cryptography framework in the Linux kernel, for various parts of the kernel that deal with cryptography, such as IPsec and dm-crypt. It was introduced in kernel version 2.5.45 and has since expanded to include essentially all popular block ciphers and hash functions.
01Userspace interfaces
Many platforms that provide hardware acceleration of AES encryption expose this to programs through an extension of the instruction set architecture (ISA) of the various chipsets (e.g. AES instruction set for x86). With this sort of implementation, any program (kernel-mode or user-space) may utilize these features directly. Some platforms, such as the ARM Kirkwood SheevaPlug and AMD Geode processors, however, are not implemented as ISA extensions, and are only accessible through kernel-mode drivers. In order for user-mode applications that utilize encryption, such as wolfSSL, OpenSSL or GnuTLS, to take advantage of such acceleration, they must interface with the kernel.
- AF_ALG
- A netlink-based interface that adds an AF_ALG address family; it was merged into version 2.6.38 of the Linux kernel mainline. There was once a plugin to OpenSSL to support AF_ALG, which has been submitted for merging. In version 1.1.0, OpenSSL landed another patch for AF_ALG contributed by Intel. wolfSSL can make use of AF_ALG and cryptodev
- cryptodev
- The OpenBSD Cryptographic Framework /dev/crypto interface of OpenBSD was ported to Linux, but never merged.
Sources and credits
This article is adapted from the Wikipedia article “Linux kernel crypto API”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.