I have already asked a similar question and now I can continue to this question about adding a "extra key" = IV.
My last question was about reusing key in OTP (One-Time-Pad). Now this question is about reusing same key BUT adding a "extra key" = IV.
Question: Is this algorithm below safe to use? (Reusing key BUT adding IV)
Sending the first message:
- $character_1 + key_1 + IV_1 = cipher_1$
- $character_2 + key_2 + IV_1 = cipher_2$
Pay attention to the little number under the objects, example: $IV_1$ it defines which one it will use of a specified group/object.
Sending the second message:
- $character_3 + key_1 + IV_2 = cipher_3$
- $character_4 + key_2 + IV_2 = cipher_4$
In the first message I send I used different keys in all of the characters BUT the same IV. Does it make it insecure?
In the second message I send I use different keys in all of the character BUT the keys where SAME AS THE MESSAGE ONE, but I used a different IV this time. Does it make it insecure?
My goal is to make OTP not "One-time", instead of generating a WHOLE sequence of keys you just change the IV every time you send a message. So, is this insecure?
EDIT: REUSING KEY IS SECURE!
I have questioned before about my own invention: Reusing the same key BUT change the IV (extra key). MANY of you were against it and you sad it was insecure and I loosed hope.
Now with some mathematical proofs and ask again. Is this secure? Here is my mathematical journey to proof why this should be secure:
This is the standard OTP algorithm (XOR version) with a never-used key:
- $message_1 ⊕ key_1 = cipher_1$ (message one)
- $message_2 ⊕ key_2 = cipher_2$ (message two)
...and if you want to break it down it will look like this:
- $c_1 ⊕ c_2 = m_1 ⊕ m_2 ⊕ k_1 ⊕ k_2$
Note that this is a secure version of OTP because the keys are different and the attacker can not access the message without the keys, but if the keys where the same the attacker would easily get the message ($m_1 ⊕ m_2$) because of when you XOR two exactly same values the result will ALWAYS be 0 (nothing) so the key do nothing...
Now this is my version of OTP, please pay attention to the number below the objects (example: $c_1$).
My goal is to make OTP not "One-time", instead of generating a WHOLE sequence of keys you just change the IV every time you send a message. So, is this insecure?
So here is how the algorithm looks like:
Sending the first message:
- $character_1 ⊕ key_1 ⊕ IV_1 = cipher_1$
- $character_2 ⊕ key_2 ⊕ IV_1 = cipher_2$ (Note that the IV is the same but the keys are different so the keys are securing the message.)
Sending the second message:
- $character_3 ⊕ key_1 ⊕ IV_2 = cipher_3$
- $character_4 ⊕ key_2 ⊕ IV_2 = cipher_4$ (Note that I reused the key but I used a different IV that secures the message.)
In the first message I send I used different keys in all of the characters BUT the same IV. Now I will simulate me to be a attacker and try to attack the two messages that have the same key:
Pay attention to which cipher text I use, look up to match the message with the cipher-number below.
- $cipher_1 ⊕ cipher_3 = character_1 ⊕ character_3 ⊕ IV_1 ⊕ IV_2$
(Note that the cipher BOTH use the SAME KEY, but they remain secure because of the two different IV)
That attack was on two different messages that have keys in common now we will test to attack characters in ONE message that have IV in common.
- $cipher_1 ⊕ cipher_2 = character_1 ⊕ character_2 ⊕ key_1 ⊕ key_2$
Note that now the IV is matching and therefore useless BUT the keys remain different and the message is SECURE.
So I have proved that this algorithm (reusing same key but with a extra key) is safe. Now you don't need to change the key just change the IV.
Now when I have proven you why this is secure please analyse this and give me some weaknesses.