Commit graph

1247 commits

Author SHA1 Message Date
stoffu
0e7ad2e2c9
Wallet API: generalize 'bool testnet' to 'NetworkType nettype' 2018-03-05 23:59:16 +09:00
stoffu
9a6be3da25
wallet_manager: fixed typo deviuce/device.hpp 2018-03-05 11:57:30 +09:00
stoffu
af773211cb
Stagenet 2018-03-05 11:55:05 +09:00
moneromooo-monero
e0cda74ace
wallet2_api: add info/error/warning entry points 2018-03-04 18:07:30 +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
stoffu
71bff546d3
wallet api: when restoring from EnglishOld, set language to English 2018-02-25 22:04:36 +09:00
rbrunner7
430268224d Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windows 2018-02-25 12:57:58 +01:00
Riccardo Spagni
2ac3da1251
Merge pull request #3256
df5273de wallet2: fix auto_low_priority field name typo on load (moneromooo-monero)
2018-02-20 17:53:38 +02:00
Riccardo Spagni
cfa3af4078
Merge pull request #3247
89ad162a wallet2: remove unused m_subaddresses_inv (moneromooo-monero)
f2c4c399 wallet2: speed up subaddress generation (by about a third) (moneromooo-monero)
2018-02-20 17:46:40 +02:00
Riccardo Spagni
6920fdaf4f
Merge pull request #3246
3c33e131 wallet2: don't store invalid key image when watch-only (stoffu)
0133b348 wallet2: don't throw when spent amount is inconsistent (stoffu)
2018-02-20 17:46:29 +02:00
Riccardo Spagni
0fc5eec9cd
Merge pull request #3235
6866ed46 Add default value to max_height, otherwise it's 0 (Michał Sałaban)
2018-02-20 17:46:00 +02:00
moneromooo-monero
89ad162a3f
wallet2: remove unused m_subaddresses_inv 2018-02-16 17:13:09 +00:00
moneromooo-monero
f2c4c39971
wallet2: speed up subaddress generation (by about a third) 2018-02-16 17:13:06 +00:00
Howard Chu
f3b74e75b0
Fix refresh height estimation
Since commit b0426d4c refresh height for a newly created wallet
connected to a sync'd daemon was off by a month. Now we only use
the 1 month safety margin if we're unable to talk to a daemon.
2018-02-16 14:17:36 +00:00
Riccardo Spagni
9c4428e583
Merge pull request #3214
214d251c wallet: suggest the use of sweep_unmixable when not_enough_outs_to_mix is thrown (stoffu)
2018-02-16 14:22:41 +01:00
Riccardo Spagni
9681a885d1
Merge pull request #3207
a99ef176 wallet-rpc: take subaddress account as arg for get_transfer_by_txid (stoffu)
77125096 wallet-rpc: rename *_INDEX_OUTOFBOUND into *_INDEX_OUT_OF_BOUNDS (stoffu)
2018-02-16 14:21:59 +01:00
Riccardo Spagni
b23578e473
Merge pull request #3197
f90c76be Return appropriate error code when there's no connection to daemon (Michał Sałaban)
3cb65b3f Return appropriate error code when not enough money for tx (Michał Sałaban)
2018-02-16 14:21:00 +01:00
Riccardo Spagni
82599ef0e3
Merge pull request #3175
3be98036 wallet-cli: Do not ask for scan_from_height if it explicitly is set to zero. (Maximilian Lupke)
2018-02-16 14:19:24 +01:00
Riccardo Spagni
5d36ed6613
Merge pull request #3094
a85dbb3f Fixed typos and wording tweaks (Maxithi)
2018-02-16 14:17:46 +01:00
moneromooo-monero
df5273def5
wallet2: fix auto_low_priority field name typo on load 2018-02-13 00:33:55 +00:00
stoffu
3c33e1317b
wallet2: don't store invalid key image when watch-only 2018-02-12 20:36:15 +09:00
stoffu
0133b3481a
wallet2: don't throw when spent amount is inconsistent 2018-02-10 12:59:25 +09:00
stoffu
214d251c48
wallet: suggest the use of sweep_unmixable when not_enough_outs_to_mix is thrown 2018-02-08 08:02:12 +09:00
Michał Sałaban
6866ed469a Add default value to max_height, otherwise it's 0 2018-02-05 23:39:37 +01:00
moneromooo-monero
19ff243f52
wallets: reorg 61 more days on testnet 2018-01-31 15:52:43 +00:00
moneromooo-monero
c70f03cacf
blockchain: move bulletproofs to v8
and set v7 height to 1057027 on testnet (one block earlier)
This is to easily dump current nodes since we're going to change
the v7 rules with this.
2018-01-31 15:52:39 +00:00
stoffu
a99ef17695
wallet-rpc: take subaddress account as arg for get_transfer_by_txid 2018-01-31 17:53:02 +09:00
stoffu
7712509644
wallet-rpc: rename *_INDEX_OUTOFBOUND into *_INDEX_OUT_OF_BOUNDS 2018-01-31 17:52:31 +09:00
Maxithi
a85dbb3f2f
Fixed typos and wording tweaks 2018-01-29 12:13:23 +01:00
Michał Sałaban
f90c76beb4 Return appropriate error code when there's no connection to daemon 2018-01-29 08:28:25 +01:00
Michał Sałaban
3cb65b3f69 Return appropriate error code when not enough money for tx 2018-01-28 12:52:05 +01:00
stoffu
30c44bce06
wallet: automatically use low priority if safe (no backlog & recent blocks not full) 2018-01-28 11:04:52 +09:00
moneromooo-monero
2f5a9b6bb3
wallet2: split estimate_backlog to allow for raw fee levels 2018-01-28 10:52:16 +09:00
Riccardo Spagni
d061c312fb
Merge pull request #3116
269ba252 wallet2::import_blockchain fix import loop (Jaquee)
2018-01-27 17:27:07 -08:00
Riccardo Spagni
1506f33075
Merge pull request #3142
a9cae0ab Wallet API: remove unused enum Priority from UnsignedTransaction (stoffu)
2018-01-27 17:25:25 -08:00
Riccardo Spagni
5603d5aaea
Merge pull request #3141
3160a930 wallet2: remove {set|get}_default_decimal_point and use the same funcs under cryptonote:: instead (stoffu)
7d1088d3 wallet2: make scan_output const and omit keys arg (stoffu)
bc1ee2c2 wallet2: make member functions const when possible (stoffu)
2018-01-27 17:25:15 -08:00
Riccardo Spagni
d3e1244466
Merge pull request #3121
6fbb0b06 cmake: set API header install path to what Qt wallet expects (redfish)
2018-01-27 17:24:57 -08:00
Riccardo Spagni
e1ba5b95c1
Merge pull request #3118
ca336c62 simplewallet: check file overwrite when exporting stuff (stoffu)
2018-01-27 17:24:34 -08:00
Riccardo Spagni
92ea8af34d
Merge pull request #3114
fb5c971c Allow retrieving spend key via RPC (Michał Sałaban)
2018-01-27 17:24:26 -08:00
Riccardo Spagni
73a19e0b06
Merge pull request #3113
ffc2e570 wallet rpc: show fees when querying incoming transfers (stoffu)
2018-01-27 17:24:15 -08:00
Riccardo Spagni
087a773247
Merge pull request #3104
939629e8 Wallet API: all recover options with password (m2049r)
2018-01-27 17:24:08 -08:00
xmr-eric
84a7f6a482 Readd copyright starting date 2018-01-26 10:03:20 -05:00
xmr-eric
18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
stoffu
a9cae0abe7
Wallet API: remove unused enum Priority from UnsignedTransaction 2018-01-26 10:59:49 +09:00
stoffu
3160a93027
wallet2: remove {set|get}_default_decimal_point and use the same funcs under cryptonote:: instead 2018-01-26 10:59:32 +09:00
stoffu
7d1088d337
wallet2: make scan_output const and omit keys arg 2018-01-26 10:59:31 +09:00
stoffu
bc1ee2c2ee
wallet2: make member functions const when possible 2018-01-26 10:59:30 +09:00
stoffu
ffc2e5705d
wallet rpc: show fees when querying incoming transfers 2018-01-26 10:58:23 +09:00
stoffu
ca336c62e3
simplewallet: check file overwrite when exporting stuff 2018-01-26 10:57:13 +09:00
Riccardo Spagni
09d19c9139
Merge pull request #3130
5ae617d5 simplewallet: single out 0 amount destinations as dummy ones (moneromooo-monero)
c1d19f3c wallet2: fix sweep_all sending an atomic unit (moneromooo-monero)
2018-01-25 16:57:03 -08:00
Riccardo Spagni
f31f5c9a3e
Merge pull request #3093
d188840c Improved terminology from create to generate (Maxithi)
2018-01-25 16:49:54 -08:00
Riccardo Spagni
66a2751d68
Merge pull request #3065
3e635a3c wallet2: allow failing parse_tx_extra (moneromooo-monero)
2018-01-25 16:47:08 -08:00
Riccardo Spagni
008b492963
Merge pull request #3047
fa5c0bab Implement #3045, fixing RPC snakecases (Nick Johnson)
2018-01-25 16:45:45 -08:00
Riccardo Spagni
153e319cd4
Merge pull request #3038
eb39a3d7 wallet_api: make this optional but not built by default (moneromooo-monero)
2018-01-25 16:44:23 -08:00
Riccardo Spagni
b2ce5739df
Merge pull request #3028
a4b006f9 wallet2 bugfix: initialize subaddress table when generating from keys (stoffu)
2018-01-25 16:42:06 -08:00
Riccardo Spagni
960b32ba70
Merge pull request #3027
6d40a920 Reserve proof (stoffu)
2018-01-25 16:40:59 -08:00
Riccardo Spagni
f077bbb4f1
Merge pull request #3010
07da9c80 Resolve addresses in get_transfers (Michał Sałaban)
2018-01-25 16:32:40 -08:00
Maximilian Lupke
3be98036e7 wallet-cli: Do not ask for scan_from_height if it explicitly is set to zero.
Fixes #3080
2018-01-24 18:01:08 +01:00
m2049r
939629e837 Wallet API: all recover options with password
also renamed memo => mnemonic in api method parms
2018-01-17 18:46:31 +01:00
moneromooo-monero
c1d19f3c84
wallet2: fix sweep_all sending an atomic unit 2018-01-15 15:54:19 +00:00
redfish
6fbb0b065d cmake: set API header install path to what Qt wallet expects 2018-01-14 20:14:07 -05:00
Jaquee
269ba25228 wallet2::import_blockchain fix import loop 2018-01-14 20:30:35 +01:00
Michał Sałaban
fb5c971cc6 Allow retrieving spend key via RPC 2018-01-14 06:23:12 +01:00
stoffu
6d40a92026
Reserve proof 2018-01-10 20:37:18 +09:00
Riccardo Spagni
00f4ff26c8
Merge pull request #3021
dc6729a6 wallet2: std::unordered_set ctor is sometimes explicit (moneromooo-monero)
2018-01-10 11:55:19 +01:00
Riccardo Spagni
990389f09d
Merge pull request #3002
9996d5e9 wallet2: guard against the dameon sending blocks before last checkpoint (moneromooo-monero)
eadaa6aa wallet_rpc_server: fix wallet leak on error exit (moneromooo-monero)
2018-01-10 11:54:11 +01:00
Riccardo Spagni
f9c66ba67c
Merge pull request #2990
2d17feb0 factor STL container serialization (moneromooo-monero)
2018-01-10 11:53:05 +01:00
Riccardo Spagni
6c7eb5109d
Merge pull request #2989
66eeeaa1 wallet2: fix failure to create tx if inputs are not enough for fee (moneromooo-monero)
2018-01-10 11:52:49 +01:00
Riccardo Spagni
ab8a32429a
Merge pull request #2985
6d8b29ef fix some link errors in debug mode for macos (stoffu)
fdd4c5e5 move memwipe to epee to avoid common<->crypto circular dependencies (moneromooo-monero)
40ab12a7 epee: remove dependency on common (moneromooo-monero)
2018-01-10 11:50:58 +01:00
Riccardo Spagni
3ce7f2bead
Merge pull request #2983
6fc4fc85 sweep_below: do not prematurely exclude subaddresses set (stoffu)
2018-01-10 11:50:36 +01:00
Riccardo Spagni
420a803ff8
Merge pull request #2973
277a5aef wallet2: fix m_key_image_{partial,known} in_light_wallet code (moneromooo-monero)
2018-01-10 11:48:42 +01:00
moneromooo-monero
fdd4c5e577
move memwipe to epee to avoid common<->crypto circular dependencies 2018-01-10 01:57:54 +00:00
moneromooo-monero
40ab12a773
epee: remove dependency on common 2018-01-10 01:57:51 +00:00
Maxithi
d188840cc2
Improved terminology from create to generate 2018-01-09 21:46:44 +01:00
Nick Johnson
fa5c0bab44
Implement #3045, fixing RPC snakecases 2018-01-06 15:11:36 -06:00
moneromooo-monero
3e635a3cef
wallet2: allow failing parse_tx_extra
It can fail if it fails to parse extra, while still having filled
the returned data with partial contents
2018-01-04 15:38:49 +00:00
Riccardo Spagni
803f54b9fd
Merge pull request #2967
55556fab wallet_rpc_server: factor transfer info return and add missing info (moneromooo-monero)
2018-01-02 00:31:30 +02:00
Riccardo Spagni
ee02c7ab03
Merge pull request #2962
14c29814 wallet2: fix use of uninitialized data (moneromooo-monero)
2018-01-02 00:30:01 +02:00
Riccardo Spagni
eb617be8f4
Merge pull request #2960
5cbcf0aa wallet: support for multisig seeds (moneromooo-monero)
2018-01-02 00:29:36 +02:00
moneromooo-monero
eb39a3d7d3
wallet_api: make this optional but not built by default
It means it can still be built with make -C build/debug wallet_api
but still not DoS us while debugging
2017-12-31 11:14:20 +00:00
stoffu
a4b006f965
wallet2 bugfix: initialize subaddress table when generating from keys 2017-12-29 15:53:28 +09:00
moneromooo-monero
dc6729a66a
wallet2: std::unordered_set ctor is sometimes explicit 2017-12-28 10:20:12 +00:00
Riccardo Spagni
5f562cf9e6
Merge pull request #2941
d0d38dc8 wallet2: print tx size in bytes and kB (moneromooo-monero)
2017-12-28 08:58:30 +02:00
stoffu
6fc4fc850e
sweep_below: do not prematurely exclude subaddresses set 2017-12-28 07:52:53 +09:00
Michał Sałaban
07da9c806d Resolve addresses in get_transfers 2017-12-27 01:35:48 +01:00
stoffu
e3530789d3
wallet-api: added Utils::onStartup 2017-12-26 08:23:32 +09:00
Riccardo Spagni
40df4905fd
Merge pull request #3006
7e7b1a82 Revert "return subaddress in get_bulk_payments" (moneromooo-monero)
2017-12-25 22:08:56 +02:00
moneromooo-monero
7e7b1a8252
Revert "return subaddress in get_bulk_payments"
This reverts commit b60f48f0e3.
2017-12-25 20:04:40 +00:00
Riccardo Spagni
ca8c7e863f
Merge pull request #2895
5ad312a1 wallet2: switch to chacha20 instead of chacha8 (moneromooo-monero)
1e5491e9 Add a chacha20 variant to go with chacha8 (moneromooo-monero)
2017-12-25 22:00:44 +02:00
Riccardo Spagni
0a5bfa7c73
Merge pull request #2938
aaae94f0 wallet2: reinstate the single preferred output selection (moneromooo-monero)
2017-12-25 21:42:22 +02:00
moneromooo-monero
5ad312a1c3
wallet2: switch to chacha20 instead of chacha8
Wallet caches and keys files are loaded with chacha8 as needed,
but only saved with chacha20. Other data (eg, cold wallet data
files, etc) will be incompatible.
2017-12-25 19:28:06 +00:00
moneromooo-monero
1e5491e942
Add a chacha20 variant to go with chacha8 2017-12-25 19:28:03 +00:00
Riccardo Spagni
409e9bb029
Merge pull request #2931
04349492 wallet2: error out in get_seed if the language is invalid (moneromooo-monero)
2017-12-25 21:21:00 +02:00
Riccardo Spagni
db09247c68
Merge pull request #2926
6b5bd129 Account tagging (stoffu)
2017-12-25 21:19:33 +02:00
Riccardo Spagni
2b00899bb2
Merge pull request #2920
bd5cce07 network_throttle: fix ineffective locking (moneromooo-monero)
e0a61299 network_throttle: remove unused xxx static member (moneromooo-monero)
24f584d9 cryptonote_core: remove unused functions with off by one bugs (moneromooo-monero)
b1634aa3 blockchain: don't leave dangling pointers in this (moneromooo-monero)
8e60b81c cryptonote_core: fix db leak on error (moneromooo-monero)
213e326c abstract_tcp_server2: log init_server errors as fatal (moneromooo-monero)
b51dc566 use const refs in for loops for non tiny types (moneromooo-monero)
f0568ca6 net_parse_helpers: fix regex error checking (moneromooo-monero)
b49ddc76 check accessing an element past the end of a container (moneromooo-monero)
2305bf26 check return value for generate_key_derivation and derive_public_key (moneromooo-monero)
a4240d9f catch const exceptions (moneromooo-monero)
45a1c4c0 add empty container sanity checks when using front() and back() (moneromooo-monero)
56fa6ce1 tests: fix a buffer overread in a unit test (moneromooo-monero)
b4524892 rpc: guard against json parsing a non object (moneromooo-monero)
c2ed8618 easylogging++: avoid buffer underflow (moneromooo-monero)
187a6ab2 epee: trap failure to parse URI from request (moneromooo-monero)
061789b5 checkpoints: trap failure to load JSON checkpoints (moneromooo-monero)
ba2fefb9 checkpoints: pass std::string by const ref, not const value (moneromooo-monero)
38c8f4e0 mlog: terminate a string at last char, just in case (moneromooo-monero)
d753d716 fix a few leaks by throwing objects, not newed pointers to objects (moneromooo-monero)
fe568db8 p2p: use size_t for arbitrary counters instead of uint8_t (moneromooo-monero)
46d6fa35 cryptonote_protocol: sanity check chain hashes from peer (moneromooo-monero)
25584f86 cryptonote_protocol: print peer versions when unexpected (moneromooo-monero)
490a5d41 rpc: do not try to use an invalid txid in relay_tx (moneromooo-monero)
2017-12-25 21:17:52 +02:00
Riccardo Spagni
8b40bc27a2
Merge pull request #2916
a9217641 wallet-rpc: added receiving address to res of get(_bulk)_payments; selective addresses for getaddress (stoffu)
2017-12-25 21:17:16 +02:00
Riccardo Spagni
d06f3ea9ad
Merge pull request #2902
1741fb5f node_rpc_proxy: remove unused local and time call (moneromooo-monero)
2017-12-25 21:16:01 +02:00
Riccardo Spagni
b3dddb22fe
Merge pull request #2899
b60f48f0 return subaddress in get_bulk_payments (Dmitriy Plekhanov)
2017-12-25 21:15:08 +02:00
Riccardo Spagni
2ef299f2a9
Merge pull request #2891
3f24e901 wallet2: don't write a .new file when not needed (moneromooo-monero)
2017-12-25 21:14:20 +02:00
Riccardo Spagni
2d1965f31b
Merge pull request #2888
ca18ff64 wallet2: detect spends in txes without a valid public tx key (moneromooo-monero)
6afcd8e3 cn_deserialize: print tx extra fields in partly decoded tx extra (moneromooo-monero)
2017-12-25 21:13:33 +02:00
moneromooo-monero
9996d5e96c
wallet2: guard against the dameon sending blocks before last checkpoint 2017-12-24 12:12:40 +00:00
moneromooo-monero
eadaa6aaa3
wallet_rpc_server: fix wallet leak on error exit
Makes it easier to debug leaks
2017-12-24 12:12:37 +00:00
moneromooo-monero
2d17feb060
factor STL container serialization 2017-12-22 19:47:12 +00:00
moneromooo-monero
66eeeaa1a2
wallet2: fix failure to create tx if inputs are not enough for fee 2017-12-21 22:11:16 +00:00
moneromooo-monero
277a5aefaa
wallet2: fix m_key_image_{partial,known} in_light_wallet code 2017-12-20 14:54:14 +00:00
moneromooo-monero
5cbcf0aa25
wallet: support for multisig seeds
They are hex rather than words, because they are a lot longer
than "normal" seeds, as they have to embed a lot more information
2017-12-20 10:22:29 +00:00
moneromooo-monero
55556fabf9
wallet_rpc_server: factor transfer info return and add missing info
Additional tx keys, amounts and fees were missing in some cases
2017-12-20 08:56:31 +00:00
moneromooo-monero
14c2981469
wallet2: fix use of uninitialized data 2017-12-19 12:33:01 +00:00
moneromooo-monero
b51dc56687
use const refs in for loops for non tiny types 2017-12-18 15:15:54 +00:00
moneromooo-monero
b49ddc766d
check accessing an element past the end of a container 2017-12-18 15:15:49 +00:00
moneromooo-monero
2305bf260d
check return value for generate_key_derivation and derive_public_key 2017-12-18 15:15:46 +00:00
moneromooo-monero
45a1c4c088
add empty container sanity checks when using front() and back() 2017-12-18 15:15:40 +00:00
stoffu
a921764162
wallet-rpc: added receiving address to res of get(_bulk)_payments; selective addresses for getaddress 2017-12-18 10:22:34 +09:00
stoffu
6b5bd129b4
Account tagging 2017-12-18 10:21:47 +09:00
moneromooo-monero
ceabc4f92b
change the N-1/N multisig second message signer for auth 2017-12-17 16:12:50 +00:00
moneromooo-monero
98db7ee467
wallet: factor multisig info parsing 2017-12-17 16:12:44 +00:00
moneromooo-monero
31a97e761e
wallet: use raw encrypted data in multisig import/export RPC 2017-12-17 16:12:41 +00:00
moneromooo-monero
2fa707d1a5
wallet: add multisig sign/submit RPC 2017-12-17 16:12:35 +00:00
moneromooo-monero
e36f5b6021
Match surae's recommendation to derive multisig keys 2017-12-17 16:12:32 +00:00
moneromooo-monero
a36c261d7a
wallet2: fix slow multisig unit tests with subaddress patch
While there, move the wallet2 ctor to the cpp file as it's a huge
amount of init list now, and remove an unused one.
2017-12-17 16:12:30 +00:00
moneromooo-monero
fa5697127f
make multisig work with subaddresses
Thanks to kenshi84 for help getting this work
2017-12-17 16:12:27 +00:00
moneromooo-monero
265290388b
wallet: guard against partly initialized multisig wallet 2017-12-17 16:12:18 +00:00
moneromooo-monero
66e34e85b1
add multisig core test and factor multisig building blocks 2017-12-17 16:12:15 +00:00
moneromooo-monero
f4eda44ce3
N-1/N multisig 2017-12-17 16:12:12 +00:00
moneromooo-monero
cd64c7990c
multisig address generation RPC 2017-12-17 16:12:09 +00:00
moneromooo-monero
fff871a455
gen_multisig: generates multisig wallets if participants trust each other 2017-12-17 16:12:06 +00:00
moneromooo-monero
95a21a793d
wallet2: allow empty wallet filename to avoid saving data
Useful to speed tests up and avoid unnecessary leftover files
2017-12-17 16:12:03 +00:00
moneromooo-monero
4c313324b1
Add N/N multisig tx generation and signing
Scheme by luigi1111:

    Multisig for RingCT on Monero

    2 of 2

    User A (coordinator):
    Spendkey b,B
    Viewkey a,A (shared)

    User B:
    Spendkey c,C
    Viewkey a,A (shared)

    Public Address: C+B, A

    Both have their own watch only wallet via C+B, a

    A will coordinate spending process (though B could easily as well, coordinator is more needed for more participants)

    A and B watch for incoming outputs

    B creates "half" key images for discovered output D:
    I2_D = (Hs(aR)+c) * Hp(D)

    B also creates 1.5 random keypairs (one scalar and 2 pubkeys; one on base G and one on base Hp(D)) for each output, storing the scalar(k) (linked to D),
    and sending the pubkeys with I2_D.

    A also creates "half" key images:
    I1_D = (Hs(aR)+b) * Hp(D)

    Then I_D = I1_D + I2_D

    Having I_D allows A to check spent status of course, but more importantly allows A to actually build a transaction prefix (and thus transaction).

    A builds the transaction until most of the way through MLSAG_Gen, adding the 2 pubkeys (per input) provided with I2_D
    to his own generated ones where they are needed (secret row L, R).

    At this point, A has a mostly completed transaction (but with an invalid/incomplete signature). A sends over the tx and includes r,
    which allows B (with the recipient's address) to verify the destination and amount (by reconstructing the stealth address and decoding ecdhInfo).

    B then finishes the signature by computing ss[secret_index][0] = ss[secret_index][0] + k - cc[secret_index]*c (secret indices need to be passed as well).

    B can then broadcast the tx, or send it back to A for broadcasting. Once B has completed the signing (and verified the tx to be valid), he can add the full I_D
    to his cache, allowing him to verify spent status as well.

    NOTE:
    A and B *must* present key A and B to each other with a valid signature proving they know a and b respectively.
    Otherwise, trickery like the following becomes possible:
    A creates viewkey a,A, spendkey b,B, and sends a,A,B to B.
    B creates a fake key C = zG - B. B sends C back to A.
    The combined spendkey C+B then equals zG, allowing B to spend funds at any time!
    The signature fixes this, because B does not know a c corresponding to C (and thus can't produce a signature).

    2 of 3

    User A (coordinator)
    Shared viewkey a,A
    "spendkey" j,J

    User B
    "spendkey" k,K

    User C
    "spendkey" m,M

    A collects K and M from B and C
    B collects J and M from A and C
    C collects J and K from A and B

    A computes N = nG, n = Hs(jK)
    A computes O = oG, o = Hs(jM)

    B anc C compute P = pG, p = Hs(kM) || Hs(mK)
    B and C can also compute N and O respectively if they wish to be able to coordinate

    Address: N+O+P, A

    The rest follows as above. The coordinator possesses 2 of 3 needed keys; he can get the other
    needed part of the signature/key images from either of the other two.

    Alternatively, if secure communication exists between parties:
    A gives j to B
    B gives k to C
    C gives m to A

    Address: J+K+M, A

    3 of 3

    Identical to 2 of 2, except the coordinator must collect the key images from both of the others.
    The transaction must also be passed an additional hop: A -> B -> C (or A -> C -> B), who can then broadcast it
    or send it back to A.

    N-1 of N

    Generally the same as 2 of 3, except participants need to be arranged in a ring to pass their keys around
    (using either the secure or insecure method).
    For example (ignoring viewkey so letters line up):
    [4 of 5]
    User: spendkey
    A: a
    B: b
    C: c
    D: d
    E: e

    a -> B, b -> C, c -> D, d -> E, e -> A

    Order of signing does not matter, it just must reach n-1 users. A "remaining keys" list must be passed around with
    the transaction so the signers know if they should use 1 or both keys.
    Collecting key image parts becomes a little messy, but basically every wallet sends over both of their parts with a tag for each.
    Thia way the coordinating wallet can keep track of which images have been added and which wallet they come from. Reasoning:
    1. The key images must be added only once (coordinator will get key images for key a from both A and B, he must add only one to get the proper key actual key image)
    2. The coordinator must keep track of which helper pubkeys came from which wallet (discussed in 2 of 2 section). The coordinator
    must choose only one set to use, then include his choice in the "remaining keys" list so the other wallets know which of their keys to use.

    You can generalize it further to N-2 of N or even M of N, but I'm not sure there's legitimate demand to justify the complexity. It might
    also be straightforward enough to support with minimal changes from N-1 format.
    You basically just give each user additional keys for each additional "-1" you desire. N-2 would be 3 keys per user, N-3 4 keys, etc.

The process is somewhat cumbersome:

To create a N/N multisig wallet:

 - each participant creates a normal wallet
 - each participant runs "prepare_multisig", and sends the resulting string to every other participant
 - each participant runs "make_multisig N A B C D...", with N being the threshold and A B C D... being the strings received from other participants (the threshold must currently equal N)

As txes are received, participants' wallets will need to synchronize so that those new outputs may be spent:

 - each participant runs "export_multisig FILENAME", and sends the FILENAME file to every other participant
 - each participant runs "import_multisig A B C D...", with A B C D... being the filenames received from other participants

Then, a transaction may be initiated:

 - one of the participants runs "transfer ADDRESS AMOUNT"
 - this partly signed transaction will be written to the "multisig_monero_tx" file
 - the initiator sends this file to another participant
 - that other participant runs "sign_multisig multisig_monero_tx"
 - the resulting transaction is written to the "multisig_monero_tx" file again
 - if the threshold was not reached, the file must be sent to another participant, until enough have signed
 - the last participant to sign runs "submit_multisig multisig_monero_tx" to relay the transaction to the Monero network
2017-12-17 16:11:57 +00:00
moneromooo-monero
6d219a9250
wallet: add multisig key generation
Scheme by luigi1111
2017-12-17 16:11:53 +00:00
Riccardo Spagni
a3a8343051
Merge pull request #2857
7193b89f Scrub keys from memory just before scope end. (moneromooo-monero)
2017-12-17 13:00:11 +02:00
Riccardo Spagni
066fd7aced
Merge pull request #2877
43f5269f Wallets now do not depend on the daemon rpc lib (moneromooo-monero)
bb89ae8b move connection_basic and network_throttle from src/p2p to epee (moneromooo-monero)
4abf25f3 cryptonote_core does not depend on p2p anymore (moneromooo-monero)
2017-12-17 12:59:44 +02:00
moneromooo-monero
43f5269f84
Wallets now do not depend on the daemon rpc lib
The shared RPC code is now moved off into a separate lib
2017-12-16 23:28:59 +00:00
moneromooo-monero
09ce03d612
move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
moneromooo-monero
7193b89fe5 Scrub keys from memory just before scope end.
Partially implements #74.

Securely erases keys from memory after they are no longer needed. Might have a
performance impact, which I haven't measured (perf measurements aren't
generally reliable on laptops).

Thanks to @stoffu for the suggestion to specialize the pod_to_hex/hex_to_pod
functions. Using overloads + SFINAE instead generalizes it so other types can
be marked as scrubbed without adding more boilerplate.
2017-12-16 15:40:33 -07:00
Riccardo Spagni
87158dca68
Merge pull request #2885
a1e3670b catch wallet decrypt false positive (Riccardo Spagni)
2017-12-16 23:24:16 +02:00
Riccardo Spagni
6c0953b15a
Merge pull request #2860
3dffe71b new wipeable_string class to replace std::string passphrases (moneromooo-monero)
7a2a5741 utils: initialize easylogging++ in on_startup (moneromooo-monero)
54950829 use memwipe in a few relevant places (moneromooo-monero)
000666ff add a memwipe function (moneromooo-monero)
2017-12-16 23:19:27 +02:00
moneromooo-monero
d0d38dc8e6
wallet2: print tx size in bytes and kB
Helpful now that tx sizes are smaller
2017-12-16 18:40:21 +00:00
moneromooo-monero
aaae94f00b
wallet2: reinstate the single preferred output selection
Removing it nullified the min-outputs-{count,value} system,
and will not increase the number of attempted transactions
in the general case.
2017-12-16 12:31:03 +00:00
moneromooo-monero
043494924b
wallet2: error out in get_seed if the language is invalid 2017-12-15 11:01:14 +00:00
moneromooo-monero
1741fb5f2b
node_rpc_proxy: remove unused local and time call 2017-12-09 11:28:18 +00:00
Dmitriy Plekhanov
b60f48f0e3
return subaddress in get_bulk_payments 2017-12-08 18:45:53 +03:00
moneromooo-monero
c83d0b3ee2
add bulletproofs from v7 on testnet 2017-12-08 13:50:45 +00:00
moneromooo-monero
d58835b2f6
integrate bulletproofs into monero 2017-12-08 13:48:15 +00:00
moneromooo-monero
3f24e90149
wallet2: don't write a .new file when not needed 2017-12-07 12:07:18 +00:00
moneromooo-monero
ca18ff644b
wallet2: detect spends in txes without a valid public tx key 2017-12-06 15:55:06 +00:00
Riccardo Spagni
a1e3670b33
catch wallet decrypt false positive 2017-12-04 11:07:32 +02:00
Riccardo Spagni
81fb832082
Merge pull request #2833
b0426d4c Fixes #759 Add sanity check on restore height (Cifrado)
2017-12-02 09:25:53 +02:00
Riccardo Spagni
301279709d
Merge pull request #2850
d875a9ff wallet2: detect multiple outputs from a tx to different subaddresses (moneromooo-monero)
2017-12-02 09:24:25 +02:00
Riccardo Spagni
0bf4d6deea
Merge pull request #2828
6cbe7bcd wallet2: check generate_key_derivation return value (moneromooo-monero)
2017-12-02 09:21:55 +02:00
moneromooo-monero
3dffe71b72
new wipeable_string class to replace std::string passphrases 2017-11-27 22:25:57 +00:00