Treatise on cryptography and cryptanalysis. Ibn Dunaynir was the first to describe an arithmetic cipher in which the characters of the plaintext are converted into numbers subjected to arithmetic operations (a Numerical Alphabet with Decimal Weighting, ADWNA). He also developed techniques for disguising messages as financial records. His combination of transposition and substitution anticipates principles of modern cipher design. He was a cryptologist and man of letters; poetry was part of the literary culture of the Islamic world of his time and does not define his scientific contribution.