aboutsummaryrefslogtreecommitdiff
path: root/src/device (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-11-12device_ledger: fix incorrect macroselsta1-4/+4
The current code does work by accident, but it might break if someone uses ASSERT_SW in a different place, or if variables get renamed.
2021-11-03device: fix ledger error strings, add human friendly messagesselsta1-7/+3
2021-10-17Merge pull request #7876luigi11111-2/+0
5e63f6c Ledger: member 'mode' was shadowing that of base class (mj-xmr)
2021-10-11Merge pull request #7793luigi11111-0/+20
13a8a57 trezor: try empty passphrase first (Dusan Klinec)
2021-10-07Ledger: member 'mode' was shadowing that of base classmj-xmr1-2/+0
2021-08-19Device: remove unused and incorrect non-default constructormj-xmr1-1/+0
2021-08-03trezor: try empty passphrase firstDusan Klinec1-0/+20
- Try empty passphrase first when opening a wallet, as all Trezors will have passphrase enabled by default by Trezor Suite by default. This feature enables easier access to all users using disabled passphrase (or empty passhprase) - If wallet address differs from device address with empty passphrase, another opening attempt is made, without passphrase suppression, so user can enter his passhprase if using some. In this scenario, nothing changes to user, wallet opening just consumes one more call to Trezor (get wallet address with empty passphrase) - also change how m_passphrase is used. Previous version did not work well with recent passphrase entry mechanism change (made in Trezor), thus this commit fixes the behaviour).
2021-07-27Merge pull request #7745luigi11111-3/+2
d52d21b ledger: don't lock for software device (tobtoht)
2021-07-27Merge pull request #7744luigi11112-6/+13
ce40c33 ledger: use software device if we have view key (tobtoht)
2021-07-13cmake: fix undefined symbols and multiple definitionsanon1-0/+1
2021-06-04ledger: don't lock for software devicetobtoht1-3/+2
2021-06-04ledger: use software device if we have view keytobtoht2-6/+13
2021-02-09Remove unused variables in monero codebaseKevin Barbour1-1/+0
There are quite a few variables in the code that are no longer (or perhaps never were) in use. These were discovered by enabling compiler warnings for unused variables and cleaning them up. In most cases where the unused variables were the result of a function call the call was left but the variable assignment removed, unless it was obvious that it was a simple getter with no side effects.
2020-10-13device: Ledger - update status codesxiphon2-65/+43
2020-08-28Fix send scalar z in plaintextFrançois Colas1-4/+6
The scalar z has not been generated on the HW thus it can't be sent encrypted. The value is derived from the exported private view key.
2020-08-28Update minimal Ledger Monero app versionFrançois Colas1-2/+2
2020-08-28Update protocol version with Ledger's HWFrançois Colas1-1/+1
2020-08-27draft support of clsagcslashm2-0/+157
2020-08-27CLSAG device supportSarang Noether3-0/+31
2020-08-27Integrate CLSAGs into moneromoneromooo-monero1-3/+3
They are allowed from v12, and MLSAGs are rejected from v13.
2020-08-16Merge pull request #6661Alexander Blair1-1/+1
267ce5b71 avoid a couple needless copies (moneromooo-monero)
2020-06-14avoid a couple needless copiesmoneromooo-monero1-1/+1
2020-05-16Support for supercop ASM in wallet, and benchmark for supercopLee Clagett2-2/+4
2020-07-19Merge pull request #6565Alexander Blair1-4/+4
72cdfa4a2 fix a few typos in error messages (moneromooo-monero)
2020-07-19Merge pull request #6512Alexander Blair13-13/+13
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-05-27Fix incorrect lenght of command INS_PREFIX_HASHFrançois Colas1-2/+2
buffer_send[4] (LC) is an unsigned char, len should not exceed 254 (255 - 1 for the option).
2020-05-19fix a few typos in error messagesmoneromooo-monero1-4/+4
Reported by adrelanos
2020-05-06Update copyright year to 2020SomaticFanatic13-13/+13
Update copyright year to 2020
2020-05-01Merge pull request #6446luigi11111-1/+1
e509ede trezor: adapt to new passphrase mechanism (ph4r05)
2020-05-01Merge pull request #6436luigi11115-1/+87
688a3e8 Add timelock verification on device (cslashm)
2020-04-27trezor: adapt to new passphrase mechanismDusan Klinec1-1/+1
- choice where to enter passphrase is now made on the host - use wipeable string in the comm stack - wipe passphrase memory - protocol optimizations, prepare for new firmware version - minor fixes and improvements - tests fixes, HF12 support
2020-04-08Add timelock verification on devicecslashm5-1/+87
2020-04-04Merge pull request #6364luigi11111-2/+14
6e1cb5a device: Ledger - fix wide char hidapi error string conversion (xiphon)
2020-04-04Merge pull request #6338luigi11111-11/+8
80d5320 Hash domain separation (SarangNoether)
2020-04-01Hash domain separationSarang Noether1-11/+8
2020-03-01device: Ledger - fix wide char hidapi error string conversionxiphon1-2/+14
2020-02-08device_ledger: include status code name in error messagexiphon2-3/+111
2019-10-25device: bounds checking in Ledger send_secret/receive_secretxiphon1-0/+4
2019-10-03Fix debug featurecslashm1-0/+2
2019-10-03Revert PR #5835 (export view key)cslashm1-1/+1
2019-10-03Add display addresscslashm2-1/+24
2019-10-03Add hmac over encrypted value during transactioncslashm2-91/+171
2019-09-08Merge pull request #5835luigi11111-1/+1
26f7a26 device: fix ledger requesting secret keys export twice (xiphon)
2019-08-26device_ledger: fix uninitialized additional_keymoneromooo-monero1-1/+1
Coverity 200185
2019-08-26device_ledger: add paranoid buffer overflow checkmoneromooo-monero1-1/+3
Coverity 200183
2019-08-20device: fix ledger requesting secret keys export twicexiphon1-1/+1
2019-08-09hid_error() could return a null, which causes the program to crash withTheQuantumPhysicist1-1/+2
std::logic_error()
2019-07-24Merge pull request #5594luigi11112-0/+2
f074b6b device: show address on device display (ph4r05)
2019-06-17device: show address on device displayDusan Klinec2-0/+2
- Trezor: support for device address display (subaddress, integrated address) - Wallet::API support added - Simplewallet: - address device [<index>] - address new <label> // shows address on device also - integrated_address [device] <payment_id|address> // new optional "device" arg to display also on the device
2019-06-09Fix GCC 9.1 build warningsmoneromooo-monero2-0/+15
GCC wants operator= aand copy ctor to be both defined, or neither
2019-04-15Merge pull request #5355Riccardo Spagni1-0/+1
c68fe787 device/trezor: add button pressed request (Dusan Klinec) 827f52ad wallet: API changes to enable passphrase entry (Dusan Klinec)
2019-04-07device/trezor: add button pressed requestDusan Klinec1-0/+1
2019-04-01Add NanoX supportcslashm3-5/+26
2019-03-28Add get_tx_proof support, needed for new sanity checkcslashm6-36/+157
Enhance debug info
2019-03-28Add support for V11 protocol with BulletProofV2 and short amount.cslashm6-43/+90
New scheme key destination contrfol Fix dummy decryption in debug mode
2019-03-28Add application version compatibility check.cslashm2-2/+30
2019-03-21Merge pull request #5211Riccardo Spagni2-4/+113
c9b13fbb tests/trezor: HF9 and HF10 tests (Dusan Klinec) a1fd1d49 device/trezor: HF10 support added, wallet::API (Dusan Klinec) d74d26f2 crypto: hmac_keccak added (Dusan Klinec)
2019-03-20device/trezor: HF10 support added, wallet::APIDusan Klinec2-4/+113
- import only key images generated by cold signing process - wallet_api: trezor methods added - wallet: button request code added - const added to methods - wallet2::get_tx_key_device() tries to decrypt stored tx private keys using the device. - simplewallet supports get_tx_key and get_tx_proof on hw device using the get_tx_key feature - live refresh enables refresh with trezor i.e. computing key images on the fly. More convenient and efficient for users. - device: has_ki_live_refresh added - a thread is watching whether live refresh is being computed, if not for 30 seconds, it terminates the live refresh process - switches Trezor state
2019-03-05Update 2019 copyrightbinaryFate13-13/+13
2019-03-04various: remove unused variablesmoneromooo-monero1-5/+1
2019-02-08Add support for V10 protocol with BulletProofV2 and short amount.cslashm1-13/+34
2019-02-08Fix dummy decryption in debug modecslashm1-1/+3
2019-02-08fix log namespacecslashm1-45/+45
2019-02-08New scheme key destination contrfolcslashm5-22/+223
Implies protocol version management.
2019-01-28Merge pull request #5055Riccardo Spagni5-9/+43
6c060e6a device: proper handling of user input (selsta)
2019-01-28Merge pull request #5054Riccardo Spagni2-2/+1
93c21644 device_ledger: remove full_name variable (selsta)
2019-01-22ringct: encode 8 byte amount, saving 24 bytes per outputmoneromooo-monero5-14/+14
Found by knaccc
2019-01-09device: proper handling of user inputselsta5-9/+43
(1) If the user denies something on the Ledger, a proper error message is now shown. (2) Ledger doesn't time out anymore while waiting on user input. (3) Lower the timeout to 2 seconds, this is enough for normal Ledger <-> System communication.
2019-01-09device_ledger: remove full_name variableselsta2-2/+1
This variable was never set, resulting in the device name always showing as "disconnected".
2018-12-12Merge pull request #4839Riccardo Spagni1-0/+10
d71f89e2 device/trezor: device/trezor: correct device initialization, status check (Dusan Klinec) 65b9bca7 device/trezor: python2 compatibility - bundle dependencies (Dusan Klinec) 9cf636af device/trezor: ask for KI sync on first refresh (Dusan Klinec) d21dad70 device: enable to use multiple independent device wallets (Dusan Klinec) 318cc784 device/trezor: passphrase entry on host (Dusan Klinec)
2018-12-04device: enable to use multiple independent device walletsDusan Klinec1-0/+1
- adds a new option `--hw-device-deriv-path` to the simple wallet. Enables to specify wallet derivation path / wallet code (path avoided so it can be misinterpreted as a file path). - devices can use different derivation mechanisms. Trezor uses standard SLIP-10 mechanism with fixed SLIP-44 prefix for Monero - Trezor: when empty, the default derivation mechanism is used with 44'/128'/0'. When entered the derivation path is 44'/128'/PATH. - Trezor: the path is always taken as elements are hardened (1<<31 bit turned on)
2018-12-04Merge pull request #4894Riccardo Spagni1-2/+0
aee7a4e3 wallet_rpc_server: do not use RPC data if the call failed (moneromooo-monero) 1a0733e5 windows_service: fix memory leak (moneromooo-monero) 0dac3c64 unit_tests: do not rethrow a copy of an exception (moneromooo-monero) 5d9915ab cryptonote: fix get_unit for non default settings (moneromooo-monero) d4f50cb1 remove some unused code (moneromooo-monero) 61163971 a few minor (but easy) performance tweaks (moneromooo-monero) 30023074 tests: slow_memmem now returns size_t (moneromooo-monero)
2018-12-04move int-util.h to epeemoneromooo-monero1-1/+1
2018-11-29device/trezor: passphrase entry on hostDusan Klinec1-0/+9
- simple device callback object added. Device can request passphrase/PIN entry via the callback or notify user some action is required - callback is routed to wallet2, which routes the callback to i_wallet_callback so CLI or GUI wallets can support passphrase entry for HW tokens - wallet: device open needs wallet callback first - passphrase protected device needs wallet callback so user can enter passphrase
2018-11-23remove some unused codemoneromooo-monero1-2/+0
Found by codacy.com
2018-11-02device/trezor: trezor support addedDusan Klinec5-5/+93
2018-11-01Merge pull request #4663Riccardo Spagni3-4/+8
d6937e37 ringct: use dummy bulletproofs when in fake mode, for speed (moneromooo-monero)
2018-10-26Merge pull request #4672Riccardo Spagni1-0/+15
62f94e1b device_io_hid.cpp: fix copyright header (moneromooo-monero)
2018-10-26Merge pull request #4536Riccardo Spagni1-7/+0
fd62b6e7 blocks: use auto-generated .c files instead of 'LD -r -b binary' (xiphon)
2018-10-23ringct: use dummy bulletproofs when in fake mode, for speedmoneromooo-monero3-4/+8
2018-10-22blocks: use auto-generated .c files instead of 'LD -r -b binary'xiphon1-7/+0
2018-10-20device_io_hid.cpp: fix copyright headermoneromooo-monero1-0/+15
2018-10-18device: extended logging, refactored device selection codexiphon3-20/+46
2018-10-18device: fixed Ledger Nano S device selectionxiphon2-6/+6
2018-10-09Merge pull request #4535Riccardo Spagni1-1/+1
c716a331 device: increase ledger timeout to 2 minutes (selsta)
2018-10-09Merge pull request #4538Riccardo Spagni1-6/+6
bd7b800f device_io_hid: fix DEFAULT_* type (too short) and init time (moneromooo-monero)
2018-10-09device_io_hid: fix DEFAULT_* type (too short) and init timemoneromooo-monero1-6/+6
2018-10-09device: increase ledger timeout to 2 minutesselsta1-1/+1
2018-10-08Merge pull request #4532Riccardo Spagni1-9/+16
8f22e808 device: destroy device objects on exit (moneromooo-monero)
2018-10-08Merge pull request #4527Riccardo Spagni1-9/+0
c5a97315 Remove last traces of libpcsc-lite (moneromooo-monero)
2018-10-08Revert "Merge pull request #4472"Riccardo Spagni1-0/+7
This reverts commit 79d46c4d551a9b1261801960095bf4d24967211a, reversing changes made to c9fc61dbb56cca442c775faa2554a7460879b637.
2018-10-08device: destroy device objects on exitmoneromooo-monero1-9/+16
2018-10-08Remove last traces of libpcsc-litemoneromooo-monero1-9/+0
2018-10-04blocks: use auto-generated .c files instead of 'LD -r -b binary'xiphon1-7/+0
2018-09-25Merge pull request #4412Riccardo Spagni2-2/+2
4d0a8db0 device: fix warnings about overridden functions (moneromooo-monero)
2018-09-24Replace USB-CCID (smartcard) by USB-HIDcslashm10-190/+578
Remove PCSC dependencies which is a bit hard (not user friendly) to install on linux and Mac Split Ledger logic and device IO
2018-09-21device: fix warnings about overridden functionsmoneromooo-monero2-2/+2
2018-09-19query backing devicem2049r3-3/+14
2018-09-14hw_device: support for multiple devices added [for review]Dusan Klinec2-22/+61
- device name is a new wallet property - full device name is now a bit more structured so we can address particular device vendor + device path. Example: 'Ledger', 'Trezor:udp', 'Trezor:udp:127.0.0.1:21324', 'Trezor:bridge:usb01'. The part before ':' identifies HW device implementation, the optional part after ':' is device path to look for. - new --hw-device parameter added to the wallet, can name the hardware device - device reconnect added
2018-09-13Add bulletproof supportcslashm1-1/+1
2018-09-11Bulletproof aggregated verification and testsmoneromooo-monero1-1/+1
Also constrains bulletproofs to simple rct, for simplicity
2018-08-23add and use constant time 32 byte equality functionmoneromooo-monero1-1/+2
2018-08-16crypto: make secret_key automatically mlockmoneromooo-monero1-1/+1
2018-08-08wallet: allow adjusting number of rounds for the key derivation functionstoffu5-8/+8
2018-07-19Merge pull request #4032luigi11112-412/+61
87e158b device_ledger: factor the prologue code (moneromooo-monero)
2018-07-03Merge pull request #4043Riccardo Spagni3-14/+19
34de7bc2 device_ledger: fix buffer underflow on bad data from device (moneromooo-monero) 41e9cab4 device: misc cleanup (moneromooo-monero) 3b4dec2d device_ledger: fix potential buffer overflow from bad size calc (moneromooo-monero)
2018-06-25Merge pull request #3977luigi11111-1/+1
0309615 device_ledger: fix bad memory access on connect error (moneromooo-monero)
2018-06-25device_ledger: factor the prologue codemoneromooo-monero2-412/+61
2018-06-23device_ledger: fix buffer underflow on bad data from devicemoneromooo-monero1-0/+1
2018-06-23device: misc cleanupmoneromooo-monero3-12/+14
use snprintf "just in case" where appropriate consistently use unsigned for temp values pass std::string by const ref rather than by value add length check (which can't happen in practice) for memcpy
2018-06-23device_ledger: fix potential buffer overflow from bad size calcmoneromooo-monero1-2/+4
2018-06-09device_ledger: fix bad memory access on connect errormoneromooo-monero1-1/+1
2018-05-23Fix PCSC compilation under windowscslashm2-0/+14
PR3843 based on release-v0.12 => rebased on master
2018-04-14device: add a one off override keyword where appropriatemoneromooo-monero2-2/+2
2018-04-12Fix sub-address tx scan.cslashm5-0/+30
When additional keys was needed, the TX scan failed because the derivation data was always recomputed with the main tx_key and not the corresponding additional one. Moreover this patch avoid perf decreasing when not using HW device.
2018-04-12Merge pull request #3511Riccardo Spagni1-2/+6
0beb94f3 device: fix endianess dependence on subaddress secret key generation (moneromooo-monero)
2018-03-31Add the possibility to export private view key for fast scan.cslashm6-82/+156
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.
2018-03-31Change mutex lock model to avoid dead lock and ensure locks are always released.cslashm5-385/+202
Additional cosmetic fixes: move 'name' as protected remove unnecessary local var Fix debug log
2018-03-28device: fix endianess dependence on subaddress secret key generationmoneromooo-monero1-2/+6
We now force little endianness
2018-03-14chacha: call prehashed version explicitly as generate_chacha_key_prehashedstoffu1-2/+2
hash: add prehashed version cn_slow_hash_prehashed slow-hash: let cn_slow_hash take 4th parameter for deciding prehashed or not slow-hash: add support for prehashed version for the other 3 platforms
2018-03-14keypair::generate: always require hw::device to avoid possible mistakestoffu1-1/+1
2018-03-14device: untangle cyclic depenencystoffu5-51/+114
When #3303 was merged, a cyclic dependency chain was generated: libdevice <- libcncrypto <- libringct <- libdevice This was because libdevice needs access to a set of basic crypto operations implemented in libringct such as scalarmultBase(), while libringct also needs access to abstracted crypto operations implemented in libdevice such as ecdhEncode(). To untangle this cyclic dependency chain, this patch splits libringct into libringct_basic and libringct, where the basic crypto ops previously in libringct are moved into libringct_basic. The cyclic dependency is now resolved thanks to this separation: libcncrypto <- libringct_basic <- libdevice <- libcryptonote_basic <- libringct This eliminates the need for crypto_device.cpp and rctOps_device.cpp. Also, many abstracted interfaces of hw::device such as encrypt_payment_id() and get_subaddress_secret_key() were previously implemented in libcryptonote_basic (cryptonote_format_utils.cpp) and were then called from hw::core::device_default, which is odd because libdevice is supposed to be independent of libcryptonote_basic. Therefore, those functions were moved to device_default.cpp.
2018-03-14device: made function prototypes consistent with pre-#3303 codebasestoffu5-46/+65
2018-03-12Ledger HW Bug fixesCédric8-93/+151
Fix the way the REAL mode is handle: Let create_transactions_2 and create_transactions_from construct the vector of transactions. Then iterate on it and resign. We just need to add 'outs' list in the TX struct for that. Fix default secret keys value when DEBUG_HWDEVICE mode is off The magic value (00...00 for view key and FF..FF for spend key) was not correctly set when DEBUG_HWDEVICE was off. Both was set to 00...00. Add sub-address info in ABP map in order to correctly display destination sub-address on device Fix DEBUG_HWDEVICE mode: - Fix compilation errors. - Fix control device init in ledger device. - Add more log. Fix sub addr control Fix debug Info
2018-03-07device: remove dependency on readlinestoffu2-7/+4
2018-03-05Monero Cryptonight variants, and add one for v7moneromooo-monero1-1/+1
This is the first variant of many, with the intent to improve Monero's resistance to ASICs and encourage mining decentralization.
2018-03-04Fix invalid device unique_ptr castMoroccanMalinois2-3/+3
2018-03-04Code modifications to integrate Ledger HW device into monero-wallet-cli.cslashm10-0/+3229
The basic approach it to delegate all sensitive data (master key, secret ephemeral key, key derivation, ....) and related operations to the device. As device has low memory, it does not keep itself the values (except for view/spend keys) but once computed there are encrypted (with AES are equivalent) and return back to monero-wallet-cli. When they need to be manipulated by the device, they are decrypted on receive. Moreover, using the client for storing the value in encrypted form limits the modification in the client code. Those values are transfered from one C-structure to another one as previously. The code modification has been done with the wishes to be open to any other hardware wallet. To achieve that a C++ class hw::Device has been introduced. Two initial implementations are provided: the "default", which remaps all calls to initial Monero code, and the "Ledger", which delegates all calls to Ledger device.