Fact-checked by Grok 2 weeks ago

Affine cipher

The affine cipher is a monoalphabetic substitution cipher in classical cryptography that encrypts plaintext letters by applying an affine transformation to their numerical equivalents, typically modulo 26 for the English alphabet. It generalizes simpler ciphers like the Caesar shift by incorporating both multiplication and addition in the encryption formula. In the affine cipher, each letter of the plaintext is first converted to a number from 0 to 25 (A=0, B=1, ..., Z=25), then encrypted using the formula E(x) = (a \cdot x + b) \mod 26, where a and b are integers serving as the key, and \gcd(a, 26) = 1 to ensure the transformation is invertible. Decryption reverses this process with the formula D(y) = a^{-1} (y - b) \mod 26, where a^{-1} is the modular multiplicative inverse of a modulo 26. Valid choices for a are limited to 12 values (1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25), yielding a total key space of 312 possible keys when b ranges from 0 to 25. Although the affine cipher enhances security over basic shift ciphers by permuting letter frequencies more thoroughly, it remains highly vulnerable to cryptanalysis, particularly frequency analysis, due to its small key space and the preservation of some statistical patterns in sufficiently long messages. It serves primarily as an educational tool today for introducing concepts in modular arithmetic and basic cryptography, rather than for practical secure communication.

History and Background

Origins and Development

The affine cipher is a generalization of classical monoalphabetic substitution ciphers, such as the Caesar cipher, developed in the late 20th century primarily as an educational tool to illustrate applications of modular arithmetic and linear congruences in cryptography. While special cases like the Caesar shift have ancient origins dating back to Julius Caesar in the 1st century BCE, the general form incorporating both multiplicative and additive components was formalized later for pedagogical purposes. These early substitution methods were employed for diplomatic and military communications in antiquity and the Renaissance, serving as precursors to more advanced ciphers, including polyalphabetic ones. The formal recognition of the affine cipher as a distinct tool, leveraging modular arithmetic for encryption, occurred in modern cryptographic education, with widespread use in the 20th century to demonstrate number theory concepts in security contexts.

Relation to Other Ciphers

The affine cipher serves as a significant generalization of the Caesar cipher, extending its simple shift mechanism by incorporating a multiplicative component. In the Caesar cipher, encryption is achieved solely through addition modulo 26, equivalent to setting the multiplier a = 1 and varying the shift b. By allowing a to be any integer coprime to 26, the affine cipher generates up to 312 distinct permutations of the alphabet, vastly increasing the key space compared to the Caesar's mere 25 non-trivial shifts (excluding the identity). This enhancement maintains the monoalphabetic substitution nature but introduces greater flexibility without altering the fundamental linear structure. A notable special case within the affine framework is the Atbash cipher, which reverses the alphabet and corresponds to the parameters a \equiv -1 \pmod{26} (or a = 25) and b = 0. This substitution maps each letter to its alphabetic counterpart from the end (A to Z, B to Y, etc.), embodying a fixed reflection that fits seamlessly into the affine model's linear congruence. Unlike more arbitrary monoalphabetic substitutions, the Atbash's simplicity highlights how the affine cipher encompasses both additive and reflective transformations as subclasses. In contrast to polyalphabetic ciphers such as the Vigenère, which employ multiple substitution alphabets keyed to a repeating keyword for periodic shifts, the affine cipher remains strictly monoalphabetic, applying a single uniform transformation across the entire message. The Vigenère effectively chains multiple Caesar-like shifts, achieving higher diffusion through its polyalphabetic design, whereas the affine's fixed linear mapping lacks this variability and keyword dependency. This positions the affine cipher as a bridge between basic monoalphabetic systems like the Caesar and more intricate polyalphabetic ones, offering increased complexity via modular multiplication while retaining the elegance of a single-key pair without reliance on textual keywords.

Mathematical Foundations

Modular Arithmetic Basics

