Re: Help with hashing and signatures
"Schanzenbach, Martin" <[email protected]> Wed, 5 Aug 2020 13:04:33 +0200
| Newsgroups | gmane.network.gnunet.general |
|---|---|
| Message-ID | <[email protected]> |
> On 5. Aug 2020, at 00:08, Alessio Vanni <[email protected]> wrote: > > "Schanzenbach, Martin" <[email protected]> writes: > >> Before you look into such low level calls you should double and triple check our >> own code and data: > > I worded it poorly, but I meant that the error happens when we reach the > actual verification, not before and that I wouldn't be able to tell if > there was something going on there or not. > >> Is the data ("container") you are sending the same (output the hex) on >> both ends before hashing? > > Yes. In a normal communication this happens two times, and for two > times everything is the same. > >> Is the hash of the data the same on both ends? (this one is easier to >> check as you can print the hash using GNUNET_h2s). > > Unless GNUNET_h2s is lying, the hash is the same. I did a simple > `printf("%s\n", GNUNET_h2s(&sd->hash))' to see what is being computed. > >> Is the public key received the one to expect when deriving it from the >> private key? (again print the key). > > Yes, it's the same. I even checked with gnunet-identity and the printed > key is the same as the one generated by the identity service. > >> If you checked all of the above, and they ALL match, then we should consider looking at the crypto >> in more detail. > > I'll wait for more instructions if I need to do something in particular. You could try to use the "GNUNET_CRYPTO_ecdsa_verify_" and "GNUNET_CRYPTO_ecdsa_sign_" functions in case there is a bug in the defines that wrap them. BR > > Thanks, > A.V.
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEPREGPBD5jRS9JNFHCwmY74b1m2oFAl8qkkEACgkQCwmY74b1 m2pGwQ//ZuNWCAzOezx+PmT7gx+UBmrxSmJtahI1uSYa7RvzhKoQygHge7vH6NC1 1trh4noGCLOctGwg7oIXc4GSQXB0qHd+NA01/KQhlk/9rHz17usZNafychu7qG1Y hbpb4/ELlynLrnXUvh3eZwmyaABS8S9ytn6bzhZEvyL/8ZQ4M3HUHHbbGmV676CR lXs4UPqlNjPHAFezWZpZ1UPqg+jUr4jnfVU1ieZdx+YaZqHqRANE239BKN7LCheY yBVDnfZPeKtm0QHh2xuJgPVaGf2/uEtEeWpNUaRjysBAMKQFqTgvDB6YjmdDJ9GK au4qd3mSL2K8qW/NSAXnYmdklsx/LDNDJ7YDMit1qVYxFR/LOc4VRx/+9cw3NOZI tugI3CtVozvB8LguDCmkMCKRvnRDDKJOwru64DbcKv7PMszy0jlgA+d7+iosXeOc YHz1bBByC23o5Vl2ul1x0CQ8o5eRTi6UhHQLyii+YWAM6j8f/RPXxVuA01fgO5oK GptYhIX8z4A8vbtWawVcvpY51a2uKJGOHiF5cnC/q6LH0GNfbFV09Qzb8zvc+Jt1 TLYZ7ogLIfJBJ9oHeI54Yzf4RQ6+tSoax60o3KI53TRrzNvLA7MDw4zQIXfLcPXR cFhVMJJp8Yu2dD8Zk+tl+6Ieh8ynbS0Qr1jBJaxNyELVW66ZveU= =5eWl -----END PGP SIGNATURE-----