1. Affine Cipher encoder
Text : ABCD efghi
Slope (A) : 3
Intercept (B) : 5
Alphabet : abcdefghijklmnopqrstuvwxyzSolution:The Affine cipher is a cipher, where each letter of plaintext is mapped to its numeric equivalent and then encrypted using a linear function y=(ax+b) mod m and then converted back to a letter.
Alphabet = abcdefghijklmnopqrstuvwxyz
| Plaintext | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z |
| x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| (3x + 5) | 5 | 8 | 11 | 14 | 17 | 20 | 23 | 26 | 29 | 32 | 35 | 38 | 41 | 44 | 47 | 50 | 53 | 56 | 59 | 62 | 65 | 68 | 71 | 74 | 77 | 80 |
| (3x + 5) mod 26 | 5 | 8 | 11 | 14 | 17 | 20 | 23 | 0 | 3 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 1 | 4 | 7 | 10 | 13 | 16 | 19 | 22 | 25 | 2 |
| Ciphertext | f | i | l | o | r | u | x | a | d | g | j | m | p | s | v | y | b | e | h | k | n | q | t | w | z | c |
| Plaintext | : ABCD efghi |
| Slope (a) | : 3 |
| Intercept (b) | : 5 |
| Ciphertext | : FILO ruxad |
2. Affine Cipher encoder
Text : hello world
Slope (A) : 3
Intercept (B) : 5
Alphabet : abcdefghijklmnopqrstuvwxyzSolution:The Affine cipher is a cipher, where each letter of plaintext is mapped to its numeric equivalent and then encrypted using a linear function y=(ax+b) mod m and then converted back to a letter.
Alphabet = abcdefghijklmnopqrstuvwxyz
| Plaintext | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z |
| x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| (3x + 5) | 5 | 8 | 11 | 14 | 17 | 20 | 23 | 26 | 29 | 32 | 35 | 38 | 41 | 44 | 47 | 50 | 53 | 56 | 59 | 62 | 65 | 68 | 71 | 74 | 77 | 80 |
| (3x + 5) mod 26 | 5 | 8 | 11 | 14 | 17 | 20 | 23 | 0 | 3 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 1 | 4 | 7 | 10 | 13 | 16 | 19 | 22 | 25 | 2 |
| Ciphertext | f | i | l | o | r | u | x | a | d | g | j | m | p | s | v | y | b | e | h | k | n | q | t | w | z | c |
| Plaintext | : hello world |
| Slope (a) | : 3 |
| Intercept (b) | : 5 |
| Ciphertext | : armmv tvemo |
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then