Expand description
Client-side keyed obfuscation of sparse hypervectors.
A VectorMask is a secret permutation of the coordinate space, derived
from a passphrase with Argon2id. Applying it before vectors leave the client
lets a remote store index and rank them without learning which coordinates
were originally active.
This is obfuscation, not encryption, and it is not homomorphic encryption. It is deterministic and preserves every pairwise similarity by construction, so a store holding masked vectors still learns the full similarity structure of the collection, equality of vectors, and coordinate activation frequencies. Each known (plain, masked) pair reveals part of the permutation. Use AES-GCM storage encryption for confidentiality at rest.
Set algebra (bind, bundling, similarity) commutes with the mask. The
cyclic permute used for ordered binding does not, so sequence operations
must be composed before masking.
Structs§
- Vector
Mask - A secret permutation of
[0, dim).
Constants§
- MAX_
MASK_ DIMENSIONS - Largest coordinate space a mask may be derived for (bounds the allocation).
- MIN_
SALT_ LEN - Minimum salt length accepted by
VectorMask::derive.