SSAP
Stateless SAP (scale and perturbation) is rust library for a one way vector encryption based on SAP scheme as as described in Approximate Distance-Comparision Preserving Symmetric Encryption.
SSAP deviates from SAP in that the use of a psuedorandom function (PRF) is removed.
- Rather than using a key
Kto generate a psuedorandom vector from a multivariate normal distribution for pertubation, we store a normalised vector as a key to remove the reliance on PRF. - Rather than storing a random factor
nto generate a psuderandom scale factorx'the pertubation vector, we ommit to store it and generatex'at random. Sincex'is af32randomly sampled from 0 to 1 which means there's a one in 16.7 million chance it can be guessed.
Included in this library is an implementation of the original SAP scheme as described in Approximate Distance Comparison Preserving Symmetric Encryption.
Usage
SAP
SSAP