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:

    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)

    He hath achieved a maid
    That paragons description and wild fame;
    One that excels the quirks of blazoning pens.
    William Shakespeare (1564–1616)

    I was here first introduced to Joe.... He was a good-looking Indian, twenty-four years old, apparently of unmixed blood, short and stout, with a broad face and reddish complexion, and eyes, methinks, narrower and more turned up at the outer corners than ours, answering to the description of his race. Besides his underclothing, he wore a red flannel shirt, woolen pants, and a black Kossuth hat, the ordinary dress of the lumberman, and, to a considerable extent, of the Penobscot Indian.
    Henry David Thoreau (1817–1862)