Checksum error importing (unencrypted) ecdsa private key
KB Sriram
mail_kb at yahoo.com
Thu Jan 29 01:33:35 CET 2015
I'm getting a checksum error when attempting to import an unencrypted ecdsa private key;
sample key appended to this email.
The interesting part of the debug log from gpg-agent says:
-> INQUIRE KEYDATA
<- [...]
<- END
command 'IMPORT_KEY' failed: Checksum error
etc.
I may be wrong, but it seems like the issue is triggered around here:
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=agent/cvt-openpgp.c;h=8cf00233e4178ee34592273c167875d083406a17;hb=0c2bfd9d5a49a6134188f8f7820f6ccdebd9f181#l831
The line
if (is_enc || curve)
{
and subsequent comment assumes that encrypted parameters or ecc parameters should be stored as opaque gcry_mpi_t numbers; but seems to me that unencrypted ecc values should not enter this clause?
FWIW, my quick test by removing the || curve from that if statement successfully imports the unencrypted key, which is appended.
version:
gpg (GnuPG) 2.1.0
libgcrypt 1.6.2
Thanks!
-kb
-----BEGIN PGP PRIVATE KEY BLOCK-----
Charset: UTF-8
xf8AAAB3BAAAAAATCCqGSM49AwEHAgMEQ4Yc8qum6fq6FXYXNKsnLHkDB++ddY2J
eGwjBfhL4WTjF/UAlF7OsM5ItqTIe4hEsWddfHgipsQu1/KVlMrm6gAA/096sow+
ihauNzH8gs2tWWHYSNtRpL03c6iE4YscU1kBEGTN/wAAABV1bmVuY3J5cHRlZC10
ZXN0LWVjZHPC/wAAAI0EEBMIAD//AAAABYJUyXUL/wAAAAKLCf8AAAAJkKmj9sai
SBXE/wAAAAWVCAkKC/8AAAADlgEC/wAAAAKbA/8AAAACngEAAFWxAP9WbzI+R7KO
/nWcidHaen9d+ZRQ9HS4y5pN4fO+dvAiGgEA3t7oPbiwvn2GGNS6Id+uu2oyqYsw
UAIjLduj5kJe8cY=
=4Fwn
-----END PGP PRIVATE KEY BLOCK-----
More information about the Gnupg-devel
mailing list