# Tag Info

Accepted

• 134k
Accepted

### Affine plaintext attack with GCD != 1

You seem to have made a mistake in your arithmetic: $$108108 - 72097 = 36011 \ne 36012.$$ The number $36011$ is invertible modulo $256256$, and thus you can find $a$ and $b$ in a straightforward ...
• 44.5k
Accepted

• 44.5k

### How to attack polyalphabetic affine cipher with only ciphertext?

This is a simple variant of the Vigenère cipher, and can be broken in basically the same way: First, you need to determine the key length. The standard methods for doing this for any Vigenère-like ...
• 44.5k
Accepted

### Can all affine cyphers be expressed with this formula

$a\cdot x +b$ means affine not permutation. And $a\cdot x +b \bmod 26$ is modular affine transformation. $a\cdot x +b \bmod 26$ can have at most $26\cdot 26$ affine transformations some of which ...
• 43.5k
Accepted

### Affine cipher: calculate the key from a known plaintext/ciphertext pair

Given that you have parts of the plain text and its corresponding ciphertext, this is called a known plaintext attack. Given an affine cipher that has a key that is composed of 2 parts $a$ and $b$, ...
• 7,914
Accepted

### Affine Cipher - Greatest Common Divisor

If you want to find the multiplicative inverse of an integer a (mod n) you can use the extended Euclidean algorithm. For two integers a and b, the Extendend Euclidean Algorithm not only calculate the ...
• 128
Accepted

### Is there a way to find $a$ and $b$ keywords in an affine cipher when only ciphertext but no plaintext is known?

There are several ways to break an affine cipher without any known plaintext. First of all, for the common case of $n = 26$, there are only $12$ possible values of $a$ (since $a$ and $n$ must be ...
• 44.5k

• 125k
1 vote

### Linear subspace and Affine subspace

In general an affine subspace is not a subspace, it's just a translate (coset) of a subspace. This is because normally we expect $0$ to be in a subspace $V$, since due to closure $x-x \in V.$ If $a+V$...
• 16.6k
1 vote
Accepted

• 128
1 vote

### Decrypt affine cipher given encryption key

Your formulas are wrong. If $$c \equiv 7p + 11 \mod{27}$$ then by applying the modular arithmetic function $$c - 11 \equiv 7 p \mod{27}$$ and then $$(c - 11) \times 7^{-1} \equiv p \mod{27}$$. ...
• 376

Only top scored, non community-wiki answers of a minimum length are eligible