defcompositeModulusGCD(a, b): if b == 0: return a.monic() else: return compositeModulusGCD(b, a % b)
defcheck_combination(args): t1, t2, N, e, delta, c1, c2 = args m = franklinReiter(N, e, delta, c1, c2, t1, t2) ifb'flag'in libnum.n2s(int(m)): return (t1, t2, m, libnum.n2s(int(m))) returnNone
e = 683 c1 = 56853945083742777151835031127085909289912817644412648006229138906930565421892378967519263900695394136817683446007470305162870097813202468748688129362479266925957012681301414819970269973650684451738803658589294058625694805490606063729675884839653992735321514315629212636876171499519363523608999887425726764249 c2 = 89525609620932397106566856236086132400485172135214174799072934348236088959961943962724231813882442035846313820099772671290019212756417758068415966039157070499263567121772463544541730483766001321510822285099385342314147217002453558227066228845624286511538065701168003387942898754314450759220468473833228762416 N = 147146340154745985154200417058618375509429599847435251644724920667387711123859666574574555771448231548273485628643446732044692508506300681049465249342648733075298434604272203349484744618070620447136333438842371753842299030085718481197229655334445095544366125552367692411589662686093931538970765914004878579967 delta = 93400488537789082145777768934799642730988732687780405889371778084733689728835104694467426911976028935748405411688535952655119354582508139665395171450775071909328192306339433470956958987928467659858731316115874663323404280639312245482055741486933758398266423824044429533774224701791874211606968507262504865993
if __name__ == '__main__': with Pool() as pool: args = [(t1, t2, N, e, delta, c1, c2) for t1 inrange(256) for t2 inrange(256)] results = pool.map(check_combination, args)
for result in results: if result isnotNone: t1, t2, m, flag_bytes = result print(f"找到解密的 m 值: {m}") print(f"flag找到: {flag_bytes}") break