I would like to use garbled circuits to provide a service that allows people to vote where they do not need to reveal their votes to my server or to anyone else. Let's assume that I have secure ways to generate garbled circuits, perform oblivious transfer for the inputs, and to evaluate the circuits. Let's also assume that every person who will vote has a login to my service, that they have a working public/private keypair, and that the server has a copy of their public key. I will use this because in this scenario voters won't be able to easily connect to each other, and must communicate through the server.
This is just for a school project/my own interest. I will be very clearly advertising that the project was not done by security experts.
This is how I have envisioned the general flow of information:
The server, knowing the number of voters and having the ids of all the voters (as in, their logins to the service), crafts a garbled circuit which will compute the outcome of the vote.
The server gives this circuit to every voter, as well as the public keys of every other voter that will be participating.
Every voter retrieves their input from the server using oblivious transfer.
Each voter then encrypts their input with the public keys of every other voter. They then send their encrypted input back to the server.
The server then distributes every voter's input to every voter by giving them the version encrypted with the receiving voter's public key.
Every voter decrypts the others' inputs with their private key.
Every voter evaluates the garbled circuit.
Voters send the output of the circuit to the server.
If the server notices any of the outputs are different, it broadcasts that the vote is bad. Otherwise, it broadcasts the outcome of the vote.
Each voter checks that the broadcasted outcome is the same as the outcome they computed.
Have I missed anything obvious here? Do you see any ways to make it more efficient?