aboutsummaryrefslogtreecommitdiffstats
path: root/src/entropy
Commit message (Collapse)AuthorAgeFilesLines
* Shuffle things around. Add NIST X.509 test to build.lloyd2014-01-0130-1909/+0
|
* Set -m flags for rdrand.cpp. Update compiler ISA flagslloyd2013-12-231-0/+2
|
* Give everything setting a feature test macro in build.h a version codelloyd2013-11-289-9/+9
| | | | | | so application code can check for the specific API it expects without having to keep track of what versions APIs x,y,z changed. Arbitrarily set all current API versions to 20131128.
* Enable all the GCC warning flags, as we now require at least GCC 4.7 anywaylloyd2013-11-162-3/+3
| | | | Fix a few nullptr and cast warnings.
* Add includes needed by OS Xlloyd2013-11-121-0/+2
|
* Split off Unix_EntropySource's fast_poll to a new sourcelloyd2013-11-102-25/+10
|
* Uninitialized pointerlloyd2013-11-091-1/+2
|
* Fix EGD settings. Some cleanup and renaming.lloyd2013-11-095-41/+37
|
* Make the process running entropy source much faster by running multiple commandslloyd2013-11-099-556/+429
| | | | | | | in parallel. On my laptop, a reseed using only process running takes .22 s wall clock in trunk and .06 s with this change - and that's after increasing the amount we read by 5 times (by reducing the entropy estimate per byte from .005 bits to 1/1024 bits).
* Use a page size buffer as we are reading from a pipelloyd2013-11-081-1/+1
|
* At least 128 bits, not at most 128lloyd2013-11-081-1/+1
|
* Use overridelloyd2013-11-081-1/+1
|
* Simplify device opening, and avoid leaking a file descriptor if it waslloyd2013-11-081-18/+14
| | | | | | too large to fit in an fd_set. Read at least 128 bits even if the poll is asking for less.
* Add more possible clock typeslloyd2013-11-081-0/+12
|
* Poll all randomness devices instead of breaking out earlylloyd2013-11-062-85/+38
|
* We do need librt herelloyd2013-08-141-0/+4
|
* Avoid uninitialized variable warning for rdrand output varlloyd2013-07-191-1/+1
|
* Enable RDRAND in 32-bit buildslloyd2013-07-101-1/+1
|
* Add a constant to make it more obvious that the clock pollinglloyd2013-04-192-9/+11
| | | | is not considered as contributing entropy to a rng poll.
* Add a patch from Markus Wanner that extends DataSource (includinglloyd2012-07-092-0/+10
| | | | | Pipe) with get_bytes_read() which returns the number of bytes read so far from that source.
* Replace 0 and NULL pointer constants with nullptr. Also fix an oldlloyd2012-05-184-20/+20
| | | | style cast in secmem.h
* Fairly huge update that replaces the old secmem types with std::vectorlloyd2012-05-186-7/+7
| | | | | | using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
* propagate from branch 'net.randombit.botan' (head ↵lloyd2012-05-183-0/+108
|\ | | | | | | | | | | 6332543aa5a8a4cc13662008ff9ac0f0016d9a4d) to branch 'net.randombit.botan.cxx11' (head 5517c9f8f6d1990f269afb94f569a97a80c5a5f4)
| * Markus Wanner pointed out on the mailing list that using rdrand opcodelloyd2012-05-071-3/+8
| | | | | | | | | | | | | | didn't work on older GCC/binutils. Instead hardcode the expression for rdrand %eax, which should work everywhere. Also, avoid including immintrin.h unless we're going to use it, to avoid problems with older compilers that lack that header (this caused build failures under GCC 3.4.6).
| * Add support for the rdrand instruction, added in Intel's Ivy Bridgelloyd2012-04-263-0/+103
| | | | | | | | | | | | | | processors. Tested using SDE on Linux with GCC 4.6, Intel C++ 11.1, and Clang 3.0, all using the inline asm variant. I do not know if current Visual C++ has the intrinsics available or not, so it's only marked as available for those compilers at the moment.
* | Merge fixupslloyd2012-02-201-4/+2
| |
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2012-02-204-36/+60
|\| | | | | | | | | | | c247a55e7c0bcd239fcfc672139b59ef63d7ee84) to branch 'net.randombit.botan.cxx11' (head 16d7756c6b8933d0d543ebdda9c7e8f4908a4a33)
| * Avoid blocking more than 100 ms in the random device reader. Scale uplloyd2012-02-201-3/+6
| | | | | | | | | | | | | | how much we ask for on the basis of how many bits we're counting each byte as contributing. Change /dev/*random estimate to 7 bits per byte. Small cleanup in HMAC_RNG.
| * Avoid having more than one directory open at a time by just keeping alloyd2012-02-201-28/+49
| | | | | | | | | | list of directory names (without the open DIRs) plus the one currently active dir.
| * Be more conservative about entropy estimates. In particular, insteadlloyd2012-02-174-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | of giving /dev/random, EGD, and CryptoAPI a full 8 bits per byte of entropy, estimate at 6 bits. In the proc walker, allow more files to be read, read more of any particular file, and count each bit for 1/10 as much as before. Reading more of the file seems especially valuable, as some files are quite random, whereas others are very static, and this should ensure we read more of the actually unpredictable inputs. Prefer /dev/random over /dev/urandom
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2011-12-182-1/+39
|\| | | | | | | | | | | 39f53266912f33dc48e942b1b865ddcd6af66d8d) to branch 'net.randombit.botan.cxx11' (head 0bf26cec09f71e75c547b4ec53365748c6d80d86)
| * Poll clock_gettime in High_Resolution_Timestamp::poll with whateverlloyd2011-11-112-1/+39
| | | | | | | | clock types we know about that have macros defined for them.
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2011-06-131-4/+2
|\ \ | |/ |/| | | | | | | 150bd11dd8090559ee1e83394b8283bf93a018de) to branch 'net.randombit.botan.c++0x' (head 7480693bb3f1e8a4e039a3e7ba3d9a7007f9730e)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2011-03-081-1/+1
| |\ | | | | | | | | | | | | | | | dd068808e5bf87c982765a8bcc314996053a5bdd) to branch 'net.randombit.botan.c++0x' (head 34696d52a8148d64f7021b3e193fc56f051b9dd2)
| * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2011-02-111-4/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | 13a0d36dac3709f3cb88e830ed7f8cab9e7433ab) to branch 'net.randombit.botan.c++0x' (head 2221ad8796466e7e096645de77ba856a9c902d14)
| | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-11-041-4/+2
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | 303b2518a80553214b1e5ab4d9b96ef54629cbc7) to branch 'net.randombit.botan.c++0x' (head d734eefabe4816be4dd3e3e6e7bb13b7ab5be148)
| | | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-283-3/+3
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2841fb518e20d2fe0a374e4f6b08bdbb14d5d158) to branch 'net.randombit.botan.c++0x' (head 0b9275139d6346bd3aa28d63bf8b8a03851d853d)
| | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-131-4/+2
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2898d79f992f27a328a3e41d34b46eb1052da0de) to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
| | | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-09-073-27/+36
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fb78974f57bc3065d8537ebeb5210c86e74e9bb1) to branch 'net.randombit.botan.c++0x' (head dcb30c0029c7e44a75d0d8b859447a6c9df97cde)
| | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-222-5/+13
| | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 647eeb4f4cf8fa4cf487cdc463d48f09fe18658e) to branch 'net.randombit.botan.c++0x' (head 2539675db91883b11895ddc5244721e93c413321)
| | | | * \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-1713-26/+85
| | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 294e2082ce9231d6165276e2f2a4153a0116aca3) to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
| | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-01-211-4/+2
| | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12382647ef0a28fcb11c824c77b670cc88a4f721) to branch 'net.randombit.botan.c++0x' (head b586a3286d2c4d547ad3add5af9df1455bf4b87b)
| | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-244-4/+4
| | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 367d157c1221a162f5b4098492944a509ef6d019) to branch 'net.randombit.botan.c++0x' (head 1b9e8c4e92663f30b7d57b0fd8f57eb13cfce155)
| | | | | * \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-161-4/+2
| | | | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 22c82e10d78ad0e2cdaa56cb02f3d846ed0ead5e) to branch 'net.randombit.botan.c++0x' (head 74dbf310b7fcc11f94a16cd63046219acd5d62bc)
| | | | | | * \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-1622-29/+76
| | | | | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
| | | | | | * \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-081-4/+2
| | | | | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 142a9359ba02d5dfcf3f2c9f99902f82ab41724e) to branch 'net.randombit.botan.c++0x' (head 390a9abce0eb6ee24eeb3cd243b6dcaaa8944ad0)
| | | | | | | * | | | | | | | Instead of checking for Windows generically before using ↵lloyd2009-12-011-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QueryPerformanceCounter, check a feature macro named BOTAN_OS_HAS_QUERY_PERF_COUNTER, and set the same via configure.py for Windows builds.
| | | | | | | * | | | | | | | Most files including <botan/time.h> actually just needed <chrono>lloyd2009-12-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up implementation of calendar_value() a bit
* | | | | | | | | | | | | | | FD_ZERO on Solaris uses memset, and assumes we included string.hlloyd2011-05-242-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | already. Reported by Jeremy C. Reed <[email protected]>
* | | | | | | | | | | | | | | I can't spelllloyd2011-05-131-1/+1
| | | | | | | | | | | | | | |