#include "platform.h"#include "gnunet_common.h"#include "gnunet_util_lib.h"#include "gnunet_gnsrecord_lib.h"#include "gnunet_signatures.h"#include <inttypes.h>#include "gnsrecord_crypto.h"Go to the source code of this file.
Data Structures | |
| struct | BestPow |
| API for proof of work. More... | |
| struct | GNUNET_GNSRECORD_PowCalculationHandle |
| The handle to a PoW calculation. More... | |
Variables | |
| static struct GNUNET_CRYPTO_PowSalt | salt = { "GnsRevocationPow" } |
|
static |
Calculate the average zeros in the pows.
| ph | the PowHandle |
Definition at line 93 of file gnsrecord_pow.c.
References GNUNET_GNSRECORD_PowCalculationHandle::best, BestPow::bits, and POW_COUNT.
Referenced by GNUNET_GNSRECORD_pow_round().
| struct GNUNET_GNSRECORD_SignaturePurposePS * GNR_create_signature_message | ( | const struct GNUNET_GNSRECORD_PowP * | pow | ) |
Create the revocation metadata to sign for a revocation message.
| pow | the PoW to sign |
Definition at line 103 of file gnsrecord_pow.c.
References GNUNET_CRYPTO_public_key_get_length(), GNUNET_CRYPTO_write_blindable_pk_to_buffer(), GNUNET_malloc, GNUNET_SIGNATURE_PURPOSE_GNS_REVOCATION, pk, GNUNET_CRYPTO_SignaturePurpose::purpose, GNUNET_GNSRECORD_SignaturePurposePS::purpose, GNUNET_CRYPTO_SignaturePurpose::size, GNUNET_GNSRECORD_PowP::timestamp, and GNUNET_GNSRECORD_SignaturePurposePS::timestamp.
Referenced by check_signature_identity(), run_with_key(), and sign_pow_identity().
|
static |
Definition at line 123 of file gnsrecord_pow.c.
References GNR_create_signature_message(), GNUNET_CRYPTO_blinded_key_signature_verify_raw_(), GNUNET_CRYPTO_public_key_get_length(), GNUNET_free, GNUNET_OK, GNUNET_SIGNATURE_PURPOSE_GNS_REVOCATION, GNUNET_SYSERR, key, GNUNET_GNSRECORD_SignaturePurposePS::purpose, and ret.
Referenced by check_signature().
|
static |
Definition at line 146 of file gnsrecord_pow.c.
References check_signature_identity(), and pk.
Referenced by GNUNET_GNSRECORD_check_pow().
|
static |
Predate the validity period to prevent rejections due to unsynchronized clocks
Definition at line 266 of file gnsrecord_pow.c.
References GNR_create_signature_message(), GNUNET_CRYPTO_blinded_key_sign_raw_(), GNUNET_CRYPTO_public_key_get_length(), GNUNET_free, GNUNET_NO, GNUNET_SYSERR, GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_hton(), GNUNET_TIME_absolute_subtract(), GNUNET_TIME_UNIT_WEEKS, key, pk, result, rp, and GNUNET_GNSRECORD_PowP::timestamp.
Referenced by sign_pow().
|
static |
Definition at line 299 of file gnsrecord_pow.c.
References GNUNET_CRYPTO_blindable_key_get_public(), key, pk, and sign_pow_identity().
Referenced by GNUNET_GNSRECORD_pow_init().
|
static |
Comparison function for quicksort.
| a | left element |
| b | right element |
Definition at line 354 of file gnsrecord_pow.c.
References GNUNET_ntohll().
Referenced by GNUNET_GNSRECORD_pow_round().
|
static |
Definition at line 84 of file gnsrecord_pow.c.
Referenced by GNUNET_GNSRECORD_check_pow(), and GNUNET_GNSRECORD_pow_round().