The Kāma Sūtra suggests that lovers learn cryptography.

In the Kāma Sūtra, the ancient Sanskrit text on love, sex, and living well, there is a section that identifies sixty-four topics that the teachers of the art of pleasure should have under their sleeves. It contains the obvious – singing, playing instruments, dancing – the less-obvious – perfumery, bed-making, and teeth dyeing – and the downright odd – hypnotism, book-binding, and puns. But it also includes the skill of mlecchita vikalpa: cryptography.
Okay, I have to note at this stage that I own a copy of the Kāma Sūtra, the Alain Daniélou translation to be precise. Don’t snicker; it sits on the shelf next to the Dharmaśāstra, the I Ching, Confucuis’ Analects, an NIV study bible, a Quran I picked up at the Grand Bazaar in Istanbul, the Corpus Hermeticum, a compilation of Old Testament pseudepigrapha featuring various fake apocalypses, and several more along the same lines. What can I say? I’m a sucker for old religious books.
Anyway, the Daniélou translation describes the skill in question as “understanding barbarous foreign languages,” but the medieval commentary added by Yashodhara calls it “by inverting syllables, being understood only by the initiated.” It’s easy to imagine why such a skill is necessary: secret communications between secret lovers.
The actual ciphers are named elsewhere as Kautiliya and Muladeviya. They’re simple substitution ciphers: specific sounds swapped out for others in a set pattern. Nevertheless, I’m delighted that the Kāma Sūtra is pro-cryptography.