Paper 2022/1688

Funshade: Function Secret Sharing for Two-Party Secure Thresholded Distance Evaluation

Alberto Ibarrondo,, EURECOM
Hervé Chabanne, Télécom ParisTech, IDEMIA
Melek Önen, EURECOM

We propose a novel privacy-preserving, two-party computation of various distance metrics (e.g., Hamming distance, Scalar Product) followed by a comparison with a fixed threshold, which is known as one of the most useful and popular building blocks for many different applications including machine learning, biometric matching, etc. Our solution builds upon recent advances in function secret sharing and makes use of an optimized version of arithmetic secret sharing. Thanks to this combination, our new solution named Funshade is the first to require only one round of communication and two ring elements of communication in the online phase, outperforming all prior state-of-the-art schemes while relying on lightweight cryptographic primitives. Lastly, we implement our solution from scratch in portable C and expose it in Python, testifying its high performance by running secure biometric identification against a database of 1 million records in ∼10 seconds with full correctness and 32-bit precision, without parallelization.

Note: Published version

Available format(s)
Cryptographic protocols
Publication info
Published elsewhere. Minor revision. PETS23
Functional Secret SharingSecure Two Party Computation2PCScalar ProductHamming Distance
Contact author(s)
ibarrond @ eurecom fr
herve chabanne @ telecom-paris fr
melek onen @ eurecom fr
2024-02-27: last of 2 revisions
2022-12-05: received
See all versions
Short URL
Creative Commons Attribution-NonCommercial-ShareAlike


      author = {Alberto Ibarrondo and Hervé Chabanne and Melek Önen},
      title = {Funshade: Function Secret Sharing for Two-Party Secure Thresholded Distance Evaluation},
      howpublished = {Cryptology ePrint Archive, Paper 2022/1688},
      year = {2022},
      doi = {10.56553/popets-2023-0096},
      note = {\url{}},
      url = {}
Note: In order to protect the privacy of readers, does not use cookies or embedded third party content.