Modular arithmetic operates on integers by considering their remainders when divided by a fixed positive integer called the modulus, denoted as m. The modulo operation, x \mod m, yields the remainder r such that x = qm + r for some integer q and $0 \leq r < m. This system, often called "clock arithmetic," ensures computations cycle within a finite set of residues from 0 to m-1. In cryptographic applications like the affine cipher, the 26-letter English alphabet is numerically mapped to the residues modulo 26, assigning A to 0, B to 1, ..., up to Z to 25. This bijection allows letters to be treated as elements in the set \{0, 1, \dots, 25\}, facilitating arithmetic operations that wrap around the alphabet. Addition and multiplication in modular arithmetic preserve the ring structure of integers, enabling efficient computation of sums and products modulo m. Specifically, (a + b) \mod m = [(a \mod m) + (b \mod m)] \mod m and (a \cdot b) \mod m = [(a \mod m) \cdot (b \mod m)] \mod m. For example, with m = 26, (5 + 3) \mod 26 = 8 and (5 \cdot 3) \mod 26 = 15. These properties ensure that operations on large numbers reduce to equivalents within the residue classes, simplifying analysis. The greatest common divisor (GCD) of two integers a and m, denoted \gcd(a, m), determines whether a is invertible modulo m—that is, whether there exists an integer b such that a \cdot b \equiv 1 \mod m. Such an inverse exists if and only if \gcd(a, m) = 1, meaning a and m are coprime. For instance, \gcd(5, 26) = 1 (computed via the Euclidean algorithm: 26 = 5 \cdot 5 + 1, then 5 = 1 \cdot 5 + 0, yielding GCD 1), so 5 is invertible modulo 26; conversely, \gcd(4, 26) = 2 (26 = 4 \cdot 6 + 2, 4 = 2 \cdot 2 + 0), so 4 has no inverse. The Euclidean algorithm efficiently computes the GCD by successive division: replace the pair (a, m) with (m \mod a, a) until the remainder is zero, with the last non-zero remainder as the GCD.

Linear Congruences

A linear congruence is an equation of the form ax \equiv b \pmod{m}, where a, b, and x are integers and m > 0 is the modulus. This equation has integer solutions for x if and only if d = \gcd(a, m) divides b. When d = 1, the equation has a unique solution modulo m, meaning there is exactly one solution class representative in the range $0 to m-1. The case b = 1 corresponds to finding the multiplicative inverse of a modulo m, denoted a^{-1}, which satisfies a \cdot a^{-1} \equiv 1 \pmod{m}. Such an inverse exists precisely when \gcd(a, m) = 1. It is computed using the extended Euclidean algorithm, which applies the Euclidean algorithm to find \gcd(a, m) while back-substituting to express the gcd as a linear combination: identify integers s and t such that a s + m t = 1, then a^{-1} \equiv s \pmod{m}. For example, the multiplicative inverse of 5 modulo 26 is 21, since $5 \times 21 = 105 and $105 \equiv 1 \pmod{26} (as $105 - 4 \times 26 = 1). In the context of the affine cipher, linear congruences form the basis for the encryption mapping Ex = (a x + b) \mod m, where the existence of the inverse for a (when \gcd(a, m) = 1) guarantees a bijective function, ensuring every plaintext letter maps uniquely to a ciphertext letter and vice versa for decryption.

Definition and Operation

General Formulation

The affine cipher is a monoalphabetic substitution cipher that operates on the letters of an alphabet by applying a linear transformation modulo the alphabet size. In its standard form for the English language, the alphabet consists of 26 uppercase letters, mapped to numerical values from 0 to 25 (A=0, B=1, ..., Z=25), with spaces and punctuation typically ignored during encoding. The encryption function transforms a plaintext letter indexed by x into a ciphertext letter indexed by y using the formula E(x) = (a x + b) \mod 26, where a and b are integers serving as the cipher keys, with a coprime to 26 to ensure invertibility. The corresponding decryption function recovers the plaintext from ciphertext y via D(y) = a^{-1} (y - b) \mod 26, where a^{-1} denotes the modular multiplicative inverse of a modulo 26, which exists precisely because \gcd(a, 26) = 1. This formulation generalizes to alphabets of size m by replacing 26 with m, allowing application to other languages or symbol sets, though the English variant remains the most common. The condition \gcd(a, 26) = 1 guarantees that the encryption map is a bijection on \{0, 1, \dots, 25\}, as multiplication by a modulo 26 permutes the residues and addition of b merely shifts them cyclically, both preserving bijectivity.

