Papers1 provider · 1 record
January 1, 2026· Computer Design Systems Theory and Practice
article

COMPARATIVE ANALYSIS OF EUCLIDEAN AND HAMMING DISTANCE METRICS EFFICIENCY IN ZERO-KNOWLEDGE IDENTIFICATION PROTOCOLS

Authors:Mykola KhranovskyiAndriy Kernytskyy

Abstract

The growing use of biometric authentication systems has raised serious concerns about the privacy and security of sensitive user data. Zero-Knowledge Proofs (ZKPs) provide a cryptographic solution that allows authentication without revealing the actual biometric templates. However, applying them in practice is often difficult due to the computational complexity of the circuits involved. It is commonly assumed that only simple metrics, such as Hamming distance, are suitable for these limited environments, while arithmetic metrics like Euclidean distance are considered too "heavy" or slow. This research challenges that assumption by comparing the performance of both metrics within a Groth16 Zero-Knowledge framework. For our methodology, we used a ResNet18 neural network to generate fixed-length biometric data (embeddings). To make this data compatible with the cryptographic system, we used a quantization strategy for the Euclidean metric and a binarization strategy for the Hamming metric. The experiments, conducted using the Circom compiler and snarkjs library, show very little difference in performance between the two approaches. The Euclidean circuit required 577 constraints, which is only 9% more than the 529 constraints of the Hamming circuit. Furthermore, both methods had an average proof generation time of approximately 0.5 seconds on standard hardware. These findings empirically prove that high-accuracy Euclidean comparisons can be used efficiently in Zero-Knowledge protocols. This allows developers to focus on biometric precision without sacrificing cryptographic performance.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.