### The War of Waving Flags
Codes at War · Signals
During the Civil War, communicating across a smoky battlefield was a nightmare. U.S. Army surgeon Major Albert Myer solved this by inventing the "wig-wag" system. Signalmen waved massive flags by day and flaming torches by night. Waving left meant "1," waving right meant "2," and combinations spelled out letters.
There was just one massive problem. Myer’s brilliant assistant, E. Porter Alexander, joined the Confederate Army, while Myer fought for the Union. Both sides were using the exact same system! To stop enemies from reading their flags through spyglasses, signalmen used brass cipher disks to scramble the alphabet.
Telegraph wires weren't safe either. Enemy spies frequently climbed poles to hook their own listening gadgets directly to the cables. To protect President Abraham Lincoln’s military telegrams, the Union Army relied on a low-tech but brilliant trick called a Route Cipher.
Instead of swapping individual letters, a Route Cipher scrambles entire words. A commander wrote a message into a grid, replaced important names with fake code words, and read down the columns instead of across the rows. Anyone tapping the wire just heard a confusing jumble of out-of-order nonsense.