# Example of product cipher more secure than its components

Can anyone give me an example of a product cipher which more secure than its components. Here is how the explanation should proceed.

There is cipher C1 which can be attacked with the technique A1, and cipher C2 which can be attacked with the technique A2, but the product of the two, C1C2 can not be attacked with A1, A2 or the combination of the two.

• "cipher C1" would not be called a cipher. Would an example as simple as breaking up AES into its constituent components count? No one of its components is sufficient on its own, but together they make a cipher that is quite secure. For example, see crypto.stackexchange.com/q/20228/54184. – forest Apr 12 '19 at 6:14
• @forest Thanks for the link. – Baby desta Apr 12 '19 at 6:44
• You could easily create two stream ciphers with biases that exactly cancel each other out. In that case each cipher alone would be insecure, but when combine such that the biases cancel them you get a strong combined cipher. Also, consider other forms of layered encryption like 3DES (same cipher implemented with 3 keys, encrypt - decrypt - encrypt). – Natanael Apr 12 '19 at 16:22

## 1 Answer

For

• a $$1$$-bit message $$m$$
• a randomly generated, fixed prime $$k$$ (the key)
• per-ciphertext randomly generated $$r$$ and/or $$e$$

## C1, C2

$$C_1 : (k * r) + m$$ $$C_2 : (2 * e) + m$$

## A1, A2

\begin{align}A_1(c_0, c_1) : c' = c_0 - m_0\\c'' = c_1 - m_1\\k = \operatorname{gcd}(c', c'') = \operatorname{gcd}(k*r_0, k*r_1)\end{align} \begin{align}A_2(c_0) : m = c_0 \bmod 2\end{align}

## C12

$$C_{(12)} : (k * r) + (2 * e) + m$$ $$A_{(12)} : \text{Solve the AGCD problem}$$

## Notes

• Attacks assume the known-plaintext attack scenario
• $$C_2$$ by itself might be considered a pathological example by itself, but as you can see above, when combined with some $$C_1$$ it contributes immensely to security.
• $$A_1$$ might require multiple applications if $$k$$ is not prime
• That was very creative. – Baby desta Apr 12 '19 at 15:32
• @Babydesta Is this helpful? I think this is what you meant by product cipher, but I wasn't certain. – Ella Rose Apr 12 '19 at 15:36
• I'm not gonna upvote it yet because I'm looking for more answers. – Baby desta Apr 12 '19 at 15:38
• From Wikipedia, a product cipher combines two or more transformations in a manner intending that the resulting cipher is more secure than the individual components to make it resistant to cryptanalysis. The product cipher combines a sequence of simple transformations such as substitution, permutation, and modular arithmetic. – Baby desta Apr 12 '19 at 15:39
• @Babydesta You can upvote an answer without accepting it; Upvotes indicate that an answer was helpful, and can be applied to all applicable answers. – Ella Rose Apr 12 '19 at 15:41