diophantus_equation
という形のDiophantus Equation ディオファントス方程式なのでsolve_diophantine 関数を使って一般的に解ける x,y = var("x,y") solutions = solve_diophantine(x**2 - 61*y**2 == 1) xsol, ysol = solutions[0] xval, yval = xsol.subs(t=0).simplify_full(…
redpwnctf2021
tokyowesterns_ctf_6th_2020_|_circular
ong-schnorr-shamir_digital_signature_scheme
方程式
diophantus_equation
#redpwnctf2021 TokyoWesterns CTF 6th 2020 | circularと全くおなじ問題設定。つまりOng-Schnorr-Shamir Digital Signature Schemeで、おなじsolverが使える #!/usr/local/bin/python from Crypto.Util.number import getPrime, bytes_to_long from Crypto.…