diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-01-06 09:15:00 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-01-06 09:15:00 +0100 |
commit | f64c8e3bee2e9c61cf18c93c6a328dd5d6d8e1b4 (patch) | |
tree | 7c6515b38c67d2ffd148527ebc51e2146ff2f716 /src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c | |
parent | 7ebc5824153f6ba8ac7385f6965bedd1b984cf5d (diff) | |
download | fastd-f64c8e3bee2e9c61cf18c93c6a328dd5d6d8e1b4.tar fastd-f64c8e3bee2e9c61cf18c93c6a328dd5d6d8e1b4.zip |
ec25519-fhmqvc: additional key checks
Until now, it wasn't checked if a public key was the identity element. I don't
think this mistake allows any actual attacks against the handshake though.
Diffstat (limited to 'src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c')
-rw-r--r-- | src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c index c0d633d..c60ce67 100644 --- a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c +++ b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c @@ -78,7 +78,7 @@ static fastd_protocol_config_t * protocol_init(void) { static fastd_protocol_key_t * protocol_read_key(const char *key) { fastd_protocol_key_t *ret = fastd_new(fastd_protocol_key_t); - if (!read_key(ret->key.u8, key)) { + if (!read_key(ret->key.u8, key) || !fastd_protocol_ec25519_fhmqvc_check_key(&ret->key.int256)) { free(ret); return NULL; } |