help-gnunet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with hashing and signatures


From: Schanzenbach, Martin
Subject: Re: Help with hashing and signatures
Date: Tue, 4 Aug 2020 22:43:59 +0200


> On 4. Aug 2020, at 22:07, Alessio Vanni <vannilla@firemail.cc> wrote:
> 
> "Schanzenbach, Martin" <mschanzenbach@posteo.de> writes:
> 
>> Is your struct packed as specified in the comment?
> 
> I tried adding both GNUNET_NETWORK_STRUCT_BEGIN/END and GNUNET_PACKED
> and nothing happens.
> 
> The struct contains just two other structs inside.  It's similar to
> `struct GNUNET_REVOCATION_SignaturePurposePS' from the
> "gnunet_revocation_service.h" file, except instead of there being a key
> and a timestamp there is simply a hash generated from a hashing context.
> 
> I even tried swapping `htonl' with `ntohl' and still no luck.  Removing
> the call entirely generates an assertion error which I assume is the
> correct behaviour.
> 
> The error actually seems to stem from gcrypt, but we're now entering a
> field I have even less expertise on, so I can't investigate any further.
> 

Before you look into such low level calls you should double and triple check our
own code and data:

Is the data ("container") you are sending the same (output the hex) on both 
ends before hashing?
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).
Is the public key received the one to expect when deriving it from the private 
key? (again print the key).

If you checked all of the above, and they ALL match, then we should consider 
looking at the crypto
in more detail.

BR
Martin

> Thanks,
> A.V.

Attachment: signature.asc
Description: Message signed with OpenPGP


reply via email to

[Prev in Thread] Current Thread [Next in Thread]