Commit Graph

235 Commits

Author SHA1 Message Date
luigi1111
8f6f674753
Merge pull request #5609
1dc3b1a wallet: add --extra-entropy command line flag (moneromooo-monero)
2019-08-27 15:14:15 -05:00
moneromooo-monero
1dc3b1a516
wallet: add --extra-entropy command line flag
It lets the user add custom entropy to the PRNG.
It does this by hashing the new data and xoring the resulting
hash with the PRNG state.
2019-08-22 11:12:57 +00:00
luigi1111
0a42fddde4
Merge pull request #5807
4b1df4e Fix for biased signature nonce (SarangNoether)
2019-08-21 15:38:35 -05:00
luigi1111
8956e90c63
Merge pull request #5731
c393e82 CryptonightR_JIT: fix return value on error (selene-kovri)
2019-08-21 15:09:48 -05:00
Sarang Noether
4b1df4e50f Fix for biased signature nonce 2019-08-12 15:58:15 -04:00
luigi1111
bb37e434fc
Merge pull request #5624
6b41bd8 Delete more include string.h (wepeng)
2019-07-24 14:39:40 -05:00
luigi1111
e3de4aa68b
Merge pull request #5502
25a7cfd add a few checks where it seems appropriate (moneromooo-monero)
1a66a86 remove unused code (moneromooo-monero)
2019-07-24 13:57:06 -05:00
moneromooo-monero
c2238327d0
keccak: guard against misaligned memory accesses on ARM
The code generated is exactly the same as the direct access
one on x86_64
2019-07-04 22:13:16 +00:00
selene
c393e824d6 CryptonightR_JIT: fix return value on error
The value was positive rather than zero, but the caller only
checks for negative errors
2019-07-04 12:49:54 +01:00
moneromooo-monero
0564da5fdc
ensure no NULL is passed to memcpy
NULL is valid when size is 0, but memcpy uses nonnull attributes,
so let's not poke the bear
2019-06-14 08:47:29 +00:00
moneromooo-monero
a00cabd4f3
tree-hash: allocate variable memory on heap, not stack
Large amounts might run out of stack

