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)

    Much can be inferred about a man from his mistress: in her one beholds his weaknesses and his dreams.
    —G.C. (Georg Christoph)

    Men are much more unwilling to have their weaknesses and their imperfections known, than their crimes; and, if you hint to a man that you think him silly, ignorant or even ill-bred or awkward, he will hate you more and longer than it you tell him plainly that you think him a rogue.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)