summaryrefslogtreecommitdiffstats
path: root/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c')
-rw-r--r--src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c
index 17f8268..97cdb3d 100644
--- a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c
+++ b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c
@@ -71,6 +71,9 @@ static fastd_protocol_config_t * protocol_init(void) {
ecc_25519_scalarmult_base(&work, &protocol_config->key.secret);
ecc_25519_store_packed(&protocol_config->key.public.int256, &work);
+ if (!divide_key(&protocol_config->key.secret))
+ exit_error("invalid secret key");
+
return protocol_config;
}