0

I have a message m="hunter". Let's say we pad it with 2 spaces from the left making the final message as m_dash=" hunter".

We are given with c where c=pow(bytes_to_long(m_dash), 3, n) and n(1024 bit). n is too big to be factorised and therefore we can't get the totient and thus 'd'. And because of that we can't recover our padded-message by pow(c,d,n). Is there any way I can get my message back?

  • 1
    Can you maybe clarify a little bit. I don't see how padding with spaces are making a difference here. c will be different between padding and not padding obviously, but wouldn't the ablitity to recover m, be the same regardless. – Nicolaj Rasmussen Jul 16 '20 at 13:06
  • 1
    Also unless I am misunderstanding your question, it might be better at home at https://crypto.stackexchange.com. – Nicolaj Rasmussen Jul 16 '20 at 13:10
  • Why can't you remove the 4 spaces after you decrypt? – President James K. Polk Jul 16 '20 at 13:54
  • Because we dont have 'd'. Thus, we can't do pow(c,d,n). – Aviral Gupta Jul 16 '20 at 14:29
  • If you can get hold of the ciphertext for the encryption of the same message with 3 different moduli then you can recover the plaintext. If the message space is very small then you can brute-force try all possible messages and see which one encrypts to your ciphertext. – President James K. Polk Jul 19 '20 at 00:39
  • If your plaintext is less than 42 characters, then it will only contain 336 bits at most. If you encrypt that with e=3 and a 1024-bit modulus, the result will be 1008 bits at most. That means you can decrypt it simply by calculating the cube root. – r3mainer Jul 20 '20 at 22:32

0 Answers0