tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

relay_crypto_tor1.h (1231B)


      1 /* Copyright (c) 2001 Matej Pfajfar.
      2 * Copyright (c) 2001-2004, Roger Dingledine.
      3 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
      4 * Copyright (c) 2007-2021, The Tor Project, Inc. */
      5 /* See LICENSE for licensing information */
      6 
      7 /**
      8 * \file relay.h
      9 * \brief Header file for relay_crypto_tor1.c.
     10 **/
     11 
     12 #ifndef TOR_RELAY_CRYPTO_TOR1_H
     13 #define TOR_RELAY_CRYPTO_TOR1_H
     14 
     15 typedef struct tor1_crypt_t tor1_crypt_t;
     16 
     17 void tor1_crypt_client_originate(tor1_crypt_t *tor1,
     18                                 cell_t *cell);
     19 void tor1_crypt_relay_originate(tor1_crypt_t *tor1,
     20                                cell_t *cell);
     21 void tor1_crypt_relay_backward(tor1_crypt_t *tor1, cell_t *cell);
     22 bool tor1_crypt_relay_forward(tor1_crypt_t *tor1, cell_t *cell);
     23 bool tor1_crypt_client_backward(tor1_crypt_t *tor1, cell_t *cell);
     24 void tor1_crypt_client_forward(tor1_crypt_t *tor1, cell_t *cell);
     25 
     26 size_t tor1_key_material_len(bool is_hs);
     27 int tor1_crypt_init(tor1_crypt_t *crypto,
     28                    const char *key_data, size_t key_data_len,
     29                    int reverse, int is_hs_v3);
     30 void tor1_crypt_assert_ok(const tor1_crypt_t *tor1);
     31 void tor1_crypt_clear(tor1_crypt_t *crypto);
     32 
     33 #endif /* !defined(TOR_RELAY_CRYPTO_TOR1_H) */