One of the earliest descriptions of encryption by substitution appears in the Kāma-Sūtra, a text written in the fourth century A.D. by the Brahmin scholar Vātsyāyana, but based on manuscripts dating back to the fourth century B.C. The Kāma-Sūtra recommends that women should study 64 arts, such as cooking, dressing, massage and the preparation of perfumes. The list also includes some less obvious arts, namely conjuring, chess, bookbinding and carpentry. Number 45 on the list is mlecchita-vikalpā, the art of secret writing, advocated in order to help women conceal the details of their liaisons.

