What flaws are exposed if encrypted version of plain message is always the same?

32 views Asked by At

I am working on a small encryption program which takes in a message, such as "Hello there!". Whenever I run the program with a message it produces the same encrypted result "Hu8z209=yTu83tu8". If I approached breaking the encryption using differential cryptanalysis, I could learn that there is no randomization in the algorithm. But what would this actually help me to learn in order to break the encryption?

1

There are 1 answers

0
bartonjs On

The easiest thing is that it tells the MITM when your behavior changes.

Setup: Every day you send a report at 0800 Encrypt("No enemy sighted"). The enemy notices this.

Scenario 1: One day after they've started 'sneaking' toward you you send a different message. They know they were spotted and move into an all-out charge before your reinforcements arrive.

Scenario 2: Imagine the enemy isn't invading and your message changes. They note this. Eventually they note the message changes every 8 days. If the message changes after only 6 days it means either a) you sent a different message or b) you changed your key/schedule. They'll possibly know which tomorrow.

So both of these scenarios told "the enemy" something. They could combine both to send an all-clear on your behalf right after they invade (the day after your keys change), giving them an 7 day head start on the next outpost. If the message ALWAYS changes, because of a random nonce/IV they get no information, and if the nonces are checked for duplicates by the receiver then they also prevent replayability.

But really this question belongs on http://crypto.stackexchange.com.