Does this mean that the message is being added onto the hashed(message, tag) ?

m || H(m, "secret")

So the output would be something like:



Yes, || means concatenation. If H means HMAC and 'secret' is a secret key then this is secure.

Usually hmac accepts key as first argument and message as second. If this protocols MACs the key using the message instead of MACing the message using the key, I don't know whether that is secure.

If H is a hash instead of a MAC, then this is insecure.

  • $\begingroup$ H is stated to be a cryptographic hash function so assume could be MAC? $\endgroup$ – NoDirection Nov 15 '16 at 22:08
  • $\begingroup$ So in terms of confidentiality, it is not very private as the plain-text 'message' is being exposed during the transmission? $\endgroup$ – NoDirection Nov 15 '16 at 22:11
  • 1
    $\begingroup$ @NoDirection This is our normal reference for this. And yes, if you just transmit a plaintext message this triviall provides no privacy. $\endgroup$ – SEJPM Nov 15 '16 at 22:36
  • $\begingroup$ @NoDirection if message is transmitted in the clear, there is no confidentiality. If H is a cryptographic hash function, then there is no integrity (you need HMAC for that). $\endgroup$ – Z.T. Nov 15 '16 at 23:10
  • $\begingroup$ Apart from integrity, how would a HMAC improve this tag? $\endgroup$ – NoDirection Nov 15 '16 at 23:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.