|
Tor 0.4.9.8
|
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() |
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))
Definition at line 52 of file hs_pow.h.
Referenced by hs_pow_solve(), hs_pow_verify(), and validate_equix_challenge().
| #define HS_POW_EFFORT_LEN sizeof(uint32_t) |
| #define HS_POW_EQX_SOL_LEN 16 |
Length of an E-quiX solution (S) in bytes.
Definition at line 31 of file hs_pow.h.
Referenced by handle_introduce2_encrypted_cell_pow_extension(), hs_pow_solve(), and validate_equix_challenge().
| #define HS_POW_HASH_LEN 4 |
Length of blake2b hash result (R) used in the PoW scheme.
Definition at line 33 of file hs_pow.h.
Referenced by validate_equix_challenge().
| #define HS_POW_ID_LEN 32 |
| #define HS_POW_NONCE_LEN 16 |
Length of random nonce (N) used in the PoW scheme.
Definition at line 29 of file hs_pow.h.
Referenced by handle_introduce2_encrypted_cell_pow_extension(), hs_pow_solve(), hs_pow_verify(), and increment_and_set_nonce().
| #define HS_POW_NONCE_OFFSET (HS_POW_PSTRING_LEN + HS_POW_ID_LEN + HS_POW_SEED_LEN) |
Offset of the nonce value within the challenge string
Definition at line 47 of file hs_pow.h.
Referenced by increment_and_set_nonce().
| #define HS_POW_PSTRING "Tor hs intro v1\0" |
| #define HS_POW_PSTRING_LEN 16 |
| #define HS_POW_SEED_HEAD_LEN 4 |
Length of seed identification heading in the PoW scheme.
Definition at line 43 of file hs_pow.h.
Referenced by handle_introduce2_encrypted_cell_pow_extension(), hs_pow_verify(), and rotate_pow_seeds().
| #define HS_POW_SEED_LEN 32 |
Length of random seed used in the PoW scheme.
Definition at line 41 of file hs_pow.h.
Referenced by get_inner_encrypted_layer_plaintext(), initialize_pow_defenses(), rotate_pow_seeds(), and update_all_descriptors_pow_params().
| enum hs_pow_desc_type_t |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |