Added key generation and MAC check in decrypt

The authenticity of the message is not verified, this is a security issue!