小编luk*_*k32的帖子

即使我知道密码,也无法解密私钥

我认为我的问题归结为密钥有问题,但我不能只是解密它,以便进一步调查,而不对其进行解析。但我不确定。

我正在尝试使用标准方法:

openssl rsa -in ./id_rsa -out ./id_rsa.decrypted
Run Code Online (Sandbox Code Playgroud)

我想我知道密码,因为当我输入错误时,我得到:

Enter pass phrase for ./id_rsa:
unable to load Private Key
140256774473360:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:544:
140256774473360:error:0906A065:PEM routines:PEM_do_header:bad decrypt:pem_lib.c:483
Run Code Online (Sandbox Code Playgroud)

坏解密”很清楚。现在,当我输入看似不错的密码时,我会回来:

Enter pass phrase for ./id_rsa:
unable to load Private Key
139662870623888:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:asn1_lib.c:153:
139662870623888:error:0D068066:asn1 encoding routines:ASN1_CHECK_TLEN:bad object header:tasn_dec.c:1314:
139662870623888:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=RSA
139662870623888:error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib:rsa_ameth.c:115:
139662870623888:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:asn1_lib.c:153:
139662870623888:error:0D068066:asn1 encoding routines:ASN1_CHECK_TLEN:bad object header:tasn_dec.c:1314:
139662870623888:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=PKCS8_PRIV_KEY_INFO
139662870623888:error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib:pem_pkey.c:132:
Run Code Online (Sandbox Code Playgroud)

它也无法加载密钥,但现在它在 asn1 解析器上失败了,与密码无关。

我可以以某种方式获得未加密版本的密钥并使用其他工具查看有什么问题吗?

我看过一些帖子,说有些东西发生了变化,看似好的密钥的可能原因无法解析,但它们都适用于未加密的版本。但他们唯一的方法是我看到的 …

rsa openssl passphrase

12
推荐指数
1
解决办法
5万
查看次数

标签 统计

openssl ×1

passphrase ×1

rsa ×1