Triplet

Fun with RSA, three times!

Files given:

This challenge requires us to send in 6 primes \(p_i,q_i,i\in{1,2,3}\) such that \(\left|\{p_iq_i\}\right|=3\). Then it asks for values \(e,d\) such that \(e,d<(p_i-1)(q_i-1),ed=1\pmod{(p_i-1)(q_i-1)}\) for all \(i\).

In order to find such values, we aim to minimize the LCM of all the \((p_i-1)(q_i-1)\) so that we can satisfy the inequality. This is easily done by demanding all the primes to be of the form \(kN+1\) where \(k\) is small and \(N\) is big. Next, we can actually set \(p_1=q_1=p_2=p_3\) to minimize the LCM even further. After we are done, we factor \(LCM\left((p_i-1)(q_i-1)\right)+1\) in order to find possible values of \(e,d\). A precomputed set of coefficients is found in solve.py

Solution at genparams.sage and solve.py

Flag: CCTF{7HrE3_b4Bie5_c4rRi3d_dUr1nG_0Ne_pr39naNcY_Ar3_triplets}