Cryptography was very important in the Civil war due to the advent of the telegraph and Morse code. Since anyone could listen in on a message as it passed between two points it was imperative to either secure the lines (not always possible) or to encode the message.