Home > College Algebra > Ciphers > Affine Cipher (encoder / decoder) example

4. Affine Cipher example (encoder / decoder) ( Enter your problem )
  1. Examples
Other related methods
  1. A1Z26 Cipher (Letter to number Cipher)
  2. ADFGVX Cipher
  3. ADFGX Cipher
  4. Affine Cipher
  5. Alberti Cipher
  6. Atbash Cipher
  7. Autokey Cipher / Autoclave Cipher
  8. Bacon Cipher
  9. Beaufort Cipher
  10. Bifid Cipher
  11. Caesar Cipher
  12. Chaocipher
  13. Columnar transposition Cipher
  14. Double Transposition Cipher
  15. Enigma machine Cipher
  16. Four Square Cipher
  17. Gronsfeld Cipher
  18. Hill Cipher
  19. Kamasutra Cipher | Vatsyayana Cipher
  20. Morse Code Translator
  21. Multiplicative Cipher | Decimation Cipher
  22. Nihilist Cipher
  23. Playfair Cipher
  24. Polybius Square Cipher
  25. Porta Cipher
  26. Rail fence Cipher
  27. ROT-5 Cipher
  28. ROT-13 Cipher
  29. ROT-18 Cipher
  30. ROT-47 Cipher
  31. ROT-N Cipher
  32. Running Key Cipher
  33. Substitution Cipher
  34. Tap code Cipher | Knock code Cipher
  35. Three Square Cipher
  36. Trifid Cipher
  37. Trithemius Cipher
  38. Two-square Cipher
  39. Vigenere Cipher

3. ADFGX Cipher
(Previous method)
5. Alberti Cipher
(Next method)

1. Examples





1. Affine Cipher encoder

Text : ABCD efghi
Slope (A) : 3
Intercept (B) : 5
Alphabet : abcdefghijklmnopqrstuvwxyz


Solution:
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

Plaintextabcdefghijklmnopqrstuvwxyz
x012345678910111213141516171819202122232425
(3x + 5)58111417202326293235384144475053565962656871747780
(3x + 5) mod 26581114172023036912151821241471013161922252
Ciphertextfiloruxadgjmpsvybehknqtwzc

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 : abcdefghijklmnopqrstuvwxyz


Solution:
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

Plaintextabcdefghijklmnopqrstuvwxyz
x012345678910111213141516171819202122232425
(3x + 5)58111417202326293235384144475053565962656871747780
(3x + 5) mod 26581114172023036912151821241471013161922252
Ciphertextfiloruxadgjmpsvybehknqtwzc

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 Submit Here



3. ADFGX Cipher
(Previous method)
5. Alberti Cipher
(Next method)





Share this solution or page with your friends.
 
 
Copyright © 2026. All rights reserved. Terms, Privacy
 
 

.