The Theory and Applications of Homomorphic Cryptography