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_default.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_default.cpp')
-rw-r--r-- | src/device/device_default.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/device/device_default.cpp b/src/device/device_default.cpp index 0071f7d4f..bf14813ea 100644 --- a/src/device/device_default.cpp +++ b/src/device/device_default.cpp @@ -100,14 +100,14 @@ namespace hw { /* WALLET & ADDRESS */ /* ======================================================================= */ - bool device_default::generate_chacha_key(const cryptonote::account_keys &keys, crypto::chacha_key &key) { + bool device_default::generate_chacha_key(const cryptonote::account_keys &keys, crypto::chacha_key &key, uint64_t kdf_rounds) { const crypto::secret_key &view_key = keys.m_view_secret_key; const crypto::secret_key &spend_key = keys.m_spend_secret_key; tools::scrubbed_arr<char, sizeof(view_key) + sizeof(spend_key) + 1> data; memcpy(data.data(), &view_key, sizeof(view_key)); memcpy(data.data() + sizeof(view_key), &spend_key, sizeof(spend_key)); data[sizeof(data) - 1] = CHACHA8_KEY_TAIL; - crypto::generate_chacha_key(data.data(), sizeof(data), key); + crypto::generate_chacha_key(data.data(), sizeof(data), key, kdf_rounds); return true; } bool device_default::get_public_address(cryptonote::account_public_address &pubkey) { |