diff options
author | stoffu <stoffu@protonmail.ch> | 2018-07-06 15:42:08 +0900 |
---|---|---|
committer | stoffu <stoffu@protonmail.ch> | 2018-08-08 01:56:54 +0900 |
commit | bcab579864801e765333e8766b714adc22e47b8b (patch) | |
tree | cbf9e199af327a703804b403a3a9b08da18e778a /src/device/device_ledger.cpp | |
parent | Merge pull request #4129 (diff) | |
download | monero-bcab579864801e765333e8766b714adc22e47b8b.tar.xz |
wallet: allow adjusting number of rounds for the key derivation function
Diffstat (limited to 'src/device/device_ledger.cpp')
-rw-r--r-- | src/device/device_ledger.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp index f7bf58531..7a34dad5e 100644 --- a/src/device/device_ledger.cpp +++ b/src/device/device_ledger.cpp @@ -531,20 +531,20 @@ namespace hw { return true; } - bool device_ledger::generate_chacha_key(const cryptonote::account_keys &keys, crypto::chacha_key &key) { + bool device_ledger::generate_chacha_key(const cryptonote::account_keys &keys, crypto::chacha_key &key, uint64_t kdf_rounds) { AUTO_LOCK_CMD(); #ifdef DEBUG_HWDEVICE crypto::chacha_key key_x; cryptonote::account_keys keys_x = hw::ledger::decrypt(keys); - this->controle_device->generate_chacha_key(keys_x, key_x); + this->controle_device->generate_chacha_key(keys_x, key_x, kdf_rounds); #endif send_simple(INS_GET_CHACHA8_PREKEY); char prekey[200]; memmove(prekey, &this->buffer_recv[0], 200); - crypto::generate_chacha_key_prehashed(&prekey[0], sizeof(prekey), key); + crypto::generate_chacha_key_prehashed(&prekey[0], sizeof(prekey), key, kdf_rounds); #ifdef DEBUG_HWDEVICE hw::ledger::check32("generate_chacha_key_prehashed", "key", (char*)key_x.data(), (char*)key.data()); |