26#define HS_UPDATE_PERIOD 300
29#define HS_POW_NONCE_LEN 16
31#define HS_POW_EQX_SOL_LEN 16
33#define HS_POW_HASH_LEN 4
35#define HS_POW_PSTRING_LEN 16
37#define HS_POW_PSTRING "Tor hs intro v1\0"
39#define HS_POW_ID_LEN 32
41#define HS_POW_SEED_LEN 32
43#define HS_POW_SEED_HEAD_LEN 4
45#define HS_POW_EFFORT_LEN sizeof(uint32_t)
47#define HS_POW_NONCE_OFFSET \
48 (HS_POW_PSTRING_LEN + HS_POW_ID_LEN + HS_POW_SEED_LEN)
52#define HS_POW_CHALLENGE_LEN \
53 (HS_POW_PSTRING_LEN + HS_POW_ID_LEN + \
54 HS_POW_SEED_LEN + HS_POW_NONCE_LEN + HS_POW_EFFORT_LEN)
100 int pqueue_low_level;
104 int pqueue_high_level;
121 time_t expiration_time;
125 uint32_t suggested_effort;
128 uint32_t max_trimmed_effort;
134 uint32_t rend_handled;
136 time_t next_effort_update;
138 uint64_t total_effort;
143 bool using_pqueue_bucket;
162#ifdef HAVE_MODULE_POW
163#define have_module_pow() (1)
177 const uint8_t *rend_circ_cookie,
181#define have_module_pow() (0)
188 (void)pow_solution_out;
197 (void)service_blinded_id;
217 const uint8_t *rend_circ_cookie,
220 (void)intro_circ_identifier;
221 (void)rend_circ_cookie;
Header for compat_libevent.c.
Header for crypto_ed25519.c.
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)
int hs_pow_solve(const hs_pow_solver_inputs_t *pow_inputs, hs_pow_solution_t *pow_solution_out)
int hs_pow_queue_work(uint32_t intro_circ_identifier, const uint8_t *rend_circ_cookie, const hs_pow_solver_inputs_t *pow_inputs)
void hs_pow_remove_seed_from_cache(const uint8_t *seed_head)
void hs_pow_free_service_state(hs_pow_service_state_t *state)
#define HS_POW_EQX_SOL_LEN
#define HS_POW_SEED_HEAD_LEN
Top-level declarations for the smartlist_t dynamic array type.
uint8_t seed[HS_POW_SEED_LEN]
uint32_t suggested_effort
Headers for token_bucket.c.