diff options
author | stoffu <stoffu@protonmail.ch> | 2018-03-05 18:24:11 +0900 |
---|---|---|
committer | stoffu <stoffu@protonmail.ch> | 2018-03-14 21:00:17 +0900 |
commit | 7dfa5e9e6e05fb2b8bb346d92f2a22229ef495c8 (patch) | |
tree | 16d206dd1cc720babdfafa10e511e490badb1d6c /src/device | |
parent | crypto: revert odd namespace changes made in #3303 (diff) | |
download | monero-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.cpp | 4 |
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(); |