Tor 0.4.9.1-alpha-dev
|
Header file containing PoW denial of service defenses for the HS subsystem for all versions. More...
#include "lib/evloop/compat_libevent.h"
#include "lib/evloop/token_bucket.h"
#include "lib/smartlist_core/smartlist_core.h"
#include "lib/crypt_ops/crypto_ed25519.h"
Go to the source code of this file.
Data Structures | |
struct | hs_pow_desc_params_t |
struct | hs_pow_solver_inputs_t |
struct | hs_pow_service_state_t |
struct | hs_pow_solution_t |
Macros | |
#define | HS_UPDATE_PERIOD 300 |
#define | HS_POW_NONCE_LEN 16 |
#define | HS_POW_EQX_SOL_LEN 16 |
#define | HS_POW_HASH_LEN 4 |
#define | HS_POW_PSTRING_LEN 16 |
#define | HS_POW_PSTRING "Tor hs intro v1\0" |
#define | HS_POW_ID_LEN 32 |
#define | HS_POW_SEED_LEN 32 |
#define | HS_POW_SEED_HEAD_LEN 4 |
#define | HS_POW_EFFORT_LEN sizeof(uint32_t) |
#define | HS_POW_NONCE_OFFSET (HS_POW_PSTRING_LEN + HS_POW_ID_LEN + HS_POW_SEED_LEN) |
#define | HS_POW_CHALLENGE_LEN |
#define | have_module_pow() (0) |
Enumerations | |
enum | hs_pow_desc_type_t { HS_POW_DESC_V1 = 1 } |
Functions | |
static int | hs_pow_solve (const hs_pow_solver_inputs_t *pow_inputs, hs_pow_solution_t *pow_solution_out) |
static int | hs_pow_verify (const ed25519_public_key_t *service_blinded_id, const hs_pow_service_state_t *pow_state, const hs_pow_solution_t *pow_solution) |
static void | hs_pow_remove_seed_from_cache (const uint8_t *seed_head) |
static void | hs_pow_free_service_state (hs_pow_service_state_t *state) |
static int | hs_pow_queue_work (uint32_t intro_circ_identifier, const uint8_t *rend_circ_cookie, const hs_pow_solver_inputs_t *pow_inputs) |
Header file containing PoW denial of service defenses for the HS subsystem for all versions.
Definition in file hs_pow.h.
#define HS_POW_CHALLENGE_LEN |
Length of a PoW challenge. Construction as per prop327 is: (P || ID || C || N || INT_32(E))
#define HS_POW_EFFORT_LEN sizeof(uint32_t) |
#define HS_POW_EQX_SOL_LEN 16 |
#define HS_POW_HASH_LEN 4 |
#define HS_POW_ID_LEN 32 |
#define HS_POW_NONCE_LEN 16 |
#define HS_POW_NONCE_OFFSET (HS_POW_PSTRING_LEN + HS_POW_ID_LEN + HS_POW_SEED_LEN) |
#define HS_POW_PSTRING "Tor hs intro v1\0" |
#define HS_POW_PSTRING_LEN 16 |
#define HS_POW_SEED_HEAD_LEN 4 |
#define HS_POW_SEED_LEN 32 |
enum hs_pow_desc_type_t |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |