0

First let me emphasize that I know nothing about encryption and maybe my question is completely wrong from encryption point of view.

Since I must use a simple substitution for a technical reason and I know that Caesar cipher is not secured and can be hacked easily and I was looking for a way to make it more secure for short messages (up to 500 words)


My suggestion

1) instead of using the 26 characters in English I’ll use the 1,111,998 characters in Unicode.

2) some characters will select in advance and will never be used in the encrypted message. The selected characters will be inserted as a distractions in the encrypted message (the receiver will know to ignore them).

3) the order of the characters will also be changed randomly and the receiver will have to do the job of reordering them.

4) instead of just shifting characters I’ll create a map of random relations between characters

Example:

Message: “I Love You”

Distraction characters: “o”

Mapping (for the simplicity of the example I mapped to order English characters): “I” = K, “ “ = U, “L” = R, “V” = M, “E” = T, “Y” = Z, “U” = A

Encrypted message: MOTUOKOURAZ (after removing the "O"s, mapping and rearrange the chars)

Decryption:

The receiver will discard the “O”s: MTUKURAZ

The receiver will translate using the map: ve i luy

The receiver will scramble the letters randomly until the message makes sense (I know this is sounds like a brute force, but in my case this is fine): I lve yu

The receiver will add the missing “O”: I love you


Why inventing the wheel? (Why shouldn't we roll our own?)

I have a case when I can only switch characters and unable to do something fancy (like ASE) and I still want it to be secure. So my question is not if there is something better, but is this secure?


Why i think this is solves the Caesar cipher weaknesses?

You can’t do a langue statistics attack since the letters are scrambled.

You can’t do a letters statistics attack since we have a distraction letters.

And the fact that we have a map and not a shit and over a million letters instead of 26 make every “guess” of one letter almost useless for the others (specially in short messages).

Thanks!

Omri
  • 103
  • 6
  • 3
    Possible duplicate of Why shouldn't we roll our own?. And please have a look of why caesar is insecure. The same techniques to break caesar can be applied in your case (i.e. statistics). It might be a bit harder to break than caesar but it is very far away from being secure. – Steffen Ullrich Nov 12 '16 at 09:18
  • I’ve updated my question with why i think this is solved the Caesar cipher weaknesses. I may be wrong, but I would like know why. – Omri Nov 12 '16 at 09:35
  • 3
    "I must use a simple substitution for a technical reason" - What reason would that be? Are you looking for format-preserving encryption? – Arminius Nov 12 '16 at 10:35
  • With your condition 3), how is the order of characters changed randomly? You do a shuffling of the "1,111,998 characters in Unicode" for (a) each session of communication depending on a session key, or (b) dynamically within a session depending on some events of the encrpytion processing? How is the shuffling done? – Mok-Kong Shen Nov 12 '16 at 11:05

2 Answers2

1

Your scheme is both not feasible and not secure.

1) instead of using the 26 characters in English I’ll use the 1,111,998 characters in Unicode.

What does this change in terms of security? It won't change the fact that most characters in the messages will be A-Z.

2) some characters will select in advance and will never be used in the encrypted message. The selected characters will be inserted as a distractions in the encrypted message (the receiver will know to ignore them). ... The receiver will add the missing “O”:

That just won't work. There are infinite possible messages you could generate by adding a number of characters at some places, and the computer is not intelligent. While a hash could help a bit, I guess with your restrictions you can't have one (and this is out of the scope of a pure "encryption" anyways).

The receiver will scramble the letters randomly until the message makes sense (I know this is sounds like a brute force, but in my case this is fine):

Again, not possible with some checking method. And if you have one, eg. 20 characters are 2432902008176640000 possibilites. Not fine.

You can’t do a letters statistics attack since we have a distraction letters.

So what? This does not change much.

And the fact that we have a map and not a shit and over a million letters instead of 26 make every “guess” of one letter almost useless for the others (specially in short messages).

Again, it won't change the fact that most characters in the messages will be A-Z.

deviantfan
  • 3,854
  • 22
  • 22
  • no, since I have more than a million letters to use, every letter in English will be mapped to more than one letter in Unicode an therefor the frequency is broken. Am I wrong?
  • – Omri Nov 12 '16 at 17:38