We want an encryption scheme that would work well in arithmetic circuits (for SNARKS). So both the key and the input to the encryption should be m∈Fn vectors (with F being the field).
Solution
Keygen: generate key x∈F uniformly at random
Encrypt:
Input: message m∈Fn, key x∈F
Sample a nonce k∈F uniformly at random. Compute a=hash(k,x)∈F
Compute ri=hash(a,i) for i=1,2,…,n and let r∈Fn be the resulting vector
Compute e=m+r (note e∈Fn)
Output (k,e)
Decrypt:
Input: ciphertext (k,e), key x∈F,
Compute r∈Fn based on k,x as above
compute m=e−r
Output m
Total cost for encryption and decryption is: ≈n⋅Ghash where Ghash is the number of gates one hashing costs.