At SafeLogic, we are committed to partnering with customers to deliver secure, validated cryptographic modules that meet FIPS 140-3 requirements. In this article, we’ll showcase a recent project involving the implementation of CryptoComply Go into WireGuard Go.
WireGuard is a modern VPN designed around simplicity, speed, and security; WireGuard Go is an implementation of this protocol written in Go. The original WireGuard, written in C, is a kernel space module, which introduces certain limitations:
Enter WireGuard Go which is written to work in the user space, providing easier integration, better management, and improved portability.
Under the hood, WireGuard utilizes the following:
Any reader who is already familiar with these cryptographic primitives will recognize that they are popular for their efficiency, speed, and security; these exact qualities make these primitives ideal for a modern VPN solution such as WireGuard. However, the drawback to all these cryptographic primitives is that they are not validated for FIPS 140-3. This presents a unique challenge to organizations that already utilize WireGuard but have intentions of deploying to a regulated environment.
To modify WireGuard to meet FIPS 140-3 compliance, the following had to occur:
Let’s start with replacing the cryptographic primitives. As previously mentioned, we have four primitives that need to be swapped to ensure compliance:
But changing the cryptographic primitives in WireGuard’s source code is not enough to satisfy our requirement. These primitives need to come from a certified source: enter CryptoComply Go. CryptoComply Go is SafeLogic’s FIPS 140-3 validated cryptographic module, designed specifically for Go applications. Oh, and would you look at that, WireGuard is a Go application! With CryptoComply Go’s drop-in compatibility, we can ensure the changes implemented in the previous step utilize a validated source, enabling WireGuard to meet FIPS compliance standards.
Unlike JVM’s pluggable JCE providers, Go’s standard library has no provider layer, meaning providers cannot be swapped at runtime or configuration. CryptoComply Go works by providing an alternative Go build that offers FIPS 140-3 approved cryptographic primitives to the library, allowing applications, such as WireGuard Go, to be rebuilt against this new provider.
By bringing CryptoComply Go into WireGuard Go, SafeLogic is able to close the gap between a modern, high-performance VPN and the strict requirements of FIPS 140-3. Swapping WireGuard’s default primitives for approved alternatives and rebuilding against a validated Go toolchain, CryptoComply Go, the protocol’s simplicity and speed are preserved while enabling deployment in regulated environments. The result is a user space implementation that’s portable across platforms, easier to operate, and backed by a certified cryptographic foundation.