Encrypted Nearest Neighbour Search
encrypted-knn · spec v0.1.0 · 0 implementations · 6 runners
DESCRIPTION
Returns the indices of the k entries of a dataset closest to an encrypted query vector.
It combines two hard things. Distances are cheap — cosine similarity is a dot product, and encrypted arithmetic does dot products well. Selecting the smallest k is not: it is a partial sort, and every comparison inside it is an approximation of a discontinuous function.
The answer is a set of indices, which makes correctness discrete: a neighbour is either in the returned set or it is not, and no amount of numeric closeness rescues a wrong membership. Where two candidates are nearly equidistant, either may legitimately be returned, and a benchmark case has to say so.
INTERFACE
encrypted_knn( in ct : Ciphertext // the encrypted query vector out ct : Ciphertext // the encrypted indices of the k nearest entries ... // anything else the realization needs — keys, context, encoding — is its own concern )
PARAMETER SCHEMA
The schema belongs to the kernel. Each implementation declares which part of it it supports.
CORRECTNESS
SECURITY PROPERTIES
The query stays hidden, and so does the result: which entries were returned must not be observable to the party holding the dataset.
ASSUMPTIONS
The dataset size, the dimensionality and k are public.