当前位置:网站首页>PEM_ read_ bio_ Privatekey() returns null only in ECB mode - PEM_ read_ bio_ PrivateKey() returns NULL in ECB mode only

PEM_ read_ bio_ Privatekey() returns null only in ECB mode - PEM_ read_ bio_ PrivateKey() returns NULL in ECB mode only

2022-06-30 02:14:00 French red wine sweet

problem :

PEM_read_bio_PrivateKey() returns NULL if a private key is encrypted by DES EDE in ECB mode. If the private key is in ECB In mode by DES EDE encryption , be PEM_read_bio_PrivateKey() return NULL .The issue happens in EVP_DecryptFinal_ex() : The problem happened in EVP_DecryptFinal_ex()

4128:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:330:

If the same private key is encrypted by DES EDE in CBC mode, this function works OK. If in CBC In mode DES EDE Encrypt the same private key , This function is normal .

I checked, this issue is reproducible on openssl 0.9.8r/y versions (without FIPS). I checked , The question is openssl 0.9.8r / y edition ( No, FIPS) Is reproducible .If openssl is built with FIPS the issue doesn't happen. If you use FIPS structure openssl, Then it will not happen .

What causes this behaviour? What causes this behavior ?

Thanks! thank you !


Solution :

Reference resources : https://stackoom.com/en/question/1BGxy
原网站

版权声明
本文为[French red wine sweet]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202160708173468.html