Chinaunix

标题: 关于GPG 来看看.我的public key 不能用??? [打印本页]

作者: netkiller    时间: 2003-12-10 11:12
标题: 关于GPG 来看看.我的public key 不能用???
[chen@linux chen]$ gpg --output revoke.asc --gen-revoke chens
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information

sec  1024D/96B15F4A 2003-12-10   chens (Chen) <netkiller@9812.net>;

Create a revocation certificate for this key? y
Please select the reason for the revocation:
  0 = No reason specified
  1 = Key has been compromised
  2 = Key is superseded
  3 = Key is no longer used
  Q = Cancel
(Probably you want to select 1 here)
Your decision? 1
Enter an optional description; end it with an empty line:
>; chen jingfeng
>;
Reason for revocation: Key has been compromised
chen jingfeng
Is this okay? y

You need a passphrase to unlock the secret key for
user: "chens (Chen) <netkiller@9812.net>;"
1024-bit DSA key, ID 96B15F4A, created 2003-12-10

ASCII armored output forced.
Revocation certificate created.

Please move it to a medium which you can hide away; if Mallory gets
access to this certificate he can use it to make your key unusable.
It is smart to print this certificate and store it away, just in case
your media become unreadable.  But have some caution:  The print system of
your machine might store the data and make it available to others!
[chen@linux chen]$ ls
file.txt  revoke.asc


[chen@linux chen]$ gpg --armor --output chen.gpg --export chens
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information
File `chen.gpg' exists. Overwrite (y/N)? y
[chen@linux chen]$

[chen@linux chen]$ gpg -ea -r chens file.txt
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information
gpg: checking the trustdb
gpg: checking at depth 0 signed=0 ot(-/q/n/m/f/u)=0/0/0/0/0/1
[chen@linux chen]$ ls
chen.asc  chen.gpg  file.txt  file.txt.asc  revoke.asc
[chen@linux chen]$

[root@linux tmp]# gpg --list-keys
/root/.gnupg/pubring.gpg
------------------------
pub  1024D/96B15F4A 2003-12-10 chens (Chen) <netkiller@9812.net>;
sub  1024g/9C2DF656 2003-12-10

[root@linux tmp]#


[root@linux tmp]# gpg -d file.txt.asc
gpg: encrypted with 1024-bit ELG-E key, ID 9C2DF656, created 2003-12-10
      "chens (Chen) <netkiller@9812.net>;"
gpg: decryption failed: secret key not available
[root@linux tmp]#




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2