Story Details

  • Beating Google's kernelCTF PoW using AVX512

    Posted: 2025-05-30 16:19:50

    The blog post details how the author significantly sped up the proof-of-work challenge for Google's kernelCTF by leveraging AVX-512 instructions. The challenge involved repeatedly hashing a provided value and checking if the resulting hash met specific criteria. The author initially optimized their C++ implementation with SIMD intrinsics using AVX2, achieving a considerable performance boost. Further analysis revealed potential for even greater gains with AVX-512, but the required VPTERNLOGD instruction wasn't available in the C++ compiler. By resorting to inline assembly and manually managing register allocation, they finally unlocked the full potential of AVX-512, reaching a blazing fast solution that solved the challenge approximately 12 times faster than their initial AVX2 implementation. This allowed them to "beat" the challenge much faster than intended and claim the associated flag.

    Summary of Comments ( 91 )
    https://news.ycombinator.com/item?id=44137715

    HN commenters discuss the cleverness of the exploit, focusing on the use of AVX-512 instructions to significantly speed up the proof-of-work computation. Some highlight the inherent tension between performance optimization and security, noting that features designed for speed can sometimes be leveraged for unintended purposes. Others point out that while impressive, this isn't a "break" in the traditional sense, as it doesn't bypass the PoW, but rather optimizes its execution. A few users discuss the potential for similar techniques to be applied elsewhere and the implications for systems relying on similar PoW schemes. Some question the practical impact, given the limited availability of AVX-512 hardware, particularly outside of cloud environments.