Mailing List Archive

problems with --add-key and --delete-key
Hi,

I'm having problems with generating sub-keys.

| 20:24:43@junk| ~ $gpg -u "James Troup <james@nocrew.org>" --add-key "James Troup"
| gpg: Warning: using insecure memory!
| sec 2048G/9EB2E7D1 1998-03-04 James Troup <jjtroup@comp.brad.ac.uk>
|
| Key is protected.
|
| You need a passphrase to unlock the secret key for
| user: "James Troup <jjtroup@comp.brad.ac.uk>"
| (2048-bit ELG-E key, ID 9EB2E7D1, created 1998-03-04)
|
| Please select what kind of key you want:
| (2) ElGamal (sign and encrypt)
| (3) ElGamal (encrypt only)
| (4) DSA (sign only)
| (5) ElGamal in a v3 packet
| Your selection? 2
| About to generate a new ELG keypair.
| minimum keysize is 768 bits
| default keysize is 1024 bits
| highest suggested keysize is 2048 bits
| What keysize do you want? (1024)
| Requested keysize is 1024 bits
| Please specify how long the key should be valid.
| 0 = key does not expire
| <n> = key expires in n days
| <n>w = key expires in n weeks
| <n>m = key expires in n months
| <n>y = key expires in n years
| Key is valid for? (0) 0
| Key does not expire at all
| Is this correct (y/n)? y
| We need to generate a lot of random bytes. It is a good idea to perform
| some other action (work in another window, move the mouse, utilize the
| network and the disks) during the prime generation; this gives the random
| number generator a better chance to gain enough entropy.
| ++++++++++.........+++++.......+++++.........+++++....++++++++++....+++++........+++++...+++++.+++++..+++++.......................+++++...+++++.....+++++......+++++..+++++.+++++..+++++++++++++++.....................+++++....+++++...+++++....++++++++++>.+++++>...........+++++.......................................................+++++^^^
| public and secret subkey created.
| 20:25:57@junk| ~ $gpg --list-keys
| /home/james/.gnupg/pubring.gpg
| ------------------------------
| gpg: Warning: using insecure memory!
| pub 2048G/9EB2E7D1 1998-03-04 James Troup <jjtroup@comp.brad.ac.uk>
| sub 1024G/2BC1891C 1998-07-02
| pub 1312G/FF3EAA0B 1998-02-09 Werner Koch <wk@isil.d.shuttle.de>
| pub 1024G/3CAF73CA 1998-02-19 Walter Koch (dg9ep) <walterk@ddorf.rhein-ruhr.de>
| 20:26:19@junk| ~ $

-u was my attempt to specify a name for the sub-key. It obviously
failed... what am I missing? Oh, and --add-key doesn't appear to be
documented in the manpage. Giving up on that, I thought I'd try to
remove some the keys I'd created in testing, but that failed to:

| 20:21:08@junk| ~ $gpg --list-keys --no-greeting
| /home/james/.gnupg/pubring.gpg
| ------------------------------
| gpg: Warning: using insecure memory!
| pub 2048G/9EB2E7D1 1998-03-04 James Troup <jjtroup@comp.brad.ac.uk>
| sub 1024D/A1F576D6 1998-07-01
| sub 1024G/5B1EF39C 1998-07-01
| sub 1024G/B33290A4 1998-07-01
| pub 1312G/FF3EAA0B 1998-02-09 Werner Koch <wk@isil.d.shuttle.de>
| pub 1024G/3CAF73CA 1998-02-19 Walter Koch (dg9ep) <walterk@ddorf.rhein-ruhr.de>
| 20:21:13@junk| ~ $gpg --no-greeting --delete-key 0xA1F576D6
| gpg: Warning: using insecure memory!
| gpg: 0xA1F576D6: user not found
| gpg: 0xA1F576D6: delete key failed: eof
| 20:21:14@junk| ~ $

Sorry, if I'm blatantly missing something obvious here. Also sorry
for sounding so negative :/

Other minor nits, which may or may not be considered bugs:

o gpg --edit-key results in an error message of something like "usage:
--edit-sig userid", which is confusing since I gave it --edit-key as
an option. (I realise the two are aliases, but...)

o gpg seems unnaturally fussy about the way options are presented to
it, e.g. `gpg --no-greeting --delete-key 0xA1F576D6' works (or not
as this case maybe), but `gpg --delete-key 0xA1F576D6 -no-greeting',
gives a usage error.

--
James
~Yawn And Walk North~ http://yawn.nocrew.org/
Re: problems with --add-key and --delete-key [ In reply to ]
James Troup <james@nocrew.org> writes:

> -u was my attempt to specify a name for the sub-key. It obviously

Subkeys don't have a name; they are bounded to the primary key with
all its user-ids (Yes, there is yet no way to add alternative
user-ids).

> failed... what am I missing? Oh, and --add-key doesn't appear to be
> documented in the manpage. Giving up on that, I thought I'd try to

I'll fix it.

> | gpg: 0xA1F576D6: user not found
> | gpg: 0xA1F576D6: delete key failed: eof

I'll fix this too. There are some other problems with
subkeys I know of.

> Sorry, if I'm blatantly missing something obvious here. Also sorry
> for sounding so negative :/

I'd like to receive more bug reports ;-) - really.

> o gpg --edit-key results in an error message of something like "usage:
> --edit-sig userid", which is confusing since I gave it --edit-key as
> an option. (I realise the two are aliases, but...)

Fixed (but not for the alias)

> o gpg seems unnaturally fussy about the way options are presented to
> it, e.g. `gpg --no-greeting --delete-key 0xA1F576D6' works (or not
> as this case maybe), but `gpg --delete-key 0xA1F576D6 -no-greeting',

You mean --no-greeting but anyway this error is due to the fact that
--delete-key is a command and expects one argument. Some other options
do take arguments (-u joe) but this are arguments of the option.

Actually there is no big difference bettween options and commands, but
there are listed in different sections of the man page and with
--help.


Thanks.

Werner