{
  "id": "2021/1337",
  "url": "https://opencryptology.org/2021/1337",
  "original_url": "https://eprint.iacr.org/2021/1337",
  "title": "Large-Precision Homomorphic Sign Evaluation using FHEW/TFHE Bootstrapping",
  "authors": [
    "Zeyu Liu",
    "Daniele Micciancio",
    "Yuriy Polyakov"
  ],
  "affiliations": null,
  "abstract": "A comparison of two encrypted numbers is an important  operation needed in many machine learning applications, for example, decision tree or neural network inference/training. An efficient instantiation of this operation in the context of fully homomorphic encryption (FHE) can be challenging, especially when a relatively high precision is sought. The conventional FHE way of evaluating the comparison operation, which is based on the sign function evaluation using FHEW/TFHE bootstrapping (often referred in literature as programmable bootstrapping), can only support very small precision (practically limited to 4-5 bits or so). For higher precision, the runtime complexity scales linearly with the ciphertext (plaintext) modulus (i.e., exponentially with the modulus bit size). We propose sign function evaluation algorithms that scale logarithmically with the ciphertext (plaintext) modulus, enabling the support of large-precision comparison in practice. Our sign evaluation algorithms are based on an iterative use of homomorphic floor function algorithms, which are also derived in our work. Further, we generalize our procedures for floor function evaluation to arbitrary function evaluation, which can be used to support both small plaintext moduli (directly) and larger plaintext moduli (by using a homomorphic digit decomposition algorithm, also suggested in our work). We implement all these algorithms using the PALISADE lattice cryptography library, introducing several implementation-specific optimizations along the way, and discuss our experimental results.",
  "category": "Implementation",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Large-Precision Homomorphic Sign Evaluation using FHEW/TFHE Bootstrapping” by Zeyu Liu, Daniele Micciancio, Yuriy Polyakov, Cryptology ePrint Archive, Paper 2021/1337, https://eprint.iacr.org/2021/1337. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": true,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2021-10-05T15:43:38Z",
    "updated": "2022-09-17T18:46:43Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2021/1337.pdf",
    "sha256": "b9f987bea585c7f8c100ec8b07df1f9920e3aef461fbe2731077c66272a43de1",
    "size": 504372,
    "source": "github-mirror",
    "source_date": "2024-01-14T06:13:28Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2021/1337/versions/20240114T061328Z.pdf",
      "captured_at": "2024-01-14T06:13:28Z",
      "label": "copy captured 2024-01-14",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2021/1337.pdf",
      "size": 504372,
      "sha256": "b9f987bea585c7f8c100ec8b07df1f9920e3aef461fbe2731077c66272a43de1",
      "is_default_pdf": true
    },
    {
      "url": "https://opencryptology.org/2021/1337/versions/20211005T160246Z.pdf",
      "captured_at": "2021-10-05T16:02:46Z",
      "label": "copy captured 2021-10-05",
      "source": "wayback",
      "source_url": "https://web.archive.org/web/20211005160246id_/https://eprint.iacr.org/2021/1337.pdf",
      "size": 444166,
      "sha256": "ac827f75b3023b9318649b69d830d6ef88854b32c138a7619666f01ee5f5ded7",
      "is_default_pdf": false
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260928065335id_/https://eprint.iacr.org/2021/1337.pdf",
      "captured_at": "2026-09-28T06:53:35Z",
      "size": 502259
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2021/1337.pdf",
      "captured_at": "2024-01-14T06:13:28Z",
      "size": 504372
    }
  ],
  "bibtex": "@misc{cryptoeprint:2021/1337,\n      author = {Zeyu Liu and Daniele Micciancio and Yuriy Polyakov},\n      title = {Large-Precision Homomorphic Sign Evaluation using FHEW/TFHE Bootstrapping},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2021/1337},\n      year = {2021},\n      url = {https://eprint.iacr.org/2021/1337}\n}"
}
