{
  "id": "2024/949",
  "url": "https://opencryptology.org/2024/949",
  "original_url": "https://eprint.iacr.org/2024/949",
  "title": "Efficient 2PC for Constant Round Secure Equality Testing and Comparison",
  "authors": [
    "Tianpei Lu",
    "Xin Kang",
    "Bingsheng Zhang",
    "Zhuo Ma",
    "Xiaoyuan Zhang",
    "Yang Liu",
    "Kui Ren",
    "Chun Chen"
  ],
  "affiliations": null,
  "abstract": "Secure equality testing and comparison are two important primitives widely used in many secure computation scenarios, such as  privacy-preserving machine learning,  private set intersection, and secure data mining, etc. This work proposes new constant-round two-party computation (2PC) protocols for secure equality testing and comparison. \nOur protocols are designed in the online/offline paradigm. \nFor 32-bit inputs, the online communication cost of our equality testing protocol and secure comparison protocol are as low as 76 bits (1\\% of ABY) and 384 bits (5\\% of ABY) , respectively.  \nOur benchmarks show that (i) for 32-bit equality testing, our scheme performs $9 \\times$ faster than the Guo \\emph{et al.} (EUROCRYPT 2023) and $15 \\times$ of the garbled circuit (GC) with the half-gate optimization (CRYPTO 2015). (ii) for 32-bit secure comparison, our scheme performs  $3 \\times$ faster than Guo \\emph{et al.} (EUROCRYPT 2023), $6 \\times$ faster than both Rathee \\emph{et al.} (CCS 2020) and GC with the half-gate optimization.",
  "category": "Cryptographic protocols",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Efficient 2PC for Constant Round Secure Equality Testing and Comparison” by Tianpei Lu, Xin Kang, Bingsheng Zhang, Zhuo Ma, Xiaoyuan Zhang, Yang Liu, Kui Ren, Chun Chen, Cryptology ePrint Archive, Paper 2024/949, https://eprint.iacr.org/2024/949. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2024-06-13T06:22:37Z",
    "updated": "2025-01-26T05:49:03Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2024/949.pdf",
    "sha256": "4cb9301725aa41e9109c02c06b80c48d56998c36ea19ade092d8719a7f367eb4",
    "size": 723426,
    "source": "github-mirror",
    "source_date": "2026-04-28T17:20:00Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2024/949/versions/20260428T172000Z.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "label": "copy captured 2026-04-28",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2024/949.pdf",
      "size": 723426,
      "sha256": "4cb9301725aa41e9109c02c06b80c48d56998c36ea19ade092d8719a7f367eb4",
      "is_default_pdf": true
    },
    {
      "url": "https://opencryptology.org/2024/949/versions/20240626T013826Z.pdf",
      "captured_at": "2024-06-26T01:38:26Z",
      "label": "copy captured 2024-06-26",
      "source": "wayback",
      "source_url": "https://web.archive.org/web/20240626013826id_/https://eprint.iacr.org/2024/949.pdf",
      "size": 796940,
      "sha256": "f94b40ecdd4112b30a2aa4517f72eed48e4f05402cd6f2eece0a2e830e3ecd7c",
      "is_default_pdf": false
    },
    {
      "url": "https://opencryptology.org/2024/949/versions/20240614T040637Z.pdf",
      "captured_at": "2024-06-14T04:06:37Z",
      "label": "copy captured 2024-06-14",
      "source": "wayback",
      "source_url": "https://web.archive.org/web/20240614040637id_/https://eprint.iacr.org/2024/949.pdf",
      "size": 845856,
      "sha256": "edd6f6f38128eefc8b2777bf29bda6024339c42aa80a54f0734fa8bb266fe102",
      "is_default_pdf": false
    }
  ],
  "other_sources": [
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2024/949.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "size": 723426
    },
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20250814142548id_/https://eprint.iacr.org/2024/949.pdf",
      "captured_at": "2025-08-14T14:25:48Z",
      "size": 724369
    }
  ],
  "bibtex": "@misc{cryptoeprint:2024/949,\n      author = {Tianpei Lu and Xin Kang and Bingsheng Zhang and Zhuo Ma and Xiaoyuan Zhang and Yang Liu and Kui Ren and Chun Chen},\n      title = {Efficient 2PC for Constant Round Secure Equality Testing and Comparison},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2024/949},\n      year = {2024},\n      url = {https://eprint.iacr.org/2024/949}\n}"
}
