summaryrefslogtreecommitdiff
path: root/src/crypto
Commit message (Collapse)AuthorAgeFilesLines
* keccak: guard against misaligned memory accesses on ARMmoneromooo-monero2019-07-041-3/+6
| | | | | The code generated is exactly the same as the direct access one on x86_64
* ensure no NULL is passed to memcpymoneromooo-monero2019-06-141-1/+2
| | | | | NULL is valid when size is 0, but memcpy uses nonnull attributes, so let's not poke the bear
* tree-hash: allocate variable memory on heap, not stackmoneromooo-monero2019-06-141-5/+7
| | | | | | Large amounts might run out of stack Reported by guidov
* crypto: replace rand<T>()%N idiom with unbiased rand_idx(N)stoffu2019-04-041-0/+27
|
* Fix build on FreeBSDNathan Dorfman2019-03-241-1/+1
|
* Merge pull request #5252Riccardo Spagni2019-03-211-27/+31
|\ | | | | | | 7ac33342 slow-hash: cache TLS references locally once at function start (moneromooo-monero)
| * slow-hash: cache TLS references locally once at function startmoneromooo-monero2019-03-071-27/+31
| |
* | Merge pull request #5251Riccardo Spagni2019-03-212-9/+24
|\ \ | | | | | | | | | | | | | | | 7632dede crypto: fix PaX issue on NetBSD with CNv4 JIT (moneromooo-monero) 89b1630e gtest: build fix for NetBSD (moneromooo-monero) fa43b547 tests: handle any cmake detected python interpreter (moneromooo-monero)
| * | crypto: fix PaX issue on NetBSD with CNv4 JITmoneromooo-monero2019-03-072-9/+24
| |/
* | Merge pull request #5250Riccardo Spagni2019-03-211-4/+4
|\ \ | | | | | | | | | a48e49aa aesb: avoid stomping on an existing define on NetBSD (moneromooo-monero)
| * | aesb: avoid stomping on an existing define on NetBSDmoneromooo-monero2019-03-071-4/+4
| |/
* | Merge pull request #5213Riccardo Spagni2019-03-211-1/+1
|\ \ | | | | | | | | | efb2bdd3 slow-hash: default to JIT on x86_64 (moneromooo-monero)
| * | slow-hash: default to JIT on x86_64moneromooo-monero2019-03-211-1/+1
| | |
* | | Merge pull request #5211Riccardo Spagni2019-03-213-0/+142
|\ \ \ | |/ / |/| | | | | | | | | | | c9b13fbb tests/trezor: HF9 and HF10 tests (Dusan Klinec) a1fd1d49 device/trezor: HF10 support added, wallet::API (Dusan Klinec) d74d26f2 crypto: hmac_keccak added (Dusan Klinec)
| * | crypto: hmac_keccak addedDusan Klinec2019-03-203-0/+142
| |/
* | Merge pull request #5192Riccardo Spagni2019-03-171-12/+2
|\ \ | | | | | | | | | | | | d0e07b3d performance_tests: fix NetBSD build (moneromooo-monero) 7d88d8f2 discontinue use of alloca (moneromooo-monero)
| * | discontinue use of allocamoneromooo-monero2019-02-251-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetBSD emits: warning: Warning: reference to the libc supplied alloca(3); this most likely will not work. Please use the compiler provided version of alloca(3), by supplying the appropriate compiler flags (e.g. not -std=c89). and man 3 alloca says: Normally, gcc(1) translates calls to alloca() with inlined code. This is not done when either the -ansi, -std=c89, -std=c99, or the -std=c11 option is given and the header <alloca.h> is not included. Otherwise, (without an -ansi or -std=c* option) the glibc version of <stdlib.h> includes <alloca.h> and that contains the lines: #ifdef __GNUC__ #define alloca(size) __builtin_alloca (size) #endif It looks like alloca is a bad idea in modern C/C++, so we use VLAs for C and std::vector for C++.
* | | Update 2019 copyrightbinaryFate2019-03-0531-31/+31
| |/ |/|
* | CryptonightR: define out i386/x86_64 specific code on other archsmoneromooo-monero2019-03-052-0/+8
| |
* | slow-hash: fix build on armmoneromooo-monero2019-03-054-27/+42
| |
* | tests: add a CNv4 JIT testmoneromooo-monero2019-03-041-7/+8
| |
* | crypto: plug CNv4 JIT into cn_slow_hashmoneromooo-monero2019-03-042-3/+100
| | | | | | | | Enabled by setting the MONERO_USE_CNV4_JIT env var to 1
* | crypto: clear cache after generating random programmoneromooo-monero2019-03-041-0/+3
| |
* | CNv4 JIT compiler for x86-64 and testsSChernykh2019-03-044-0/+2746
| | | | | | | | | | | | | | | | | | Minimalistic JIT code generator for random math sequence in CryptonightR. Usage: - Allocate writable and executable memory - Call v4_generate_JIT_code with "buf" pointed to memory allocated on the previous step - Call the generated code instead of "v4_random_math(code, r)", omit the "code" parameter
* | Fixed path to int-util.hSChernykh2019-02-141-1/+1
| |
* | Adding cnv4-2 tweaksSChernykh2019-02-142-39/+79
| | | | | | | | Co-Authored-By: Lee Clagett <vtnerd@users.noreply.github.com>
* | Cryptonight variant 4 aka CryptonightRSChernykh2019-02-145-16/+507
|/ | | | It introduces random integer math into the main loop.
* move int-util.h to epeemoneromooo-monero2018-12-047-7/+7
|
* Merge pull request #4854Riccardo Spagni2018-12-042-4/+0
|\ | | | | | | bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
| * Removed a lot of unnecessary includesMartijn Otto2018-11-152-4/+0
| |
* | slow-hash: some more big endian fixesxiphon2018-11-161-6/+6
| |
* | slow-hash: fix for big endianmoneromooo-monero2018-11-161-20/+21
| |
* | Merge pull request #4757Riccardo Spagni2018-11-141-0/+7
|\ \ | | | | | | | | | db24a2e5 hash: fix hash_permutation on big endian (moneromooo-monero)
| * | hash: fix hash_permutation on big endianmoneromooo-monero2018-10-291-0/+7
| | |
* | | Merge pull request #4755Riccardo Spagni2018-11-141-2/+3
|\ \ \ | |_|/ |/| | | | | 42d8d508 crypto: fix AES encryption on big endian (xiphon)
| * | crypto: fix AES encryption on big endianxiphon2018-10-311-2/+3
| |/
* | Merge pull request #4711Riccardo Spagni2018-11-061-5/+2
|\ \ | | | | | | | | | c4fbfd78 Small function declaration cleanup in slow-hash.c (Pol Mauri)
| * | Small function declaration cleanup in slow-hash.cPol Mauri2018-10-231-5/+2
| |/ | | | | | | | | | | | | | | - These functions are declared twice in slow-hash.c. Remove one of the copies. - The declarations have the wrong return type, should be void, not int. Function definitions here: https://github.com/monero-project/monero/blob/1e74586ee99e4bd89626d2eb4d23883cd91f0f81/src/crypto/aesb.c#L151-L180 Test plan: make release-test
* | crypto: fixed groestl on big-endian platformsxiphon2018-10-252-47/+91
| |
* | crypto: fixed incremental keccak API on big-endian platformsxiphon2018-10-221-2/+3
|/
* Merge pull request #4449Riccardo Spagni2018-09-291-2/+41
| | | | 17142ec9 malloc scratchpad for all supported android archs (m2049r)
* Merge pull request #4404Riccardo Spagni2018-09-221-0/+20
|\ | | | | | | f3cd51a1 cryptonote tweak v2.2 (Lee Clagett)
| * cryptonote tweak v2.2Lee Clagett2018-09-221-0/+20
| |
* | Merge pull request #4395Riccardo Spagni2018-09-211-3/+8
|\ \ | | | | | | | | | 9bf0105e Fixed Keccak implementation on big-endian platforms (Alexandro Sanchez)
| * | Fixed Keccak implementation on big-endian platformsAlexandro Sanchez2018-09-171-3/+8
| |/
* | Merge pull request #4357Riccardo Spagni2018-09-181-1401/+3
|\ \ | |/ |/| | | 8501b8df crypto_ops_builder: link to EdDSA/Ed25519 draft RFC (moneromooo-monero)
| * crypto_ops_builder: link to EdDSA/Ed25519 draft RFCmoneromooo-monero2018-09-091-1401/+3
| | | | | | | | instead of including the text, as it's not fully free to redistribute
* | Merge pull request #4326Riccardo Spagni2018-09-143-8/+10
|\ \ | | | | | | | | | bcda7adc NetBSD support (thomasvaughan)
| * | NetBSD supportthomasvaughan2018-09-113-8/+10
| | |
* | | Merge pull request #4219Riccardo Spagni2018-09-114-4/+35
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9137ad2c blockchain: add a testnet v9 a day after v8 (moneromooo-monero) ac4f71c2 wallet2: bump testnet rollback to account for coming reorg (moneromooo-monero) 8f418a6d bulletproofs: #include <openssl/bn.h> (moneromooo-monero) 2bf63650 bulletproofs: speed up the latest changes a bit (moneromooo-monero) 044dff5a bulletproofs: scale points by 8 to ensure subgroup validity (moneromooo-monero) c83012c4 bulletproofs: match aggregated verification to sarang's latest prototype (moneromooo-monero) ce0c7432 performance_tests: add padded bulletproof construction (moneromooo-monero) 1224e53b core_tests: add a test for 4-aggregated BP verification (moneromooo-monero) 0e6ed559 fuzz_tests: add a bulletproof fuzz test (moneromooo-monero) 463434d1 more comprehensive test for ge_p3 comparison to identity/point at infinity (moneromooo-monero) d0a0565f unit_tests: add a few more multiexp unit tests (moneromooo-monero) 6526d87f core_tests: add a test for a tx with empty bulletproof (moneromooo-monero) a129bbd9 multiexp: fix maxscalar off by one (moneromooo-monero) 7ed496cc ringct: error out when hashToPoint* returns the point at infinity (moneromooo-monero) d1591853 cryptonote_basic: check output type before using it (moneromooo-monero) 61632dc1 ringct: prevent a potential very large allocation (moneromooo-monero) a4317e61 crypto: some paranoid checks in generate_signature/check_signature (moneromooo-monero) 7434df1c crypto: never return zero in random32_unbiased (moneromooo-monero) 0825e974 multiexp: fix wrong Bos-Coster result for 1 non trivial input (moneromooo-monero) a1359ad4 Check inputs to addKeys are in range (moneromooo-monero) fe0fa3b9 bulletproofs: reject x, y, z, or w[i] being zero (moneromooo-monero) 5ffb2ff9 v8: per byte fee, pad bulletproofs, fixed 11 ring size (moneromooo-monero) 869b3bf8 bulletproofs: a few fixes from the Kudelski review (moneromooo-monero) c4291762 bulletproofs: reject points not in the main subgroup (moneromooo-monero) 15697177 bulletproofs: speed up a few multiplies using existing Hi cache (moneromooo-monero) 0b05a0fa Add Pippenger cache and limit Straus cache size (moneromooo-monero) 51eb3bdc add pippenger unit tests (moneromooo-monero) b17b8db3 performance_tests: add stats and loop count multiplier options (moneromooo-monero) 7314d919 perf_timer: split timer class into a base one and a logging one (moneromooo-monero) d126a02b performance_tests: add aggregated bulletproof tx verification (moneromooo-monero) 263431c4 Pippenger multiexp (moneromooo-monero) 1ed0ed4d multiexp: cut down on memory allocations (moneromooo-monero) 1b867e7f precalc the ge_p3 representation of H (moneromooo-monero) ef56529f performance_tests: document the tested bulletproof layouts (moneromooo-monero) 30111780 unit_tests: a couple more bulletproof unit tests for gamma (moneromooo-monero) c444b1b2 require canonical multi output bulletproof layout (moneromooo-monero) 7e67c52f Add a define for the max number of bulletproof multi-outputs (moneromooo-monero) 2a8fcb42 Bulletproof aggregated verification and tests (moneromooo-monero) 126196b0 multiexp: some speedups (moneromooo-monero) 71d67bda aligned: aligned memory alloc/realloc/free (moneromooo-monero) cb9ecab1 performance_tests: add signature generation/verification (moneromooo-monero) bacf0a1e bulletproofs: add aggregated verification (moneromooo-monero) e895c3de make straus cached mode thread safe, and add tests for it (moneromooo-monero) 7f48bf05 multiexp: bos coster now works for just one point (moneromooo-monero) 9ce9f8ca bulletproofs: add multi output bulletproofs to rct (moneromooo-monero) f34e2e20 performance_tests: add tx checking tests with more than 2 outputs (moneromooo-monero) 0793184b performance_tests: add a --verbose flag, and default to terse (moneromooo-monero) 939bc223 add Straus multiexp (moneromooo-monero) 9ff6e6a0 ringct: add bos coster multiexp (moneromooo-monero) e9164bb3 bulletproofs: misc optimizations (moneromooo-monero) 112f32f0 performance_tests: add crypto ops (moneromooo-monero) f5d7b993 performance_tests: add bulletproofs (moneromooo-monero) 8f4ce989 performance_tests: add RingCT MLSAG gen/ver tests (moneromooo-monero) 1aa10c43 performance_tests: add (Borromean) range proofs (moneromooo-monero) aacfd6e3 bulletproofs: multi-output bulletproofs (moneromooo-monero) cb1cc757 performance_tests: don't override log level to 0 (moneromooo-monero)