aboutsummaryrefslogtreecommitdiff
path: root/src/or/onion_ntor.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-05 16:31:38 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-05 17:15:50 -0400
commit63b4ea22af8e8314dd718f02046de5f4b91edf9d (patch)
treeaf52b6fba37f22c86447fd5267dd5eb557807c8b /src/or/onion_ntor.h
parentce84200542f48a92e8b56a8d032401ecd153e90c (diff)
downloadtor-63b4ea22af8e8314dd718f02046de5f4b91edf9d.tar.gz
tor-63b4ea22af8e8314dd718f02046de5f4b91edf9d.zip
Move literally everything out of src/or
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.
Diffstat (limited to 'src/or/onion_ntor.h')
-rw-r--r--src/or/onion_ntor.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/or/onion_ntor.h b/src/or/onion_ntor.h
deleted file mode 100644
index 0ba4abe49e..0000000000
--- a/src/or/onion_ntor.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (c) 2012-2018, The Tor Project, Inc. */
-/* See LICENSE for licensing information */
-
-#ifndef TOR_ONION_NTOR_H
-#define TOR_ONION_NTOR_H
-
-#include "lib/cc/torint.h"
-
-struct di_digest256_map_t;
-struct curve25519_public_key_t;
-struct curve25519_keypair_t;
-
-/** State to be maintained by a client between sending an ntor onionskin
- * and receiving a reply. */
-typedef struct ntor_handshake_state_t ntor_handshake_state_t;
-
-/** Length of an ntor onionskin, as sent from the client to server. */
-#define NTOR_ONIONSKIN_LEN 84
-/** Length of an ntor reply, as sent from server to client. */
-#define NTOR_REPLY_LEN 64
-
-void ntor_handshake_state_free_(ntor_handshake_state_t *state);
-#define ntor_handshake_state_free(state) \
- FREE_AND_NULL(ntor_handshake_state_t, ntor_handshake_state_free_, (state))
-
-int onion_skin_ntor_create(const uint8_t *router_id,
- const struct curve25519_public_key_t *router_key,
- ntor_handshake_state_t **handshake_state_out,
- uint8_t *onion_skin_out);
-
-int onion_skin_ntor_server_handshake(const uint8_t *onion_skin,
- const struct di_digest256_map_t *private_keys,
- const struct curve25519_keypair_t *junk_keypair,
- const uint8_t *my_node_id,
- uint8_t *handshake_reply_out,
- uint8_t *key_out,
- size_t key_out_len);
-
-int onion_skin_ntor_client_handshake(
- const ntor_handshake_state_t *handshake_state,
- const uint8_t *handshake_reply,
- uint8_t *key_out,
- size_t key_out_len,
- const char **msg_out);
-
-#ifdef ONION_NTOR_PRIVATE
-#include "lib/crypt_ops/crypto_curve25519.h"
-
-/** Storage held by a client while waiting for an ntor reply from a server. */
-struct ntor_handshake_state_t {
- /** Identity digest of the router we're talking to. */
- uint8_t router_id[DIGEST_LEN];
- /** Onion key of the router we're talking to. */
- curve25519_public_key_t pubkey_B;
-
- /**
- * Short-lived keypair for use with this handshake.
- * @{ */
- curve25519_secret_key_t seckey_x;
- curve25519_public_key_t pubkey_X;
- /** @} */
-};
-#endif /* defined(ONION_NTOR_PRIVATE) */
-
-#endif /* !defined(TOR_ONION_NTOR_H) */