【问题标题】:I need to decrypt file encrypted by gpg (in command line)我需要解密 gpg 加密的文件(在命令行中)
【发布时间】:2014-09-05 15:49:05
【问题描述】:

我有一个文件,我在 PC 上使用 aes256 和密码短语对其进行了加密。

gpg --cipher-algo AES256 --output testfile.gpg --symmetric testfile.txt

现在我需要从我的 android 应用程序中解密这个文件。

我之前在 android 中使用过解密数据(使用 aes256 加密),但后来我必须提供 KEY(256 位)和 salt(128 位)才能解密。

如何将我的密码短语转换为密钥/盐对? 或者如何拥有密钥/盐对我可以使用 GPG 加密文件(并使用相同的密钥/盐稍后解密)?

【问题讨论】:

    标签: android cryptography aes gnupg


    【解决方案1】:

    我决定使用 AESCrypt 应用程序进行加密,然后我可以使用标准 android API(不需要库)在 android 端解密这个文件。

    AES crypt 的文件格式为documented。他们还有open source implementation for java,这让我可以编写我的代码。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多