[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNUnet-developers] Two questions regarding CADET application
From: |
Christian Grothoff |
Subject: |
Re: [GNUnet-developers] Two questions regarding CADET application |
Date: |
Thu, 29 Dec 2016 17:52:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 12/28/2016 04:49 PM, Heiko Stamer wrote:
> Hey developers,
>
> I am going to use CADET for distributed key generation [1] based
> algorithms implemented in LibTMCG [2]. I have two short questions:
>
> 1) Please, can you reserve two official message types and a CADET port
> for this application? Currently I am using:
>
> #define GNUNET_MESSAGE_TYPE_LIBTMCG_DKG_GENERATE_PIPE_UNICAST 10001
> #define GNUNET_MESSAGE_TYPE_LIBTMCG_DKG_GENERATE_PIPE_BROADCAST 10002
>
> GNUNET_CRYPTO_hash("42742", 5, &porthash);
We've actually in the latest GNUnet code switched from 32-bit port
numbers to cryptographic hashes as CADET port numbers. Hence such
#define's are no longer in fashion, so to speak.
Ideally, your application should pick such a hash-port at random or
based on a shared secret of the various participants. In the rare cases
where you do need to hard code one, just use a string describing the
purpose and hash that.
> 2) GNUNET_PROGRAM_run() does not terminates, if services (i.e. ARM) are
> not running. Is this behavior intended? (Workaround: should I use exit
> in shutdown task?)
GNUNET_PROGRAM_run() will only terminate once all activities of your
process have terminated. Usually, the issue behind such non-termination
is that you need to install a shutdown task and use it to explicitly
stop ongoing actions.
I hope this helps!
Happy hacking!
Christian
signature.asc
Description: OpenPGP digital signature