CTF Writeup: Reversing a Custom Polynomial Cipher Without Brute-Forcing Private Keys
A BronoCTF challenge called pscheme.py presented a custom encryption scheme that encoded messages as polynomial roots and shuffled their order using a compact bitfield. Participants were given only an enc.txt file containing a public key polynomial and ciphertext chunks, with no direct execution path to the original script. The solution involved reconstructing the monic public key polynomial, then performing exact integer polynomial long division on each ciphertext chunk to isolate degree-4 quotients. Brute-force root search over the ASCII range recovered the original byte values, while decoding the shuffle order field restored correct character positions. The flag was retrieved without factoring large private keys or any heavy computational attack.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in