2
$\begingroup$

I want to authenticate part of a message, not all of it, while creating the MAC over the entire message. Let's say I create a 16B MAC over one hundred message blocks that are 64B each. Then I send one 64B message and the combined MAC to the receiver. The receiver has to verify the 64B using the MAC while it does not have the entire message.

Is there any cryptographic algorithm/way to do that?

$\endgroup$
1
1
$\begingroup$

My guess is that you want to prove that the message you sent is a part of a bigger message without showing the entirety of the bigger message to prove so. A solution that comes to mind is to make the authentication hash is the hash of the hashes of the other messages. That way you can confirm that this message is a part of the bigger message you sent without revealing the actual bigger message.

$\endgroup$
2
  • $\begingroup$ Yes, what I want is something similar. Could you please elaborate your solution a bit? Let's say I have M0,M1,M2..Mn and each of them is 64B. Now, according to what I understand about your solution is that I will create hash of H(M0), H(M1)... and send that hash with the message. I want to let's say send {M2,hash} and want to verify that M2 was part of my messages. How can I calculate hash from just M2? $\endgroup$ – zubairXenomorph May 26 at 18:45
  • $\begingroup$ The hash of the entire message (to authenticate) is H(all)=H(H(M0),H(M1),H(M2)....) Now you send the message as {M0,H(M0),H(all)} if you want to check if this message is a part of the entire message you also need to send {H(M1),H(M2)...} then all he needs to do is to calculate H(H(M0),H(M1),H(M2)...) and see if it's equal to H(all) $\endgroup$ – Ahmad Wahbi May 26 at 18:49

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.