aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/entropy
Commit message (Collapse)AuthorAgeFilesLines
* Some fixes for modernize-loop-convertJack Lloyd2022-02-061-7/+7
|
* Fix clang-tidy readability-container-size-empty warningsJack Lloyd2022-02-061-1/+1
|
* No need for a conditional hereJack Lloyd2022-01-101-4/+1
|
* Fix compilation issue on older mac (< 10.12)tenzap2021-11-171-0/+4
| | | | | | | | | | | | | | Error was: In file included from src/lib/entropy/getentropy/getentropy.cpp:13: /usr/include/sys/random.h:37:32: error: unknown type name 'u_int' void read_random(void* buffer, u_int numBytes); ^ /usr/include/sys/random.h:38:33: error: unknown type name 'u_int' void read_frandom(void* buffer, u_int numBytes); ^ /usr/include/sys/random.h:39:33: error: unknown type name 'u_int' int write_random(void* buffer, u_int numBytes); ^
* More raw pointer removalJack Lloyd2021-04-051-6/+6
|
* Remove /proc walker entropy sourceJack Lloyd2021-04-034-224/+0
|
* Remove the entropy source reading /dev/randomJack Lloyd2021-03-014-184/+2
| | | | | | | | | | | Instead if System_RNG is backed by /dev/urandom, have the RNG block once on init on a read of /dev/random. That guarantees that we are seeded on old Linux kernels. On basically every other platform besides old Linux this code was redundant with the entropy source that just reads from the system RNG since typically on such systems, /dev/random, /dev/urandom, arc4random, and getentropy all source from the same RNG.
* Solaris and Illumos distributions support getentropy.David Carlier2020-12-131-1/+1
|
* Make scan_name.h, cpuid.h and http_util.h internalJack Lloyd2020-11-281-1/+1
|
* Remove some unused macro checks/includesJack Lloyd2020-11-281-8/+0
|
* Remove deprecated headers, make more headers internalJack Lloyd2020-11-061-0/+4
| | | | | | | | | Now modules default to internal headers instead of defaulting to public; making a new public API should be a visible and intentional choice. Brings the public header count from over 300 to around 150. Also removes the deprecated tls_blocking interface
* Fix for systems without a hardware RNG instructionJack Lloyd2020-05-081-1/+4
|
* Add Processor_RNGJack Lloyd2020-05-087-201/+46
| | | | | | | Replaces RDRAND_RNG, RDRAND entropy source, and DARN entropy source. Provides also DARN-based RNG interface. This also gives an easy path for supporting the ARMv8 RNG instructions.
* Still need user32 for other functions called in hereJack Lloyd2020-02-091-0/+4
| | | | GetCursorPos, GetInputState etc
* Remove use of Tooltip snapshots in Win32 entropy sourceJack Lloyd2020-02-092-86/+16
| | | | | | | Due to flagging by antivirus (#1614) A peruse of MSDN found some other candidate functions that seem useful, but I don't have a Windows machine to use to evaluate them.
* Clean up handling of POWER ISA extensionsJack Lloyd2019-12-121-0/+4
| | | | See #2226
* Fix Windows linking to consistently use .lib suffix as requiredJack Lloyd2019-12-061-1/+1
| | | | | | Also fix the zlib basename for Windows. Resolves #2210
* Enable SSE2 for RDSEEDJack Lloyd2019-10-091-0/+1
| | | | Fixes #2139
* Use inline asm to avoid GCC bug. Handle RNG failureJack Lloyd2019-08-272-13/+42
|
* Add support for POWER9 DARN RNGJack Lloyd2019-08-274-0/+81
|
* Use RDRAND in such a way that an internal reseed is performedJack Lloyd2019-08-162-28/+93
| | | | | | At least according to Intel's docs. Closes #447
* Fix include for getentropyJack Lloyd2019-07-041-3/+3
| | | | Everyone but BSDs puts it in sys/random.h
* Make the ISA list a listJack Lloyd2019-04-171-1/+3
|
* Rename 'darwin' target to 'macos'Jack Lloyd2019-03-271-1/+1
| | | | | Both because that's the more common term, and because iOS/watchOS also uses the Darwin kernel, but we have a distinct target for mobile.
* Make exceptions easier to translate to error codesJack Lloyd2018-11-231-3/+2
| | | | | | | | | | | Avoid throwing base Botan::Exception type, as it is difficult to determine what the error is in that case. Add Exception::error_code and Exception::error_type which allows (for error code) more information about the error and (for error type) allows knowing the error type without requiring a sequence of catches. See GH #1742
* Add OS::running_in_privileged_stateJack Lloyd2018-09-271-1/+2
| | | | | | | | Avoid any getenv toggles or reading /proc if we are setuid/setgid. It is possible there is or will someday be some file in /proc that is world-readable, but if read by a privileged user causes some side effect.
* Remove Darwin SecRandomCopyBytesJack Lloyd2018-09-044-85/+0
| | | | | It is the same RNG as arc4random and /dev/urandom. And arc4random seems to be working well for iOS and macOS.
* Expose RDRAND RNG through FFIJack Lloyd2018-08-132-4/+5
|
* Add a warning about win32 stats making antivirus unhappy [ci skip]Jack Lloyd2018-06-251-0/+4
| | | | GH #1614
* Add missing errno.h include to entropy/dev_randomfwsGonzo2018-04-111-0/+1
|
* Fix header for getentropy on macOSJack Lloyd2018-03-091-1/+5
| | | | Re #1481
* One comment fix and one formatting fix [ci skip]René Korthaus2018-02-281-1/+1
|
* Merge GH #1378 Use OS feature flags instead of OS name for enabling system ↵Jack Lloyd2018-01-095-41/+15
|\ | | | | | | specific code
| * Test OS features by the feature vs the OS nameJack Lloyd2017-12-305-41/+15
| |
* | Remove needless <arch> blocks for RDRAND/RDSEEDJack Lloyd2018-01-041-5/+0
|/ | | | These were already implicit due to requiring the relevant ISA
* Use a better name for the entropy source that reads the system RNGJack Lloyd2017-12-231-1/+1
| | | | Now the value round trips with Entropy_Source::create
* FreeBSD removed support for proc filesystem a while agoJack Lloyd2017-12-231-1/+0
|
* Avoid uninitialized param warningJack Lloyd2017-12-231-0/+1
|
* Break out of Win32 entropy poll as soon as entropy goal is reached.Jack Lloyd2017-12-221-7/+15
| | | | | | Rather than running over the entire heap list which may be long. Fixes #1369
* Drop IRIX supportJack Lloyd2017-12-132-2/+0
| | | | | | It turns out that GCC dropped support for IRIX in 4.8, so likely there was never even a C++11 compiler that could have been used to compile 2.x in any case.
* Avoid empty methods, use =default or add a commentJack Lloyd2017-10-031-5/+3
| | | | Sonar
* Use explicit on more single-argument constructorsJack Lloyd2017-09-302-2/+2
|
* Attempt to make MSVC happyJack Lloyd2017-09-221-0/+12
|
* Use RAII, avoid explicit deleteJack Lloyd2017-09-222-16/+4
|
* Apply final annotations to the library alsoJack Lloyd2017-09-222-2/+2
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* Header file cleanupsJack Lloyd2017-09-211-1/+0
| | | | Some help from include-what-you-use
* Clean up header includesJack Lloyd2017-09-212-2/+0
| | | | | | | Avoid including build.h or assert.h directly, instead always take them though types.h Avoid math.h in favor of cmath
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-208-16/+16
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Add API stability annotations.Jack Lloyd2017-09-191-2/+2
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Define macro so windows.h doesn't include winsock.hJack Lloyd2017-09-031-0/+2
| | | | Ugh Windows headers y u so nasty.