# hint e1 = 2303413961 e2 = 2622163991 c1 = 1754421169036191391717309256938035960912941109206872374826444526733030696056821731708193270151759843780894750696642659795452787547355043345348714129217723 c2 = 1613454015951555289711148366977297613624544025937559371784736059448454437652633847111272619248126613500028992813732842041018588707201458398726700828844249 p1 = 107316975771284342108362954945096489708900302633734520943905283655283318535709 n = 6807492006219935335233722232024809784434293293172317282814978688931711423939629682224374870233587969960713638310068784415474535033780772766171320461281579
gcd, s, t = gmpy2.gcdext(e1, e2) if s < 0: s = -s c1 = gmpy2.invert(c1, n) if t < 0: t = -t c2 = gmpy2.invert(c2, n) c = gmpy2.powmod(c1, s, n) * gmpy2.powmod(c2, t, n) % n print(c)
import gmpy2 import sympy from Crypto.Util.number import *
# hint e1 = 2303413961 e2 = 2622163991 c1 = 1754421169036191391717309256938035960912941109206872374826444526733030696056821731708193270151759843780894750696642659795452787547355043345348714129217723 c2 = 1613454015951555289711148366977297613624544025937559371784736059448454437652633847111272619248126613500028992813732842041018588707201458398726700828844249 p1 = 107316975771284342108362954945096489708900302633734520943905283655283318535709 n = 6807492006219935335233722232024809784434293293172317282814978688931711423939629682224374870233587969960713638310068784415474535033780772766171320461281579
gcd, s, t = gmpy2.gcdext(e1, e2) if s < 0: s = -s c1 = gmpy2.invert(c1, n) if t < 0: t = -t c2 = gmpy2.invert(c2, n) c = gmpy2.powmod(c1, s, n) * gmpy2.powmod(c2, t, n) % n print(c) m = sympy.nthroot_mod(c, 256, p1) print(long_to_bytes(m))