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:

    Delicious essence! how refreshing art thou to nature! how strongly are all its powers and all its weaknesses on thy side! how sweetly dost thou mix with the blood, and help it through the most difficult and tortuous passages to the heart!
    Laurence Sterne (1713–1768)

    A pretty little collection of weaknesses and a terror of spiders are our indispensable stock-in-trade with the men.
    Colette [Sidonie Gabrielle Colette] (1873–1954)

    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)