PADLOCK(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… PADLOCK(4) β€” the kernel interfaces manual, but make it cute πŸŽ€

okay bestie so this is PADLOCK(4), part of the Kernel Interfaces Manual, and it's literally the page about the padlock driver β€” the one that does cryptographic stuff and RNG inside VIA C3, C7 and Eden processors. yes it's a niche processor family, no I will not be apologizing, it ate and left no crumbs πŸ¦‹


✨ NAME ✨

padlock β€” the driver for the cryptographic functions and RNG in VIA C3, C7 and Eden processors πŸ’–

✨ SYNOPSIS ✨

so to get this driver built into the kernel, you drop these lines into your kernel configuration file:

device crypto
device padlock

or, alternate route, if you wanna load the driver as a module at boot time instead, put this line in loader.conf(5):

padlock_load="YES"

pick your lane, both are valid, both slay 🫢


🌸 DESCRIPTION 🌸

okay so here's the tea β˜• β€” the C3 and Eden processor series from VIA include hardware acceleration for AES. then the C7 series comes in and includes hardware acceleration for AES, SHA1, SHA256 and RSA. and all of the above processor series include a hardware random number generator. every single one. love that for them πŸ‘‘

the padlock driver registers itself to accelerate AES operations and, if available, HMAC/SHA1 and HMAC/SHA256 for crypto(4). it also registers itself to accelerate other HMAC algorithms β€” even though there is no hardware acceleration for those algorithms. and why, you ask? because it's only needed so that padlock can work with ipsec(4). that's the whole reason. iconic honestly πŸ’…

and the hardware random number generator? it supplies data for the kernel random(4) subsystem. it's giving main character energy in the entropy department 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

go read them, iykyk πŸ“š


⭐ HISTORY ⭐

the padlock driver first appeared in OpenBSD. and the first FreeBSD release to include it was FreeBSD 6.0. a little crossover moment, we love to see it ✨


πŸ’œ AUTHORS πŸ’œ

  • the padlock driver with AES encryption support was written by Jason Wright <jason@OpenBSD.org> 🌸
  • it was ported to FreeBSD and then extended to support SHA1 and SHA256 by Pawel Jakub Dawidek <pjd@FreeBSD.org> πŸ”₯
  • and this manual page was written by Christian Brueffer <brueffer@FreeBSD.org> πŸŽ€

ngl, none of this is dangerous, it's just hardware crypto. but like β€” respect the hardware RNG, it's doing the work 😀

and that's the whole page bestie, no cap πŸ’€

from the Debian edition, dated July 29, 2020 β€” mwah, take care of your AES acceleration, ily πŸ«ΆπŸ’–πŸ§š

πŸ“¦ where this page comes from