We describe the theory behind a practical voting scheme based on homomorphic encryption. We give an example of an ElGamal-style encryption scheme, which can be used as the underlying cryptosystem. Then, we present efficient honest verifier zero-knowledge proofs that make the messages in the voting scheme shorter and easier to compute and verify, for voters as well as authorities, than in currently known schemes. Finally, we discuss various issues connected with the security of a practical implementation of the scheme for on-line voting. Notably, this includes minimizing risks that are beyond what can be handled with cryptography, such as attacks that try to substitute the software running on client machines.