PEM_read_bio_RSAPublicKey equivalent API which returns EVP_PKEY

Paramashivaiah, Sunil Sunil.Paramashivaiah at rbbn.com
Mon Apr 12 04:24:32 UTC 2021


Hi All,

 While migrating from 1.0.2 to 3.0, we are replacing deprecated APIs "RSA_public_encrypt" and "RSA_public_decrypt" with "EVP_PKEY_encrypt" and "EVP_PKEY_decrypt".

In 1.0.2, "RSA_public_encrypt" and "RSA_public_decrypt" were taking RSA public key as parameter
created using "PEM_read_bio_RSA_PUBKEY" and "PEM_read_bio_RSAPublicKey" where the public key
was encoded using a SubjectPublicKeyInfo structure and PKCS#1 RSAPublicKey structure respectively.

In 3.0, I replaced "PEM_read_bio_RSA_PUBKEY" with "PEM_read_bio_PUBKEY" to get EVP_PKEY
for creating EVP ctx(EVP_PKEY_CTX_new) to use in "EVP_PKEY_encrypt" and "EVP_PKEY_decrypt".

But, I couldn't find equivallent API to replace "PEM_read_bio_RSAPublicKey" to get EVP_PKEY for
creating EVP ctx(EVP_PKEY_CTX_new) to use in "EVP_PKEY_encrypt" and "EVP_PKEY_decrypt".

Please suggest me an API(replacement for PEM_read_bio_RSAPublicKey) to use to get
EVP_PKEY for public key encoded using PKCS#1 RSAPublicKey structure.

Thanks and Regards,
Sunil

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20210412/680397d0/attachment-0001.html>


More information about the openssl-users mailing list