Linux Crypto Speeds Up: New Patches Deliver 53% Faster HCTR2 Mode
Google engineer Eric Biggers has once again turned his attention to enhancing the performance of Linux’s cryptographic subsystem. Over the weekend, he submitted a series of nine patches to the kernel mailing list, aimed at relocating the POLYVAL implementation to the shared directory lib/crypto and replacing the base version of the algorithm with a faster one.
The primary outcome of this work is a noticeable acceleration of the HCTR2 mode. Previously, the kernel accessed POLYVAL through the crypto_shash interface, which introduced performance overhead. The new implementation eliminates these redundant costs. According to Biggers’ measurements, throughput increases by approximately 45% for 64-byte messages, 53% for 128-byte messages, and 6% for 4096-byte blocks — with the most substantial gains observed for smaller payloads.
Another advantage is improved convenience: the optimized POLYVAL code is now automatically included alongside HCTR2 support, whereas previously it had to be enabled manually.
The patches are currently under review by kernel developers. If approved, these improvements could be incorporated into one of the upcoming Linux releases.
Support Our Threat Intelligence
If you find our technology report and cybersecurity news helpful, consider supporting our work.