In routerlist_assert_ok(), check r2 before taking &(r2->cache_info)
[tor.git] / src / or / onion_tap.h
blobb978b66737d82fe552d7d8d85dbe5f2861070f74
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-2013, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
7 /**
8 * \file onion_tap.h
9 * \brief Header file for onion_tap.c.
10 **/
12 #ifndef TOR_ONION_TAP_H
13 #define TOR_ONION_TAP_H
15 #define TAP_ONIONSKIN_CHALLENGE_LEN (PKCS1_OAEP_PADDING_OVERHEAD+\
16 CIPHER_KEY_LEN+\
17 DH_KEY_LEN)
18 #define TAP_ONIONSKIN_REPLY_LEN (DH_KEY_LEN+DIGEST_LEN)
20 int onion_skin_TAP_create(crypto_pk_t *router_key,
21 crypto_dh_t **handshake_state_out,
22 char *onion_skin_out);
24 int onion_skin_TAP_server_handshake(const char *onion_skin,
25 crypto_pk_t *private_key,
26 crypto_pk_t *prev_private_key,
27 char *handshake_reply_out,
28 char *key_out,
29 size_t key_out_len);
31 int onion_skin_TAP_client_handshake(crypto_dh_t *handshake_state,
32 const char *handshake_reply,
33 char *key_out,
34 size_t key_out_len);
36 #endif