34 "50d7b652a4efeadff37396909785e5952171a02178c8e7d450fa907925fafd98";
67 "gnunet+tcp://1.2.3.4"));
69 "gnunet+udp://6.7.8.9"));
71 "gnunet+https://example.gnu"));
73 printf (
"Addresses (sorted):\n");
77 printf (
"Address hash:\n");
82 printf(
"Seed key:\n");
86 printf(
"Derived key:\n");
115 "Generate test vectors for PILS",
struct GNUNET_GETOPT_CommandLineOption options[]
int main()
Program to simulate results from GCP_get_desirability_of_path() for various plausible inputs.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
static void print_addr(void *cls, const struct GNUNET_PeerIdentity *pid, const char *uri)
static uint8_t seed_key[256/8]
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
Main function that will be run.
static const char * d_seed
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
static struct GNUNET_PeerIdentity pid
Identity of the peer we transmit to / connect to.
Helper library for handling HELLO URIs.
void GNUNET_PILS_derive_pid(size_t seed_key_bytes, const uint8_t seed_key[seed_key_bytes], const struct GNUNET_HashCode *addrs_hash, struct GNUNET_CRYPTO_EddsaPrivateKey *outkey)
Generate the peer id from the addresses hash and the initial secret key.
#define GNUNET_GETOPT_OPTION_END
Marker for the end of the list of options.
struct GNUNET_HELLO_Builder * GNUNET_HELLO_builder_new()
Allocate builder.
void GNUNET_HELLO_builder_iterate(const struct GNUNET_HELLO_Builder *builder, GNUNET_HELLO_UriCallback uc, void *uc_cls)
Iterate over URIs in a builder.
enum GNUNET_GenericReturnValue GNUNET_HELLO_builder_add_address(struct GNUNET_HELLO_Builder *builder, const char *address)
Add individual address to the builder.
void GNUNET_HELLO_builder_hash_addresses(const struct GNUNET_HELLO_Builder *builder, struct GNUNET_HashCode *hash)
Compute hash over addresses in builder.
void GNUNET_print_bytes(const void *buf, size_t buf_len, int fold, int in_be)
Print a byte string in hexadecimal ascii notation.
size_t GNUNET_hex2b(const char *src, void *dst, size_t dstlen, int invert)
Parse an ascii-encoded hexadecimal string into the buffer.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
enum GNUNET_GenericReturnValue GNUNET_log_setup(const char *comp, const char *loglevel, const char *logfile)
Setup logging.
const struct GNUNET_OS_ProjectData * GNUNET_OS_project_data_gnunet(void)
Return default project data used by 'libgnunetutil' for GNUnet.
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(const struct GNUNET_OS_ProjectData *pd, int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
Common type definitions for the peer identity lifecycle service and API.
Private ECC key encoded for transmission.
Definition of a command line option.
Context for building (or parsing) HELLO URIs.
The identity of the host (wraps the signing key of the peer).