Elves are trying very hard to communicate in perfect secrecy in order to keep Santa's warehouse. Unfortunately, their lack of knowledge about cryptography leads them to common mistakes.
-
Looking at the challenge we see that the public modulus, n, is the same for both messages. Searching for a "RSA Common Modulus Attack" finds some writeups and code to solve problems like these. The code I used is explained in RSA: Common Modulus attack with extended Euclidean algorithm.
-
The solution script is nearly identical to a0xnirudh's RSA: Common modulus attack.py. I formatted the code slightly better and added in a line (
print("Plain Text: ", binascii.unhexlify(hex(self.m)[2:]).decode())
) to convert the decrypted message to ASCII. Running the script will produce the flag.
HTB{c0mm0n_m0d_4774ck_15_4n07h3r_cl4ss1c}