0
$\begingroup$

Is a hash function created by using CBC-MAC with one public key that does not change secure against preimage attacks? If not, how could you exploit this to find a single block message that hashes to a given digest?

$\endgroup$
  • $\begingroup$ A super obvious hint: try decrypting the digest. $\endgroup$ – DannyNiu Sep 18 at 12:08
  • $\begingroup$ Okay so I get that I can decrypt the digest since the key is public, but wont the plaintext still be XOR'ed with the IV since its CBC-MAC? Or am I missing something $\endgroup$ – sharkyxy Sep 18 at 12:15
  • $\begingroup$ Sure it's xor'd with the IV, but that's just 1 block, and nothing else. $\endgroup$ – DannyNiu Sep 18 at 12:16
  • 1
    $\begingroup$ How do you compute a public hash function on an input of your choice, if it has a secret IV? It would be rather difficult to use SHA-256 if it had a secret IV, for example! $\endgroup$ – Squeamish Ossifrage Sep 18 at 14:31
  • 2
    $\begingroup$ CBC-MAC uses an all-zero IV. $\endgroup$ – Maarten Bodewes Sep 18 at 23:32

Your Answer

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

Browse other questions tagged or ask your own question.