JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Untitled Page | JustPaste.app
about 3 hours ago4 views
👨‍💻Programming

Untitled Page

from math import isqrt
from Crypto.Util.number import inverse, long_to_bytes

n = 1569373247920223191538041739239582153669128304522086582209
e = 65537
c = 14970984586229452543687743050140672697852815206198748863

# Ищем a, для которого a² - n — квадрат
a = isqrt(n)
if a * a < n:
    a += 1

while True:
    b2 = a * a - n
    b = isqrt(b2)
    if b * b == b2:
        p, q = a - b, a + b
        break
    a += 1

phi = (p - 1) * (q - 1)
d = inverse(e, phi)
m = pow(c, d, n)

print(long_to_bytes(m))
← Back to timeline