# Security of a cryptosystem where the encryption is swapped with decryption

For any given one-key cipher $(M,C,K,E_k,D_k)$, we may modify it into $(M,C,K,D_k,E_k)$. In other words, we swap the encryption function with the decryption in the modified cipher.

Are the two ciphers have the same level of security with respect to known- plaintext attacks?

• looks like homework, what have you tried? – kodlu Mar 4 '17 at 1:54
• Yes. I don't how to tackle this. Would you mind to give me some hints, please? – Ng Clement Mar 4 '17 at 1:58
• Known plaintext means you have both plaintext and ciphertext. So you can go from either to the other,... – kodlu Mar 4 '17 at 2:34
• Suppose you could break the new scheme. Show how this would allow you to break the old. Conclude. – SEJPM Mar 4 '17 at 10:16
• What research have you done? I'm asking because sharing research efforts helps everyone! Tell us what research you did, what you found, and why it didn’t meet your needs. That shows users you took time trying to help yourself, it saves us from reiterating obvious answers, and (most important) it helps you to get more relevant on-point answers. In case of doubt, you can start by searching this site for related Q&As that might shed light on your question. At worst it will help you frame “a better question”; at best it might even answer it. – e-sushi Mar 4 '17 at 12:21

## 1 Answer

If we have a plain text attack which takes n pairs of known plain text known cipher text and with expected computational effort T extracts the key K then for the inverted cipher the same attack would work with the same properties would work by swapping the order of the pairs.

More formally if we have an atack function a(c,p)= k where c is a cipher text and p is a plain text, we can trivially construct a'(x,y)=a(y,x) which will work on the swapped cipher. You can extend this to family if known plain text attacks, multiple pairs required, computaitional cost, probability of succsss, weak keys etc. As long as the input is pairs of cipher text and plain text you can swap the pair order and get the same attack propeties on the swapped cipher.

• Thank you for your answer. So they are not in the same level because the second attack would become easier? – Ng Clement Mar 5 '17 at 16:30
• No, they are equal, the operation can be applied again on the swapped cipher and return to the original cipher. The swapped cipher can't be weaker by reasons of symmetry. – Meir Maor Mar 8 '17 at 6:21