aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/entropy
Commit message (Collapse)AuthorAgeFilesLines
* Push the hardcoded entropy estimates up to build.hJack Lloyd2015-11-289-65/+53
| | | | Defaults should be fine for everyone but it makes the values more transparent
* New reseed_with_sources call on RNGsJack Lloyd2015-11-2419-99/+181
| | | | | | | | | | | | | Provides an easier way for an application to configure a list of entropy sources they'd like to use, or add a custom entropy source to their seeding. Exposes some toggles for the global/default entropy sources to build.h Adds basic entropy tests which runs the polls and does sanity checking on the results, including compression tests if available. These are less useful for the CSPRNG outputs but a good check for the ones producing plain ASCII like the /proc reader.
* Add the Darwin_SecRandom entropy sourceDaniel Seither2015-09-254-0/+84
| | | | | | | It uses the SecRandomCopyBytes function from the Security framework of OS X and iOS. We need this because it is the official way to get cryptographically secure random numbers on iOS, where /dev/random is not accessible due to sandboxing.
* Avoid concatination of charsSimon Warta2015-09-221-1/+1
| | | | | | | Ever tried? auto str = "some long string"; auto str2 = str + '\n'; It's not with the brainfuck finding the bug.
* Remove alloc module; move secmem.h to base and locking_allocator to utilsJack Lloyd2015-08-291-4/+0
|
* entropy: Add missing overridesDaniel Seither2015-07-3010-20/+20
|
* Fix typosSimon Warta2015-07-241-1/+1
| | | | Thanks to @vlajos https://github.com/vlajos/misspell_fixer
* Add Android OSDaniel Seither2015-07-174-0/+4
| | | | | | The android.txt is a copy of linux.txt minus the getsid feature (Android's libc, Bionic, doesn't support it) and the alias linux-gnu. It is supported anywhere where linux is supported.
* Add OS feature getsidDaniel Seither2015-07-171-0/+2
| | | | | It is added to all OS that use getsid currently, so it must be available there.
* Remove references to removed tru64 OSDaniel Seither2015-07-174-4/+0
| | | | There's no OS file in src/build-data/os for tru64
* lib/entropy: Convert &vec[0] to vec.data()Simon Warta2015-06-275-10/+10
|
* Avoid 0-defining BOTAN_USE_GCC_INLINE_ASMsimon2015-05-312-2/+2
| | | | GH #103
* Fix various bugs found by Coverity scanner.lloyd2015-05-151-17/+10
| | | | | | | Uninitialized variables, missing divide by zero checks, missing virtual destructor, etc. Only thing serious is bug in TLS maximum fragment decoder; missing breaks in switch statement meant receiver would treat any negotiated max frament as 4k limit.
* Use available MinGW APIs (CryptoAPI and Unix-style fds). GH#84joerg2015-04-271-1/+2
|
* Windows fixlloyd2015-03-202-5/+4
|
* This check doesn't make sense as the entropy source is sharedlloyd2015-03-181-15/+6
|
* Remove the shared IO buffer from EntropySource_Accumulator.lloyd2015-03-1813-60/+51
| | | | Instead each source that needs a buffer maintains their own.
* Avoid requiring a system header herelloyd2015-03-021-1/+1
|
* Add missing includelloyd2015-02-241-0/+1
|
* Hide all uses of boost filesystem in fs.cpp. Use readdir as anlloyd2015-02-211-6/+1
| | | | | alternate implementation for Unix and add some feature checks so a boost-free build of the tests and command line are possible again.
* Add version_cstr (returns const char*) and move tag_size from AEAD tolloyd2015-02-112-1/+2
| | | | Cipher_Mode. Add missing includes in entropy sources, noticed by clang.
* Enable OpenSSL for providing ciphers and hashes again.lloyd2015-02-051-1/+1
|
* Remove algo factory, engines, global RNG, global state, etc.lloyd2015-02-0410-7/+143
| | | | | | | | | | | | | | | Convert all uses of Algorithm_Factory and the engines to using Algo_Registry The shared pool of entropy sources remains but is moved to EntropySource. With that and few remaining initializations (default OIDs and aliases) moved elsewhere, the global state is empty and init and shutdown are no-ops. Remove almost all of the headers and code for handling the global state, except LibraryInitializer which remains as a compatability stub. Update seeding for blinding so only one hacky almost-global RNG instance needs to be setup instead of across all pubkey uses (it uses either the system RNG or an AutoSeeded_RNG if the system RNG is not available).
* Centralize where string.h/cstring is included to mem_ops.hlloyd2015-01-233-4/+2
| | | | See github 42 for background
* Ensure all files have copyright and license info.lloyd2015-01-1020-20/+20
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Add MinGW support for the CryptoAPI RNG. Also disable the dependencieslloyd2014-12-171-0/+1
| | | | | | | | in auto_rng for a working entropy source as in situations where it doesn't work almost none of the library builds. Disable boost by default from the library. Github issue 34. Unrelated - remove long dead Tru64 as a target.
* Various small fixes and cleanups, new is_prime utillloyd2014-11-033-12/+19
|
* Don't bother polling std:: clocks if we have clock_gettimelloyd2014-08-091-32/+22
|
* Avoid std::chrono::steady_clock, missing in some distro gccslloyd2014-04-251-1/+0
|
* Avoid crash if read returns an error. Canonical case is on the blocking devicelloyd2014-04-241-1/+2
| | | | | with concurrent readers; if someone else got the entropy first we can get -1/errno=EAGAIN
* Add rng command which can dump RNG outputs or raw entropy sampleslloyd2014-03-221-2/+2
|
* Simpify HMAC_RNG reseeding process. Actually update HMAC_DRBG reseed counter.lloyd2014-03-223-57/+19
|
* Add std::chrono clock polllloyd2014-02-021-11/+30
|
* Avoid Windows macro damage. Github issue 13.lloyd2014-02-021-0/+2
|
* Guess I won't be needing theselloyd2014-01-181-1/+0
|
* More unique_ptr, also cleanup MGF1 usagelloyd2014-01-182-28/+12
|
* Move lib into srclloyd2014-01-1030-0/+1909