Secret Key UID Missing
imacat
imacat at mail.imacat.idv.tw
Wed May 25 20:23:49 CEST 2005
Well, after some hacking, I think I'd found the answer to manuplate
the secret key UID now. I think this worths sharing. It may not be the
intension of the authors, but at the meanwhile while secret key UID
management is not available, this should provide some solution. This
method should work for people want to add a secret key UID, delete a
secret key UID, or bla bla bla. Though, GnuPG itself should provide
some way to synchronize the secret key UID with the public key UID, or
drop the secret key UID completely.
I got the idea from this article:
http://lists.gnupg.org/pipermail/gnupg-devel/2000-January/016247.html
> The user IDs are actually not needed in the secret key but they are
> normally created to make the listening easier.
If the secret key UID is "only" created to make the listening easier,
I can reasonably assume that it is irrevelent to the corresponding
public key UID. Then, if I backup and drop the original public key UID
that has many signatures, create a new dummy public/secret key UID pair
with exactly the same name, e-mail and comment, and replace the dummy
new public key UID with my original, backuped one, the new secret key
UID should be paired with the original, signed public key UID. Then,
I'll have a new secret key UID to use.
This works. Here is the actual steps involved.
====================================
imacat at rinse ~ % gpg --edit 30B94B5C
gpg (GnuPG) 1.4.1; Copyright (C) 2005 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.
Secret key is available.
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
[ultimate] (2) 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> check
uid 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
sig!3 30B94B5C 2005-05-16 [self-signature]
sig!3 30B94B5C 2005-05-16 [self-signature]
sig! 11C02382 2005-05-25 Ying-Chieh Liao <ijliao at FreeBSD.org>
uid 依瑪貓 (imacat) <imacat at pristine.com.tw>
sig!3 30B94B5C 2005-05-16 [self-signature]
sig! 11C02382 2005-05-25 Ying-Chieh Liao <ijliao at FreeBSD.org>
Command> toggle
sec 1024D/30B94B5C created: 2002-07-04 expires: never
ssb 4096g/266EF40E created: 2002-07-04 expires: never
(1) 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
Command> toggle
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
[ultimate] (2) 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> quit
imacat at rinse ~ % cp .gnupg/pubring.gpg .gnupg/pubring.gpg-bak
imacat at rinse ~ % gpg --edit 30B94B5C
gpg (GnuPG) 1.4.1; Copyright (C) 2005 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.
Secret key is available.
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
[ultimate] (2) 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> check
uid 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
sig!3 30B94B5C 2005-05-16 [self-signature]
sig!3 30B94B5C 2005-05-16 [self-signature]
sig! 11C02382 2005-05-25 Ying-Chieh Liao <ijliao at FreeBSD.org>
uid 依瑪貓 (imacat) <imacat at pristine.com.tw>
sig!3 30B94B5C 2005-05-16 [self-signature]
sig! 11C02382 2005-05-25 Ying-Chieh Liao <ijliao at FreeBSD.org>
Command> toggle
sec 1024D/30B94B5C created: 2002-07-04 expires: never
ssb 4096g/266EF40E created: 2002-07-04 expires: never
(1) 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
Command> toggle
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
[ultimate] (2) 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> uid 2
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
[ultimate] (2)* 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> deluid
Really remove this user ID? (y/N) y
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
Command> check
uid 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
sig!3 30B94B5C 2005-05-16 [self-signature]
sig!3 30B94B5C 2005-05-16 [self-signature]
sig! 11C02382 2005-05-25 Ying-Chieh Liao <ijliao at FreeBSD.org>
Command> toggle
sec 1024D/30B94B5C created: 2002-07-04 expires: never
ssb 4096g/266EF40E created: 2002-07-04 expires: never
(1) 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
Command> toggle
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
Command> adduid
Real name: 依瑪貓
Email address: imacat at pristine.com.tw
Comment: imacat
You are using the `utf-8' character set.
You selected this USER-ID:
"依瑪貓 (imacat) <imacat at pristine.com.tw>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
You need a passphrase to unlock the secret key for
user: "依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>"
1024-bit DSA key, ID 30B94B5C, created 2002-07-04
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
[ultimate] (2) 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> check
uid 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
sig!3 30B94B5C 2005-05-16 [self-signature]
sig!3 30B94B5C 2005-05-16 [self-signature]
sig! 11C02382 2005-05-25 Ying-Chieh Liao <ijliao at FreeBSD.org>
uid 依瑪貓 (imacat) <imacat at pristine.com.tw>
sig!3 30B94B5C 2005-05-25 [self-signature]
Command> toggle
sec 1024D/30B94B5C created: 2002-07-04 expires: never
ssb 4096g/266EF40E created: 2002-07-04 expires: never
(1) 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
(2) 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> toggle
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
[ultimate] (2) 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> save
imacat at rinse ~ % cp .gnupg/pubring.gpg-bak .gnupg/pubring.gpg
cp: overwrite `.gnupg/pubring.gpg'? y
imacat at rinse ~ % gpg --edit 30B94B5C
gpg (GnuPG) 1.4.1; Copyright (C) 2005 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.
Secret key is available.
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 2 signed: 45 trust: 0-, 0q, 0n, 0m, 0f, 2u
gpg: depth: 1 valid: 45 signed: 0 trust: 5-, 0q, 0n, 40m, 0f, 0u
gpg: next trustdb check due at 2005-10-22
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
[ultimate] (2) 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> check
uid 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
sig!3 30B94B5C 2005-05-16 [self-signature]
sig!3 30B94B5C 2005-05-16 [self-signature]
sig! 11C02382 2005-05-25 Ying-Chieh Liao <ijliao at FreeBSD.org>
uid 依瑪貓 (imacat) <imacat at pristine.com.tw>
sig!3 30B94B5C 2005-05-16 [self-signature]
sig! 11C02382 2005-05-25 Ying-Chieh Liao <ijliao at FreeBSD.org>
Command> toggle
sec 1024D/30B94B5C created: 2002-07-04 expires: never
ssb 4096g/266EF40E created: 2002-07-04 expires: never
(1) 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
(2) 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> toggle
pub 1024D/30B94B5C created: 2002-07-04 expires: never usage: CS
trust: ultimate validity: ultimate
sub 4096g/266EF40E created: 2002-07-04 expires: never usage: E
[ultimate] (1). 依瑪貓 (imacat) <imacat at mail.imacat.idv.tw>
[ultimate] (2) 依瑪貓 (imacat) <imacat at pristine.com.tw>
Command> quit
imacat at rinse ~ %
--
Best regards,
imacat ^_*' <imacat at mail.imacat.idv.tw>
PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt
<<Woman's Voice>> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://www.linux.org.tw/mailman/listinfo/tlug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : /pipermail/attachments/20050526/018b1569/attachment.pgp
More information about the Gnupg-users
mailing list