Reported by guidov
2019-06-14 08:47:20 +00:00
Your Name
6b41bd8eb5 Delete more include string.h 2019-06-11 16:08:42 +08:00
moneromooo-monero
1a66a86f94
remove unused code 2019-04-29 20:52:40 +00:00
stoffu
a2195b9b7f
crypto: replace rand<T>()%N idiom with unbiased rand_idx(N) 2019-04-04 22:38:19 +09:00
Nathan Dorfman
9f49722c4d Fix build on FreeBSD 2019-03-24 01:12:06 -06:00
Riccardo Spagni
6c0c7d796d
Merge pull request #5252
7ac33342 slow-hash: cache TLS references locally once at function start (moneromooo-monero)
2019-03-21 14:48:24 +02:00
Riccardo Spagni
39107e18d5
Merge pull request #5251
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)
2019-03-21 14:47:43 +02:00
Riccardo Spagni
56feda84d3
Merge pull request #5250
a48e49aa aesb: avoid stomping on an existing define on NetBSD (moneromooo-monero)
2019-03-21 14:47:11 +02:00
Riccardo Spagni
f9b1c4f962
Merge pull request #5213
efb2bdd3 slow-hash: default to JIT on x86_64 (moneromooo-monero)
2019-03-21 14:44:26 +02:00
Riccardo Spagni
48e3a341f8
Merge pull request #5211
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)
2019-03-21 14:44:04 +02:00
moneromooo-monero
efb2bdd309
slow-hash: default to JIT on x86_64 2019-03-21 11:29:08 +00:00
Dusan Klinec
d74d26f2c9
crypto: hmac_keccak added 2019-03-20 21:11:01 +01:00
Riccardo Spagni
c3de019f56
Merge pull request #5192
d0e07b3d performance_tests: fix NetBSD build (moneromooo-monero)
7d88d8f2 discontinue use of alloca (moneromooo-monero)
2019-03-17 17:56:52 +02:00
moneromooo-monero
7ac3334217
slow-hash: cache TLS references locally once at function start 2019-03-07 18:11:19 +00:00
moneromooo-monero
7632dede7b
crypto: fix PaX issue on NetBSD with CNv4 JIT 2019-03-07 16:46:02 +00:00
moneromooo-monero
a48e49aa36
aesb: avoid stomping on an existing define on NetBSD 2019-03-07 16:08:00 +00:00
binaryFate
1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero
108c625b3f
CryptonightR: define out i386/x86_64 specific code on other archs 2019-03-05 10:24:24 +00:00
moneromooo-monero
1b8757dddc
slow-hash: fix build on arm 2019-03-05 10:24:24 +00:00
moneromooo-monero
0de14396b9
tests: add a CNv4 JIT test 2019-03-04 11:56:55 +00:00
moneromooo-monero
24d281c324
crypto: plug CNv4 JIT into cn_slow_hash
Enabled by setting the MONERO_USE_CNV4_JIT env var to 1
2019-03-04 11:56:55 +00:00
moneromooo-monero
78ab59ea44
crypto: clear cache after generating random program 2019-03-04 11:56:46 +00:00
SChernykh
fff23bf7c6
CNv4 JIT compiler for x86-64 and tests
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
2019-03-04 11:56:29 +00:00
moneromooo-monero
7d88d8f27c
discontinue use of alloca
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++.
2019-02-25 11:11:07 +00:00
SChernykh
f1fb06b137 Fixed path to int-util.h 2019-02-14 20:46:56 +01:00
SChernykh
9da0892b10 Adding cnv4-2 tweaks
Co-Authored-By: Lee Clagett <vtnerd@users.noreply.github.com>
2019-02-14 20:42:50 +01:00
SChernykh
f51397b306 Cryptonight variant 4 aka CryptonightR
It introduces random integer math into the main loop.
2019-02-14 11:29:54 +01:00
moneromooo-monero
ec1a62b50d
move int-util.h to epee 2018-12-04 15:14:29 +00:00
Riccardo Spagni
c00ac446fd
Merge pull request #4854
bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
2018-12-04 17:08:42 +02:00
xiphon
2a48c2a286
slow-hash: some more big endian fixes 2018-11-16 09:58:41 +00:00
moneromooo-monero
b39fdf8ebe
slow-hash: fix for big endian 2018-11-16 09:58:38 +00:00
Martijn Otto
bd98e99c80
Removed a lot of unnecessary includes 2018-11-15 17:29:34 +01:00
Riccardo Spagni
92c5a892b5
Merge pull request #4757
db24a2e5 hash: fix hash_permutation on big endian (moneromooo-monero)
2018-11-14 21:34:09 +02:00
Riccardo Spagni
8ba3f89b44
Merge pull request #4755
42d8d508 crypto: fix AES encryption on big endian (xiphon)
2018-11-14 21:33:38 +02:00
Riccardo Spagni
267b5d8807
Merge pull request #4711
c4fbfd78 Small function declaration cleanup in slow-hash.c (Pol Mauri)
2018-11-06 14:51:23 +02:00
xiphon
42d8d5085e crypto: fix AES encryption on big endian 2018-10-31 03:13:55 +00:00
moneromooo-monero
db24a2e509
hash: fix hash_permutation on big endian 2018-10-29 22:26:44 +00:00
xiphon
ba0faae789 crypto: fixed groestl on big-endian platforms 2018-10-25 02:06:23 +00:00
Pol Mauri
c4fbfd786a Small function declaration cleanup in slow-hash.c
- 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: 1e74586ee9/src/crypto/aesb.c (L151-L180)
Test plan: make release-test
2018-10-23 23:19:52 -07:00
xiphon
ed36335c96 crypto: fixed incremental keccak API on big-endian platforms 2018-10-22 18:34:19 +03:00