I recently came across an application that more or less does this:
- starts from a (supposedly unknown to others) key
- generates a random IV
- encrypts some smallish (~ 160 bytes) payload with the key and generated IV using AES256 in CBC mode
- [>=60% of payload is comprised of two or three ASCII words, chosen from a supposedly unknown but more or less easily guessable list of some dozen elements]
- derives another IV just by doing some math on the key. This IV will be the same for every packet, ever, and the code to generate it from the key is publicly known.
- encrypts a small header (32 bytes) with the key and derived IV using AES256 in CBC mode
- [most of this header is made of fixed data such as "protocol version" that should be considered publicly known, then it contains a unix timestamp (known data if you know when the packet has been transmitted) and the random IV used before for the payload part]
- transmits the resulting encrypted header+payload on the wire
The receiving part knows the (pre-shared) key, regenerates the "header IV" from that, decrypts header, gets payload IV from there, decrypts payload.
The whole stuff repeats for every packet, and the typical application would have anything from 5 to 50 packets per second going on the wire, and since many of them are just "status info" the only difference between their cleartext would be the unix timestamp and the (pseudo)randomly-generated payload IV.
I'm definitely no cryptography expert but as far as I know "fixed IV derived from key used to encrypt 32 bytes, 28 of which are fixed and/or easily guessable" should at least ring some alarm.
How could the security of such approach be considered? - "security" defined as keeping the key and/or the payload secret even if someone could eavesdrop packets from the wire.