Hardware-based capture-the-flag challenges