Let $$d_p = d~\mathrm{mod}~(p−1)$$ and $$d_q = d~\mathrm{mod}~(q−1).$$
Given $d_p$, $d_q$, $p$ and $q$, how can I reconstruct $d$?
Let $$d_p = d~\mathrm{mod}~(p−1)$$ and $$d_q = d~\mathrm{mod}~(q−1).$$
Given $d_p$, $d_q$, $p$ and $q$, how can I reconstruct $d$?
If you happen to know also $e$ then you can use the formula
$$d = d_p + d_q - e\cdot d_p\cdot d_q \quad\bmod (p-1)\cdot(q-1).$$
Instead of modulo $\varphi(p\cdot q) = (p-1)\cdot(q-1)$ you can also calculate the result modulo the least common multiple of $p-1$ and $q-1$.
PS: I do not understand the downvote(s) for the question. When generating an RSA key one usually first finds $p, q, d_p, d_q$ (and maybe $p^{-1}\bmod q)$ given $e$. If one uses the private key on an embedded device that is susceptible to fault attacks like the Bellcore attack, one might prefer to refrain from using the CRT despite the performance advantages.
Check The Chinese Reminder Theorem.
Is pretty easy.
https://en.wikipedia.org/wiki/RSA_(cryptosystem)#Using_the_Chinese_remainder_algorithm
they give you all you need, including DP and DQ, the only think you would have to calculate is qinv where you can use python gmpy and the function gmpy.invert(e,phi).