rather-sneaky-arithmetic
problem
Surely there’s nothing untoward going on in the background here … right?
enc.py
#!/usr/bin/env python3
from sneaky import n
from Crypto.Util.number import bytes_to_long
m = bytes_to_long(open("flag.txt", "rb").read())
e = 65537
c = pow(m, e, n)
print(f"{n = }")
print(f"{e = }")
print(f"{c = }")
out.txt
n = 3111044576870969014501983933178502027023981167079015899173919623323179819159959937299493090258415852876697028924992819798197088728779385505522552117699754376661912511300340636029975075092825947869974421278808405023418712344719710116794360360826663859012880214584140469847371034934178359454499608276967589452003386127738194582750040218133821825075710631876965415863652451904696977338533128861867192537594276965874366481710136258993528731847263188675780158032662166860058157609308808779563350042790134280834004641562903892773652586413298947940991665775947887572732397987189688506338633306241920545760203804035747042718011
e = 65537
c = 770667759161657931403002838251028986418407812083400524953931525287613930139847819405280154770358171816601269559997325845834950120435212268847641152557211610214890342256074340211308455456339595945419690987781672592836063315329562428454925780548182014866844709677329503316018630529276693125778907277312191209195328534616698576191984847565910807327955412552056066578830420455877149251173657072724486610623412592495723563507793204832135000415355929455021852765292443410678616757966433902692592931846137078311528218886476045927703162134189731036404819508962148731547279405589281118567898936719529706470994862367589965597699
solution
not sure why sneaky.py
is a different file because the n value is shown but whatever
anyways, if we put it into factordb we can see that the number is composed of 5 digit primes
we can use dcodehttps://www.dcode.fr/euler-totient tools to get the euler totient value and then decrypt the rsa