二分探索

SECCON CTF 2022 Quals | this is not lsb

#SECCON_CTF_2022_Quals #kurenaif from Crypto.Util.number import * from flag import flag p = getStrongPrime(512) q = getStrongPrime(512) e = 65537 n = p * q phi = (p - 1) * (q - 1) d = pow(e, -1, phi) print(f"n = {n}") print(f"e = {e}") pri…

TSG LIVE CTF 8 | RSA Debug ?

def my_pow(a, n, m): result = 1 while n > 0: if n % 2 != 0: result = (result * a) % m a = (a + a) % m # oops! n = n // 2 return result from Crypto.Util.number import getPrime, bytes_to_long p = getPrime(512) q = getPrime(512) N = p * q phi…

BlackHat MEA CTF Quals 2022 | ursaminor

BlackHat MEA CTF Quals 2022 #!/usr/local/bin/python # # Polymero # # Imports from Crypto.Util.number import isPrime, getPrime, inverse import hashlib, time, os # Local import FLAG = os.environ.get('FLAG').encode() class URSA: # Upgraded RS…