Skip to content

Fallback Crypto

os-fallbackcrypto · Protection

Chooses which of the kernel's crypto drivers encrypts the IPsec tunnels the host carries itself - the ones a Sophos XGS's coprocessor does not take.

In the menu

  • With os-xgs-npu installed: XGS: Fallback Crypto
  • Without os-xgs-npu: VPN: IPsec: Fallback Crypto
Fallback Crypto in the web GUI
Its page in the web GUI.

Three choices: aesni only, what OPNsense ships; ossl beside aesni, with ossl(4), the kernel's OpenSSL-based driver, loaded now and early in every boot, before any tunnel exists, so new SAs are shared between the two; or ossl only, with aesni switched off at the loader through OPNsense's own Tunables, so from the next boot every session is ossl's.

ossl carries OpenSSL's own AES-GCM: the wide code with AVX-512 and VAES, and the stitched AES-NI/GHASH code with AVX, PCLMULQDQ and MOVBE. The XGS 3300's host, an AMD Ryzen Embedded V1780B, has no AVX-512, so ossl would take the second. Whether ossl is faster than aesni on these hosts is not measured yet.

On any XGS the coprocessor encrypts the SAs it has taken, whatever is chosen here; this changes only the ones left to the host. On the XGS 136, where os-xgs-npu holds IPsec to software providers, the two agree: ossl is a software provider, and this plugin's early boot hook runs before os-xgs-npu's.

Features

  • Three choices

    aesni only, ossl beside aesni, or ossl only.

  • Loaded before any tunnel

    ossl is loaded at once and early in every boot, before any tunnel exists.

  • aesni off through Tunables

    hint.aesni.0.disabled=1 is written through OPNsense's own Tunables, so it is visible in System: Settings: Tunables.

  • Processor features

    The host's processor, the features AES-GCM depends on, and which AES-GCM code ossl takes there.

  • Providers and SAs

    The crypto providers present, whether IPsec is held to software providers, and the SAs in the kernel with their algorithms.

  • Next boot

    What the next boot will run, and whether a reboot is still needed for the rest.

Install and update

From os-xgs-npu's release after 0.1.0-alpha.7.1, XGS: Updates lists it on its Plugins tab - an installed copy is updated there by hand, and a missing one installed there - and the ready-made images built from that release carry it; until then it is installed and updated as below. No cron entry runs the update. To install it on an XGS appliance or on any other OPNsense, as root: from a checkout of the repository with sh install/install.sh, which puts the page under XGS with os-xgs-npu and under VPN: IPsec without it, and keeps the settings when run again; or from the release's package, os-fallbackcrypto-1.0.0.pkg, checked against SHA256SUMS and added with pkg. A copy installed this way is updated by its own self-update.py. Nothing changes until a provider is chosen and applied. Before removing it, set it back to aesni only and apply, or remove hint.aesni.0.disabled from System: Settings: Tunables afterwards. It is not in the OPNsense plugin repository.

Limits, and what is not tested yet

  • Applying a choice from the page (apply.php, which loads ossl and writes the tunable).
  • A tunnel on ossl, and aesni switched off.
  • The throughput of either provider: whether ossl is faster than aesni is not measured.
  • The package, built by tools/make-package.sh and added with pkg.
  • An install on OPNsense without os-xgs-npu.
  • An update through the Plugins tab or self-update.py: 1.0.0 is the first release, so none has been ahead of an installed copy.

Repository

First release: 2026-10-25

os-fallbackcrypto Releases

Discussion

The discussion of this page is held in the project's GitHub Discussions. Showing it here loads giscus from giscus.app and GitHub, and writing in it needs a GitHub account - what that means.