# P2P encryption - Do I need a different session key each time?

I am using AES128-CBC+HMAC for all encryption.

Currently I am using the same encryption and authentication/MAC key (Both derived from a master key with HKDF).

Assuming that forward secrecy is not a requirement for my project:

Is having a different session key each time strictly necessary and why?

No, having a different session key each time is not strictly necessary. The generic justification is that all modern ciphers and Message Authentication Codes, including AES128-CBC and HMAC, are specified to allow a key to be safely reused for multiple messages.

Note: the One Time Pad does not allow reuse of its pad/key for multiple messages, but is not an exception; it just does not match the modern definition of a cipher.

For CBC with a $b$-bit block, and fully random IV, the best generic attack (for chosen plaintext) requires that there is an accidental collision in the ciphertext blocks, and that has demonstrably odds less than $n^2/2^{b+1}$ to occur after $n$ blocks of $b$ bits have been encrypted. For AES, $b=128$, so if one enciphers less than $2^{60}$ octets (including padding) across all the sessions, residual odds of any attack due to CBC are demonstrably less than $2^{-17}$; and then that is only expected to compromise a few blocks of plaintext, or allow to test if the plaintext has some characteristic.

HMAC with any common hash (including the broken MD5) resists even better to multiple uses.

Still, there could be good reasons to change the key regularly, including being secure despite:

• an insufficiently random IV for CBC (including, a narrow one, or one generated using a poor RNG, including a good PRNG that is poorly seeded);
• leakage of key by some side-channel, including plain compromise of a machine using it;
• guess of the MAC for a certain message that the attacker wants to be accepted, by some side channel like the archetypal timing attack allowed by comparison using memcmp;