aboutsummaryrefslogtreecommitdiff
path: root/src/or/onion_fast.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-12-04 16:51:31 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-03 11:29:02 -0500
commit5fa1c7484cba293e6467acbca06a4143ce9da68d (patch)
tree5a7c2003488b5882882bb8a31b9080c03080291a /src/or/onion_fast.h
parentf7e590df05b1b3568a68ee3eae3965cb58e13de7 (diff)
downloadtor-5fa1c7484cba293e6467acbca06a4143ce9da68d.tar
tor-5fa1c7484cba293e6467acbca06a4143ce9da68d.tar.gz
Refactor the CREATE_FAST handshake code to match the others.
Diffstat (limited to 'src/or/onion_fast.h')
-rw-r--r--src/or/onion_fast.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/or/onion_fast.h b/src/or/onion_fast.h
index 5c9d59ec6..2d652cc53 100644
--- a/src/or/onion_fast.h
+++ b/src/or/onion_fast.h
@@ -12,12 +12,24 @@
#ifndef TOR_ONION_FAST_H
#define TOR_ONION_FAST_H
-int fast_server_handshake(const uint8_t *key_in,
+#define CREATE_FAST_LEN DIGEST_LEN
+#define CREATED_FAST_LEN DIGEST_LEN*2
+
+typedef struct fast_handshake_state_t {
+ uint8_t state[DIGEST_LEN];
+} fast_handshake_state_t;
+
+void fast_handshake_state_free(fast_handshake_state_t *victim);
+
+int fast_onionskin_create(fast_handshake_state_t **handshake_state_out,
+ uint8_t *handshake_out);
+
+int fast_server_handshake(const uint8_t *message_in,
uint8_t *handshake_reply_out,
uint8_t *key_out,
size_t key_out_len);
-int fast_client_handshake(const uint8_t *handshake_state,
+int fast_client_handshake(const fast_handshake_state_t *handshake_state,
const uint8_t *handshake_reply_out,
uint8_t *key_out,
size_t key_out_len);