The history of cryptography is almost as old as that of human language. It is known that the ancient Egyptians, Chinese, Indians or Greeks already used more or less sophisticated message encryption methods, as shown by some surviving documentary examples.
Generally associated with the military field, the need to send messages also produced the development of artifacts for this purpose, such as the escítala used by the Spartan ephors. It consisted of two sticks of similar thickness, one for the sender and one for the receiver, on which a leather ribbon was wound where the message was written. Only by wrapping the tape around a stick of similar thickness could the message be read.
And there are even testimonies of the use of steganography (hiding the existence of the message), as detailed by Herodotus:
But when the need dictated the rapid communication of messages or warnings, there were not many options. The most instant it was the smoke signals and the fire. Although saying smoke signals inevitably we think of the Indians American Wild West movies, the method was actually used millennia ago in places like China or Greece. And it is still used today (see conclaves to elect pope).
But there was a problem, the smoke and fire signals could only transmit pre-agreed messages by sender and receiver (that is, both must know both the signals and their meaning in advance). If an impromptu message needed to be communicated, there was no way to do it because the receiver would not be able to decipher it.
We know that the Greeks had solved this problem thanks to the invention of Cleóxenos and Democlitus (in some translations they appear as Cleóxenes and Demoditus), two characters of whom hardly anything is known other than that they were historians and that they lived in the third century BC, having written the first a History of the Persians lost today. Polybius is the one who mentions them as the inventors of a telegraphic communication system that used smoke or fire signals to transmit letters of the Greek alphabet.
Of course, adding that he himself had perfected it and although he does not expressly say so, it is very likely that such improvement occurred to him during the siege of Numancia, of which he was a witness.
The method consists of encoding the letters of the alphabet with the numerical coordinates of a table. Each letter is therefore represented by two figures according to its position on the vertical and horizontal axes. Something really simple that anyone who has played sink the fleet or the like will be familiar. But back then it was something new and possibly revolutionary.
The improvement made by the Greek historian around 134 BC, and which led to the system being known today as Polybius' Square , focuses on regulating the use of torches to transmit lyrics.
In this way, it was possible to transmit any message, however improvised or urgent it might be, and not just pre-fixed and agreed-upon notices. That is if, once its widespread use, anyone could decrypt the messages knowing the method, which over time would lead to the development of cryptography itself. But that's another story. The important thing is that for the first time that is known, the human being was able to transmit any type of improvised message from a distance and immediately.
So it is not unreasonable to think that in the Roman army there would be soldiers specialized in such tasks. In any case, the Square of Polybius , combined with an encryption method, would be widely used by all kinds of military and subversive organizations, including none other than the KGB.