Affine Cipher - Weaknesses

Weaknesses

Since the affine cipher is still a monoalphabetic substitution cipher, it inherits the weaknesses of that class of ciphers. The Caesar cipher is the Affine cipher when since the encrypting function simply reduces to a linear shift.

Considering the specific case of encrypting messages in English (i.e. ), there are a total of 286 non-trivial affine ciphers, not counting the 26 trivial Caesar ciphers. This number comes from the fact there are 12 numbers that are coprime with 26 that are less than 26 (these are the possible values of ). Each value of can have 26 different addition shifts (the value); therefore, there are 12*26 or 312 possible keys. This lack of variety renders the system as highly insecure when considered in light of Kerckhoffs' Principle.

The cipher's primary weakness comes from the fact that if the cryptanalyst can discover (by means of frequency analysis, brute force, guessing or otherwise) the plaintext of two ciphertext characters then the key can be obtained by solving a simultaneous equation. Since we know and are relatively prime this can be used to rapidly discard many "false" keys in an automated system.

The same type of transformation used in affine ciphers is used in linear congruential generators, a type of pseudorandom number generator. This generator is not a cryptographically secure pseudorandom number generator for the same reason that the affine cipher is not secure.

Read more about this topic:  Affine Cipher

Famous quotes containing the word weaknesses:

    You will find that reason, which always ought to direct mankind, seldom does; but that passions and weaknesses commonly usurp its seat, and rule in its stead.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)

    Once we know our weaknesses they cease to do us any harm.
    —G.C. (Georg Christoph)

    Never yield to that temptation, which, to most young men, is very strong, of exposing other people’s weaknesses and infirmities, for the sake either of diverting the company, or of showing your own superiority. You may get the laugh on your side by it for the present; but you will make enemies by it for ever; and even those who laugh with you then, will, upon reflection, fear, and consequently hate you.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)