<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="monospace"><span style="color:rgb(0,0,0);background-color:rgb(248,248,248)">Hope, you are referring to </span><span style="color:rgb(0,0,0)"><a href="https://www.openssl.org/docs/man1.0.2/man3/EVP_PKEY_encrypt.html">https://www.openssl.org/docs/man1.0.2/man3/EVP_PKEY_encrypt.html</a></span><br></font></div><div dir="ltr"><span style="color:rgb(0,0,0)"><font face="monospace"><br></font></span></div><div dir="ltr"><font face="monospace">Use <span style="background-color:rgb(248,248,248)">PEM_read_bio_PUBKEY to get EVP_PKEY.</span></font></div><div><font face="monospace"><span style="background-color:rgb(248,248,248)">eng is for engine reference. If you have no engine, it can be NULL.</span></font></div><div><font face="monospace"><br></font></div><div></div><div><font face="monospace">Thanks,</font></div><div><font face="monospace">Thulasi.</font></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 29 Jan 2021 at 10:13, Narayana, Sunil Kumar <<a href="mailto:sanarayana@rbbn.com">sanarayana@rbbn.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">



<div>
<div style="color:rgb(33,33,33);background-color:rgb(255,255,255);text-align:left" dir="auto">
<span style="font-family:Calibri,sans-serif;font-size:11pt">Dear Openssl team,</span><br>
</div>
<div style="color:rgb(33,33,33);background-color:rgb(255,255,255);text-align:left" dir="auto">
<span style="font-family:Calibri,sans-serif;font-size:11pt"><br>
</span></div>
<div id="gmail-m_-7971964893424203708id-6524b03e-8ea9-4590-8b42-7a1d40c9463a" dir="auto" style="text-align:left">
<div>
<p class="MsoNormal">                While migrating from 1.0.2 to 3.0 we observe that RSA_public_decrypt() API been deprecated in 3.0.</p>
<p class="MsoNormal">We referred the example provided in man page but we are not clear in generating the initial ‘key’ required to create CTX.
</p>
<p class="MsoNormal">Please suggest on (key , eng) params to proceed </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Also currently we are using PEM_read_bio_RSA_PUBKEY() to generate RSA, I think this might not require in case of EVP, please suggest.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">/*</p>
<p class="MsoNormal">  * NB: assumes key, eng, in, inlen are already set up</p>
<p class="MsoNormal">  * and that key is an RSA private key</p>
<p class="MsoNormal">  */</p>
<p class="MsoNormal">ctx = EVP_PKEY_CTX_new(key, eng);</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Regards,</p>
<p class="MsoNormal">Sunil</p>
<p class="MsoNormal"> </p>
</div>
<br>
</div>

<br clear="both">
Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. and its Affiliates that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments.<br>
</div>

</blockquote></div>