Abstract
In this paper, the best linear approximations of addition modulo 2n are studied. Let x = (x n−1, x n−2,…,x 0) and y = (y n−1, y n−2,…,y 0) be any two n-bit integers, and let z = x + y (mod 2n). Firstly, all the correlations of a single bit z i approximated by x j ’s and y j ’s (0 ≤ i, j ≤ n − 1) are characterized, and similar results are obtained for the linear approximation of the xoring of the neighboring bits of z i ’s. Then the maximum correlations and the best linear approximations are presented when these z j ’s (0 ≤ j ≤ n − 1) are xored in any given means.
Similar content being viewed by others
References
Staffelbach, O., Meier, W.: Cryptographic Significance of the Carry for Ciphers Based on Integer Addition. In: Advances in Cryptology—CRYPTO 1990, LNCS, vol. 537, pp. 601–614 (1990)
Maximov, A.: On Linear Approximation of Modulo Sum. In: Fast Software Encryption—FSE 2004, LNCS, vol. 3017, pp. 483–484 (2004)
Maximov, A., Johansson, T.: Fast Computation of Large Distributions and Its Cryptographic Applications. In: Advances in Cryptology—ASIACRYPT 2005, LNCS, vol. 3788, pp. 313–332 (2005)
Sarkar, P.: On approximating addition by exclusive OR. http://eprint.iacr.org/2009/047.pdf (2014)
Alquié, D.: Approximating addition by XOR: how to go all the way. http://eprint.iacr.org/2010/072.pdf (2015)
Feng, X., Zhou, C., Wu, C.: Linear Approximations of Addition Modulo 2n−1. In: Fast Software Encryption—FSE 2011, LNCS, vol. 6733, pp. 359–377 (2011)
Ekdahl, P., Johansson, T.: Distinguishing Attacks on SOBER-T16 and T32. In: Fast Software Encryption—FSE 2002, LNCS, vol. 2365, pp. 210–224 (2002)
Coppersmith, D., Halevi, S., Jutla, C.: Cryptanalysis of Stream Ciphers with Linear Masking. In: Advances in Cryptology—CRYPTO 2002, LNCS, vol. 2442, pp. 515–532 (2002)
Wallén, J.: Linear Approximations of Addition Modulo 2n. In: Fast Software Encryption—FSE 2003, LNCS, vol. 2887, pp. 261–273 (2003)
Wallén, J.: On the Differential and Linear Properties of Addition Research Report A84, Helsinki University of Technology, Laboratory for Theoretical Computer Science, Espoo, Finland (2003)
Nyberg, K., Wallén, J.: Improved Linear Distinguishers for SNOW 2.0. In: Fast Software Encryption—FSE 2006, LNCS, vol. 4047, pp. 144–162 (2006)
Author information
Authors and Affiliations
Corresponding author
Additional information
This work was supported by the NSF of China under Grant Number 61272042,61202492.
Appendices
Appendix A: The proof of Lemma 3.2
Let z i , σ i be defined the same as in the proof of Lemma 3.1, then from the (3.1) we have
If c(2i+1;v, w) ≠ 0, then from Lemma 3.1 we have 2i+1 ≤ v, w ≤ 2i+2. Without loss of generality, we can assume that v = v ′⊕v i 2i ⊕ 2i+1, w ′⊕w i 2i ⊕ 2i+1, where 0 ≤ v ′, w ′ < 2i, and v i , w i ∈ {0, 1}. Thus from the definition of c(2i+1;v, w), we have
On the other hand, using the total probability formula and the (A.1), we have
Next we will show the (3.2) holds according to the following three cases.
-
(i)
If v i ⊕w i = 1, then Pr(v ′⋅x⊕w ′⋅y = v i ⊕σ i )+ Pr(v ′⋅x⊕w ′⋅y = σ i ⊕w i )=1, thus from the (A.3) we have
$$\begin{array}{@{}rcl@{}} &&\Pr (\sigma_{i+1}\oplus v_{i}x_{i}\oplus w_{i}y_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0) \\ &=&\frac{1}{2}\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0)+\frac{1}{4} . \end{array} $$Since
$$\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0)=\left\{ \begin{array}{l} 1,\text{\ if }v^{\prime }=w^{\prime }=0, \\ \frac{1}{2},\text{ otherwise,} \end{array} \right. $$then combining with the (A.2) we know that
$$c(2^{i+1};v^{\prime }\oplus v_{i}2^{i}\oplus 2^{i+1},w^{\prime }\oplus w_{i}2^{i}\oplus 2^{i+1})=\left\{ \begin{array}{l} \frac{1}{2},\text{\ if }v^{\prime }=w^{\prime }=0, \\ 0,\text{ otherwise.} \end{array} \right. $$Thus the (3.2) holds when \(v_{^{i}}\oplus w_{^{i}}=1\).
-
(ii)
If v i = w i = 0, then v = 2i+1⊕v ′, w = 2i+1⊕w ′. Thus from the (A.3), we have
$$\begin{array}{@{}rcl@{}} &&\Pr (\sigma_{i+1}\oplus v_{i}x_{i}\oplus w_{i}y_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0) \\ &=&\frac{1}{4}+\frac{1}{2}\Pr (\sigma_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0) \\ &=&\frac{1}{4}+\frac{1}{2}\cdot \frac{1+c(2^{i};v^{\prime }\oplus 2^{i},w^{\prime }\oplus 2^{i})}{2} \\ &=&\frac{1}{2}+\frac{1}{4}c(2^{i};v^{\prime }\oplus 2^{i},w^{\prime }\oplus 2^{i}). \end{array} $$It follows that \(c(2^{i+1};2^{i+1}\oplus v_{i}2^{i}\oplus v^{\prime },2^{i+1}\oplus w_{i}2^{i}\oplus w^{\prime })=\frac {1}{2}c(2^{i};2^{i}\oplus v^{\prime },2^{i}\oplus w^{\prime }),\) and the (3.2) holds when v i = w i = 0.
-
(iii)
If v i = w i = 1, then we have v = 2i+1 ⊕ 2i⊕v ′, w = 2i+1 ⊕ 2i⊕w ′. Thus from the (1.3), we have
$$\begin{array}{@{}rcl@{}} &&\Pr (\sigma_{i+1}\oplus v_{i}x_{i}\oplus w_{i}y_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0) \\ &=&\frac{1}{4}+\frac{1}{2}\Pr (\sigma_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=1) \\ &=&\frac{1}{4}+\frac{1}{2}\cdot \frac{1-c(2^{i};v^{\prime }\oplus 2^{i},w^{\prime }\oplus 2^{i})}{2} \\ &=&\frac{1}{2}-\frac{1}{4}c(2^{i};v^{\prime }\oplus 2^{i},w^{\prime }\oplus 2^{i}). \end{array} $$It follows that \(c(2^{i+1};v^{\prime }\oplus v_{i}2^{i}\oplus 2^{i+1},w^{\prime }\oplus w_{i}2^{i}\oplus 2^{i+1})=-\frac {1}{2} c(2^{i};v^{\prime }\oplus 2^{i},w^{\prime }\oplus 2^{i}),\) and the (3.2) holds when v i = w i = 1.
Appendix B: The proof of Lemma 3.3
Let z i , σ i be defined the same as in the proof of Lemma 3.1. If c(2i ⊕ 2i+1;v, w) ≠ 0, then from Lemma 3.1 we have 2i+1 ≤ v, w ≤ 2i+2. Without loss of generality, we can assume that v = v ′⊕v i 2i ⊕ 2i+1 , w = w ′⊕w i 2i ⊕ 2i+1, where 0 ≤ v ′, w ′ < 2i, and v i , w i ∈ {0,1}. Thus from the definition of c(2i ⊕ 2i+1;v, w) and x i+1⊕y i+1⊕z i+1 = σ i+1 we have
On the other hand, from the (A.1) that
using the total probability formula we can further derive that
Next we will show the (3.3) holds according to the following three cases.
-
(i)
If v i = w i = 1, then we have v = 2i+1 ⊕ 2i⊕v ′, w = 2i+1 ⊕ 2i⊕w ′. Thus from the (B.2), we have
$$\begin{array}{@{}rcl@{}} &&\Pr (\sigma_{i+1}\oplus z_{i}\oplus v_{i}x_{i}\oplus w_{i}y_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0) \\ &=&\frac{1}{4}+\frac{1}{2}\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0). \end{array} $$Since Pr(v ′⋅x⊕w ′⋅y = 0)=1 if v ′ = w ′ = 0 and 1/2 otherwise, then we know that c(2i+1 ⊕ 2i;v, w) = 1/2 if v ′ = w ′ = 0 and 0 otherwise. Thus the (3.3) holds when v i = w i = 1.
-
(ii)
If v i = w i = 0, similar as case (i), we can show that c(2i+1 ⊕ 2i;v, w) = 1/2 if and only if v ′ = w ′ = 0. Thus the (3.3) holds when v i = w i = 0.
-
(iii)
If v i ⊕w i = 1, since σ i = x i ⊕y i ⊕z i , then from the (B.2) we have
$$\begin{array}{@{}rcl@{}} &&\Pr (\sigma_{i+1}\oplus z_{i}\oplus v_{i}x_{i}\oplus w_{i}y_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0) \\ &=&\frac{1}{4}+\frac{1}{2}\Pr (\sigma_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0) \\ &=&\frac{1}{4}+\frac{1}{2}\Pr (x_{i}\oplus y_{i}\oplus z_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0) \\ &=&\frac{1}{4}+\frac{1}{2}\cdot \frac{1+c(2^{i};2^{i}\oplus v^{\prime },2^{i}\oplus w^{\prime })}{2}. \end{array} $$Thus combining with the (B.1) we know that \(c(2^{i+1}\oplus 2^{i};2^{i+1}\oplus v_{^{i}}2^{i}\oplus v^{\prime },2^{i+1}\oplus w_{^{i}}2^{i}\oplus w^{\prime })=\frac {1}{2} c(2^{i};2^{i}\oplus v^{\prime },2^{i}\oplus w^{\prime }).\) Hence the (3.3) holds when v i ⊕w i = 1.
Rights and permissions
About this article
Cite this article
Xue, S., Qi, WF. & Yang, XY. On the best linear approximation of addition modulo 2n . Cryptogr. Commun. 9, 563–580 (2017). https://doi.org/10.1007/s12095-016-0203-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12095-016-0203-8