Suppose N$N$ many messages has been sent from A$A$ to B$B$ in this format:
- HMAC(K, C(i)) || C(i)$\operatorname{HMAC}(K, C(i)) \mathbin\| C(i)$.
Where
- C(i)$C(i)$ is some cipher-text encrypted with some secure algorithm using some key
- K(i) != K$K(i) \ne K$ for any i$i$ in range [0, N-1]$[0, N-1]$.
There is no implication whether K(i) = K(j)$K(i) = K(j)$ for any i != j$i \ne j$.
Thus, it is just "some" encryption algorithm but encryption key used to encrypt the message is not directly equal to K$K$, the key for HMAC which is constant for each N$N$ messages.
Now my question is:
If the attacker captures these N$N$ messages and HMAC's$\operatorname{HMAC}$s, does it give any more advantage to the attacker than just "brute-forcing" the key K$K$ to find it (whether he can draw some conclusions, etc)? We can say that the cryptographic hash function used in the HMAC$\operatorname{HMAC}$ is secure.