Encryption was literally invented to communicate and plan killing people.
Some clay tablets from Mesopotamia somewhat later are clearly meant to protect information—one dated near 1500 BC was found to encrypt a craftsman's recipe for pottery glaze, presumably commercially valuable.
Also, a lot of those older cryptic hieroglyphs turned out to be in an early Northwestern Semitic language. The idea was apparently that you're going to have spells effective against snakes coming in on ships from Byblos, the spells should invoke the deities they know in the language they know.
https://semiticmuseum.fas.harvard.edu/publications/early-nor...
Guns can be used either to kill things, or to practice at getting better at killing things.