VPN WireGuard Support Added to DragonFly BSD

The nucleus of the Dragonfly BSD operating system has accepted approximately 100 changes related to the implementation of WireGuard VPN support. The WG driver, which supports the WireGuard protocol, was transferred from FreeBSD, while the code for cryptographic functions, network interface, and iOCTL API was obtained from OpenBSD. Changes to the IFCONFIG utility for tuning VPN were postponed from OpenBSD. This implementation is compatible with all official WireGuard clients for Linux, Windows, MacOS, *BSD, iOS, and Android. Dragonfly BSD has now become the fifth open OS, alongside Linux, OpenBSD, NETBSD, and FreeBSD, to have integrated support for WireGuard.

WireGuard utilizes the concept of routing by encryption keys, where each network interface is bound to a private key and an open key for establishing connections. To coordinate the keys and manage connections without running a separate daemon in the user’s space, the Noise_ik mechanism from the Noise Protocol Framework is involved. Data transmission occurs through encapsulation to UDP packages. The implementation also supports the change in the VPN server’s IP address (roaming) without disrupting the connection, thanks to automatic client reconfiguration.

For encryption, WireGuard employs the stream cipher Chacha20 and the message authentication code (MAC) algorithm Poly1305. These algorithms were developed by Daniel Bernstein, Tanya Lange, and Peter Schwabe. Chacha20 and Poly1305 are faster alternatives to AES-256-CTR and HMAC, with a software implementation that achieves a consistent execution time without requiring specialized hardware support. The Diffie-Hellman protocol on elliptic curves is used to generate a shared secret key, using the curve25519 implementation also proposed by Daniel Bernstein. The Blake2S algorithm (RFC7693) is utilized for drifting.

/Reports, release notes, official announcements.