Lets say that we use init vector IV, key K and HMAC key H. Message is M.
Mode of operation is CBC !!!
We usually encrypt this way:
C = crypt(M,K,IV) #encrypted data R = C + MAC(C) # final result and + is for con cat
But we could just use:
R = len + crypt(M + H,K, IV) # notice M + H
Is there something wrong with such a scheme? It looks much faster to me and requires like half the computation and complexity.