Challenge Description
Overview
In this challenge, you are given an ECDSA signature for a message that was hashed using a custom encryption function called spn_encrypt
(defined in hash.py
). Your task is to find a new message that is different from the original, yet when processed by spn_encrypt
produces a hash that verifies correctly against the provided ECDSA signature which means the output of spn_encrypt for the new message will be the same as the old message.
Challenge Goal
You must craft a new message M2 that, when encrypted using spn_encrypt
results in a digest for which the given ECDSA signature still verifies. In other words, you need to find a collision under the hash function so that spn_encrypt(M2) == spn_encrypt(ori_msg).
Verify Challenge Script
The provided verify.py
script accepts the new message in hexadecimal format. It ensures the new message is different from the original and computes its hash using spn_encrypt
.Then it uses the public key and signature to verify if the new hash is valid. If signature verification succeeds against your new message, the script prints a success message and flag.
/challenge/Verify new_message_in_hex
Example:
/challenge/Verify 000000aaa00000