HANGING chads. Ballot stuffing. Gerrymandering. Such dirty tricks enfeeble democracy. But the security of the votes cast in Geneva during Switzerland's general election on October 21st is guaranteed. The authorities will use quantum cryptography—a way to transmit information that detects eavesdroppers and errors almost immediately—to ensure not only that votes are kept secret but also that they are all counted.

In quantum cryptography, as in most long-distance data transmission, the information is carried by photons, the particles which compose light and other sorts of electromagnetic radiation. These particular photons, however, are manipulated in a special way. The simplest example is when the sender (whom cryptographers usually call Alice) dispatches a stream of them to the receiver (who is known as Bob). These photons will have one of two modes. In the first, a photon is polarised either vertically or horizontally. In the second, it is polarised diagonally—plus or minus 45°. In the first mode, a photon polarised vertically represents a “0” and one polarised horizontally represents a “1”. Similarly, in the second mode polarisation at +45° represents “0” and at -45°, “1”.

Bob's receiver can be set to only one mode at a time, so if Alice sends him a vertically polarised photon and his equipment is in the first mode, then he will record a “0”. If his equipment is in the second mode, he will have an equal chance of recording a “0” or a “1”. After a short time, Alice tells Bob that the photon she sent should have been measured in mode one; she does not tell him what value it should have been. Bob now knows whether he made a correct measurement. If he did, he keeps the result and tells Alice that they have a match. If not, he junks it and tells Alice to do likewise—a process that takes a few millionths of a second.

It is at this point that Eve may show up. Eve is the name that cryptographers give to an eavesdropper. Should Eve intercept the transmission, the laws of quantum mechanics mean that she cannot read it without altering the photon in some way. By recording each photon, she actually destroys what she is measuring. She must therefore generate some new photons and send these to Bob, in the hope that he doesn't twig what is going on. But her equipment, too, must be set to one mode or the other, and she cannot be certain that the polarity of the photon she sends to Bob is correct.

This means that if Eve is involved, when Alice and Bob come to compare their data there will be many more mistakes than would otherwise be expected. Eve's presence will thus quickly be revealed and appropriate countermeasures can be taken. And the system works not only when there is an intelligent eavesdropper on the line, but also when data become corrupted accidentally.

For a truly secure system, the message will be encrypted in a way that requires a mathematical key to unlock it. In fact, both key and message can be transmitted this way: if the key is sent first, any interception will be detected and the key discarded. Only when the key has been safely transmitted need the message itself be sent.

This being Switzerland, it is unlikely that anyone will try a bit of electronic ballot-stuffing in this particular election, so it is the anti-accidental-corruption feature that is of most interest to Geneva's returning officers. And in truth, this is as much a piece of advertising as a real application. The firm behind the efforts, ID Quantique, is Swiss. The other two companies developing quantum cryptography for commercial use, MagiQ and BBN Technologies, are American. Employing quantum cryptography to transmit the vote from polling stations to central counting house is thus a bit of a publicity stunt.

Still, this will be the first time the technology has been deployed for real, so whether the system succeeds or fails will be of great importance to ID Quantique. Like the other two firms, it has its eyes on banks, insurance companies and other businesses that have to move a lot of sensitive data around. Whether the government of Florida will be interested is a different question.