Key Generation and Validity

In the affine cipher, the key consists of a pair of integers (a, b), where a is the multiplicative component and b is the additive shift, both operating modulo 26 for the standard 26-letter English alphabet. The value of a must be chosen from 1 to 25 such that \gcd(a, 26) = 1 to ensure the encryption function is bijective, meaning it provides a one-to-one mapping between plaintext and ciphertext letters. The valid values for a are 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, and 25, yielding 12 possible choices. Meanwhile, b can be any integer from 0 to 25, providing 26 options. This results in a total of $12 \times 26 = 312 possible valid keys. If \gcd(a, 26) > 1, the mapping is not bijective, as multiple plaintext letters will encrypt to the same ciphertext letter, rendering decryption ambiguous or impossible without loss of information. For instance, with the invalid key (a=2, b=0), the encryption function E(x) = 2x \mod 26 maps only to even residues modulo 26, collapsing the 26-letter space into just 13 distinct outputs; for example, both x=0 (A) and x=13 (N) map to 0 (A), while odd inputs like x=1 (B) map to 2 (C), but the overall substitution fails to cover the full alphabet uniquely. To generate keys systematically, select a from the list of integers coprime to 26, verifiable using the Euclidean algorithm, and pair it with any b from 0 to 25; random selection should first filter for coprimality to avoid invalid keys that compromise reversibility. A valid example is the key (a=3, b=5), where \gcd(3, 26) = 1, ensuring a full permutation of the alphabet.

Encryption and Decryption Processes

Encryption Algorithm

The encryption algorithm of the affine cipher transforms plaintext letters into ciphertext letters using a linear function over the integers modulo 26, assuming the standard 26-letter English alphabet. The process requires a key pair (a, b), where a and b are integers between 0 and 25, and a must be coprime with 26 to ensure invertibility. To encrypt a message, follow these steps:
  1. Convert each letter in the plaintext to its numerical equivalent, where A = 0, B = 1, ..., Z = 25. Typically, the plaintext is converted to uppercase, and non-alphabetic characters such as spaces or punctuation are preserved in their original positions without modification.
  2. For each numerical value x corresponding to a letter, compute the ciphertext value y using the formula E(x) = (a x + b) \mod 26. This operation applies the affine transformation modulo 26 to shift and scale the position within the alphabet.
  3. Convert each resulting y value back to a letter using the same mapping (0 = A, 1 = B, ..., 25 = Z). Non-alphabetic characters remain unchanged, ensuring the ciphertext maintains the same length and structure as the original message.
For example, consider the plaintext "HELLO" with key (a=3, b=5). The letter H corresponds to x=7, so E(7) = (3 \cdot 7 + 5) \mod 26 = 26 \mod 26 = 0, which maps to A. Continuing this for the full word yields the ciphertext "ARMMV", preserving the original length of 5 characters.

Decryption Algorithm

The decryption process in the affine cipher reverses the encryption transformation to recover the original plaintext from the ciphertext, assuming a valid key pair (a, b) where a is coprime with the modulus 26. The general decryption function is given by D(y) = a^{-1} (y - b) \pmod{26}, where y is the numerical representation of a ciphertext letter, and a^{-1} is the modular multiplicative inverse of a modulo 26, satisfying a \cdot a^{-1} \equiv 1 \pmod{26}. This formula ensures that applying decryption to an encrypted value yields the original plaintext number. To decrypt a ciphertext message, follow these steps:
  1. Convert each ciphertext letter to its corresponding numerical value, where A=0, B=1, ..., Z=25.
  2. For each numerical value y, compute the inverse a^{-1} of the encryption multiplier a modulo 26 (detailed below).
  3. Apply the decryption formula: multiply a^{-1} by (y - b) and take the result modulo 26.
  4. Convert the resulting numerical values back to letters using the same alphabet mapping.
