DEFCON 2020 quals | notbefoooled

ECDLP で、 E(F_p).order() == pとなる(=anomalous curveとなる)ように p, a, bを渡すと適当な原始根  Pを作ってくれるので、こちらからは Q を送る。すると向こうはSmart Attack Q = xPとなる xを復元してくる。この攻撃が失敗するようなパラメータと Qを選べれば勝ち

Uninteded solution

python2系で input を使っているので print(open('/flag').read()) を送ると終わる。は?

Intended solution

Smart Attackは内部でHensel's Liftを使っているんだけど、これが失敗するケースがあるらしい(なんでもcanonical liftになるらしい https://crypto.stackexchange.com/questions/70454/why-smarts-attack-doesnt-work-on-this-ecdlp)。どういうときになるかと言うと、