aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
Commit message (Collapse)AuthorAgeFilesLines
* chacha: call prehashed version explicitly as generate_chacha_key_prehashedstoffu2018-03-144-16/+34
| | | | | | 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
* crypto: revert odd namespace changes made in #3303stoffu2018-03-142-10/+1
|
* device: untangle cyclic depenencystoffu2018-03-143-89/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* device: made function prototypes consistent with pre-#3303 codebasestoffu2018-03-141-6/+2
|
* slow-hash: fix uint64 type typomoneromooo-monero2018-03-071-1/+1
|
* tweaks to the monerov1 cryptonight algorithmLee Clagett2018-03-051-16/+52
|
* slow-hash: optimized versionSChernykh2018-03-051-4/+4
|
* Monero Cryptonight variants, and add one for v7moneromooo-monero2018-03-054-12/+53
| | | | | This is the first variant of many, with the intent to improve Monero's resistance to ASICs and encourage mining decentralization.
* Correct spelling mistakes.Edward Betts2018-03-051-1/+1
|
* Code modifications to integrate Ledger HW device into monero-wallet-cli.cslashm2018-03-047-6/+115
| | | | | | | | | | | | | | | | | | | 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.
* crypto: add missing include (WIN32)iDunk54002018-02-161-0/+1
|
* Merge pull request #3226Riccardo Spagni2018-02-161-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e4646379 keccak: fix mdlen bounds sanity checking (moneromooo-monero) 2e3e90ac pass large parameters by const ref, not value (moneromooo-monero) 61defd89 blockchain: sanity check number of precomputed hash of hash blocks (moneromooo-monero) 9af6b2d1 ringct: fix infinite loop in unused h2b function (moneromooo-monero) 8cea8d0c simplewallet: double check a new multisig wallet is multisig (moneromooo-monero) 9b98a6ac threadpool: catch exceptions in dtor, to avoid terminate (moneromooo-monero) 24803ed9 blockchain_export: fix buffer overflow in exporter (moneromooo-monero) f3f7da62 perf_timer: rewrite to make it clear there is no division by zero (moneromooo-monero) c6ea3df0 performance_tests: remove add_arg call stray extra param (moneromooo-monero) fa6b4566 fuzz_tests: fix an uninitialized var in setup (moneromooo-monero) 03887f11 keccak: fix sanity check bounds test (moneromooo-monero) ad11db91 blockchain_db: initialize m_open in base class ctor (moneromooo-monero) bece67f9 miner: restore std::cout precision after modification (moneromooo-monero) 1aabd14c db_lmdb: check hard fork info drop succeeded (moneromooo-monero)
| * keccak: fix mdlen bounds sanity checkingmoneromooo-monero2018-02-071-1/+2
| | | | | | | | found by h908714124
| * keccak: fix sanity check bounds testmoneromooo-monero2018-02-021-1/+1
| | | | | | | | Nothing calls this with those inputs
* | Merge pull request #3187Riccardo Spagni2018-02-163-7/+33
|\ \ | | | | | | | | | 851bd057 call _exit instead of abort in release mode (moneromooo-monero)
| * | call _exit instead of abort in release modemoneromooo-monero2018-02-013-7/+33
| | | | | | | | | | | | | | | Avoids cores being created, as they're nowadays often piped to some call home system
* | | Merge pull request #3180Riccardo Spagni2018-02-163-5/+15
|\ \ \ | |_|/ |/| | | | | | | | 1dfed567 Fixed #if instead of #ifdef (Matt Little) 7c442453 Support building cncrypto lib with msvc (Matt Little)
| * | Support building cncrypto lib with msvcMatt Little2018-01-253-5/+15
| |/
* | Merge pull request #3119Riccardo Spagni2018-01-273-0/+157
|\ \ | | | | | | | | | | | | c4f43779 crypto: add a ge_p3_identity constant (moneromooo-monero) 13b4c90e crypto: add scalar mult functions returning ge_p3 instead of ge_p2 (moneromooo-monero)
| * | crypto: add a ge_p3_identity constantmoneromooo-monero2018-01-152-0/+2
| | |
| * | crypto: add scalar mult functions returning ge_p3 instead of ge_p2moneromooo-monero2018-01-152-0/+155
| |/ | | | | | | | | | | | | | | | | ge_scalarmult_p3 ge_double_scalarmult_precomp_vartime2_p3 ge_double_scalarmult_base_vartime_p3 This makes it possible to reuse the result without having to convert back to unsigned char[32] and back to ge types.
* / Update 2018 copyrightxmr-eric2018-01-2631-31/+31
|/
* Merge pull request #2988Riccardo Spagni2018-01-101-1/+1
|\ | | | | | | 8a4610c3 blake256: fix wrong hash when computed in parts (moneromooo-monero)
| * blake256: fix wrong hash when computed in partsmoneromooo-monero2017-12-221-1/+1
| | | | | | | | This does not happen when used by the monero code
* | fix some link errors in debug mode for macosstoffu2018-01-101-0/+1
| |
* | move memwipe to epee to avoid common<->crypto circular dependenciesmoneromooo-monero2018-01-102-2/+2
| |
* | Add a chacha20 variant to go with chacha8moneromooo-monero2017-12-253-17/+32
|/
* Scrub keys from memory just before scope end.moneromooo-monero2017-12-162-17/+10
| | | | | | | | | | | | 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.
* Merge pull request #2860Riccardo Spagni2017-12-161-2/+3
|\ | | | | | | | | | | | | 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)
| * use memwipe in a few relevant placesmoneromooo-monero2017-11-271-2/+3
| |
* | add a version of ge_double_scalarmult_precomp_vartime with A precompmoneromooo-monero2017-12-072-3/+9
| |
* | sc_mul and sc_muladdluigi11112017-12-072-0/+654
|/
* Merge pull request #2771Riccardo Spagni2017-11-152-4/+16
|\ | | | | | | | | e3e838d0 kaccak: remove unused return value (moneromooo-monero) 4877aca2 keccak: some paranoid "can't happen" checks (moneromooo-monero)
| * kaccak: remove unused return valuemoneromooo-monero2017-11-112-4/+2
| |
| * keccak: some paranoid "can't happen" checksmoneromooo-monero2017-11-071-0/+14
| |
* | make this build on SunOS/SolarisPavel Maryanov2017-11-141-0/+5
|/
* Merge pull request #2583Riccardo Spagni2017-10-151-2/+2
|\ | | | | | | 27fdaaa4 Fix building with -DARCH=default -DNO_AES=ON (moneromooo-monero)
| * Fix building with -DARCH=default -DNO_AES=ONmoneromooo-monero2017-10-061-2/+2
| |
* | Subaddresseskenshi842017-10-072-41/+111
|/
* move checkpoints in a separate librarymoneromooo-monero2017-09-252-0/+35
|
* crypto: use malloc instead of allocamoneromooo-monero2017-08-231-10/+9
|
* crypto: moved boost::lock_guard into a smaller scopestoffu2017-06-221-4/+5
|
* Signature proving payment to destination by only revealing key derivation, ↵stoffu2017-06-222-0/+139
| | | | not the actual tx secret key
* Fix #1991 asm multiply againHoward Chu2017-06-081-16/+13
| | | | | Tweak temp variables and constraints. Was working before if not inlined but newer gcc tends to inline it.
* changed crypto to cncrypto so it generated libcncryptoGentian2017-05-231-3/+3
| | | | fix a cmakelist
* Clean up ARMv8-a aes_expand_key()hyc2017-04-121-24/+16
| | | | The inline asm was lying about its parameters
* IOS CMAKE build settingsJaquee2017-04-031-1/+1
|
* Silence warning about possibly uninitialized pointerGuillaume LE VAILLANT2017-03-251-1/+1
|
* Specify "524,288" iterations instead of "500,000"darentuzi2017-03-141-5/+5
| | | CryptoNight does exactly 524,288 iterations over the scratchpad as defined in CNS008, saying 500,000 could be confusing. I know its meant to give a rough idea (around 500k) to the reader but if you are reading the code, might as well know the exact number.
* update copyright year, fix occasional lack of newline at line endRiccardo Spagni2017-02-2131-31/+31
|