The modular inverse a^{-1} is computed using the extended Euclidean algorithm, which finds integers s and t such that a s + 26 t = \gcd(a, 26); since \gcd(a, 26) = 1 for valid keys, s \pmod{26} provides the inverse. This algorithm efficiently solves for the inverse in logarithmic time relative to the modulus size. For example, consider decrypting the ciphertext letter A (0) produced by encrypting H (7) with key (a=3, b=5), where $3 \cdot 7 + 5 = 26 \equiv 0 \pmod{26}. The inverse of 3 modulo 26 is 9, since $3 \cdot 9 = 27 \equiv 1 \pmod{26}. Then, D(0) = 9 \cdot (0 - 5) = 9 \cdot (-5) = -45 \equiv 7 \pmod{26} (as -45 + 2 \cdot 26 = 7), corresponding to H. This process assumes a valid key with \gcd(a, 26) = 1; if the key is invalid (e.g., \gcd(a, 26) > 1), no such inverse exists, preventing full recovery of the plaintext.

Examples and Illustrations

Basic Numerical Example

To illustrate the encryption and decryption processes of the affine cipher, consider the keys a = 5 and b = 8, which are valid since \gcd(5, 26) = 1. Assume the standard mapping where A=0, B=1, ..., Z=25, and process the plaintext message "HI" (ignoring case and spaces for simplicity). For encryption, apply the formula E(x) = (5x + 8) \mod 26 to each letter's numerical value. The letter H corresponds to x = 7, so E(7) = (5 \cdot 7 + 8) \mod 26 = 43 \mod 26 = 17, which maps to R. Similarly, I corresponds to x = 8, so E(8) = (5 \cdot 8 + 8) \mod 26 = 48 \mod 26 = 22, which maps to W. Thus, the ciphertext is "RW". For decryption, first compute the modular inverse of a = 5 modulo 26, which is a^{-1} = 21 because $5 \cdot 21 = 105 \equiv 1 \mod 26. The decryption formula is D(y) = 21(y - 8) \mod 26. For the ciphertext letter R (y = 17), D(17) = 21(17 - 8) \mod 26 = 21 \cdot 9 \mod 26 = 189 \mod 26 = 7, which maps back to H. For W (y = 22), D(22) = 21(22 - 8) \mod 26 = 21 \cdot 14 \mod 26 = 294 \mod 26 = 8, which maps to I. Thus, the plaintext "HI" is recovered.

Full Alphabet Encoding

To illustrate the complete substitution mapping of the affine cipher over the full 26-letter English alphabet, consider the example keys a = 3 and b = 5. The encryption applies the formula E(x) = (3x + 5) \mod 26, where x represents the numerical value of the plaintext letter (A=0 to Z=25), producing a permutation that shifts and scales positions linearly modulo 26. This generates a monoalphabetic substitution where each plaintext letter maps uniquely to a ciphertext letter, preserving the linear structure evident in the sequential increments of 3 positions (plus the fixed offset of 5), wrapped around the modulus. The full mapping for this key pair is presented in the table below, showing the direct correspondence for all letters:
PlaintextCiphertext
AF
BI
CL
DO
ER
FU
GX
HA
ID
JG
KJ
LM
MP
NS
OV
PY
QB
RE
SH
TK
UN
VQ
WT
XW
YZ
ZC
This table highlights the linear pattern: starting from F for A, each subsequent plaintext letter advances the ciphertext by 3 positions in the alphabet, modulo 26, demonstrating the affine transformation's systematic nature. Only 12 possible values for a (specifically, those coprime to 26: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25) yield valid, invertible mappings, ensuring each such a produces a unique permutation structure when combined with any b from 0 to 25.

