【问题标题】:Encrypt and decrypt a string of text with RSA and DES3 key使用 RSA 和 DES3 密钥加密和解密文本字符串
【发布时间】:2011-12-21 12:26:55
【问题描述】:

我正在使用 Linux 命令行,我使用以下命令创建了一个私钥:

openssl genrsa -des3 -out private.pem 2048

我已经从私钥中提取了公钥,如下所示:

openssl rsa -in private.pem -out public.pem -outform PEM -pubout

我想用公钥加密一串文本,比如说“foo bar”,然后再解密这个字符串。

我该怎么做?

谢谢

【问题讨论】:

    标签: linux public-key-encryption


    【解决方案1】:

    我想你想要

    openssl rsautl -encrypt -inkey public.pem -pubin -in unencrypted_file.txt -out encrypted_file.ssl
    

    devco 上查看更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-06-08
      • 2018-09-10
      • 1970-01-01
      • 1970-01-01
      • 2019-06-26
      • 2013-01-02
      • 1970-01-01
      相关资源
      最近更新 更多