Rating: 5.0

**TL;DR**
Source
```python
from Crypto.Util.number import bytes_to_long, isPrime
from secrets import randbelow

p = bytes_to_long(open("flag.txt", "rb").read())
assert isPrime(p)

a = randbelow(p)
b = randbelow(p)

def f(s):
return (a * s + b) % p

print("a = ", a)
print("b = ", b)
print("f(31337) = ", f(31337))
print("f(f(31337)) = ", f(f(31337)))
```
Rewrite both congruences to solve for p\*n and take the gcd, full solve script at original link

Original writeup (https://an00brektn.github.io/corctf22/#tadpole).