Note that this question describe hypothetical case, that is never meant to be used in real world.
Server communicates with clients with message structure: client_id, initialization_vector, encrypted body. Each client each day exchange with server 1-5KB messages average 100 times. Messages "occasionally" may leak out, due to insecure network (e.g. DNS spoofing).
Generated keys are distributed securely to clients by another system. When a key gets compromised, the client can issue another one, but currently the key has no expire time (even after few years). I want to avoid mixing RSA and other asymmetric stuff to keep this simple. Message protocol may change in the future, but previously issued key will be used for stronger encryption without requiring re-issue.
Is this kind of system secure when used with e.g AES/CBC + padding? Can I firmly go forward with this basic approach for years?
Message initialization_vector is random (AES/CBC) at each message and encrypted_body has internal (encrypted with body) integrity checks (MAC and digest). What makes it insecure despite that? Is option to compromise AES encryption over time really viable in that case?
Here is pseudo-code of message encryption. When message MAC is not valid, error response is not encrypted (to avoid active attack). System will drop old messages when timestamp is older than T (to avoid reply attack).
init_vector := secure_random (); // for AES/CBC or increment init_vector for AES/CTR mac = hash (client_id + timestamp + init_vector + text); // MD5 or SHA-1 body = encrypt (mac + text); // AES/CBC message = client_id + timestamp + init_vector + body;