I have a ciphertext $C$ encrypted with public key $pub_C$, which contains ciphertext $B$ and $pub_B$, $$C= E_{pub_C}(B\mathbin\|pub_B)$$

Ciphertext $B$ is encrypted with $pub_B$ and contains $pub_A$ only. $$ B = E_{pub_B}(pub_A) $$

I already factorized $pub_C$ with Fermat obtaining ciphertext $B$ and $pub_B$ by decrypting ciphertext $C$. Now I'm stuck on factorizing the modulus of this public key so this is the question:

  • can I exploit this recursive encryption to factorize $pub_B$ modulus?
  • $\begingroup$ Hmm, not unless there is a relation of some sort between B and C, imho. Homework? Why not factorise B if you managed to factorise C? $\endgroup$
    – tum_
    Oct 24 '19 at 21:27
  • $\begingroup$ I edited the question, I mixed public and private keys. The problem now is that I can't factorize the modulus of pubB, I tried lot of attacks. $\endgroup$
    – user33580
    Oct 24 '19 at 22:17
  • $\begingroup$ The aim is to get p, q and d from all the three keys $\endgroup$
    – user33580
    Oct 25 '19 at 7:27
  • 2
    $\begingroup$ You need to factor the modulus of $pub_b$. One way the earlier factorization of $pub_c$ could help is if they share a factor. Also, Fermat is not the only factorization method around. $\endgroup$
    – fgrieu
    Oct 25 '19 at 7:59
  • $\begingroup$ pub_C is the double of pub_B and I successfully factorized it $\endgroup$
    – user33580
    Oct 25 '19 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy