This sounds like a similar problem addressed by fuzzy extractors/secure sketches.
A small excerpt from the abstract:
We provide formal definitions and efficient secure techniques for:
• turning noisy information into keys usable for any cryptographic application
• reliably and securely authenticating biometric data.
Our techniques apply not just to biometric information, but to any keying material that, unlike traditional cryptographic keys, is (1) not reproducible precisely and (2) not distributed uniformly.
two primitives: a
reliably extracts nearly uniform randomness
from its input; the extraction is error-tolerant in the sense that
will be the same even if the input changes, as long as it
remains reasonably close to the original. Thus,
can be used as a key in a cryptographic application.
produces public information about its input
that does not reveal
, and yet allows
exact recovery of
given another value that is close to
. Thus, it can be used to reliably reproduce
error-prone biometric inputs without incurring the security risk inherent in storing them
We define the primitives to be both formally secure and versatile, generalizing much prior work. In
addition, we provide nearly optimal constructions of both primitives for various measures of “closeness”
of input data, such as Hamming distance, edit distance, and set difference.
The problem addressed in the paper is how to regularly extract the same key from noisy biometric data such as fingerprint scans. Repeated measurements of such information does not yield identical results, but it is desired to generate the same key to be derived from similar-enough data. This sounds similar to the problem you are/were attempting to address: How to generate a particular output for inputs that are "close enough".