Analysis of Diagonal Constants in Salsa

In this paper, we study the effect of diagonal constants in the software oriented stream ciphers Salsa and Chacha. So far, there has not been any clear justification why such constants are chosen. We concentrate on differential cryptanalysis to evaluate how different constants affect the biases after a few rounds in these ciphers. We are using Measure of Uniformity in bias as a measure for differentiating constants as good or bad constants w.r.t. original constant. We have observed that after 4 rounds of Salsa20, for an Input Differential (\(\mathcal {ID}\)) at Most Significant Bit (MSB) of the third word of quarterround function, the specific patterns in constant involved in that quarterround function leads to increase or decrease in Measure of Uniformity in bias. The location of specific patterns in those diagonal constants varies with the change in last two rotation constants. We did not observe any pattern for ChaCha after 3 rounds. We have also observed a slight increase and decrease in time and data complexity for good and bad constants respectively as compared to an original constant. The designer constants are a good constant however it can be even better with a slight change in constant \(c_0\) or \(c_3\).