aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_tx_utils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix: check hwdev.generate_output_ephemeral_keys resultSChernykh2026-06-041-1/+2
| | | | If it fails, out_eph_public_key and view_tag remain uninitialized.
* cryptonote_core: add change address sanity checkjeffro2562026-04-271-0/+44
| | | | | | Prevents silly mistakes where wrong change address is passed Release versions uses boost::optional instead of std::optional
* build: fix build with Boost 1.85 and remove instances of viewkey logging ↵jeffro2562024-09-101-2/+2
| | | | | | | | | | | [RELEASE] 1. Use std::is_standard_layout and std::is_trivially_copyable instead of std::is_pod for KV byte-wise serialization, which fixes compile issue for Boost UUIDs 2. Removed reimplementation of std::hash for boost::uuids::uuid 3. Removed << operator overload for crypto::secret_key 4. Removed instances in code where private view key was dumped to the log in plaintext Release version of #9450, containing C++14 modified assertions
* Enforce Tx unlock_time is Zero by Relay Rule [RELEASE]jeffro2562024-04-291-6/+6
| | | | | | | | | | | | | | | | Related to https://github.com/monero-project/research-lab/issues/78 Added a relay rule that enforces the `unlock_time` field is equal to 0 for non-coinbase transactions. UIs changed: * Removed `locked_transfer` and `locked_sweep_all` commands from `monero-wallet-cli` APIs changed: * Removed `unlock_time` parameters from `wallet2` transfer methods * Wallet RPC transfer endpoints send error codes when requested unlock time is not 0 * Removed `unlock_time` parameters from `construct_tx*` cryptonote core functions @tobtoht: undo rebase changes tx.dsts -> tx_dsts
* Add a size limit for tx_extra in tx pooltevador2023-03-181-0/+2
|
* Refactored rx-slow-hash.cSChernykh2022-12-141-20/+6
| | | | | | | | | - Straight-forward call interface: `void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash)` - Consensus chain seed hash is now updated by calling `rx_set_main_seedhash` whenever a block is added/removed or a reorg happens - `rx_slow_hash` will compute correct hash no matter if `rx_set_main_seedhash` was called or not (the only difference is performance) - New environment variable `MONERO_RANDOMX_FULL_MEM` to force use the full dataset for PoW verification (faster block verification) - When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then) - When mining is running, PoW checks now also use dataset for faster verification
* multisig: fix critical vulnerabilities in signinganon2022-06-301-18/+9
|
* Add view tags to outputs to reduce wallet scanning timej-berman2022-04-181-14/+21
| | | | | | | | | | | | | Implements view tags as proposed by @UkoeHB in MRL issue https://github.com/monero-project/research-lab/issues/73 At tx construction, the sender adds a 1-byte view tag to each output. The view tag is derived from the sender-receiver shared secret. When scanning for outputs, the receiver can check the view tag for a match, in order to reduce scanning time. When the view tag does not match, the wallet avoids the more expensive EC operations when deriving the output public key using the shared secret.
* Copyright: Update to 2022mj-xmr2022-03-041-1/+1
|
* Merge pull request #7877luigi11112022-03-021-1/+0
|\ | | | | | | e08abaa multisig key exchange update and refactor (koe)
| * multisig key exchange update and refactorkoe2022-02-221-1/+0
| |
* | Add calcpow RPCHoward Chu2021-11-201-4/+9
|/ | | | Calculate PoW hash for a block candidate
* Warnings: unused var at cryptonote_tx_utils.cppmj-xmr2021-05-021-1/+3
|
* core: fix mining from a block that's not the current topmoneromooo-monero2020-08-271-6/+11
|
* Update copyright year to 2020SomaticFanatic2020-05-061-1/+1
| | | | Update copyright year to 2020
* Merge pull request #6436luigi11112020-05-011-1/+1
|\ | | | | | | 688a3e8 Add timelock verification on device (cslashm)
| * Add timelock verification on devicecslashm2020-04-081-1/+1
| |
* | remove empty statementsInterchained2020-02-171-1/+1
|/ | | | Cleaning up a little around the code base.
* cryptonote: untangle dependency from miner to blockchainmoneromooo-monero2019-10-311-1/+3
| | | | It causes link errors at least on mac
* Add hmac over encrypted value during transactioncslashm2019-10-031-15/+19
|
* RandomX integrationHoward Chu2019-09-251-1/+52
| | | | Support RandomX PoW algorithm
* Changed the use of boost:value_initialized for C++ list initializerJesus Ramirez2019-09-021-1/+1
|
* Replace std::random_shuffle with std::shuffleTom Smeding2019-08-151-1/+1
| | | | | | | | | | | | | According to [1], std::random_shuffle is deprecated in C++14 and removed in C++17. Since std::shuffle is available since C++11 as a replacement and monero already requires C++11, this is a good replacement. A cryptographically secure random number generator is used in all cases to prevent people from perhaps copying an insecure std::shuffle call over to a place where a secure one would be warranted. A form of defense-in-depth. [1]: https://en.cppreference.com/w/cpp/algorithm/random_shuffle
* Update 2019 copyrightbinaryFate2019-03-051-1/+1
|
* New scheme key destination contrfolcslashm2019-02-081-41/+4
| | | | Implies protocol version management.
* add a bulletproof version, new bulletproof type, and rct configmoneromooo-monero2019-01-221-7/+7
| | | | This makes it easier to modify the bulletproof format
* core: include a dummy encrypted payment id when no payment is usedmoneromooo-monero2019-01-181-6/+40
| | | | For better transaction uniformity, even though this wastes space.
* crptonote_core: do not error out sending unparsable extra fieldmoneromooo-monero2019-01-181-2/+2
| | | | extra is arbitrary, and the user may well want to send custom data
* a few minor (but easy) performance tweaksmoneromooo-monero2018-11-231-3/+3
| | | | Found by codacy.com
* Merge pull request #4308Riccardo Spagni2018-10-261-0/+6
|\ | | | | | | 9907ea06 cryptonote: sort tx_extra fields (moneromooo-monero)
| * cryptonote: sort tx_extra fieldsmoneromooo-monero2018-10-071-0/+6
| | | | | | | | | | | | | | This removes some small amount of fingerprinting entropy. There is no consensus rule to require this since this field is technically free form, and a transaction is free to have custom data in it.
* | build: fix gcc false positive 'stringop-overflow' warningxiphon2018-09-301-1/+1
| |
* | v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero2018-09-111-3/+3
| |
* | Bulletproof aggregated verification and testsmoneromooo-monero2018-09-111-2/+2
| | | | | | | | Also constrains bulletproofs to simple rct, for simplicity
* | bulletproofs: add multi output bulletproofs to rctmoneromooo-monero2018-09-111-6/+6
| |
* | Do memwipe for critical secret keys copied to rct::keystoffu2018-08-161-0/+3
|/
* Fix output shuffling for multisigstoffu2018-05-201-7/+9
|
* cryptonote_tx_util: make destinations properly shuffledstoffu2018-03-311-2/+3
|
* keypair::generate: always require hw::device to avoid possible mistakestoffu2018-03-141-1/+1
|
* device: untangle cyclic depenencystoffu2018-03-141-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Ledger HW Bug fixesCédric2018-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* Merge pull request #3338Riccardo Spagni2018-03-051-0/+2
|\ | | | | | | 51219457 core: fix sending to the source address with a short payment id (moneromooo-monero)
| * core: fix sending to the source address with a short payment idmoneromooo-monero2018-03-021-0/+2
| | | | | | | | | | It would fail to send, thinking it needs a destination address, since the destination matches the change address in this case.
* | Use `genesis_tx` parameter in `generate_genesis_block`. #3261Jean Pierre Dudey2018-03-051-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/cryptnote_config.h: The constant `config::testnet::GENESIS_TX` was changed to be the same as `config::GENESIS_TX` (the mainnet's transaction) because the mainnet's transaction was being used for both networks. * src/cryptonote_core/cryptonote_tx_utils.cpp: The `generate_genesis_block` function was ignoring the `genesis_tx` parameter, and instead it was using the `config::GENESIS_TX` constant. That's why the testnet genesis transaction was changed. Also five lines of unused code were removed. Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
* | Code modifications to integrate Ledger HW device into monero-wallet-cli.cslashm2018-03-041-16/+23
|/ | | | | | | | | | | | | | | | | | | 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.
* cryptonote_tx_utils: fixed logic bug in get_destination_view_key_pubstoffu2018-01-291-9/+13
|
* Update 2018 copyrightxmr-eric2018-01-261-1/+1
|
* check accessing an element past the end of a containermoneromooo-monero2017-12-181-0/+6
|
* make multisig work with subaddressesmoneromooo-monero2017-12-171-13/+4
| | | | Thanks to kenshi84 for help getting this work
* add multisig core test and factor multisig building blocksmoneromooo-monero2017-12-171-15/+1
|