RSA private key DER decode fails without CRT components
Brahmaji K
brahmaji.k at gmail.com
Tue Aug 31 08:06:27 UTC 2021
Hi,
I could see this with openssl version 1.1.1d.
Sure I'll update.
On Tue, Aug 31, 2021 at 1:34 PM Dmitry Belyavsky <beldmit at gmail.com> wrote:
> Hello,
>
> First, may I ask you which version of OpenSSL do you use?
> Secondly, could you please report the issue via GitHub to make sure that
> it will not be lost?
>
> On Tue, Aug 31, 2021 at 10:01 AM Brahmaji K <brahmaji.k at gmail.com> wrote:
>
>> Hi Team,
>>
>> I'm trying to decode the RSA private key which was DER encoded earlier
>> without CRT components (p, q, dmp1, dmq1 and iqmp is NULL). I'm using the
>> same openssl version for both encoding and decoding, encoding works fine
>> but decode fails. In decode, we call EVP_PKEY2PKCS8() function, this is
>> failing with below error:
>>
>> 469393408:error:0D078079:asn1 encoding routines:asn1_item_embed_d2i:field
>> missing:crypto/asn1/tasn_dec.c:425:Field=p, Type=RSAPrivateKey
>>
>> The above error is because field p is NULL, but with same p is NULL
>> encoding is successful. Any idea why encode is Success but decode fails?
>>
>> Thanks and Regards,
>> Brahmaji K
>>
>
>
> --
> SY, Dmitry Belyavsky
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20210831/2fded1f3/attachment.html>
More information about the openssl-users
mailing list