Tags: factoring rsa 

Rating: 5.0

This was a beginner RSA challenge. Unfortunately someone uploaded the primes onto factordb some time during the competition which ruined it for people and boosted the number of solves. We decided to leave the challenge as is.

- we are given `s = pow(557p-127q, n-p-q, n)`
- notice that `557p - 127q = s^(-1) (mod n)`
- construct a qudratic with known coefficients to recover the primes

[DUCTF GitHub](https://github.com/DownUnderCTF/Challenges_2020_public/tree/master/crypto/babyrsa)

[blog writeup](https://www.josephsurin.me/posts/2020-09-20-downunderctf-2020-writeups#babyrsa)

Original writeup (https://www.josephsurin.me/posts/2020-09-20-downunderctf-2020-writeups#rot-i).