I'd like to implement some kind of simple (yet as strong as possible) encryption for my client-server application network traffic. Data to be encrypted can be both textual, and binary.
Now I'm thinking about using just a trivial XOR encryption, but with following features:
- Key will be random (i.e. uniformly distributed random sequence of bytes) for each session.
- CBC mode with random IV will be used for each session. That is, plaintext will be XORed with previous ciphertext (or in case of first "block" - the IV), and the result will then be XORed with (repeating sequences of) encryption key. That way the attacks mentioned in What's wrong with XOR encryption will not be possible, right?
So my question is: how strong is such encryption? Many points mentioned in the What's wrong with XOR encryption question's answers will not be valid I think, as the random IV will ensure that the plaintext patterns (e.g. spaces, NULL bytes, etc.) will not be observable, and the ciphertext will "look more random".
What are the weaknesses of such encryption? Thanks!
P.S.: I know that for ultimate security, implementing TLS with e.g. OpenSSL would be the way to go, but I don't actually need that level of "theoretically unbreakable" security, using certificates and big libs like OpenSSL is just overkill for my project. I just need simplest possible defense against somebody wiresharking my traffic.