A method implemented in a computer for performing distance revealing encryption, comprising: generating a tuple (,,, ê), where and are groups whose order is with p prime and is a bilinear pairing and is non-degenerate; randomly select a first plurality of elements and a second plurality of elements; defining a parameter h that is based upon ê, g 1, g 2, and the first plurality of elements; selecting a pseudo-random function family indexed by a secret key K; setting public parameters as ê,,,, p, h; setting private parameters as g 1, g 2, the first plurality of elements, the second plurality of elements, the pseudo-random function family, and the secret key K; encrypting a message x = ( x 1,..., x n), when n is the number of components in the message by: choosing a random value r; computing a plurality of values of the pseudo random function; and computing a first plurality of ciphertext values based upon g 1, the random value r, the first plurality of elements, the second plurality of elements, the plurality of values of the pseudo random function, and message x; and computing a second plurality of ciphertext values based upon g 2, the random value r, the first plurality of elements, the second plurality of elements, the plurality of values of the pseudo random function, and message x; wherein: the first plurality of elements are α, β, ξ, η and are selected such that ( α + β) ξη ≢ 0 (mod p), and the second plurality of elements are μ 1..., μ n and are selected such that ∑ i = 1 n μ i 2 ≡ 0 (mod p); wherein the parameter h = ê ( g 1, g 2) ( α + β) ξη; and AD:SK:st wherein: the first plurality of ciphertext values are calculated as c i,1 = g 1 ξ ( x i + t i)+ rμ i and c' i,2 = g 1 αξ ( x i +t i)-βrμ i for 1 ≤ i ≤ n, where t i are the plurality of values of the pseudo random function, and the second plurality of ciphertext values are calculated as d i,1 = g 2 βη ( x i + t i)- αrμ i and d i, 2 = g 2 η ( x i + t i)+ rμ i for 1 ≤ i ≤ n. generating a tuple (,,, ê), where and are groups whose order is with p prime and is a bilinear pairing and is non-degenerate; randomly select a first plurality of elements and a second plurality of elements; defining a parameter h that is based upon ê, g 1, g 2, and the first plurality of elements; selecting a pseudo-random function family indexed by a secret key K; setting public parameters as ê,,,, p, h; setting private parameters as g 1, g 2, the first plurality of elements, the second plurality of elements, the pseudo-random function family, and the secret key K; encrypting a message x = ( x 1,..., x n), when n is the number of components in the message by: choosing a random value r; computing a plurality of values of the pseudo random function; and computing a first plurality of ciphertext values based upon g 1, the random value r, the first plurality of elements, the second plurality of elements, the plurality of values of the pseudo random function, and message x; and computing a second plurality of ciphertext values based upon g 2, the random value r, the first plurality of elements, the second plurality of elements, the plurality of values of the pseudo random function, and message x; choosing a random value r; computing a plurality of values of the pseudo random function; and computing a first plurality of ciphertext values based upon g 1, the random value r, the first plurality of elements, the second plurality of elements, the plurality of values of the pseudo random function, and message x; and computing a second plurality of ciphertext values based upon g 2, the random value r, the first plurality of elements, the second plurality of elements, the plurality of values of the pseudo random function, and message x; the first plurality of elements are α, β, ξ, η and are selected such that ( α + β) ξη ≢ 0 (mod p), and the second plurality of elements are μ 1..., μ n and are selected such that ∑ i = 1 n μ i 2 ≡ 0 (mod p); the first plurality of ciphertext values are calculated as c i,1 = g 1 ξ ( x i + t i)+ rμ i and c' i,2 = g 1 αξ ( x i +t i)-βrμ i for 1 ≤ i ≤ n, where t i are the plurality of values of the pseudo random function, and the second plurality of ciphertext values are calculated as d i,1 = g 2 βη ( x i + t i)- αrμ i and d i, 2 = g 2 η ( x i + t i)+ rμ i for 1 ≤ i ≤ n.