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.

  • 1
    $\begingroup$ "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. $\endgroup$
    – forest
    Apr 12, 2019 at 6:14
  • $\begingroup$ 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). $\endgroup$
    – Natanael
    Apr 12, 2019 at 16:22

1 Answer 1



  • 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}$$


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


  • 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
  • $\begingroup$ That was very creative. $\endgroup$
    – Aven Desta
    Apr 12, 2019 at 15:32
  • $\begingroup$ @Babydesta Is this helpful? I think this is what you meant by product cipher, but I wasn't certain. $\endgroup$
    – Ella Rose
    Apr 12, 2019 at 15:36
  • $\begingroup$ I'm not gonna upvote it yet because I'm looking for more answers. $\endgroup$
    – Aven Desta
    Apr 12, 2019 at 15:38
  • $\begingroup$ 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. $\endgroup$
    – Aven Desta
    Apr 12, 2019 at 15:39
  • 2
    $\begingroup$ @Babydesta You can upvote an answer without accepting it; Upvotes indicate that an answer was helpful, and can be applied to all applicable answers. $\endgroup$
    – Ella Rose
    Apr 12, 2019 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.