# Differential Analysis of a Cryptographic Hashing Algorithm HBC-256
## 4 Results and Discussion
An example of one of the options is shown in Figure 4. In Figure 4 and further, white cells mean zero difference in the state, while black cells mean nonzero value of the difference. Further analysis revealed an even more appropriate variant of difference transformation (Figure 5). Figure 4: Variant of the initial filling of the data set. Figure 3: A fragment of the table with the results of the analysis for box S\({}_{00}\). Further examination of the data transformations from Figure 5, it was found that even after the Stage-2 and Stage-3 transformations, only three different replacement boxes (S\({}_{20}\), S\({}_{30}\), S\({}_{31}\)) remain affected each time. These transformations are depicted in Figure 6.  
As a result of the found transformation (Figure 6), a hypothesis appeared: if after the first round of transformations the difference state coincides with the difference of the first subkey, and also if further, the second-round key acquires a zero difference, then further transformations will go the same way, and hence a collision will be obtained (Figure 7). _Hypothesis._ There is a difference a which, when passing through one round of hashing, forms a difference (a + b) in bytes 20 and 30. At the same time, the same difference a form a difference (a + b) in the same bytes (20 and 30) when passing through one round of round keys generation. In addition, the difference (a + b) in bytes 20 and 30 can be converted into itself when passing through one round of the generation of round keys. Tables S\({}_{20}\), S\({}_{30}\), and S\({}_{31}\) must convert the same input difference values into the same output difference values according to Figure 6. It means that if two differences equal to the value a are received at the input, then two differences equal to the value b or (a + b) must be formed at the output, but they must coincide in bytes 20 and 30 (taking into account that different substitution boxes are used there). In Stage2, the difference values may be different. It is important to remember that the Stage2 operation is different for the keying operation and the hashing function itself. The search is performed for chains, in which the same values at the input of tables S\({}_{30}\), and S\({}_{31}\) will give the same values. This must be done for the Stage-1 conversion. Then these values should be multiplied by two (equal to a shift to the left by 1), which will give us a Stage-2 transformation. Then these values should go back to the original value but by tables S\({}_{20}\), and S\({}_{30}\). If we transfer all this to symbolic form, we get the input value A. It is rearranged by the replacement tables S\({}_{30}\), and S\({}_{31}\) to the value C. Then this element is multiplied by two, and we get (C x 2). After that this value is rearranged by substitution tables S\({}_{20}\), and S\({}_{30}\) back to value B.  
Figure 5: Improved version of the initial filling of the data set. Figure 6: Conversion of the difference through three basic operations. Thus, we want to achieve the following indicators for the transformation of differences (Table 6). It should be taken into account that first, the value with index 20 goes to Stage-1, which is converted to zero. Then the value with index 30, which by S-box of permutation is changed to something. You should not use output differences greater than 128 so that after the conversion of Stage-2 neighboring boxes are not changed. As a result of the analysis, we obtained chains in accordance with the hypothesis for the key conversion (Table 7). All values represent one byte of difference, written in decimal form, the record corresponds to the scheme: Input difference \(\rightarrow\) Difference after Stage1 \(\rightarrow\) Difference after Stage2 \(\rightarrow\) Difference after Stage3, with the values in parentheses for the two S-boxes