【问题标题】:Openssl cannot decrypt message using PuttyGen private keyOpenssl 无法使用 PuttyGen 私钥解密消息
【发布时间】:2018-02-13 14:07:17
【问题描述】:

我使用 PuttyGen 创建了公钥和私钥,然后使用公钥加密消息。 我现在正在尝试通过以下命令使用私钥解密此类消息:

echo [my encrypted message] | openssl enc -d -base64 -A | openssl rsautl -decrypt -inkey ~/.ssh/private.ppk

但我得到了错误:

unable to load Private Key
6870300:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: ANY PRIVATE KEY

私钥如下所示(实际密钥省略):

PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: rsa-key-20170724
Public-Lines: 6
[...]
Private-Lines: 14
[...]
Private-MAC: [...]

怎么了?

【问题讨论】:

    标签: encryption public-key-encryption


    【解决方案1】:

    感谢this guy我整理出来了。

    我用 PuttyGen 重新打开了私钥并导出为 OpenSSH,然后使用这个新文件解密消息。

    【讨论】:

      猜你喜欢
      • 2017-07-07
      • 2022-08-02
      • 2019-08-15
      • 2021-02-22
      • 2016-03-08
      • 2020-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多