SONiC (https://sonicfoundation.dev/, https://github.com/sonic-net/SONiC), the open source operating system built for switches, is built on Debian and relies on OpenSSL throughout: OpenSSH, curl, Python, net-snmp, redis, systemd, and wpa_supplicant. Recent posts on this blog looked at taking OpenSSL out of Yocto and OpenWrt. SONiC is a natural next target, and there are two ways to bring wolfSSL into it.
Path 1: The fast path to FIPS 140-3 with wolfProvider
SONiC already has a mechanism for swapping its cryptography. The INCLUDE_FIPS build option replaces the stock OpenSSL-related packages and adds a FIPS provider for OpenSSL 3, which today is SymCrypt-OpenSSL.
wolfProvider fits the same slot. It is an OpenSSL provider backed by wolfCrypt FIPS, our FIPS 140-3 validated module. Applications don’t even need to be rebuilt. wolfProvider ships Debian packaging, and its “replace default” mode makes it OpenSSL’s default provider without any edits to openssl.cnf. For a SONiC distributor who needs FIPS, this is as close to a drop-in replacement as it’s going to get. What it doesn’t do is save memory, because OpenSSL is still loaded.
Path 2: The memory path, ripping and replacing OpenSSL
Linking applications directly against wolfSSL removes OpenSSL from their address space entirely. On OpenWrt, uclient-fetch peaked at about 41 to 44 KiB with wolfSSL and 556 to 558 KiB with OpenSSL. The difference is stark!
On a switch, this matters most for daemons that run many times. SONiC starts one wpa_supplicant for every MACsec-enabled port, so any per-process saving is multiplied by the port count. SONiC’s own wpa_supplicant fork already contains hostap’s wolfSSL backend. Switching it over is a build configuration change, not a port.
Using both
Use wolfProvider for the long tail of packages tied to OpenSSL, and link the high-volume daemons directly against wolfSSL. Both run wolfCrypt FIPS underneath, so the image has only one cryptographic module to manage. Customers on our Full LInux FIPS Experience are very familiar with this concept.
We will measure a SONiC virtual switch image with a wolfSSL-backed wpa_supplicant next if you desire. If you are building on SONiC and need FIPS 140-3, a smaller footprint, or both, contact us at facts@wolfssl.com or +1 425 245 8247.
Download wolfSSL Now

