Raw implementation of Paillier