| Commit message (Collapse) | Author | Age |
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This module is currently implemented to use the same technique as
libottery (later used by the bsds' arc4random replacement), using
AES-CTR-256 as its underlying stream cipher. It's backtracking-
resistant immediately after each call, and prediction-resistant
after a while.
Here's how it works:
We generate psuedorandom bytes using AES-CTR-256. We generate BUFLEN bytes
at a time. When we do this, we keep the first SEED_LEN bytes as the key
and the IV for our next invocation of AES_CTR, and yield the remaining
BUFLEN - SEED_LEN bytes to the user as they invoke the PRNG. As we yield
bytes to the user, we clear them from the buffer.
Every RESEED_AFTER times we refill the buffer, we mix in an additional
SEED_LEN bytes from our strong PRNG into the seed.
If the user ever asks for a huge number of bytes at once, we pull SEED_LEN
bytes from the PRNG and use them with our stream cipher to fill the user's
request.
|
| | |
| |
| |
| |
| | |
test_crypto.c is pretty big; it wouldn't hurt to split it up some
more before I start adding stuff to the PRNG tests.
|
| | |
| |
| |
| | |
This is the second part of refactoring the random-int-in-range code.
|
| | |
| |
| |
| |
| | |
Some of the code for getting a random value within a range wants to
be shared between crypto_rand() and the new crypto_fast_rng() code.
|
| | |
| |
| |
| |
| | |
I don't know how this got here, but this kind of a wrapper only
belongs in a header file.
|
| | |
| |
| |
| |
| |
| |
| | |
Using an anonymous mmap() is a good way to get pages that we can set
kernel-level flags on, like minherit() or madvise() or mlock().
We're going to use that so that we can make uninheritable locked
pages to store PRNG data.
|
| |\ \ |
|
| | |\ \ |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
Closes ticket 29026; patch from Mangix.
|
| | | | |
| | | |
| | | |
| | | | |
Patch from Mangix. Closes part of ticket 29026.
|
| |\ \ \ \
| |/ / / |
|
| | |\ \ \ |
|
| |\ \ \ \ \ |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| |\ \ \ \ \ \ |
|
| | | | | | | | |
|
| |\ \ \ \ \ \ \
| | |_|/ / / /
| |/| | | | | |
|
| | |\ \ \ \ \ \ |
|
| |\ \ \ \ \ \ \ \
| |_|_|_|/ / / /
|/| | | | | | | |
|
| | |\ \ \ \ \ \ \
| | | |/ / / / /
| | |/| | | | | |
|
| | | | | | | | | |
|
| | |\ \ \ \ \ \ \
| | |/ / / / / / |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Because the test is adding entries to the "rend_cache" directly, the
rend_cache_increment_allocation() was never called which made the
rend_cache_clean() call trigger that underflow warning:
rend_cache/clean: [forking] Nov 29 09:55:04.024 [warn] rend_cache_decrement_allocation(): Bug: Underflow in rend_cache_decrement_allocation (on Tor 0.4.0.0-alpha-dev 2240fe63feb9a8cf)
The test is still good and valid.
Fixes #28660
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
These are ones that happen on windows only.
Fixes bug 29161.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixes 29160, and allows 28668 (treating ERR logs as test failures)
to procede.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixes an instance of ticket28668.
|
| | |\ \ \ \ \ \ \
| | |/ / / / / / |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Closes ticket 28668.
|
| |\ \ \ \ \ \ \ \ |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
SO_ACCEPTCONN checks whether socket listening is enabled and is
used ever since 9369152aae9527cc3764 has been merged.
Closes ticket #29150
|
| |\ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Fixes bug 28614; bugfix on 0.4.0.1-alpha when we started mmapping
the consensus.
|
| | | |_|_|_|/ / / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This will help us out on windows now that we mmap files. Fixes part
of ticket 28614.
|
| |\ \ \ \ \ \ \ \ \
| | |_|_|_|/ / / /
| |/| | | | | | | |
|
| | |\ \ \ \ \ \ \ \ |
|
| | | |\ \ \ \ \ \ \ \ |
|
| | | | |\ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / / / / |
|