DCTF 2022 MACdonalds 1 and 2 Solutions

Preface

Similarities

  1. tag calculate MAC for the given message. We can perform this task only once.
  2. verify — verify that the given message has the given tag. Here if verification is successful and the message we provided really has provided tag, then we will get the flag. The trick is that we cannot verify the same message we used to create a tag.
  • Generate tag for some message
  • Using generated tag forge tag for new message.

MACdonalds 1 [200]

MACdonalds 2 [300]

  1. Now we can generate tag only for a one-block message.
  2. The server uses random IV
  3. The server uses a two-part tag which consists of iv and ct.
  4. During verification, server checks not only that the new message is not equal to the old message but also that the new message does not contain the old message as its substring. This means that our old trick with a and a + a ^ t will not pass this check. This forces us to generate a completely different message.

--

--

awawa.fun

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store