# Block cipher encryption of decryption with the same key

With block chipers can I assume that

Enc(k,Dec(k,m))=m


Meaning if I decrypt something with a key k and then encrypt the result with the same key k, do I get what I originally had? Using the same BC scheme of course.

I can't right? It's possible that it has some random parts, no?

• It depends on what you mean by "encrypt with a blockcipher". If you mean using a blockcipher in a secure mode of operation, then no, the probability of this happening will be negligible. – Maeher May 4 '14 at 11:21
• I'm trying to find a collision to show that block ciphers are not collision resistant and can't therefore be used as compression function for hash or something like that. I thought that maybe Enc(k,m)=c would collide with Enc(k',Dec(k',c))=c, but that seemed slightly too easy. – Sunny May 4 '14 at 11:30

If by $\operatorname{Enc}$ and $\operatorname{Dec}$ you mean the application of the block cipher primitive to a single block, then yes, it is assumed to be deterministic. (Since the size of input and output block is the same, and we want to be able to decrypt again, there is no way to be nondeterministic.)