aboutsummaryrefslogtreecommitdiff
path: root/src/device/device_ledger.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-08-15 17:09:52 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-08-15 17:09:52 -0500
commit017e07a0354ea01e2aba35dd5ae11c8b2b99170b (patch)
tree2cd6d6fb33d4c215e4f4ea4b5cfd9ea0592b7516 /src/device/device_ledger.cpp
parentdd966c8a3ac9d987745c494e33606e99ccec7d5f (diff)
parentbcab579864801e765333e8766b714adc22e47b8b (diff)
downloadmonzero-core-017e07a0354ea01e2aba35dd5ae11c8b2b99170b.tar.gz
monzero-core-017e07a0354ea01e2aba35dd5ae11c8b2b99170b.tar.xz
monzero-core-017e07a0354ea01e2aba35dd5ae11c8b2b99170b.zip
Merge pull request #4103
bcab579 wallet: allow adjusting number of rounds for the key derivation function (stoffu)
Diffstat (limited to 'src/device/device_ledger.cpp')
-rw-r--r--src/device/device_ledger.cpp6
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());