Page MenuHome GnuPG

"Unknown curve" error when attempting to generate secp256k1 ECC key pair
Closed, ResolvedPublic

Description

After attempting to create an ECC key pair with the secp256k1 curve, I get the
following error:
"gpg: agent_genkey failed: Unknown elliptic curve"

I am using the following:
gpg (GnuPG) 2.1.0-beta864
libgcrypt 1.7.0-beta122

gpg2 --expert --full-gen-key

gpg (GnuPG) 2.1.0-beta864; Copyright (C) 2014 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
gpg: It is only intended for test purposes and should NOT be
gpg: used in a production environment or with production keys!
Please select what kind of key you want:

 (1) RSA and RSA (default)
 (2) DSA and Elgamal
 (3) DSA (sign only)
 (4) RSA (sign only)
 (7) DSA (set your own capabilities)
 (8) RSA (set your own capabilities)
 (9) ECC and ECC
(10) ECC (sign only)
(11) ECC (set your own capabilities)

Your selection? 9
Please select which elliptic curve you want:

(2) NIST P-256
(3) NIST P-384
(4) NIST P-521
(5) Brainpool P-256
(6) Brainpool P-384
(7) Brainpool P-512
(8) secp256k1

Your selection? 8
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

GnuPG needs to construct a user ID to identify your key.

Real name: Test Secp
Email address: secp@test.com
Comment: Test sec
You selected this USER-ID:

    "Test Secp (Test sec) <secp@test.com>"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: agent_genkey failed: Unknown elliptic curve
Key generation failed: Unknown elliptic curve

Event Timeline

That is an very experimental feature and you need a patched version of
Libgcrypt. I close this bug; please ask for help on gnupg-devel.

werner claimed this task.