Post Deleted by Community
    Post Locked by Community
    Post Migrated Away to crypto.stackexchange.com by Steffen Ullrich, Gilles, Tom K., schroeder
    Post Closed as "off-topic" by Steffen Ullrich, Gilles, Tom K., schroeder
1
source | link

How to calculate Public Key exponent if I have p, q, Dp, Dq, QInv?

I have a private key components p, q, Dp, Dq, and QInv. I need to calculate the public key modulus and exponent. Modulus was super simple p*q, but exponent I can't figure out. Have searched all the articles and often found how to go opposite way - generating public private key once you pick the exponenet.

I have been trying ModInverse from p-1 and q-1, and solve x with GCD on all the componenets, but nothing gave me the right value (I know the value I should get is x010001). Seems to be a little bit more complex that this...

Im really in to the code and less in math, so if I could get the answer which use simple math operations as 'Add', 'Sub', 'Multiply', 'Mod', 'ModInverse', 'GCD' etc. would be great!