Root certificate bad signature - bug?
Michal Příhoda
michal at prihoda.net
Mon Nov 19 08:54:41 CET 2007
Hi,
I tried to send this email last week, but it didn't come through to
the list and I got no response from moderator, so I'm trying it again
and if this is not the right place to post this question, just let me
know, please.
I'm having a problem importing root certificate of ACA eIdentity. The
certificate seems to work just fine with OpenSSL, Mozilla, Windows
and Java tools.
> mph at tuxik ~ % openssl verify -CAfile rca.pem rca.pem
> rca.pem: OK
> mph at tuxik ~ % openssl x509 -in rca.pem -inform PEM -out rca.der -
outform DER
> mph at tuxik ~ % gpgsm --import rca.der
> gpgsm: self-signed certificate has a BAD signature: Bad signature
> gpgsm: basic certificate checks failed - not imported
> gpgsm: total number processed: 1
> gpgsm: not imported: 1
> mph at tuxik ~ % gpgsm --version
> gpgsm (GnuPG) 2.0.7
> Copyright (C) 2007 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/
licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> Home: ~/.gnupg
> Supported algorithms:
> Cipher: 3DES, AES, AES192, AES256, SERPENT128, SERPENT192, SERPENT256
> Pubkey: RSA
> Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512
I tried to debug it and tracked it all the way to mpi-pow.c
gcry_mpi_powm, but there my ability to work efficiently ends, as I'm
not skilled in big number algorithms. All the inputs till this point
seemed to be right, as far as I'm able to tell - I compared the
exponent, modulus, signature and hash byte to byte with what my Java
code is using. But part of the result differs from the original hash:
(gdb) p /x *result->d at 32
$3 = {0x8ba7566f0fd4adb8, 0xed2c6d4c0f2fdb2, 0x21a0414cf08577d,
0x1f300706052b0e03, 0xffffffffffff0030,
0xffffffffffffffff <repeats 26 times>, 0x1ffffffffffff}
(gdb) p /x *hash->d at 32
$5 = {0x8ba7566f0fd4adb8, 0xed2c6d4c0f2fdb2, 0x5000414cf08577d,
0x906052b0e03021a, 0xffffffff00302130,
0xffffffffffffffff <repeats 26 times>, 0x1ffffffffffff}
I would really appreciate if anyone could look into it and will
gladly help in any way possible. The certificate is available at
http://www.acaeid.cz/root/rca.pem. Thanks in advance for any response.
--
Michal Prihoda
More information about the Gnupg-devel
mailing list