Jump to content

Crypto API (Linux)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Scientus (talk | contribs) at 07:15, 28 January 2012 (Userspace interfaces). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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.4.12[citation needed] and has since expanded to include essentially all popular block ciphers and hash functions.

Userspace interfaces

Many platforms that provide hardware acceleration of AES encryption expose this to programs through an extention of the instruction set architecture (ISA) of the various chipset. (e.g. AES instruction set for x86) With this sort of implamentation 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 implamented as ISA extentions, and are only accessable through kernel-mode drivers. In order for user-mode applications that utilize encryption such 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 interface family,[1] was merged in 2.6.38.[2][3] There is a plugin to OpenSSL to support AF_ALG,[4] which has been submitted for merging.[5]

cryptodev

The /dev/crypto interface of OpenBSD was ported to Linux[6][7][8], but never merged.

References

  1. ^ Edge, Jake (October 20, 2010). "A netlink-based user-space crypto API". LWN.net. Retrieved 29 December 2011.
  2. ^ Linux_2_6_38 changes
  3. ^ 03c8efc fe869cd 8ff5909
  4. ^ "OpenSSL - AF_ALG". 2011-10-22 at 10:34. Retrieved 29 December 2011. {{cite web}}: |first= missing |last= (help); Check date values in: |date= (help)
  5. ^ "#2554: Patch: AF_ALG dynamic engine for linux >= 2.6.38". OpenSSL. Sun Jul 03 21:24:59 2011. Retrieved 29 December 2011. {{cite web}}: |first= missing |last= (help); Check date values in: |date= (help)
  6. ^ Ludvig, Michal. "CryptoDev for Linux". Retrieved 29 December 2011.
  7. ^ Mavrogiannopoulos, Nikos. "cryptodev-linux". Retrieved 12 January 2012.
  8. ^ Edge, Jake (August 25, 2010). "An API for user-space access to kernel cryptography". LWN.net. Retrieved 29 December 2011.

See also