mirror of
https://github.com/monero-project/monero.git
synced 2025-12-30 06:30:50 -08:00
Add the possibility to export private view key for fast scan.
On client startup the device asks for authorization to export the private view key. If user agree, the client hold the private view key allowing a fast blockchain scan. If the user does not agree, the blockchain scan is fully done via the device.
This commit is contained in:
@@ -56,8 +56,8 @@ namespace hw {
|
||||
}
|
||||
|
||||
#ifdef DEBUG_HWDEVICE
|
||||
extern crypto::secret_key viewkey;
|
||||
extern crypto::secret_key spendkey;
|
||||
extern crypto::secret_key dbg_viewkey;
|
||||
extern crypto::secret_key dbg_spendkey;
|
||||
|
||||
|
||||
void decrypt(char* buf, size_t len) {
|
||||
@@ -69,7 +69,7 @@ namespace hw {
|
||||
if (buf[i] != 0) break;
|
||||
}
|
||||
if (i == 32) {
|
||||
memmove(buf, hw::ledger::viewkey.data, 32);
|
||||
memmove(buf, hw::ledger::dbg_viewkey.data, 32);
|
||||
return;
|
||||
}
|
||||
//spend key?
|
||||
@@ -77,7 +77,7 @@ namespace hw {
|
||||
if (buf[i] != (char)0xff) break;
|
||||
}
|
||||
if (i == 32) {
|
||||
memmove(buf, hw::ledger::spendkey.data, 32);
|
||||
memmove(buf, hw::ledger::dbg_spendkey.data, 32);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -161,4 +161,4 @@ namespace hw {
|
||||
}
|
||||
#endif //WITH_DEVICE_LEDGER
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user