Skip to main content
Log in

On the best linear approximation of addition modulo 2n

  • Published:
Cryptography and Communications Aims and scope Submit manuscript

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, jn − 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 ≤ jn − 1) are xored in any given means.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. 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)

  2. Maximov, A.: On Linear Approximation of Modulo Sum. In: Fast Software Encryption—FSE 2004, LNCS, vol. 3017, pp. 483–484 (2004)

  3. 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)

  4. Sarkar, P.: On approximating addition by exclusive OR. http://eprint.iacr.org/2009/047.pdf (2014)

  5. Alquié, D.: Approximating addition by XOR: how to go all the way. http://eprint.iacr.org/2010/072.pdf (2015)

  6. 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)

  7. Ekdahl, P., Johansson, T.: Distinguishing Attacks on SOBER-T16 and T32. In: Fast Software Encryption—FSE 2002, LNCS, vol. 2365, pp. 210–224 (2002)

  8. 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)

  9. Wallén, J.: Linear Approximations of Addition Modulo 2n. In: Fast Software Encryption—FSE 2003, LNCS, vol. 2887, pp. 261–273 (2003)

  10. 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)

  11. 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)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shuai Xue.

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

$$ \sigma_{i+1}=\left\{ \begin{array}{c} 0,\text{\ if }x_{i}=y_{i}=0\text{,} \\ 1,\text{\ if }x_{i}=y_{i}=1\text{,} \\ \sigma_{i},\text{\ if }x_{i}\oplus y_{i}=1\text{.} \end{array} \right. $$
(1.1)

If c(2i+1;v, w) ≠ 0, then from Lemma 3.1 we have 2i+1v, 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

$$\begin{array}{@{}rcl@{}} c(2^{i+1};v,w) &=&2\cdot \Pr (z_{i+1}=x_{i+1}\oplus y_{i+1}\oplus v_{i}x_{i}\oplus w_{i}y_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y)-1 \\ &=&2\cdot \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)-1. \end{array} $$
(1.2)

On the other hand, using the total probability formula and the (A.1), 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) \\ &=&\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0|x_{i}=y_{i}=0)\Pr (x_{i}=y_{i}=0) \\ &&+\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=v_{i}\oplus w_{i}\oplus 1|x_{i}=y_{i}=1)\Pr (x_{i}=y_{i}=1) \\ &&+\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=v_{i}\oplus \sigma_{i}|x_{i}=1,y_{i}=0)\Pr (x_{i}=1,y_{i}=0) \\ &&+\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=w_{i}\oplus \sigma_{i}|x_{i}=0,y_{i}=1)\Pr (x_{i}=0,y_{i}=1) \\ &=&\frac{1}{4}(\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0)+\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=v_{i}\oplus w_{i}\oplus 1) \\ &&+\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=v_{i}\oplus \sigma_{i})+\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=\sigma_{i}\oplus w_{i})). \end{array} $$
(1.3)

Next we will show the (3.2) holds according to the following three cases.

  1. (i)

    If v i w i = 1, then Pr(v xw y = v i σ i )+ Pr(v xw 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\).

  2. (ii)

    If v i = w i = 0, then v = 2i+1v , w = 2i+1w . 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.

  3. (iii)

    If v i = w i = 1, then we have v = 2i+1 ⊕ 2iv , w = 2i+1 ⊕ 2iw . 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+1v, 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+1y i+1z i+1 = σ i+1 we have

$$\begin{array}{@{}rcl@{}} &&c(2^{i}\oplus 2^{i+1};v,w) \\ &=&2\cdot \Pr (z_{i}\oplus z_{i+1}=x_{i+1}\oplus y_{i+1}\oplus v_{i}x_{i}\oplus w_{i}y_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y)-1 \\ &=&2\cdot \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)-1. \end{array} $$
(2.1)

On the other hand, from the (A.1) that

$$\sigma_{i+1}=\left\{ \begin{array}{c} 0,\text{\ if }x_{i}=y_{i}=0\text{,} \\ 1,\text{\ if }x_{i}=y_{i}=1\text{,} \\ \sigma_{i},\text{\ if }x_{i}\oplus y_{i}=1\text{,} \end{array} \right. $$

using the total probability formula we can further derive that

$$\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}(\Pr (\sigma_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=0)+\Pr (\sigma_{i}\oplus v^{\prime }\cdot x\oplus w^{\prime }\cdot y=v_{i}\oplus w_{i}\oplus 1) \\ &&+\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=v_{i}\oplus 1)+\Pr (v^{\prime }\cdot x\oplus w^{\prime }\cdot y=w_{i}\oplus 1)). \end{array} $$
(2.2)

Next we will show the (3.3) holds according to the following three cases.

  1. (i)

    If v i = w i = 1, then we have v = 2i+1 ⊕ 2iv , w = 2i+1 ⊕ 2iw . 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 xw 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.

  2. (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.

  3. (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

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12095-016-0203-8

Keywords

Mathematics Subject Classification (2010)