Tags: rsa elgamal 

Rating: 5.0

tldr;
- LCG used as PRNG for ElGamal encryption to encrypt secret RSA modulus twice
- Recover secret RSA modulus which is easily factored
- `e` and `phi(N)` are not coprime, but we can work modulo a factor of `N` since the flag is small

[writeup](https://jsur.in/posts/2020-08-31-gactf2020-writeups#elgaml_rsa)

Original writeup (https://jsur.in/posts/2020-08-31-gactf2020-writeups#elgaml_rsa).