<div dir="ltr"><div>Hi all,<br></div><div><br></div><div>I need to reconstruct public and private keys for data signing operation from p, q, dmp1, dmq1 and iqmp. When I fill values in as per below then OpenSSL complains about missing d.</div><div><br></div><div>    RSA* pkey = RSA_new();</div><div>    pkey->n = NULL;</div><div>    pkey->e = NULL;</div><div>    pkey->d = NULL;</div><div><br></div><div>    pkey->p    = BN_bin2bn(secureP.data(), secureP.size(), NULL);</div><div>    pkey->q    = BN_bin2bn(secureQ.data(), secureQ.size(), NULL);</div><div>    pkey->dmp1 = BN_bin2bn(secureDmp1.data(), secureDmp1.size(), NULL);</div><div>    pkey->dmq1 = BN_bin2bn(secureDmq1.data(), secureDmq1.size(), NULL);</div><div>    pkey->iqmp = BN_bin2bn(secureIqmp.data(), secureIqmp.size(), NULL);</div><div><br></div><div>I did my homework on Google/Stackoverflow/OpenSSL docu, but I haven't been able to find out any good way to do this, while it is obvious that openssl needs to know this by deafult for its internals.</div><div>Would you have any hint on where next with this?</div><div><br></div><div>Thank you,</div><div>Jan</div></div>