New answers tagged

0

Similarly, is there a way to generalize the conditions for a key to be involutary for a substitution cipher? Any substitution cipher $E$ over a set $M$ might be expressed as a permutation $\pi_E$ of the elements of $M$. Any permutation is uniquely identified by its decomposition into cycles, save for the order of the cycles. The condition $E(E(x)) = x$ ...


2

If $E(x) = ax+b \bmod n$, and $E(E(x)) = x$, then you need $a(ax+b)+b = x$, or $a^2x + ab + b = x$. So any (a, b) where $a^2 = 1$ and $b(a+1) = 0$ will do it. There are always solutions $(1, 0)$ (which corresponds to not encrypting) and $(-1, b)$. Depending on the value of $n$ there may be other solutions for $a$. There are only those two for $n = 26$, ...


5

Well, to start off with, we have: $$k_1 m_1 + k_2 - n_1 p = c_1$$ $$k_1 m_2 + k_2 - n_2 p = c_2$$ $$k_1 m_3 + k_2 - n_3 p = c_3$$ Where we know $m_1, c_1, m_2, c_2, m_3, c_3$, and we don't know $k_1, k_2, p, n_1, n_2, n_3$. I chose to use explicit unknown integers $n_1, n_2, n_3$, rather than modulo an unknown $p$, as it makes it easier to justify the ...


2

First things first, finding the key (book) is not impossible, but just tough. If someone, like Google for example, has scanned millions of books into digital formats then it won't take long for them to figure out which book (simply try decrypting the first sentence only until the key is found, should be feasible for a mainframe). Also, there is a lack of ...


3

In general, creating your own "encryption/decryption" algorithm is a BAD IDEA. The algorithm you've chosen would be subject to an attack known as Frequency Analysis. There are 26! (2^88) keys, which is generally reasonable (would be hard to brute force). But if you were to analyse the cryptotext, you'd quickly see that "B" is much more common than a random ...



Top 50 recent answers are included