Commit Graph

46 Commits

Author SHA1 Message Date
xiphon
25d327e796 device: extended logging, refactored device selection code 2018-10-18 17:53:06 +03:00
xiphon
825d836f9f device: fixed Ledger Nano S device selection 2018-10-18 07:42:29 +03:00
Riccardo Spagni
0c135c9420
Merge pull request #4535
c716a331 device: increase ledger timeout to 2 minutes (selsta)
2018-10-09 16:42:30 +02:00
Riccardo Spagni
18318e0dbc
Merge pull request #4538
bd7b800f device_io_hid: fix DEFAULT_* type (too short) and init time (moneromooo-monero)
2018-10-09 16:42:16 +02:00
moneromooo-monero
bd7b800f0a
device_io_hid: fix DEFAULT_* type (too short) and init time 2018-10-09 08:18:50 +00:00
selsta
c716a331f3
device: increase ledger timeout to 2 minutes 2018-10-09 02:17:40 +02:00
Riccardo Spagni
31155115d2
Merge pull request #4532
8f22e808 device: destroy device objects on exit (moneromooo-monero)
2018-10-08 22:30:50 +02:00
Riccardo Spagni
91c6725b88
Merge pull request #4527
c5a97315 Remove last traces of libpcsc-lite (moneromooo-monero)
2018-10-08 22:04:45 +02:00
Riccardo Spagni
ac5674524a
Revert "Merge pull request #4472"
This reverts commit 79d46c4d55, reversing
changes made to c9fc61dbb5.
2018-10-08 21:39:54 +02:00
moneromooo-monero
8f22e80865
device: destroy device objects on exit 2018-10-08 19:22:31 +00:00
moneromooo-monero
c5a97315ee
Remove last traces of libpcsc-lite 2018-10-08 14:22:10 +00:00
xiphon
02d3ef7bda blocks: use auto-generated .c files instead of 'LD -r -b binary' 2018-10-04 00:01:09 +00:00
Riccardo Spagni
295bae10ba
Merge pull request #4412
4d0a8db0 device: fix warnings about overridden functions (moneromooo-monero)
2018-09-25 12:13:51 +02:00
cslashm
bb6e3bbc0f Replace USB-CCID (smartcard) by USB-HID
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-24 21:57:42 +02:00
moneromooo-monero
4d0a8db06d
device: fix warnings about overridden functions 2018-09-21 19:33:15 +00:00
m2049r
bce474be7d
query backing device 2018-09-19 18:25:38 +02:00
Dusan Klinec
f9b22a7b01
hw_device: support for multiple devices added [for review]
- 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-14 16:02:00 +02:00
cslashm
cd236aebca Add bulletproof support 2018-09-13 09:50:43 +02:00
moneromooo-monero
2a8fcb421b
Bulletproof aggregated verification and tests
Also constrains bulletproofs to simple rct, for simplicity
2018-09-11 13:37:37 +00:00
moneromooo-monero
d2e26c23f3
add and use constant time 32 byte equality function 2018-08-23 07:56:51 +00:00
moneromooo-monero
ab74dc277a
crypto: make secret_key automatically mlock 2018-08-16 11:57:49 +00:00
stoffu
bcab579864
wallet: allow adjusting number of rounds for the key derivation function 2018-08-08 01:56:54 +09:00
luigi1111
cff15e4123
Merge pull request #4032
87e158b device_ledger: factor the prologue code (moneromooo-monero)
2018-07-19 13:54:39 -05:00
Riccardo Spagni
d1f102626c
Merge pull request #4043
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-07-03 15:21:56 +02:00
luigi1111
31f47d72fe
Merge pull request #3977
0309615 device_ledger: fix bad memory access on connect error (moneromooo-monero)
2018-06-25 15:26:23 -05:00
moneromooo-monero
87e158b5b9
device_ledger: factor the prologue code 2018-06-25 12:35:10 +01:00
moneromooo-monero
34de7bc267
device_ledger: fix buffer underflow on bad data from device 2018-06-23 15:43:31 +01:00
moneromooo-monero
41e9cab4e1
device: misc cleanup
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-23 15:28:48 +01:00
moneromooo-monero
3b4dec2d12
device_ledger: fix potential buffer overflow from bad size calc 2018-06-23 15:28:45 +01:00
moneromooo-monero
03096150c6
device_ledger: fix bad memory access on connect error 2018-06-09 20:52:34 +01:00
cslashm
bdf5a3ad3f Fix PCSC compilation under windows
PR3843 based on release-v0.12 => rebased on master
2018-05-23 10:22:55 +02:00
moneromooo-monero
f914df8494
device: add a one off override keyword where appropriate 2018-04-14 10:59:38 +01:00
cslashm
2c274e05fe Fix sub-address tx scan.
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-12 13:58:57 +02:00
Riccardo Spagni
3a9290ba6f
Merge pull request #3511
0beb94f3 device: fix endianess dependence on subaddress secret key generation (moneromooo-monero)
2018-04-12 11:15:27 +02:00
cslashm
c77d2bfaa0 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.
2018-03-31 18:00:33 +02:00
cslashm
100b7bc10d Change mutex lock model to avoid dead lock and ensure locks are always released.
Additional cosmetic fixes:
 move 'name' as protected
 remove unnecessary local var
 Fix debug log
2018-03-31 18:00:33 +02:00
moneromooo-monero
0beb94f323
device: fix endianess dependence on subaddress secret key generation
We now force little endianness
2018-03-28 11:14:25 +01:00
stoffu
7dfa5e9e6e
chacha: call prehashed version explicitly as generate_chacha_key_prehashed
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-14 21:00:17 +09:00
stoffu
8705beaf51
keypair::generate: always require hw::device to avoid possible mistake 2018-03-14 21:00:16 +09:00
stoffu
27a196b126
device: untangle cyclic depenency
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-14 21:00:15 +09:00
stoffu
c9b38b4765
device: made function prototypes consistent with pre-#3303 codebase 2018-03-14 21:00:06 +09:00
Cédric
73dd883d51 Ledger HW Bug fixes
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-12 10:43:06 +01:00
stoffu
49c70962ee
device: remove dependency on readline 2018-03-07 07:42:28 +09:00
moneromooo-monero
608fd6f14a
Monero Cryptonight variants, and add one for v7
This is the first variant of many, with the intent to improve
Monero's resistance to ASICs and encourage mining decentralization.
2018-03-05 18:18:39 +00:00
MoroccanMalinois
25ea307d67
Fix invalid device unique_ptr cast 2018-03-04 18:56:48 +00:00
cslashm
e745c1e38d Code modifications to integrate Ledger HW device into monero-wallet-cli.
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.
2018-03-04 12:54:53 +01:00