aboutsummaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2018-03-05 18:24:11 +0900
committerstoffu <stoffu@protonmail.ch>2018-03-14 21:00:17 +0900
commit7dfa5e9e6e05fb2b8bb346d92f2a22229ef495c8 (patch)
tree16d206dd1cc720babdfafa10e511e490badb1d6c /src/device
parentcrypto: revert odd namespace changes made in #3303 (diff)
downloadmonero-7dfa5e9e6e05fb2b8bb346d92f2a22229ef495c8.tar.xz
chacha: call prehashed version explicitly as generate_chacha_key_prehashed
hash: add prehashed version cn_slow_hash_prehashed slow-hash: let cn_slow_hash take 4th parameter for deciding prehashed or not slow-hash: add support for prehashed version for the other 3 platforms
Diffstat (limited to 'src/device')
-rw-r--r--src/device/device_ledger.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
index ccbc45b45..b3c0035a1 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -513,10 +513,10 @@ namespace hw {
char prekey[200];
memmove(prekey, &this->buffer_recv[0], 200);
- crypto::generate_chacha_key(&prekey[0], sizeof(prekey), key, 0, true);
+ crypto::generate_chacha_key_prehashed(&prekey[0], sizeof(prekey), key);
#ifdef DEBUG_HWDEVICE
- hw::ledger::check32("generate_chacha_key", "key", (char*)key_x.data(), (char*)key.data());
+ hw::ledger::check32("generate_chacha_key_prehashed", "key", (char*)key_x.data(), (char*)key.data());
#endif
unlock_device();