diff options
author | luigi1111 <luigi1111w@gmail.com> | 2020-08-31 16:54:51 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2020-08-31 16:54:51 -0500 |
commit | 94b056c06ee534d7e8724c7f546745fd9c29a716 (patch) | |
tree | 10c927a5f32535d2ed8c7b0e2af0e0244f22e5cd /src/device/device_ledger.cpp | |
parent | Merge pull request #6783 (diff) | |
parent | Fix send scalar z in plaintext (diff) | |
download | monero-94b056c06ee534d7e8724c7f546745fd9c29a716.tar.xz |
Merge pull request #6786
975ae22 Fix send scalar z in plaintext (grydz)
333ae55 Update minimal Ledger Monero app version (grydz)
0a3c5a6 Update protocol version with Ledger's HW (grydz)
Diffstat (limited to 'src/device/device_ledger.cpp')
-rw-r--r-- | src/device/device_ledger.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp index 4e89f835d..3e0afeb65 100644 --- a/src/device/device_ledger.cpp +++ b/src/device/device_ledger.cpp @@ -259,7 +259,7 @@ namespace hw { static int device_id = 0; - #define PROTOCOL_VERSION 3 + #define PROTOCOL_VERSION 4 #define INS_NONE 0x00 #define INS_RESET 0x02 @@ -2126,7 +2126,7 @@ namespace hw { AUTO_LOCK_CMD(); #ifdef DEBUG_HWDEVICE const rct::key p_x = hw::ledger::decrypt(p); - const rct::key z_x = hw::ledger::decrypt(z); + const rct::key z_x = z; rct::key I_x; rct::key D_x; const rct::key H_x = H; @@ -2146,7 +2146,8 @@ namespace hw { //p this->send_secret(p.bytes, offset); //z - this->send_secret(z.bytes, offset); + memmove(this->buffer_send+offset, z.bytes, 32); + offset += 32; //H memmove(this->buffer_send+offset, H.bytes, 32); offset += 32; @@ -2225,7 +2226,7 @@ namespace hw { const rct::key c_x = c; const rct::key a_x = hw::ledger::decrypt(a); const rct::key p_x = hw::ledger::decrypt(p); - const rct::key z_x = hw::ledger::decrypt(z); + const rct::key z_x = z; const rct::key mu_P_x = mu_P; const rct::key mu_C_x = mu_C; rct::key s_x; @@ -2249,7 +2250,8 @@ namespace hw { //p this->send_secret(p.bytes, offset); //z - this->send_secret(z.bytes, offset); + memmove(this->buffer_send+offset, z.bytes, 32); + offset += 32; //mu_P memmove(this->buffer_send+offset, mu_P.bytes, 32); offset += 32; |