# niteCTF 2021, Rabin to the Rescue Writeup

## Description

1. We have some cryptosystem that looks like an RSA, but it is not an RSA.
2. We don’t know any parameters of the cryptosystem.
3. We have an encryption oracle
4. We have an encrypted flag

## Solution

`awawa@awawa-pc:~/Documents/CTF/niteCTF\$ python3 rabin_solution.py  [+] Opening connection to rabin.challenge.cryptonite.team on port 1337: Done Obtaining x Obtaining y Calculating modulus Obtaining flag Factoring modulus Decrypting b'\x84\x14hMnf\xc7\xda\x12:\xac\xb7_\xdd\xe7\x06\xae\xc0\xf8\x99\x1a\xbbX\xf57\xc5\x9b\xde\xbc\x90&\$\xfeq\x9d\x87\\U\xd4\xba\xcd2\xd0z\xe0\x06\td\x9e\xb4\xd1?\xe4\x06\x04\x84\x0e:\xec\x06\x19g}\x1c' b'nite{r3p34t3d_r461n_3ncrypt10n_l1tr4lly_k1ll5_3d6f4adc5e}' b'KQ\xbe0k\xdcCH\xa9u\xb6\x1eC\x1b\x9dk\r\xa8L\xea\xfa\x9f\x91\xa4\xf3\xbe\x88\xf3\xb44\x8aq\xe2t\xf2\x88\xef\\u\xae\xecI[\xd1\xd9\xb2\xc3&\x8e\x83\xc6;\xc7q`{\xdc\x8b\x8c\xcb\xdb=A\x8b' b'8\xc2\xaa\x1d\x02\x8a\x84\xff\xd29\\\x14\x8e\xf5\xb9\xce\xd5\x8c\xdf\x12\x7f\x8d\xfb\x86uur\x1ev\xbf\x0e,\x8cp\xdc.\xdbX\xcb=U[\xa9\x15r\xcc\xa5\xa9A\x9dw9{\xc8\x08>\x97\xe3\xc0\x9e\xa1_\xa1\x0e' awawa@awawa-pc:~/Documents/CTF/niteCTF\$`

--

--