diff options
author | Roman Proskuryakov <humbug@deeptown.org> | 2016-01-24 19:16:40 +0300 |
---|---|---|
committer | Roman Proskuryakov <humbug@deeptown.org> | 2016-01-27 02:14:59 +0300 |
commit | ed3a794c9bf6380801ee21c816505f457b6a1348 (patch) | |
tree | 14e1b8fa1c8c1b7f45b08bae5e0b6169054c3751 /toxcore/crypto_core.h | |
parent | 61f8e65c0157049ac26bf9b081ba6842d7defdeb (diff) |
fix: compare sensitive data with sodium_memcmp
fix: make increment_nonce & increment_nonce_number independent of user-controlled input
fix: make crypto_core more stable agains null ptr dereference
Diffstat (limited to 'toxcore/crypto_core.h')
-rw-r--r-- | toxcore/crypto_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/crypto_core.h b/toxcore/crypto_core.h index eefb1d90..41a5a045 100644 --- a/toxcore/crypto_core.h +++ b/toxcore/crypto_core.h | |||
@@ -108,7 +108,7 @@ int decrypt_data_symmetric(const uint8_t *secret_key, const uint8_t *nonce, cons | |||
108 | void increment_nonce(uint8_t *nonce); | 108 | void increment_nonce(uint8_t *nonce); |
109 | 109 | ||
110 | /* increment the given nonce by num */ | 110 | /* increment the given nonce by num */ |
111 | void increment_nonce_number(uint8_t *nonce, uint32_t num); | 111 | void increment_nonce_number(uint8_t *nonce, uint32_t host_order_num); |
112 | 112 | ||
113 | /* Fill the given nonce with random bytes. */ | 113 | /* Fill the given nonce with random bytes. */ |
114 | void random_nonce(uint8_t *nonce); | 114 | void random_nonce(uint8_t *nonce); |