# Multi layer encryption with ECB mode [closed]

if i use the 2 of the same key with 2 of the same algoritm when encrypting in ECB like when i have 2 blocks of the same color and i encrypt the 2 blocks with the same color the cipher text should not change

just like when i encrypt 2 blocks of the same information with the same key the cipher text would appear like i had only encrypted it once

but when i use 2 different keys encrypting in ECB with the same algoritm the cipher text should not be identical to plain text because it was double encrypted with 2 different keys

• So are you proposing using a new key for every block? It is hard to tell what your actual question is. In your last paragraph, you seem to be saying that the plaintext will be identical to the ciphertext. Is that correct? – mikeazo Jul 6 '12 at 23:32
• i encrypt with one key and use another key to encrypt the aready encrypted information under the same algoritm like when you encrypt with the cipher usb addonics.com/products/cipherusb.php then encrypt with the lock down harddrive enclosure satechi.net/index.php/satechi-lockdown – Andrew Campbell Jul 7 '12 at 1:17
• Why are you using ECB? – mikeazo Jul 7 '12 at 2:12
• Welcome to Cryptography Stack Exchange. Sorry, your question is not clear at all. What are you trying to do? What do you want to know? You can edit it to make it clearer, and then we can reopen it. – Paŭlo Ebermann Jul 8 '12 at 12:33

Correct me if I'm wrong, but it sounds like the question is really, "If I encrypt a document multiple times with different keys in ECB mode, does the common vulnerability of patterns in plaintext showing in ciphertext go away?"

The answer to this is no. Consider a simple cipher which has the following mappings: $E_{k_1}(0)=1234, E_{k_1}(1)=8532, E_{k_2}(1234)=3901, E_{k_2}(8532)=6279$.

Given the message $0,1,0,0$, the problem with ECB mode is that the cipher text reveals the patterns. In this case the ciphertext under $k_2$ would be $1234, 8532, 1234, 1234$.

So then, what happens if I encrypt this ciphertext with $k_2$. I'd get $3901, 6279, 3901, 3901$. The pattern is still present.

• if i encrypt with one key and encrypt the same information with another key should there be a small difference in the cipher text – Andrew Campbell Jul 8 '12 at 13:31
• it would appear like i only encrypted once so using multible keys dous not raise security – Andrew Campbell Jul 8 '12 at 14:03