Introduction
BLAKE2 is a high-performance successor to the SHA-3 finalist BLAKE, designed to rival the speed of MD5 while providing modern features like parallelism and tree-hashing. To achieve this performance, the designers introduced several "tweaks," including the removal of constants from the round function, changes to rotation amounts, and a simplified initialization process. This paper provides the first comprehensive security analysis of BLAKE2, investigating whether these optimizations created theoretical or practical security backdoors.
The BLAKE2 Round Function and Methodology
The authors employ several advanced cryptanalytic frameworks to "stress test" BLAKE2, focusing on its ARX (Addition-Rotation-XOR) structure.
The G Function
The core of BLAKE2's security lies in its $G$ function. Unlike its predecessor, BLAKE2 removes constants from this function to improve speed. This change is central to the analysis of symmetry within the primitive.
Cryptanalytic Techniques
- Rotational Cryptanalysis: This technique exploits symmetries in ARX primitives. If an input is rotated, the output may also be a rotated version of the original. The lack of constants in the $G$ function (shown above) makes the internal permutation more susceptible to this symmetry.
- Impossible Differential Cryptanalysis: Using a "miss-in-the-middle" approach, the authors identify two differential paths that are individually possible but logically contradictory when they meet, allowing them to discard incorrect state guesses.
- Automated Differential Search: Improved algorithms were developed to find the highest probability differential characteristics for the modified rotation constants in BLAKE2.
Comparative Security Results
The analysis compares the security margins of the BLAKE and BLAKE2 families across various attack vectors, including impossible differentials, rotational attacks, and collision searches.
Key Findings
- Impossible Differentials: The authors improved results for both families, identifying a 6.5-round impossible differential for the permutations of BLAKE-256, BLAKE-512, BLAKE2s, and BLAKE2b.
- Rotational Vulnerabilities: The most significant finding is that removing constants makes the underlying permutation weaker. A rotational attack can penetrate all 12 rounds of the BLAKE2b permutation. However, this remains a theoretical weakness; the actual hash function uses non-rotational initialization vectors (IVs) that block this attack in practice.
- Initialization as a Defense: Surprisingly, the new initialization method in BLAKE2 fixes more state words than the original BLAKE. This restricts an attacker’s freedom, making it harder to find high-probability differential paths and effectively increasing the security of the compression function.
Conclusion
Despite theoretical vulnerabilities in the internal permutation—specifically regarding rotational symmetry—the BLAKE2 hash function maintains a robust security margin. The "tweaked" rotation constants were well-chosen for security, and the initialization process provides a strong defense against practical exploitation. The authors conclude that BLAKE2 remains highly secure for standard applications, with a security margin only slightly lower than its predecessor.
Summary updated