Affine Cipher - Description

Description

In the affine cipher the letters of an alphabet of size are first mapped to the integers in the range . It then uses modular arithmetic to transform the integer that each plaintext letter corresponds to into another integer that correspond to a ciphertext letter. The encryption function for a single letter is

where modulus is the size of the alphabet and and are the key of the cipher. The value must be chosen such that and are coprime. The decryption function is

where is the modular multiplicative inverse of modulo . I.e., it satisfies the equation

The multiplicative inverse of only exists if and are coprime. Hence without the restriction on decryption might not be possible. It can be shown as follows that decryption function is the inverse of the encryption function,

\begin{align}
\mbox{D}(\mbox{E}(x)) &= a^{-1}(\mbox{E}(x)-b)\mod{m}\\ &= a^{-1}(((ax+b)\mod{m})-b)\mod{m} \\ &= a^{-1}(ax+b-b)\mod{m} \\ &= a^{-1}ax \mod{m}\\ &= x\mod{m}.
\end{align}

Read more about this topic:  Affine Cipher

Famous quotes containing the word description:

    God damnit, why must all those journalists be such sticklers for detail? Why, they’d hold you to an accurate description of the first time you ever made love, expecting you to remember the color of the room and the shape of the windows.
    Lyndon Baines Johnson (1908–1973)

    It is possible—indeed possible even according to the old conception of logic—to give in advance a description of all ‘true’ logical propositions. Hence there can never be surprises in logic.
    Ludwig Wittgenstein (1889–1951)

    Whose are the truly labored sentences? From the weak and flimsy periods of the politician and literary man, we are glad to turn even to the description of work, the simple record of the month’s labor in the farmer’s almanac, to restore our tone and spirits.
    Henry David Thoreau (1817–1862)