GrabCon CTF 2021 - NotRSA
Last updated
Last updated
It's not RSA , of course broooooooooooooooooo. Try for instead :<
from math import sqrt
import random
from Crypto.Util.number import bytes_to_long
N = 2433984714450860961589027518159810370561856716063956157321856705975948489337570445957833120668443867975490363019335530343179129689501017626817947777263721
c = 1378297008929492435762470180953416238081302819750327089183697281160938504327642742017058360280755400054663296904328307673692314945545918393502459480987913
a = int(sqrt(N) + 1)
b = random.randint(0,9999999999)
flag = b"REDACTED"
m = bytes_to_long(flag)
c = ((a**m)*(b**(a-1)))%((a-1)*(a-1))
from math import sqrt
import random
from Crypto.Util.number import *
phi = 49335430619898930416886440294125273227060654497185988935450212291095389910400
n = 49335430619898930416886440294125273227508793331445421957576671205000501326189
u = pow(phi,-1, n)
c = 1378297008929492435762470180953416238081302819750327089183697281160938504327642742017058360280755400054663296904328307673692314945545918393502459480987913
N = 2433984714450860961589027518159810370561856716063956157321856705975948489337570445957833120668443867975490363019335530343179129689501017626817947777263721
print(long_to_bytes((((pow(c,phi,N)-1)//n) * u % n)))
#b'GrabCON{i75_p4ill13r_f0lks}'