Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.

Latest commit

 

History

History
19 lines (14 loc) · 842 Bytes

File metadata and controls

19 lines (14 loc) · 842 Bytes

HMAC CTFs

"FirstHMAC" CTF

Challenge Description

In this challenge, you need to compute the HMAC-SHA256 of two files whose names are passed as parameters from the command line. The flag is obtained using the secret "keykeykeykeykeykey" and the two files attached to this challenge.

Key Instructions

  1. Read the contents of the two input files.
  2. Use the secret key "keykeykeykeykeykey" to compute the HMAC-SHA256 of the concatenated contents of the two files.
  3. Print the HMAC in hexadecimal format.
  4. Surround the HMAC with CRYPTO25{} to obtain the flag.

Example Code

Refer to the hmac.c file for the implementation details.

Additional Resources