In my introduction to cryptography course I only ever did differential cryptanalysis on ciphers which were completly linear. Now I am analyzing a hash function, where I have to propagate XOR differences through a modular addition. I am now trying to find high-probability output differences for the modular addition.
I will first explain my notation:
Let $x$ and $y$ be $32$-bit strings.
Modular addition $\boxplus$ of two bitstrings $x$ and $y$ is defined like the following: $$x\boxplus y=x+y\pmod{2^{32}}$$
Whenever I speak about a (input/output) difference I mean the result of $\delta=x\oplus y$. When I am speaking about a difference we only know/search the value of the difference $\delta$ and not of $x$ and $y$. I denote differences with greek letters. Whenever I just use a $0$, I mean a difference of $0$.
A modular addition that receives an input difference $\alpha=x\oplus y$ as first summand, and an input difference $\beta=x'\oplus y'$, produces an output difference of $\gamma=(x\boxplus x')\oplus (y\boxplus y')$. I am aware that $\alpha\boxplus\beta\neq\gamma$, because of the nonlinearity. I use this notation ($\alpha\boxplus\beta=\gamma$) to indicate that the modular addition receives the summands $\alpha$ and $\beta$ and produces an output difference of $\gamma$.
I am aware that brute forcing for the best probability output is infeasible, so I am looking for more practical methods.
In the following I want to give three different cases, which are relevant for me.
Case 1
Assuming we have the following equation:
$$\alpha\boxplus 0=\beta$$
Assume for this case that I am able to choose the values for $\alpha=x\oplus y$. How can I choose an $\alpha\neq 0$ such that $\beta$ is a high probability output difference? The output difference $\beta=0$ is allowed.
Case 2
Now assume the same equation as in the first case, but I am not able to choose $\alpha$, it is given. How can I now find the a high probability output difference $\beta$?
Case 3
Now we have the following equation:
$$\alpha\boxplus\beta=\gamma$$
Given $\alpha\neq 0,\beta\neq 0$ (with $\alpha = \beta$ allowed), how can we find a high probability output difference $\gamma$?
So my question is: Are there general methods or heuristics to compute high-probability output differences for modular addition that apply to all three cases? Or does each case require a separate approach?
I looked at the following questions and papers:
- Question 1: Here it is only stated how to calculate the probability of a given output difference $\gamma$, when also $\alpha$ and $\beta$ are given.
- Question 2: Is not explaining anything regarding to modular addition.
- Question 3: I think is also not useful for me.
- Cryptographic Properties of Modular Addition $2^n$: Could probably help, but I did not understand all the math and I think it would be difficult for me to transform the results presented there, to an actualy method which can help me.