Security and Cryptanalysis

Inherent Weaknesses

The affine cipher is fundamentally a monoalphabetic substitution cipher, in which each plaintext letter is mapped to a unique ciphertext letter via a fixed linear transformation, resulting in a consistent substitution throughout the entire message. This monoalphabetic nature exposes it to classical cryptanalytic techniques, such as frequency analysis, because the relative frequencies of letters in the ciphertext directly correspond to those in the plaintext, allowing attackers to identify common letters like 'E' by their prominent occurrence. A primary structural limitation is the cipher's small key space, comprising only 12 valid multipliers a (those coprime to 26) and 26 possible shifts b, yielding a total of 312 distinct keys. This limited number of possibilities renders the cipher susceptible to exhaustive brute-force attacks, as modern computing resources can enumerate all keys in negligible time. Additionally, the affine cipher preserves the statistical properties of the plaintext, including letter frequencies, since it applies a bijective permutation to the alphabet without altering the distribution of occurrences. For instance, frequent English letters such as 'E' (appearing about 12.7% of the time) will map to another letter that exhibits similarly high frequency in the ciphertext, facilitating pattern recognition by cryptanalysts. Unlike contemporary cryptographic systems, the affine cipher lacks meaningful diffusion and confusion beyond its basic linear mapping, as each plaintext symbol is encrypted independently without propagating changes to other positions in the text. This isolation of encryptions means that modifying a single letter in the plaintext affects only its corresponding ciphertext letter, providing no avalanche effect or interdependency that could obscure statistical attacks.

Breaking the Cipher

The affine cipher can be broken using a brute-force attack, which exhaustively tests all possible valid keys to decrypt the ciphertext and identify the correct one through pattern recognition or statistical validation. There are 312 possible keys, consisting of 12 choices for the multiplier a (the integers coprime to 26: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25) and 26 choices for the shift b (0 through 25). For each key pair, the entire ciphertext is decrypted, and the resulting text is scored against English language patterns, such as letter frequencies or common word occurrences; the highest-scoring decryption is selected as the plaintext. This approach is computationally inexpensive, completing in seconds on modern hardware like a standard laptop or cloud environment, even for ciphertexts of several thousand characters. Frequency analysis exploits the affine cipher's preservation of plaintext letter frequencies, as it is a monoalphabetic substitution cipher, allowing attackers to map the most frequent ciphertext letters to common English letters like 'E' (frequency ≈12.7%) or 'T' (≈9.1%). To recover the key, assume two such mappings—for instance, the most frequent ciphertext letter y_1 corresponds to plaintext 'E' (numeric value 4), and the second-most frequent y_2 to 'T' (19)—yielding the system of congruences: a \cdot 4 + b \equiv y_1 \pmod{26} a \cdot 19 + b \equiv y_2 \pmod{26} Subtracting these equations eliminates b, solving for a via the difference: a \cdot 15 \equiv y_2 - y_1 \pmod{26}, where a must be coprime to 26; substitute back to find b. For example, given ciphertext "OINRF HORXH ONAPF..." with frequencies showing 'N' (13) most common and 'O' (14) second, assume 'N' → 'E' and 'O' → 'T', leading to a = 7, b = 11, which decrypts coherently. This method achieves high accuracy (up to 100% in tests on texts of 350–15,000 words) when using dot-product scoring of letter frequencies against English norms or counting common words like "the". If the initial assumptions fail, test alternative pairs among the top frequent letters, requiring at most a few dozen trials. A known-plaintext attack requires only two pairs of corresponding plaintext letters x_1, x_2 and ciphertext letters y_1, y_2 to solve for the key directly, forming the linear system: a x_1 + b \equiv y_1 \pmod{26} a x_2 + b \equiv y_2 \pmod{26} Subtracting yields a (x_1 - x_2) \equiv y_1 - y_2 \pmod{26}; solve for a (ensuring it is invertible modulo 26), then compute b. For instance, if plaintext "defend" encrypts to "ufqfau" (partial), mapping 'd' (3) → 'u' (20) and 'e' (4) → 'f' (5) gives equations solvable via Gaussian elimination modulo 26, yielding a = 11, b = 13, decrypting the full message "defend the east wall". This attack is highly efficient, succeeding with minimal known text (e.g., two letters), and is practical when partial plaintext is available from context or cribs. In practice, for a ciphertext like "FQQHI LZWZX YZFYD ELQOO HQQDI...", frequency analysis might identify 'Q' (16) as mapping to 'E' (4), setting up a \cdot 4 + b \equiv 16 \pmod{26}; testing candidate a values coprime to 26 (e.g., a=11 gives b=24, decrypting to recognizable English from Edgar Allan Poe's "The Raven"). These methods render the affine cipher obsolete for secure communication, as breaks are feasible by hand or basic computation.

