One of the key features of a secret ballot voting system is that there's no practical way to tie a voter to a vote.
If you have a direct relation between a voter and a unique key, and that key and a vote, you've basically built an automated corruption system.
And a lot of people might not be entirely comfortable with the assertion that it's fine, only the government knows who you voted for.