|
|
|
|
|
by pbsd
1461 days ago
|
|
Look at how RSA CRT decryption works: m_1 = c^d_p mod p
m_2 = c^d_q mod q
h = (m_1 - m_2)*q^-1 mod p
m = m_2 + h * m_1
If m < q, m_2 = m and there is nothing left to add. But if m >= q, there needs to be something to add, and this something will very likely be wrong and kind of random, because q^-1 mod p is wrong. The distinguisher between the two cases hinges on the upper bits of the decryption result being (non-)0. So for this attack to work all you have to do is change any part of q^-1; it doesn't really matter much what the change is.Now you have a binary search oracle for q, from which you can iteratively obtain the most significant bits of q, one guess at a time (e.g., try m = 2^1024 first, then (2^1024 or 0) + 2^1023, etc). Once you have half of the most significant bits of q, you can use the Coppersmith method [1] to find a small root of f(x) = msb(q) + x modulo a divisor of n and thus recover the rest of q. In reality doing exactly 512 iterations of guessing plus Coppersmith is pretty costly; if possible, guessing a few more bits will make the Coppersmith step much faster. [1] https://en.wikipedia.org/wiki/Coppersmith_method |
|
Could you just elaborate on the part:
> If m < q, m_2 = m and there is nothing left to add.
Why is this? What is d_p? d mod p?