American Civil War for Kids - Codes and Ciphers
The internet had not yet been invented during the Civil War. Even the telephone had not yet been invented (although it would be soon after the Civil War in 1876). To send a message, both Union and Rebel armies used couriers, telegraphs, and signal flags. All of these methods were easily intercepted by the enemy. So messages were written in secret code.
The South: The South used an ancient system of coding known as the diplomatic cipher. A phrase was selected, such as Liberty or Death. Then a cipher square was used to substitute letters in the coded message with letters in the secret phrase. There was nothing wrong with the code itself. But people would forget the phrase, or use the wrong phrase, or jumble the letters. Sometimes messages were received but were not understood.
The North: Once again, the North had an advantage. The Union system of coding messages was called the route cipher. It was simple to use and never cracked by the Confederacy. In frustration, the Confederate government even posted one of the captured Union messages in the newspaper, asking anyone who could decipher this message to please contact the army immediately. But no one responded.