Affine

The Affine cipher is a mono-alphabetic substitution cipher where each letter in the alphabet is mapped to a numeric equivalent and encrypted using a mathematical function.

Key 1
1
Key 2
0

Explanation

Encryption is performed by converting every letter to a number with a = 0, b = 1, c = 2, etc., then applying a function to each number, then converting each number back to a letter.

The formula used in this encryption is F(x) = (ax + b) % m, where x is the original letter, a and b are the keys of the cipher, and m is the length of the alphabet, with a and m being co-prime.

Decryption is performed using the formula F(x) = a^-1(x - b) % m.

The Affine cipher is a relatively weak cipher compared to modern encryption methods because it's vulnerable to frequency analysis and other cryptanalysis techniques. However, it's simple to implement and understand, making it a good introduction to encryption concepts.

Facts

No facts available.