# Streebog

Streebog (Russian: Стрибог) is a cryptographic hash function defined in the Russian national standard GOST R 34.11-2012 Information Technology – Cryptographic Information Security – Hash Function. It was created to replace an obsolete GOST hash function defined in the old standard GOST R 34.11-94, and as an asymmetric reply to SHA-3 competition by the US National Institute of Standards and Technology. The function is also described in RFC 6986 and one out of hash functions in ISO/IEC 10118-3:2018.

## Description

Streebog operates on 512-bit blocks of the input, using the Merkle–Damgård construction to handle inputs of arbitrary size.
The high-level structure of the new hash function resembles the one from GOST R 34.11-94, however, the compression function was changed significantly. The compression function operates in Miyaguchi–Preneel mode and employs a 12-round AES-like cipher with a 512-bit block and 512-bit key. (It uses an 8×8 matrix of bytes rather than AES's 4×4 matrix.)
Streebog-256 uses a different initial state than Streebog-512, and truncates the output hash, but is otherwise identical.
The function was named Streebog after Stribog, the god of rash wind in ancient Slavic mythology, and is often referred by this name, even though it is not explicitly mentioned in the text of the standard.

## Examples of Streebog hashes

Hash values of empty string.
Even a small change in the message will (with overwhelming probability) result in a mostly different hash, due to the avalanche effect. For example, adding a period to the end of the sentence:

## Cryptanalysis

In 2013 the Russian Technical Committee for Standardization "Cryptography and Security Mechanisms" (TC 26) with the participation of Academy of Cryptography of the Russian Federation declared an open competition for cryptanalysis of the Streebog hash function, which attracted international attention to the function.
Ma, et al, describe a preimage attack that takes 2$^{496}$ time and 2$^{64}$ memory or 2$^{504}$ time and 2$^{11}$ memory to find a single preimage of GOST-512 reduced to 6 rounds. They also describe a collision attack with 2$^{181}$ time complexity and 2$^{64}$ memory requirement in the same paper.
Guo, et al, describe a second preimage attack on full Streebog-512 with total time complexity equivalent to 2$^{266}$ compression function evaluations, if the message has more than 2$^{259}$ blocks.
AlTawy and Youssef published an attack to a modified version of Streebog with different round constants. While this attack may not have a direct impact on the security of the original Streebog hash function, it raised a question about the origin of the used parameters in the function. The designers published a paper explaining that these are pseudorandom constants generated with Streebog-like hash function, provided with 12 different natural language input messages.
AlTawy, et al, found 5-round free-start collision and a 7.75 free-start near collision for the internal cipher with complexities 2$^8$ and 2$^{40}$, respectively, as well as attacks on the compression function with 7.75 round semi free-start collision with time complexity 2$^{184}$ and memory complexity 2$^8$, 8.75 and 9.75 round semi free-start near collisions with time complexities 2$^{120}$ and 2$^{196}$, respectively.
Wang, et al, describe a collision attack on the compression function reduced to 9.5 rounds with 2$^{176}$ time complexity and 2$^{128}$ memory complexity.
In 2015 Biryukov, Perrin and Udovenko reverse engineered the unpublished S-box generation structure (which was earlier claimed to be generated randomly) and concluded that the underlying components are cryptographically weak.