summaryrefslogtreecommitdiffstats
path: root/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-01-09 11:55:07 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-01-09 11:55:07 +0100
commitf11b14362b05f5965b0d1e6b9af1c48945884b9e (patch)
tree5ed6c4a921bf47c4259cc8fa7a82a0475f30b116 /src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
parent020c28af111d7d0fc325fc9a55bd185368e049cd (diff)
downloadfastd-f11b14362b05f5965b0d1e6b9af1c48945884b9e.tar
fastd-f11b14362b05f5965b0d1e6b9af1c48945884b9e.zip
ec25519-fhmqvc: unpack peers' keys only once
Diffstat (limited to 'src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h')
-rw-r--r--src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
index 087cf35..8dd8456 100644
--- a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
+++ b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
@@ -56,7 +56,7 @@ typedef union aligned_int256 {
/** A keypair */
typedef struct keypair {
- ecc_int256_t secret; /**< The section key */
+ ecc_int256_t secret; /**< The secret key */
aligned_int256_t public; /**< The public key */
} keypair_t;
@@ -68,8 +68,10 @@ struct fastd_protocol_config {
/** A peer's public key */
struct fastd_protocol_key {
aligned_int256_t key; /**< The peer's public key */
+ ecc_25519_work_t unpacked; /**< The peer's public key (unpacked) */
};
+
/** Session state */
typedef struct protocol_session {
/**
@@ -119,8 +121,7 @@ fastd_peer_t * fastd_protocol_ec25519_fhmqvc_find_peer(const fastd_protocol_key_
void fastd_protocol_ec25519_fhmqvc_generate_key(void);
void fastd_protocol_ec25519_fhmqvc_show_key(void);
-
-bool fastd_protocol_ec25519_fhmqvc_check_key(const ecc_int256_t *key);
+bool fastd_protocol_ec25519_fhmqvc_check_key(const ecc_25519_work_t *key);
void fastd_protocol_ec25519_fhmqvc_set_shell_env(fastd_shell_env_t *env, const fastd_peer_t *peer);
bool fastd_protocol_ec25519_fhmqvc_describe_peer(const fastd_peer_t *peer, char *buf, size_t len);