[PATCH] Small bug fixes for ECDH

NIIBE Yutaka gniibe at fsij.org
Thu Apr 24 06:54:53 CEST 2014


On 2014-04-23 at 14:22 +0200, Werner Koch wrote:
> > (2) According to RFC 6637, "Algorithm-Specific Fields for ECDH" are:
> >
> >     * an ephemeral public key
> >
> >     then,
> >
> >     * symmetric key info (size, key)
> 
> I don't understand that.  Why do we need to swap the parameters.  was
> there a regression?

I didn't understand well, either.  I debugged and found it's swapped.
It seems for me that... it was not working well long time.

I don't know how the code around ECDH has been tested.

I just found that tests/openpgp/ecc.test has been skipped for a while.

At least, something like following is needed.

Before Curve25519, I'm going to fix the code around ECDH.

diff --git a/tests/openpgp/ecc.test b/tests/openpgp/ecc.test
index 062a1ae..6f07f74 100755
--- a/tests/openpgp/ecc.test
+++ b/tests/openpgp/ecc.test
@@ -20,7 +20,7 @@ mainkeyids='BAA59D9C
             45AF2FFE'
 

-if have_pubkey_algo "ECC"; then
+if have_pubkey_algo "ECDSA"; then
   :
 else
   info "No ECC support due to an old Libgcrypt"
-- 





More information about the Gnupg-devel mailing list