summaryrefslogtreecommitdiffstats
path: root/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-10-31 02:35:29 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-10-31 02:35:29 +0100
commit6e7882ebd4ed84ed371739970aaaf5d37f856014 (patch)
treeef849e866d30bc2c334e60692b0050880f906ca8 /src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
parent39db0b827875a70e4af41a5003dd1b9fbcfb5f37 (diff)
downloadfastd-6e7882ebd4ed84ed371739970aaaf5d37f856014.tar
fastd-6e7882ebd4ed84ed371739970aaaf5d37f856014.zip
ec25519-fhmqvc: some more refactoring
Diffstat (limited to 'src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h')
-rw-r--r--src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
index c11a995..4cd7217 100644
--- a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
+++ b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
@@ -45,23 +45,6 @@ struct fastd_protocol_config {
keypair_t key;
};
-typedef struct handshake_key {
- uint64_t serial;
- struct timespec preferred_till;
- struct timespec valid_till;
-
- /* keypair used as initiator */
- keypair_t key1;
-
- /* keypair used as responder */
- keypair_t key2;
-} handshake_key_t;
-
-struct fastd_protocol_state {
- handshake_key_t prev_handshake_key;
- handshake_key_t handshake_key;
-};
-
struct fastd_protocol_peer_config {
aligned_int256_t public_key;
};
@@ -116,14 +99,6 @@ static inline void hexdump(char out[65], const unsigned char d[32]) {
}
-static inline bool is_handshake_key_valid(fastd_context_t *ctx, const handshake_key_t *handshake_key) {
- return timespec_after(&handshake_key->valid_till, &ctx->now);
-}
-
-static inline bool is_handshake_key_preferred(fastd_context_t *ctx, const handshake_key_t *handshake_key) {
- return timespec_after(&handshake_key->preferred_till, &ctx->now);
-}
-
static inline bool is_session_valid(fastd_context_t *ctx, const protocol_session_t *session) {
return (session->method && session->method->session_is_valid(ctx, session->method_state));
}