Breaking Double Encryption I am trying to understand how an attacker knows when he has successfully decrypted a ciphertext for an assignment. As such, some pointers/hints for the following questions would be greatly appreciated.


If you double encrypt secret data with two different algorithms. How does the attacker know if he already broke the 'first layer' of encryption?
Is it possible to determine the encryption algorithm used by analyzing the cipher text?
If you find out what algorithm was used does it give you the necessary information to know when you successfully broke the 'first layer'?
Considering the above, what difference would it make if the attacker knows the open-source program or the (public available) algorithms used to protect the data?
To begin with 4: Remember Kerckhoff's principle. You should always assume that the attacker knows which algorithm is used to encrypt your data. All the algorithms used in practice are designed to be secure under this assumption, so you should consider that hiding the algorithm from the attacker is superfluous. But as a hypothetical...


I can't think of any real-world cryptosystem where it would be possible to tell exactly which algorithm was used knowing only the ciphertext, but in a theoretical sense such an algorithm could exist, and would not be any less secure because the attacker is supposed to know that anyway.
Same as above, for mostly the same reasons.
In light of the above, it shouldn't make a significant difference. If it does, your algorithm relies on security by obscurity, and is generally worthless.


In your "double encryption" case, the attacker will just treat the composition of the two algorithms as one big algorithm, he will not try to decipher one and then the other.