References

  1. [1]
    [PDF] Affine Ciphers
    An affine cipher is a substitution cipher, like a shift cipher, using the formula y ≡ αx + β (mod 26) for encryption.Missing: history | Show results with:history
  2. [2]
    [PDF] Lecture 5 - CPSC 467: Cryptography and Security
    Sep 15, 2020 · Affine ciphers. Affine ciphers generalize simple shift ciphers such as Caesar. Let α and β be two integers with gcd(α,26) = 1.
  3. [3]
    Affine Ciphers - WCSU Sites
    Definition 6.2.1. Affine Cipher. An affine cipher is a cipher with a two part key, a multiplier ...
  4. [4]
    Johannes Trithemius Issues the First Book on Cryptography
    A book on many forms of writing, but actually the first book on codes and cryptography, was posthumously published in Basel in 1518, two years after his death.
  5. [5]
    A brief history of western cryptography through the Middle Ages
    Jan 27, 2024 · In 1518 Johannes Trithemius would publish 'Polygraphia', the first western book dedicated to the topics of cryptography and steganography.
  6. [6]
    [PDF] Affine Ciphers - Koc Lab
    Cryptanalysis of Affine Cipher. The Affine Cipher is only slightly stronger than the Shift Cipher. The number of keys is larger than the Shift Cipher: 312 ...
  7. [7]
    [PDF] Affine Ciphers
    Also note that if a = 1, then E(x)=(x + b) MOD 26 is simply a Caesar (+b) shift cipher.
  8. [8]
    [PDF] using primitive pythagorean triples and the blom's scheme in the 4 ...
    The Atbash cipher and the Caesar cipher are special cases of the affine cipher. They inherit the weakness of affine cipher, that is; they break Kerckhoffs ...
  9. [9]
    What is modular arithmetic? (article) - Khan Academy
    a mod b is the remainder when a is divided by b. 1 comment
  10. [10]
    Shift cipher (article) - Khan Academy
    Shift Ciphers work by using the modulo operator to encrypt and decrypt messages. The Shift Cipher has a key K, which is an integer from 0 to 25.
  11. [11]
    Modular multiplication (article) - Khan Academy
    Modular multiplication. Let's explore the multiplication property of modular arithmetic: (A * B) mod C = (A mod C * B mod C) mod C. Example for Multiplication:.
  12. [12]
    Modular inverses (article) | Cryptography | Khan Academy
    What is a modular inverse? In modular arithmetic we do not have a division operation. However, we do have modular inverses.
  13. [13]
    [PDF] Number Theory 1: GCD, Linear Combinations, Inverses
    Jan 27, 2014 · Euclid's Algorithm computes the greatest common divisor of two positive integers, and it can be written in a recursive form as follows. function ...
  14. [14]
    Linear Congruence Equation -- from Wolfram MathWorld
    A linear congruence equation ax=b (mod m) (1) is solvable iff the congruence b=0 (mod d) (2) with d=GCD(a,m) is the greatest common divisor is solvable.
  15. [15]
    Modular Inverse -- from Wolfram MathWorld
    A modular inverse of an integer b (modulo m ) is the integer b^(-1) such that bb^(-1)=1 (mod m). A modular inverse can be computed in the Wolfram Language.
  16. [16]
    [PDF] The Euclidean Algorithm and Multiplicative Inverses - Math
    The Euclidean Algorithm finds the greatest common divisor of two integers. It can also be used to find multiplicative inverses in modular arithmetic.
  17. [17]
    3.6 Application: Encryption
    Affine Cipher. ... An affine cipher is one in which letters are transformed via a linear function, e ( x ) = a x + b ( mod n ) where a , b ∈ Z and . n ∈ Z + .
  18. [18]
    [PDF] Affine Ciphers
    Affine Ciphers, Decimation Ciphers, and Modular Arithmetic ... In the special case where b = 0, the affine cipher E(x) = axMODm is called a decimation cipher.
  19. [19]
    [PDF] BILL RECORD THIS LECTURE - UMD Computer Science
    Sep 16, 2020 · Affine cipher Key in. {1,3,5,7,9,11,15,17,19,21,23,25}×{0,...,25}. 312 keys, need 9 bits. Page 15. Affine Cipher: Need to Know Inverses Mod ...
  20. [20]
  21. [21]
    [PDF] LAMC Junior Circle: Modular Arithmetic and Ciphers
    Jun 3, 2018 · Subtract β from the ciphertext • Find the modular inverse of α and then multiply that by the number you obtained by subtracting β • Convert ...
  22. [22]
    [PDF] Cryptography
    Note: By above, the extended Euclidean algorithm gives us a way to compute the multiplicative inverse in polynomial time. Page 18. Extended Euclidean Algorithm.
  23. [23]
    Affine Cipher - Online Decryption, Decoder, Encoder, Calculator
    Affine cipher is the name given to a substitution cipher whose key consists of 2 coefficients A and B constituting the parameters of a mathematical linear ...Missing: congruences | Show results with:congruences
  24. [24]
    [PDF] Exploring Classical Cryptographic Ciphers and IS-ENGLISH ...
    Jul 4, 2025 · This project focused on two fundamental classical encryption schemes: the Shift Cipher and the Affine Cipher. Both are substitution ciphers ...Missing: origin | Show results with:origin
  25. [25]
    Affine Cipher - Practical Cryptography
    For example 15 and 26 have no factors in common, so 15 is an acceptable value for a, however 12 and 26 have factors in common (e.g. 2) so 12 cannot be used for ...
  26. [26]
    [PDF] Cracking of Cryptographic Algorithms - JETIR Research Journal
    Additionally, the Rail Fence and Affine Ciphers demonstrate vulnerabilities inherent in their structural designs, while the Autokey Cipher offers moderate ...
  27. [27]
    [PDF] Contents - Jay Daigle
    Algorithm 1.3 (Affine Cipher). Let a ∈ Z/26Z×,b ∈ Z/26Z. We can encipher a ... no diffusion or con- fusion; each plaintext letter corresponds to one ...
  28. [28]
    [PDF] Sketch of Lecture 1 - Armin Straub
    Feb 7, 2024 · (affine cipher) A slight upgrade to the shift cipher, we encrypt ... as in the one-time pad or stream ciphers provides no diffusion.
  29. [29]
    [PDF] Cryptanalysis of Shift and Affine Ciphers Using Statistical English ...
    Aug 15, 2025 · For the Affine cipher, all (a,b) pairs are tested, where a ∈ {1,3,5,7,9,11,15,17,19,21,23,25} and b ∈ {0,1,..,25}. Each pair defines a.
  30. [30]
    [PDF] Rudimentary Cryptanalysis of the Affine Cipher with Known ...
    In this research paper, we aim to investigate the cryptanalysis of the affine cipher using the brute-force algorithm. Our objective is to develop an ...
  31. [31]
    None
    ### Summary of Methods for Cryptanalyzing Affine Ciphers Using Frequency Analysis