Mailing List Archive

agent_genkey failed: Invalid flag
A user of Enigmail tried to create a key using the following command:

/usr/bin/gpg2 --charset utf-8 --display-charset utf-8 \
--no-auto-check-trustdb --batch --no-tty --no-verbose --status-fd 2 \
--gen-key
%echo Generating key
Key-Type: EDDSA
Key-Curve: Ed25519
Key-Usage: sign
Subkey-Type: ECDH
Subkey-Curve: Curve25519
Subkey-Usage: encrypt
Name-Real: [name]
Name-Email: [email]
Expire-Date: 1825

gpg reports the following error:

gpg: agent_genkey failed: Invalid flag
gpg: key generation failed: Invalid flag
[GNUPG:] ERROR key_generate 16777288
[GNUPG:] KEY_NOT_CREATED

Any idea what could be wrong here?

-Patrick

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: agent_genkey failed: Invalid flag [ In reply to ]
Hello,

Patrick Brunschwig wrote:
> gpg reports the following error:
>
> gpg: agent_genkey failed: Invalid flag
> gpg: key generation failed: Invalid flag
> [GNUPG:] ERROR key_generate 16777288
> [GNUPG:] KEY_NOT_CREATED
>
> Any idea what could be wrong here?

The error is from libgcrypt. I think that libgcrypt is too old
to use Ed25519/Curve25519.

When generating Ed25519/Curve25519 key/subkey, gpg uses three flags:

comp
eddsa
djb-tweak

It seems that some flag(s) is not supported by libgcrypt in the user's
system.

Meaning:

comp: compact format
(only use x or y-coordinate to represent an EC point)
eddsa: use for EdDSA
djb-tweak: specify bits of secret is tweaked DJB's method;
MSB is set, LSBs are cleared.
--

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users