{
  "id": "2009/047",
  "url": "https://opencryptology.org/2009/047",
  "original_url": "https://eprint.iacr.org/2009/047",
  "title": "On Approximating Addition by Exclusive OR",
  "authors": [
    "Palash Sarkar"
  ],
  "affiliations": null,
  "abstract": "Let $X^{(1)},X^{(2)},\\ldots,X^{(n)}$ be independent and uniformly distributed over the\nnon-negative integers $\\{0,1,\\ldots,2^i-1\\}$; $S^{(n)}=X^{(1)}+X^{(2)}+\\cdots+X^{(n)}$\nand $L^{(n)}=X^{(1)}\\oplus X^{(2)}\\oplus \\cdots\\oplus X^{(n)}$. Denote the $i$-th\nbits of $S^{(n)}$ and $L^{(n)}$ by $S^{(n)}_i$ and $L^{(n)}_i$ respectively.\nWe show that as $i\\rightarrow \\infty$,\n$\\pr[S^{(n)}_i=L^{(n)}_i]\\rightarrow\n\\gamma^{(n)}=\n\\frac{1}{2}+\\frac{2^{n+1}(2^{n+1}-1)}{2(n+1)}\\times\\frac{b_{n+1}}{n!}$, where\n$b_n$ is the $n$-th Bernoulli number.\nAs a consequence, $\\gamma^{(2r)}=1/2$ for every $r$; and we show that\n$\\gamma^{(2r+1)}\\rightarrow 1/2$ as $r\\rightarrow \\infty$.\nFor small values of $r$, $\\gamma^{(2r+1)}$ is significantly different from $1/2$;\nfor example $\\gamma^{(3)}=1/3$ and $\\gamma^{(5)}=17/30$. The behaviour of\n$\\gamma^{(n)}$ for even and odd values of $n$ was earlier shown by\nStaffelbach and Meier without actually obtaining the formula mentioned above.\nFor every fixed\n$n\\geq 2$, we give a simple method for computing $\\pr[S^{(n)}_i=L^{(n)}_i]$ for each\n$i\\geq 0$.\nThe expression involving Bernoulli numbers is arrived at via the Eulerian number\ntriangle which in turn arises in relation to the stationary distribution of\na Markov chain formed by the carry values.",
  "category": "Secret-key cryptography",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“On Approximating Addition by Exclusive OR” by Palash Sarkar, Cryptology ePrint Archive, Paper 2009/047, https://eprint.iacr.org/2009/047. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": true,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2009-01-29T15:30:07Z",
    "updated": "2009-02-03T12:54:33Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2009/047.pdf",
    "sha256": "3c8eafc2fe90dec5c11890146bfb0fa0739d175762d9b788cd4cd962b1a16827",
    "size": 184093,
    "source": "github-mirror",
    "source_date": "2019-02-25T16:20:12Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2009/047/versions/20190225T162012Z.pdf",
      "captured_at": "2019-02-25T16:20:12Z",
      "label": "copy captured 2019-02-25",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2009/047.pdf",
      "size": 184093,
      "sha256": "3c8eafc2fe90dec5c11890146bfb0fa0739d175762d9b788cd4cd962b1a16827",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260415024219id_/https://eprint.iacr.org/2009/047.pdf",
      "captured_at": "2026-04-15T02:42:19Z",
      "size": 165799
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2009/047.pdf",
      "captured_at": "2019-02-25T16:20:12Z",
      "size": 184093
    }
  ],
  "bibtex": "@misc{cryptoeprint:2009/047,\n      author = {Palash Sarkar},\n      title = {On Approximating Addition by Exclusive OR},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2009/047},\n      year = {2009},\n      url = {https://eprint.iacr.org/2009/047}\n}"
}
