aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-04-12Merge pull request #3473Riccardo Spagni1-5/+6
eaa8bfe7 wallet2: set from_height of GET_OUTPUT_DISTRIBUTION correctly The previous expression (stoffu) 0a619f78 wallet2: enable the mitigation only after the fork height (stoffu)
2018-04-12Merge pull request #3468Riccardo Spagni1-0/+9
0098ed33 wallet2: fix for loading settings of key reuse mitigation (stoffu)
2018-03-22wallet2: set from_height of GET_OUTPUT_DISTRIBUTION correctlystoffu1-1/+1
The previous expression req_t.from_height = X ? Y >= Z : 0; forces the parameter to take the value of either 0 or 1.
2018-03-22wallet2: enable the mitigation only after the fork heightstoffu1-4/+5
2018-03-22wallet2: fix for loading settings of key reuse mitigationstoffu1-0/+9
2018-03-21wallet: catch exceptions dealing with ringdb and warnmoneromooo-monero1-19/+44
2018-03-17wallet: make the segregation height settablemoneromooo-monero1-8/+58
via user setting first, then DNS TXT record, hardcoded fallback
2018-03-16Merge pull request #3336Riccardo Spagni1-4/+4
57c0b1ed Fix typos in various files (Dimitris Apostolou)
2018-03-16wallet: more user friendly print_ringmoneromooo-monero1-2/+38
It can now take a txid (to display rings for all its inputs), and will print rings in a format that set_ring understands
2018-03-16ringdb: use the genesis block as a db namemoneromooo-monero1-1/+3
This will avoid careless forkers polluting the shared database even if they make their own chain. They'll then automatically start using another subdb, and any key-reusing fork of those forks will reuse their subdbs.
2018-03-16wallet: add a set_ring commandmoneromooo-monero1-0/+11
This is so one can set rings for spent key images in case the attackers don't merge the ring matching patch set.
2018-03-16wallet: make ringdb an object with database statemoneromooo-monero1-24/+48
2018-03-16wallet: add an output blackball list to avoid using those in ringsmoneromooo-monero1-2/+29
2018-03-16wallet: key reuse mitigation optionsmoneromooo-monero1-15/+166
If a pre-fork output is spent on both Monero and attack chain, any post-fork output can be deduced to be a fake output, thereby decreasing the effective ring size. The segregate-per-fork-outputs option, on by default, allows selecting only pre-fork outputs in this case, so that the same ring can be used when spending it on the other side, which does not decrease the effective ring size. This is intended to be SET when intending to spend Monero on the attack fork, and to be UNSET if not intending to spend Monero on the attack fork (since it leaks the fact that the output being spent is pre-fork). If the user is not certain yet whether they will spend pre-fork outputs on a key reusing fork, the key-reuse-mitigation2 option should be SET instead. If you use this option and intend to spend Monero on both forks, then spend real Monero first.
2018-03-16wallet: add shared ring databasemoneromooo-monero1-6/+233
This maps key images to rings, so that different forks can reuse the rings by key image. This avoids revealing the real inputs like would happen if two forks spent the same outputs with different rings. This database is meant to be shared with all Monero forks which don't bother making a new chain, putting users' privacy at risk in the process. It is placed in a shared data directory by default ($HOME/.shared-ringdb on UNIX like systems). You may use --shared-ringdb-dir to override this location, and should then do so for all Monero forks for them to share the database.
2018-03-16add RPC to get a histogram of outputs of a given amountmoneromooo-monero1-0/+65
2018-03-15Fix typos in various filesDimitris Apostolou1-4/+4
2018-03-14replace invoke_http_json("/json_rpc",...) with ↵stoffu1-108/+78
invoke_http_json_rpc("/json_rpc",methodname,...) to reduce boilerplate
2018-03-14Merge pull request #3398Riccardo Spagni1-1/+1
c577abab wallet: fix auto low priority so that it takes effect only when saved default is 0 (stoffu)
2018-03-14Merge pull request #3399Riccardo Spagni1-1/+1
1d39b265 wallet2: fix use_fork_rules() when querying version that is defined but not enabled yet (stoffu)
2018-03-14Merge pull request #3386Riccardo Spagni1-0/+5
9abeff59 wallet2: handle no blocks returned in refresh to mean no new blocks (moneromooo-monero)
2018-03-14wallet2: check_tx_key() shouldn't require hardware encryptionstoffu1-2/+2
2018-03-14device: untangle cyclic depenencystoffu1-20/+19
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 codebasestoffu1-6/+2
2018-03-14Merge pull request #3377Riccardo Spagni1-1/+1
aa8bef0c fix error message typo in wallet2.cpp (cryptochangements34)
2018-03-14Merge pull request #3369Riccardo Spagni1-6/+6
1979d53d wallet: fixes and tweaks to the save_watch_only command (moneromooo-monero)
2018-03-14Merge pull request #3353Riccardo Spagni1-43/+59
73dd883d Ledger HW Bug fixes (Cédric)
2018-03-14Merge pull request #3337Riccardo Spagni1-3/+14
91d97dd4 fuzz_tests: set small subaddress lookahead for speed (moneromooo-monero) 5f85cc7e wallet2: guard against overflowing of subaddress indices (moneromooo-monero)
2018-03-14Merge pull request #3315Riccardo Spagni1-24/+48
649a1b7a wallet2 / simplewallet: Must opt-in to create '.address.txt' files for new wallets (Leon Klingele)
2018-03-14wallet2: guard against overflowing of subaddress indicesmoneromooo-monero1-3/+14
2018-03-14wallet2: fix use_fork_rules() when querying version that is defined but not ↵stoffu1-1/+1
enabled yet
2018-03-14wallet: fix auto low priority so that it takes effect only when saved ↵stoffu1-1/+1
default is 0
2018-03-12Ledger HW Bug fixesCédric1-43/+59
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-11wallet2: handle no blocks returned in refresh to mean no new blocksmoneromooo-monero1-0/+5
This is not a possible return from the daemon, but I want this in now so all wallets handle this when the daemon starts doing so.
2018-03-10wallet2 / simplewallet: Must opt-in to create '.address.txt' files for new ↵Leon Klingele1-24/+48
wallets Previously, a file containing the unencrypted Monero address was created by default in the wallet's directory. This file might pose as a privacy risk. The creation of this file is now opt-in and can be enabled by providing --create-address-file
2018-03-09fix error message typo in wallet2.cppcryptochangements341-1/+1
2018-03-07wallet: fixes and tweaks to the save_watch_only commandmoneromooo-monero1-6/+6
- save the new keys file as FOO-watchonly.keys, not FOO.keys-watchonly - catch any exception (eg, I/O errors) and error out - print the new keys filename in simplewallet
2018-03-07Bump min ring size from 5 to 7 from v7moneromooo-monero1-1/+5
2018-03-05Merge pull request #3313Riccardo Spagni1-0/+12
43026822 Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windows (rbrunner7)
2018-03-05Merge pull request #3277Riccardo Spagni1-50/+65
0e7ad2e2 Wallet API: generalize 'bool testnet' to 'NetworkType nettype' (stoffu) af773211 Stagenet (stoffu) cc9a0bee command_line: allow args to depend on more than one args (stoffu) 55f8d917 command_line::get_arg: remove 'required' for dependent args as they're always optional (stoffu) 450306a0 command line: allow has_arg to handle arg_descriptor<bool,false,true> #3318 (stoffu) 9f9e095a Use `genesis_tx` parameter in `generate_genesis_block`. #3261 (Jean Pierre Dudey)
2018-03-05Merge pull request #3273Riccardo Spagni1-13/+16
f3b74e75 Fix refresh height estimation (Howard Chu)
2018-03-05Correct spelling mistakes.Edward Betts1-7/+7
2018-03-05Stagenetstoffu1-50/+65
2018-03-04Code modifications to integrate Ledger HW device into monero-wallet-cli.cslashm1-89/+169
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-02-25Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windowsrbrunner71-0/+12
2018-02-20Merge pull request #3256Riccardo Spagni1-2/+2
df5273de wallet2: fix auto_low_priority field name typo on load (moneromooo-monero)
2018-02-20Merge pull request #3247Riccardo Spagni1-17/+12
89ad162a wallet2: remove unused m_subaddresses_inv (moneromooo-monero) f2c4c399 wallet2: speed up subaddress generation (by about a third) (moneromooo-monero)
2018-02-20Merge pull request #3246Riccardo Spagni1-5/+15
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-16wallet2: remove unused m_subaddresses_invmoneromooo-monero1-4/+0
2018-02-16wallet2: speed up subaddress generation (by about a third)moneromooo-monero1-16/+15
2018-02-16Fix refresh height estimationHoward Chu1-13/+16
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-16Merge pull request #3175Riccardo Spagni1-0/+2
3be98036 wallet-cli: Do not ask for scan_from_height if it explicitly is set to zero. (Maximilian Lupke)
2018-02-16Merge pull request #3094Riccardo Spagni1-1/+1
a85dbb3f Fixed typos and wording tweaks (Maxithi)
2018-02-13wallet2: fix auto_low_priority field name typo on loadmoneromooo-monero1-2/+2
2018-02-12wallet2: don't store invalid key image when watch-onlystoffu1-1/+1
2018-02-10wallet2: don't throw when spent amount is inconsistentstoffu1-4/+14
2018-01-31wallets: reorg 61 more days on testnetmoneromooo-monero1-2/+3
2018-01-31blockchain: move bulletproofs to v8moneromooo-monero1-7/+4
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-29Fixed typos and wording tweaksMaxithi1-1/+1
2018-01-28wallet: automatically use low priority if safe (no backlog & recent blocks ↵stoffu1-0/+91
not full)
2018-01-28wallet2: split estimate_backlog to allow for raw fee levelsmoneromooo-monero1-9/+26
2018-01-27Merge pull request #3116Riccardo Spagni1-1/+1
269ba252 wallet2::import_blockchain fix import loop (Jaquee)
2018-01-27Merge pull request #3141Riccardo Spagni1-33/+23
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-27Merge pull request #3118Riccardo Spagni1-0/+7
ca336c62 simplewallet: check file overwrite when exporting stuff (stoffu)
2018-01-27Merge pull request #3113Riccardo Spagni1-1/+5
ffc2e570 wallet rpc: show fees when querying incoming transfers (stoffu)
2018-01-26Update 2018 copyrightxmr-eric1-1/+1
2018-01-26wallet2: remove {set|get}_default_decimal_point and use the same funcs under ↵stoffu1-10/+0
cryptonote:: instead
2018-01-26wallet2: make scan_output const and omit keys argstoffu1-5/+5
2018-01-26wallet2: make member functions const when possiblestoffu1-18/+18
2018-01-26wallet rpc: show fees when querying incoming transfersstoffu1-1/+5
2018-01-26simplewallet: check file overwrite when exporting stuffstoffu1-0/+7
2018-01-25Merge pull request #3130Riccardo Spagni1-2/+2
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-25Merge pull request #3093Riccardo Spagni1-1/+1
d188840c Improved terminology from create to generate (Maxithi)
2018-01-25Merge pull request #3065Riccardo Spagni1-14/+7
3e635a3c wallet2: allow failing parse_tx_extra (moneromooo-monero)
2018-01-25Merge pull request #3028Riccardo Spagni1-0/+1
a4b006f9 wallet2 bugfix: initialize subaddress table when generating from keys (stoffu)
2018-01-24wallet-cli: Do not ask for scan_from_height if it explicitly is set to zero.Maximilian Lupke1-0/+2
Fixes #3080
2018-01-15wallet2: fix sweep_all sending an atomic unitmoneromooo-monero1-2/+2
2018-01-14wallet2::import_blockchain fix import loopJaquee1-1/+1
2018-01-10Reserve proofstoffu1-0/+245
2018-01-10Merge pull request #3021Riccardo Spagni1-2/+2
dc6729a6 wallet2: std::unordered_set ctor is sometimes explicit (moneromooo-monero)
2018-01-10Merge pull request #3002Riccardo Spagni1-0/+5
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-10Merge pull request #2990Riccardo Spagni1-0/+1
2d17feb0 factor STL container serialization (moneromooo-monero)
2018-01-10Merge pull request #2989Riccardo Spagni1-0/+12
66eeeaa1 wallet2: fix failure to create tx if inputs are not enough for fee (moneromooo-monero)
2018-01-10Merge pull request #2985Riccardo Spagni1-1/+1
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-10Merge pull request #2983Riccardo Spagni1-18/+29
6fc4fc85 sweep_below: do not prematurely exclude subaddresses set (stoffu)
2018-01-10Merge pull request #2973Riccardo Spagni1-1/+2
277a5aef wallet2: fix m_key_image_{partial,known} in_light_wallet code (moneromooo-monero)
2018-01-10move memwipe to epee to avoid common<->crypto circular dependenciesmoneromooo-monero1-1/+1
2018-01-09Improved terminology from create to generateMaxithi1-1/+1
2018-01-04wallet2: allow failing parse_tx_extramoneromooo-monero1-14/+7
It can fail if it fails to parse extra, while still having filled the returned data with partial contents
2018-01-02Merge pull request #2962Riccardo Spagni1-0/+1
14c29814 wallet2: fix use of uninitialized data (moneromooo-monero)
2018-01-02Merge pull request #2960Riccardo Spagni1-0/+155
5cbcf0aa wallet: support for multisig seeds (moneromooo-monero)
2017-12-29wallet2 bugfix: initialize subaddress table when generating from keysstoffu1-0/+1
2017-12-28wallet2: std::unordered_set ctor is sometimes explicitmoneromooo-monero1-2/+2
2017-12-28Merge pull request #2941Riccardo Spagni1-8/+18
d0d38dc8 wallet2: print tx size in bytes and kB (moneromooo-monero)
2017-12-28sweep_below: do not prematurely exclude subaddresses setstoffu1-18/+29
2017-12-25Merge pull request #2895Riccardo Spagni1-40/+57
5ad312a1 wallet2: switch to chacha20 instead of chacha8 (moneromooo-monero) 1e5491e9 Add a chacha20 variant to go with chacha8 (moneromooo-monero)
2017-12-25Merge pull request #2938Riccardo Spagni1-1/+13
aaae94f0 wallet2: reinstate the single preferred output selection (moneromooo-monero)
2017-12-25wallet2: switch to chacha20 instead of chacha8moneromooo-monero1-19/+36
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-25Add a chacha20 variant to go with chacha8moneromooo-monero1-21/+21
2017-12-25Merge pull request #2931Riccardo Spagni1-1/+5
04349492 wallet2: error out in get_seed if the language is invalid (moneromooo-monero)
2017-12-25Merge pull request #2926Riccardo Spagni1-0/+40
6b5bd129 Account tagging (stoffu)
2017-12-25Merge pull request #2920Riccardo Spagni1-9/+29
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-25Merge pull request #2891Riccardo Spagni1-8/+8
3f24e901 wallet2: don't write a .new file when not needed (moneromooo-monero)
2017-12-25Merge pull request #2888Riccardo Spagni1-1/+1
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-24wallet2: guard against the dameon sending blocks before last checkpointmoneromooo-monero1-0/+5
2017-12-22factor STL container serializationmoneromooo-monero1-0/+1
2017-12-21wallet2: fix failure to create tx if inputs are not enough for feemoneromooo-monero1-0/+12
2017-12-20wallet2: fix m_key_image_{partial,known} in_light_wallet codemoneromooo-monero1-1/+2
2017-12-20wallet: support for multisig seedsmoneromooo-monero1-0/+155
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-19wallet2: fix use of uninitialized datamoneromooo-monero1-0/+1
2017-12-18use const refs in for loops for non tiny typesmoneromooo-monero1-1/+1
2017-12-18check accessing an element past the end of a containermoneromooo-monero1-1/+13
2017-12-18check return value for generate_key_derivation and derive_public_keymoneromooo-monero1-7/+14
2017-12-18add empty container sanity checks when using front() and back()moneromooo-monero1-0/+1
2017-12-18Account taggingstoffu1-0/+40
2017-12-17change the N-1/N multisig second message signer for authmoneromooo-monero1-10/+9
2017-12-17wallet: factor multisig info parsingmoneromooo-monero1-0/+54
2017-12-17wallet: use raw encrypted data in multisig import/export RPCmoneromooo-monero1-3/+58
2017-12-17wallet: add multisig sign/submit RPCmoneromooo-monero1-26/+36
2017-12-17Match surae's recommendation to derive multisig keysmoneromooo-monero1-15/+16
2017-12-17wallet2: fix slow multisig unit tests with subaddress patchmoneromooo-monero1-3/+44
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-17make multisig work with subaddressesmoneromooo-monero1-29/+13
Thanks to kenshi84 for help getting this work
2017-12-17wallet: guard against partly initialized multisig walletmoneromooo-monero1-1/+3
2017-12-17add multisig core test and factor multisig building blocksmoneromooo-monero1-83/+37
2017-12-17N-1/N multisigmoneromooo-monero1-77/+490
2017-12-17multisig address generation RPCmoneromooo-monero1-5/+21
2017-12-17gen_multisig: generates multisig wallets if participants trust each othermoneromooo-monero1-2/+0
2017-12-17wallet2: allow empty wallet filename to avoid saving datamoneromooo-monero1-29/+57
Useful to speed tests up and avoid unnecessary leftover files
2017-12-17Add N/N multisig tx generation and signingmoneromooo-monero1-60/+515
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-17wallet: add multisig key generationmoneromooo-monero1-4/+159
Scheme by luigi1111
2017-12-17Merge pull request #2857Riccardo Spagni1-5/+5
7193b89f Scrub keys from memory just before scope end. (moneromooo-monero)
2017-12-16move includes around to lessen overall loadmoneromooo-monero1-2/+5
2017-12-16Scrub keys from memory just before scope end.moneromooo-monero1-5/+5
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-16Merge pull request #2885Riccardo Spagni1-1/+6
a1e3670b catch wallet decrypt false positive (Riccardo Spagni)
2017-12-16Merge pull request #2860Riccardo Spagni1-16/+16
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-16wallet2: print tx size in bytes and kBmoneromooo-monero1-8/+18
Helpful now that tx sizes are smaller
2017-12-16wallet2: reinstate the single preferred output selectionmoneromooo-monero1-1/+13
Removing it nullified the min-outputs-{count,value} system, and will not increase the number of attempted transactions in the general case.
2017-12-15wallet2: error out in get_seed if the language is invalidmoneromooo-monero1-1/+5
2017-12-08add bulletproofs from v7 on testnetmoneromooo-monero1-7/+10
2017-12-08integrate bulletproofs into moneromoneromooo-monero1-12/+25
2017-12-07wallet2: don't write a .new file when not neededmoneromooo-monero1-8/+8
2017-12-06wallet2: detect spends in txes without a valid public tx keymoneromooo-monero1-1/+1
2017-12-04catch wallet decrypt false positiveRiccardo Spagni1-1/+6
2017-12-02Merge pull request #2833Riccardo Spagni1-20/+33
b0426d4c Fixes #759 Add sanity check on restore height (Cifrado)
2017-12-02Merge pull request #2850Riccardo Spagni1-1/+1
d875a9ff wallet2: detect multiple outputs from a tx to different subaddresses (moneromooo-monero)
2017-12-02Merge pull request #2828Riccardo Spagni1-2/+11
6cbe7bcd wallet2: check generate_key_derivation return value (moneromooo-monero)
2017-11-27new wipeable_string class to replace std::string passphrasesmoneromooo-monero1-16/+16
2017-11-25Merge pull request #2824Riccardo Spagni1-1/+0
51895fd7 split wallet and wallet_api (moneromooo-monero)
2017-11-25Merge pull request #2823Riccardo Spagni1-6/+4
0d149f70 Add out-of-bound exceptions and handle them in RPC (Michał Sałaban)
2017-11-25Merge pull request #2806Riccardo Spagni1-1/+3
da706b61 Fix false GCC warning '‘*((void*)& subaddr_account +4)’ may be used unitialized' (binaryFate)
2017-11-25Merge pull request #2800Riccardo Spagni1-102/+94
0b726be7 wallet2: minimize the number of construct_tx calls (moneromooo-monero) 9d505d26 wallet2: cleanup some debug logs (moneromooo-monero)
2017-11-25Merge pull request #2797Riccardo Spagni1-10/+14
7e387fb1 wallet2: only add a dummy 0 output if there's one output otherwise (moneromooo-monero)
2017-11-25Merge pull request #2368Riccardo Spagni1-0/+230
b0b7e0f0 Spend proof without txkey (stoffu)
2017-11-21wallet2: detect multiple outputs from a tx to different subaddressesmoneromooo-monero1-1/+1
2017-11-21Spend proof without txkeystoffu1-0/+230
2017-11-21fix for tx proof: use exception instead of error_str when signature gen failedstoffu1-12/+3
2017-11-20Merge pull request #2768Riccardo Spagni1-0/+2
ef941855 Wallet RPC: Add prompt-for-password flag (Tim L)
2017-11-18Tx proof (revised):stoffu1-0/+349
- refactoring: proof generation/checking code was moved from simplewallet.cpp to wallet2.cpp - allow an arbitrary message to be signed together with txid - introduce two types (outbound & inbound) of tx proofs; with the same syntax, inbound is selected when <address> belongs to this wallet, outbound otherwise. see GitHub thread for more discussion - wallet RPC: added get_tx_key, check_tx_key, get_tx_proof, check_tx_proof - wallet API: moved WalletManagerImpl::checkPayment to Wallet::checkTxKey, added Wallet::getTxProof/checkTxProof - get_tx_key/check_tx_key: handle additional tx keys by concatenating them into a single string
2017-11-17Fixes #759 Add sanity check on restore heightCifrado1-20/+33
2017-11-16split wallet and wallet_apimoneromooo-monero1-1/+0
This speeds up building a lot when wallet2.h (or something it includes) changes, since all the API includes wallet2.h
2017-11-16wallet2: check generate_key_derivation return valuemoneromooo-monero1-2/+11
2017-11-15Wallet RPC: Add prompt-for-password flagTim L1-0/+2
2017-11-15wallet2: minimize the number of construct_tx callsmoneromooo-monero1-95/+90
2017-11-15wallet2: cleanup some debug logsmoneromooo-monero1-7/+4
2017-11-15Add out-of-bound exceptions and handle them in RPCMichał Sałaban1-6/+4
2017-11-15Merge pull request #2773Riccardo Spagni1-13/+12
ffe5b857 Correct totals computation (Michał Sałaban)
2017-11-15Merge pull request #2772Riccardo Spagni1-1/+1
5d92c7cc wallet2: typo fix in error message (moneromooo-monero)
2017-11-15Merge pull request #2634Riccardo Spagni1-0/+21
b738f4b5 wallet: add sweep_single command (stoffu)
2017-11-15Merge pull request #2628Riccardo Spagni1-42/+19
7cb303a4 wallet2: simplify incoming tx processing code (moneromooo-monero)
2017-11-15wallet: add sweep_single commandstoffu1-0/+21
2017-11-14More missed readline dependencies thru scoped_message_writerHoward Chu1-3/+1
2017-11-14Fix 437421ce42f1deaa7ec3f28c0c17aff519f1230dHoward Chu1-1/+1
Missing an error argument for an exception
2017-11-14Merge pull request #2739Riccardo Spagni1-10/+17
99f398a2 wallet2: avoid growing the short history when refreshing in a loop (moneromooo-monero)
2017-11-14Merge pull request #2736Riccardo Spagni1-103/+52
0d9c0db9 Do not build against epee_readline if it was not built (Howard Chu) 178014c9 split off readline code into epee_readline (moneromooo-monero) a9e14a19 link against readline only for monerod and wallet-wallet-{rpc,cli} (moneromooo-monero) 437421ce wallet: move some scoped_message_writer calls from the libs (moneromooo-monero) e89994e9 wallet: rejig to avoid prompting in wallet2 (moneromooo-monero) ec5135e5 move input_line from command_line to simplewallet (moneromooo-monero) 082db75f move cryptonote command line options to cryptonote_core (moneromooo-monero)
2017-11-14Merge pull request #2629Riccardo Spagni1-0/+2
383ff4f6 remove "using namespace std" from headers (moneromooo-monero)
2017-11-14wallet2: avoid growing the short history when refreshing in a loopmoneromooo-monero1-10/+17
2017-11-14wallet: move some scoped_message_writer calls from the libsmoneromooo-monero1-75/+34
2017-11-14wallet: rejig to avoid prompting in wallet2moneromooo-monero1-28/+18
wallet2 is a library, and should not prompt for stdin. Instead, pass a function so simplewallet can prompt on stdin, and a GUI might display a window, etc.
2017-11-14remove "using namespace std" from headersmoneromooo-monero1-0/+2
It's nasty, and actually breaks on Solaris, where if.h fails to build due to: struct map *if_memmap;
2017-11-14Merge pull request #2727Riccardo Spagni1-1/+14
9d6c6c5d wallet2: do not bother downloading block hashes below last checkpoint (moneromooo-monero)
2017-11-14wallet2: simplify incoming tx processing codemoneromooo-monero1-42/+19
2017-11-14Merge pull request #2624Riccardo Spagni1-0/+13
2677ade5 simplewallet: forbid 0 ring size (moneromooo-monero) da8b60cb simplewallet: reject attempts to use too low mixin early (moneromooo-monero)
2017-11-14Merge pull request #2697Riccardo Spagni1-10/+11
d269bff2 wallet2: use a vector, not a list, for selected_transfers (moneromooo-monero)
2017-11-14simplewallet: reject attempts to use too low mixin earlymoneromooo-monero1-0/+13
This yields a clear error message rather then some possibly confusing more technical errors down the line
2017-11-14Merge pull request #2661Riccardo Spagni1-5/+21
ac4018a7 wallet2: workaround for lightwallet before supporting subaddress (followup #2656) (kenshi84)
2017-11-14Merge pull request #2633Riccardo Spagni1-2/+11
ad96c478 wallet-cli: added --generate-from-spend-key option (stoffu)
2017-11-14Merge pull request #2509Riccardo Spagni1-23/+48
ccf53a56 track double spending in the txpool (moneromooo-monero)
2017-11-14Fix false GCC warning '‘*((void*)& subaddr_account +4)’ may be used ↵binaryFate1-1/+3
unitialized'
2017-11-14wallet-cli: added --generate-from-spend-key optionstoffu1-2/+11
2017-11-13wallet2: use a vector, not a list, for selected_transfersmoneromooo-monero1-10/+11
Friendlier on memory/speed, we know in advance the max amount of items, which are small and constant size, and there's a lot of list walking involved.
2017-11-13wallet2: only add a dummy 0 output if there's one output otherwisemoneromooo-monero1-10/+14
2017-11-08Correct totals computationMichał Sałaban1-13/+12
2017-11-07wallet2: typo fix in error messagemoneromooo-monero1-1/+1
2017-11-06wallet2 bugfix: supply missing subaddr_account arg to balance() and unlocked ↵stoffu1-4/+4
balance()
2017-11-06track double spending in the txpoolmoneromooo-monero1-23/+48
Transactions in the txpool are marked when another transaction is seen double spending one or more of its inputs. This is then exposed wherever appropriate. Note that being marked with this "double spend seen" flag does NOT mean this transaction IS a double spend and will never be mined: it just means that the network has seen at least another transaction spending at least one of the same inputs, so care should be taken to wait for a few confirmations before acting upon that transaction (ie, mostly of use for merchants wanting to accept unconfirmed transactions).
2017-11-06Merge pull request #2605Riccardo Spagni1-0/+23
b370ef54 Wallet: Descriptions through new commands 'set_description', 'get_description' (rbrunner7)
2017-11-06Merge pull request #2546Riccardo Spagni1-2/+11
b2d416f2 Distinguish "not enough money" and "not enough unlocked money" (binaryFate)
2017-11-01Merge pull request #2703Riccardo Spagni1-9/+9
d0463312 fix libwallet api test after api change (Jaquee) a46c1eed Wallet2: Don't throw when subaddress label doesn't exist (Jaquee) 086b7db2 Wallet API: default values for account and subaddr index (Jaquee)
2017-10-31Merge pull request #2718Riccardo Spagni1-2/+2
626e8078 wallet2: fix show_transfers missing multiple incoming outputs (moneromooo-monero)
2017-10-31wallet2: do not bother downloading block hashes below last checkpointmoneromooo-monero1-1/+14