tool to manipulate SCRYPT proofs of work. More...
Go to the source code of this file.
Macros | |
#define | ROUND_SIZE 10 |
Functions | |
static void | shutdown_task (void *cls) |
Write our current proof to disk. More... | |
static void | find_proof (void *cls) |
Find our proof of work. More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *config) |
Main function that will be run by the scheduler. More... | |
int | main (int argc, char *const *argv) |
Program to manipulate ECC key files. More... | |
Variables | |
static struct GNUNET_CRYPTO_PowSalt | salt = { "gnunet-nse-proof" } |
Salt for PoW calculations. More... | |
static unsigned long long | nse_work_required |
Amount of work required (W-bit collisions) for NSE proofs, in collision-bits. More... | |
static struct GNUNET_TIME_Relative | proof_find_delay |
Interval between proof find runs. More... | |
static struct GNUNET_CRYPTO_EddsaPublicKey | pub |
static uint64_t | proof |
static struct GNUNET_SCHEDULER_Task * | proof_task |
static const struct GNUNET_CONFIGURATION_Handle * | cfg |
static char * | pkfn |
static char * | pwfn |
tool to manipulate SCRYPT proofs of work.
Definition in file gnunet-scrypt.c.
#define ROUND_SIZE 10 |
|
static |
Write our current proof to disk.
cls | closure |
Definition at line 66 of file gnunet-scrypt.c.
References GNUNET_DISK_fn_write(), GNUNET_DISK_PERM_USER_READ, GNUNET_DISK_PERM_USER_WRITE, GNUNET_ERROR_TYPE_WARNING, GNUNET_log_strerror_file, GNUNET_OK, proof, and pwfn.
Referenced by find_proof(), and run().
|
static |
Find our proof of work.
cls | closure (unused) |
Definition at line 87 of file gnunet-scrypt.c.
References find_proof(), GNUNET_ALIGN, GNUNET_CRYPTO_hash_count_leading_zeros(), GNUNET_CRYPTO_pow_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_memcpy, GNUNET_SCHEDULER_add_delayed_with_priority(), GNUNET_SCHEDULER_PRIORITY_IDLE, GNUNET_SCHEDULER_shutdown(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_duration(), GNUNET_TIME_relative_divide(), nse_work_required, proof, proof_find_delay, proof_task, pub, result, ROUND_SIZE, salt, shutdown_task(), and timestamp().
Referenced by find_proof(), and run().
|
static |
Main function that will be run by the scheduler.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
cfg | configuration |
Definition at line 165 of file gnunet-scrypt.c.
References _, consensus-simulation::args, cfg, config, find_proof(), GNUNET_CONFIGURATION_get_value_filename(), GNUNET_CONFIGURATION_get_value_number(), GNUNET_CRYPTO_eddsa_key_from_file(), GNUNET_CRYPTO_eddsa_key_get_public(), GNUNET_CRYPTO_eddsa_public_key_to_string(), GNUNET_DISK_file_test(), GNUNET_DISK_fn_read(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_free, GNUNET_log, GNUNET_log_config_invalid(), GNUNET_log_config_missing(), GNUNET_OK, GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_add_with_priority(), GNUNET_SCHEDULER_PRIORITY_IDLE, GNUNET_SCHEDULER_shutdown(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_SYSERR, GNUNET_YES, nse_work_required, pk, pkfn, proof, proof_find_delay, proof_task, pub, pwfn, and shutdown_task().
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
Program to manipulate ECC key files.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 274 of file gnunet-scrypt.c.
References gettext_noop, GNUNET_free, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_filename(), GNUNET_GETOPT_option_relative_time(), GNUNET_GETOPT_option_ulong(), GNUNET_OK, GNUNET_OS_project_data_gnunet(), GNUNET_PROGRAM_run(), nse_work_required, options, pkfn, proof_find_delay, pwfn, ret, and run().
|
static |
Salt for PoW calculations.
Definition at line 34 of file gnunet-scrypt.c.
Referenced by checkvec(), compute_global_id(), derive_h(), find_proof(), get_ibf_key(), GNUNET_CRYPTO_blind_sign(), GNUNET_CRYPTO_get_blinding_input_values(), GNUNET_CRYPTO_hmac_derive_key(), GNUNET_CRYPTO_hmac_derive_key_v(), GNUNET_CRYPTO_pow_hash(), GNUNET_CRYPTO_symmetric_derive_iv(), GNUNET_CRYPTO_symmetric_derive_iv_v(), labeled_extract(), output_vectors(), salt_key(), unsalt_key(), and update_ax_by_kx().
|
static |
Amount of work required (W-bit collisions) for NSE proofs, in collision-bits.
Definition at line 40 of file gnunet-scrypt.c.
Referenced by find_proof(), main(), and run().
|
static |
Interval between proof find runs.
Definition at line 45 of file gnunet-scrypt.c.
Referenced by find_proof(), main(), and run().
|
static |
Definition at line 47 of file gnunet-scrypt.c.
Referenced by calc_r_dash(), checkvec(), clean_blind_sign_pub(), create_finished(), cs_full_domain_hash(), derive_h(), derive_ublock_encryption_key(), elligator_generate_public_key(), find_proof(), get_nick_record(), get_update_information_directory(), GNR_derive_block_aes_key(), GNR_derive_block_xsalsa_key(), GNUNET_CRYPTO_blind_sign_keys_create_va(), GNUNET_CRYPTO_cs_calc_blinded_c(), GNUNET_CRYPTO_cs_private_key_get_public(), GNUNET_CRYPTO_cs_verify(), GNUNET_CRYPTO_ecc_ecdh(), GNUNET_CRYPTO_ecdh_ecdsa(), GNUNET_CRYPTO_ecdh_eddsa(), GNUNET_CRYPTO_ecdhe_elligator_encoding(), GNUNET_CRYPTO_ecdhe_elligator_key_get_public_norand(), GNUNET_CRYPTO_ecdhe_key_get_public(), GNUNET_CRYPTO_ecdsa_ecdh(), GNUNET_CRYPTO_ecdsa_key_get_public(), GNUNET_CRYPTO_ecdsa_private_key_derive(), GNUNET_CRYPTO_ecdsa_public_key_derive(), GNUNET_CRYPTO_ecdsa_public_key_from_string(), GNUNET_CRYPTO_ecdsa_public_key_to_string(), GNUNET_CRYPTO_ecdsa_verify_(), GNUNET_CRYPTO_eddsa_ecdh(), GNUNET_CRYPTO_eddsa_kem_encaps(), GNUNET_CRYPTO_eddsa_key_get_public(), GNUNET_CRYPTO_eddsa_private_key_derive(), GNUNET_CRYPTO_eddsa_public_key_derive(), GNUNET_CRYPTO_eddsa_public_key_from_string(), GNUNET_CRYPTO_eddsa_public_key_to_string(), GNUNET_CRYPTO_eddsa_verify_(), GNUNET_CRYPTO_edx25519_key_get_public(), GNUNET_CRYPTO_edx25519_private_key_derive(), GNUNET_CRYPTO_edx25519_public_key_derive(), GNUNET_CRYPTO_edx25519_verify_(), GNUNET_CRYPTO_hpke_kem_encaps(), GNUNET_CRYPTO_rsa_private_key_get_public(), GNUNET_CRYPTO_signature_verify_(), GNUNET_CRYPTO_signature_verify_raw_(), GNUNET_CRYPTO_x25519_ecdh(), GNUNET_FS_publish_ublock_(), GNUNET_GNSRECORD_query_from_private_key(), GNUNET_GNSRECORD_query_from_public_key(), GNUNET_PQ_query_param_blind_sign_pub(), GNUNET_PQ_result_spec_blind_sign_pub(), issue_ticket(), output_vectors(), and run().
|
static |
Definition at line 49 of file gnunet-scrypt.c.
Referenced by automaton_create_proofs(), find_proof(), pabc_create_presentation(), print_edge(), REGEX_BLOCK_check_proof(), REGEX_BLOCK_create(), regex_iterator(), run(), shutdown_task(), store_all_states(), and write_proof().
|
static |
Definition at line 51 of file gnunet-scrypt.c.
Referenced by find_proof(), and run().
|
static |
Definition at line 53 of file gnunet-scrypt.c.
Referenced by run().
|
static |
Definition at line 55 of file gnunet-scrypt.c.
|
static |
Definition at line 57 of file gnunet-scrypt.c.
Referenced by main(), run(), and shutdown_task().