| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| | |
The Intel RNG may fail if heavily contended, so retry as needed.
|
| |
| |
| |
| | |
prevents filtering out any 0x00000000 outputs from RDRAND/RDSEED
|
| |
| |
| |
| |
| |
| |
| |
| | |
* no spaces around if(), for() etc
* snake_case for plain functions
* anonymous namespace function instead private and static
* don't propagate failed poll to the calling application
* RdRand retires configurable in build.h
|
| |
| |
| |
| |
| | |
* Make it configurable how often RdRand and RdSeed is polled
* Make it configurable how many RdSeed retries are executed
|
| | |
|
| |
| |
| |
| | |
explicit.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add OS functions get_process_id, get_processor_timestamp, and
get_system_timestamp_ns. HMAC_RNG uses the pid call to detect forks to
initiate a reseed. It also adds the output of all three functions (the
pid, the CPU cycle counter, and the system timestamp) into the PRF input.
Calls the new OS timer functions from hres_timer entropy source.
Removes the call to QPC in es_win32 which is mostly redundant with the
one in hres_timer.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Thinking it over I've realized this was not a good move; XP may be EOLed but is
still widely used and even VS 2015 still supports targeting XP. It's not really
the same situation as going to extra efforts for supporting SunOS 5.1 or VAX/VMS,
instead it actively broke support for something which is still widely deployed.
And for those building for XP the options are patch out the call (GH #416) or
disable win32_stats altogether in their build. I'd like to prevent downstream
distributors from having to patch, because that can get messy. And while the
design of CryptGenRandom is not disclosed it apparently has changed over time
and at one point (IIRC) used RC4 to generate outputs, so if there is any OS that
could use some extra help generating seed material it is XP.
There may be future code that really makes use of APIs added after XP - CryptoNG,
TPM support, etc and then people targetting XP will have to compile out those
modules. But it doesn't make sense to break it here for this small gain.
|
| |
| |
| |
| | |
Remove bogus virtual destructor on Entropy_Accumulator (has no virtuals)
|
|\ \
| | |
| | |
| | |
| | |
| | | |
By adopting MemoryStatusEx, this drops support for XP and Server 2003
which do not implement this API. This is considered a feature as these
versions are already EOLed by Microsoft.
|
| | |
| | |
| | |
| | |
| | | |
* GetTickCount is replaced by GetTickCount64(): see https://msdn.microsoft.com/en-us/library/windows/desktop/ms724408(v=vs.85).aspx for details
* GlobalMemoryStatus is replaced by GlobalMemoryStatusEx: see https://msdn.microsoft.com/en-us/library/windows/desktop/aa366589(v=vs.85).aspx for details
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In some cases this can offer better optimization, via devirtualization.
And it lets the user know the class is not intended for derivation.
Some discussion in GH #402
|
| |/
|/| |
|
| |
| |
| |
| | |
GH #370 for background
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
| |
As the alternatives are unfortunate for applications trying to catch
all library errors, and it seems deriving from std::runtime_error
causes problems with MSVC DLLs (GH #340)
Effectively reverts 2837e915d82e43
|
|
|
|
|
| |
Change getrusage output to static system data since it is sparse and
changes rarely, and so actually does trigger the differential test.
|
|
|
|
| |
Defaults should be fine for everyone but it makes the values more transparent
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Ever tried?
auto str = "some long string";
auto str2 = str + '\n';
It's not with the brainfuck finding the bug.
|
| |
|
| |
|
|
|
|
| |
Thanks to @vlajos https://github.com/vlajos/misspell_fixer
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
It is added to all OS that use getsid currently, so it must be available
there.
|
|
|
|
| |
There's no OS file in src/build-data/os for tru64
|
| |
|
|
|
|
| |
GH #103
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
Instead each source that needs a buffer maintains their own.
|
| |
|
| |
|
|
|
|
|
| |
alternate implementation for Unix and add some feature checks so a
boost-free build of the tests and command line are possible again.
|
|
|
|
| |
Cipher_Mode. Add missing includes in entropy sources, noticed by clang.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
See github 42 for background
|
|
|
|
|
| |
Update license header line to specify the terms and refer to the file,
neither of which it included before.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|