How to batch generate ECC key

Rezart Qelibari für GnuPG gnupg-kontakt at rezart.qelibari.de
Fri Dec 29 01:18:27 CET 2017


Hi *,

I want to batch generate a key using an ECC algorithm using the following command:  

$ cat config.txt | gpg —-batch —generate-key  

config.txt contains the following:  

Key-Type: eddsa  
Key-Curve: ed25519
Key-Usage: sign
Subkey-Type: ecdh
Subkey-Curve: cv25519
Subkey-Usage: encrypt
Passphrase: somepassword
Name-Real: Some Real Name
Name-Email: mail at example.com
Creation-Date: 20170801T180000
Expire-Date: 0
%commit

But I always receive the following error:  

gpg: agent_genkey failed: Unknown elliptic curve  
gpg: key generation failed: Unknown elliptic curve

I already tried changing the key type to 22 or 18. Strangely this only happens with ed25519 or cv25519 curves while it works for nist p 256 as shown here:
https://askubuntu.com/questions/861978/unattended-gnupg-key-generation-for-ecc/861985

Does anyone know what exactly goes wrong here?
I am using gpg 2.2.4 and libgcrypt 1.8.2.

Best
Rezart



More information about the Gnupg-users mailing list