Back to index

tor  0.2.3.19-rc
onion.h
Go to the documentation of this file.
00001 /* Copyright (c) 2001 Matej Pfajfar.
00002  * Copyright (c) 2001-2004, Roger Dingledine.
00003  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
00004  * Copyright (c) 2007-2012, The Tor Project, Inc. */
00005 /* See LICENSE for licensing information */
00006 
00012 #ifndef _TOR_ONION_H
00013 #define _TOR_ONION_H
00014 
00015 int onion_pending_add(or_circuit_t *circ, char *onionskin);
00016 or_circuit_t *onion_next_task(char **onionskin_out);
00017 void onion_pending_remove(or_circuit_t *circ);
00018 
00019 int onion_skin_create(crypto_pk_t *router_key,
00020                       crypto_dh_t **handshake_state_out,
00021                       char *onion_skin_out);
00022 
00023 int onion_skin_server_handshake(const char *onion_skin,
00024                                 crypto_pk_t *private_key,
00025                                 crypto_pk_t *prev_private_key,
00026                                 char *handshake_reply_out,
00027                                 char *key_out,
00028                                 size_t key_out_len);
00029 
00030 int onion_skin_client_handshake(crypto_dh_t *handshake_state,
00031                                 const char *handshake_reply,
00032                                 char *key_out,
00033                                 size_t key_out_len);
00034 
00035 int fast_server_handshake(const uint8_t *key_in,
00036                           uint8_t *handshake_reply_out,
00037                           uint8_t *key_out,
00038                           size_t key_out_len);
00039 
00040 int fast_client_handshake(const uint8_t *handshake_state,
00041                           const uint8_t *handshake_reply_out,
00042                           uint8_t *key_out,
00043                           size_t key_out_len);
00044 
00045 void clear_pending_onions(void);
00046 
00047 #endif
00048