-
-
Save samueltangz/5c5446c6d544e4d8cecd417001451600 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: UTF-8 -*- | |
def main(): | |
assert 21846 * 3 - 65537 == 1 | |
n = 8208175638972200577186038102634114258848486365767463332763957381946985480397227219800325703361508208728778216773973313756762762324416016301819271949512427 | |
c3 = 510199524103978915755062119293765889950938959100085136114101960072728304594090942964306874023123457091885387418124063977610496306587745044542739034336862 | |
c65537 = 4673531855283872496727093452348048121242854682829577660566947295656149440028839210065857595110277181842297946378296819272562912619683355333762343087859186 | |
m = pow(c3, 21846, n) * pow(c65537, -1, n) % n | |
flag = m.to_bytes((m.bit_length()+7)//8, 'big') | |
print(flag) | |
# kurenaifCTF{you_4re_redundant_master} | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment