StarCTF 2019 - notcurves (Crypto, 363)

Challenge

Server: nc 34.85.45.159 20005
File: task.py


Solution

The challenge is broken 😦

R = self.recvpoint(30)
(u,v) = R
print R
if (u*v)%p == 0:
self.dosend("%s\n" % FLAG)

where the input function recvpoint(sz):

def recvpoint(self, sz):
try:
...
except:
res = ''
x = 0
y = 0
return (x,y)

So just send some garbage to get the flag.

*ctf{2ca55eb39e6fd9e5f1e7396b5c24a352}