Crypto API (Linux)

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[1] 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 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;[2] it was merged into version 2.6.38 of the Linux kernel mainline.[3][4] There was once a plugin to OpenSSL to support AF_ALG,[5] which has been submitted for merging.[6] In version 1.1.0, OpenSSL landed another patch for AF_ALG contributed by Intel.[7] wolfSSL can make use of AF_ALG and cryptodev[8]
cryptodev
The OpenBSD Cryptographic Framework /dev/crypto interface of OpenBSD was ported to Linux,[9][10][11] but never merged.
gollark: Wait, he said it *wasn't* good, oh dear.
gollark: I just implemented bubble sort, since I heard Obama saying it was good.
gollark: But working out things like "how is this styled" and "is this done idiomatically by someone who knows the language well" can require even deeper knowledge than just working out the algorithm.
gollark: If you're writing a thing you probably have a decent idea of the problem domain involved and what's going on, and just have to work out how to express that in code.
gollark: What I'm saying is that reading things and understanding them can be harder than writing them sometimes.

See also

References

  1. "Kernel development". LWN.net. 2002. Retrieved 2013-09-29.
  2. Edge, Jake (October 20, 2010). "A netlink-based user-space crypto API". LWN.net. Retrieved 29 December 2011.
  3. Linux_2_6_38 changes
  4. 03c8efc Archived 2013-04-15 at Archive.today fe869cd Archived 2013-04-15 at Archive.today 8ff5909 Archived 2013-04-15 at Archive.today
  5. Markus (2011-10-22). "OpenSSL - AF_ALG". Archived from the original on 28 September 2011. Retrieved 29 December 2011.
  6. Markus <nepenthesdev at gmail.com> (2011-07-03). "#2554: Patch: AF_ALG dynamic engine for linux >= 2.6.38". OpenSSL. Retrieved 29 December 2011.CS1 maint: extra punctuation (link) CS1 maint: multiple names: authors list (link)
  7. clucey (2016-02-17). "ALG: Add AFALG engine". OpenSSL. Retrieved 31 August 2016.
  8. Jacob (19 December 2018). "AF_ALG + Cryptodev-linux". Retrieved 10 March 2020.
  9. Ludvig, Michal. "CryptoDev for Linux". Retrieved 29 December 2011.
  10. Mavrogiannopoulos, Nikos. "cryptodev-linux". Archived from the original on 20 March 2012. Retrieved 12 January 2012.
  11. Edge, Jake (August 25, 2010). "An API for user-space access to kernel cryptography". LWN.net. Retrieved 29 December 2011.


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.