implementation for bv homomorphic encryption scheme