If you don't care about secret ballots, it's easy. If you do, it is much more difficult to do. If you're interested in the nitty-gritty of this, do a google for "Bruce Schneier electronic voting". He's written several essays on all of this that goes into detail of the 'whys' of exactly how difficult this is to do correctly. Yeah, if you read other stuff of his, you'll see that he's a leftist (generally), but he is directly on point for this issue. I read his monthly newsletter because I respect him regardless of his politics after having read "Applied Cryptography" many years ago.
I’ve never understood how a person can be smart and liberal at the same time. Common sense seems to debunk all their ideas. Weird. But yeah, Schneier on crypto is awesome.