以前生成的密钥对,最近重装系统后导入发觉不能用了。
Google 了好久也没找到哪儿的问题( macOS 、Debian 都试过同样的问题),请各位大佬看看,谢谢。
下面是在 Debian 上的一些基本情况。
GPG 版本:
# gpg --version
gpg (GnuPG) 2.2.40
libgcrypt 1.10.1
Copyright (C) 2022 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /root/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
公钥:
# gpg -k --keyid-format long
/root/.gnupg/pubring.kbx
------------------------
pub rsa4096/F2215CFC0976F86F 2017-08-05 [C]
FC99D7294A552BFAEDD018F6F2215CFC0976F86F
uid [ultimate] Anton Chen <contact@antonchen.com>
sub rsa4096/CE0FDC02360FD82C 2017-08-05 [S]
sub rsa4096/91ACDEB9013FFE65 2017-08-05 [E]
sub rsa4096/D9D6D4C9E6788098 2017-12-22 [A]
私钥:
# gpg -K --keyid-format long
/root/.gnupg/pubring.kbx
------------------------
sec rsa4096/F2215CFC0976F86F 2017-08-05 [C]
FC99D7294A552BFAEDD018F6F2215CFC0976F86F
uid [ultimate] Anton Chen <contact@antonchen.com>
ssb# rsa4096/CE0FDC02360FD82C 2017-08-05 [S]
ssb# rsa4096/91ACDEB9013FFE65 2017-08-05 [E]
ssb# rsa4096/D9D6D4C9E6788098 2017-12-22 [A]
测试:
# echo "test" | gpg --clearsign -v
gpg: using pgp trust model
gpg: no default secret key: Unusable secret key
gpg: [stdin]: clear-sign failed: Unusable secret key
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.