| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
the library state. Remove library state config apis, as OIDS were the
last remaining user.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
cause a huge amount of lock contention in heavily multithreaded
code. Now each AutoRNG is its own uniquely seeded HMAC_RNG. The set of
entropy sources is shared rather than being per-RNG (so there is only
one open fd to /dev/random, etc). So reseeding is still a global lock,
but sharing the resources (open file descriptors, etc) across RNGs
seems worth the contention.
Remove Randpool, which was only used if HMAC_RNG was disabled at build.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| | |
c6dfcb1b2e25290f071169361fb07cc9bb602eac)
to branch 'net.randombit.botan.c++0x' (head 802b80d11c9eb4550d592439b773f6bc8b0ec045)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
into global_state.{h,cpp}. Move all of the functions into a new
namespace Global_State_Management, though exposing global_state() into
the Botan namespace for compatability.
Also add new functions global_state_exists and
set_global_state_unless_set which may be helpful in certain tricky
initialization scenarios (eg when an application using botan also uses
a library which may or may not itself use botan).
|
|\|
| |
| |
| |
| |
| | |
294e2082ce9231d6165276e2f2a4153a0116aca3)
to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/|
| |
| |
| | |
96d0a1885774b624812fd143d541c8bcda319217)
to branch 'net.randombit.botan.c++0x' (head e14368ab9d7976f3e111c6bc0adf24eebeb7c114)
|
| |\
| | |
| | |
| | |
| | |
| | | |
74e9e8642943d126a5e5efa5be1da8351f0fb6d7)
to branch 'net.randombit.botan.c++0x' (head 24371f742c2a1c7e5f3aace364fbb21e01c94657)
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | | |
12382647ef0a28fcb11c824c77b670cc88a4f721)
to branch 'net.randombit.botan.c++0x' (head b586a3286d2c4d547ad3add5af9df1455bf4b87b)
|
| | | |
| | | |
| | | |
| | | |
| | | | |
them as private variables for operator= and copy constructors that shouldn't
be used.
|
| | |\ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
32f457161b1ad1afb7a3d0ccebc98ada83fb23d9)
to branch 'net.randombit.botan.c++0x' (head 6e3c13869f27636152cf11c65a7d8197a93641d9)
|
| | | | | |
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
PRNG everywhere. The removal of the global PRNG was generated by a
desire to remove the global library state entirely. However the real
point of this was to remove the use of globally visible _mutable_
state; of the mutable state, the PRNG is probably the least important,
and the most useful to share. And it seems unlikely that thread
contention would be a major issue in the PRNG.
Add back a global PRNG to Library_State. Use lazy initialization, so
apps that don't ever use a PRNG don't need a seeding step. Then have
AutoSeeded_RNG call that global PRNG.
Offer once again
RandomNumberGenerator& Library_State::global_rng();
which returns a reference to the global PRNG.
This RNG object serializes access to itself with a mutex.
Remove the hack known as Blinding::choose_nonce, replace with using
the global PRNG to choose a blinding nonce
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
not. Instead provide via Extensions::add(). No way to modify behavior
currently, it just follows the previous default police.
Remove the config options from Library_State entirely. Die, mutable
singletons, die.
|
|/ / /
| | |
| | |
| | | |
variable directly.
|
|/ / |
|
|/
|
|
|
| |
passed as a 'const std::string' instead of a const reference. Can't fix
in 1.8 since it is ABI breaking.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
up during the Fedora submission review, that each source file include some
text about the license. One handy Perl script later and each file now has
the line
Distributed under the terms of the Botan license
after the copyright notices.
While I was in there modifying every file anyway, I also stripped out the
remainder of the block comments (lots of astericks before and after the
text); this is stylistic thing I picked up when I was first learning C++
but in retrospect it is not a good style as the structure makes it harder
to modify comments (with the result that comments become fewer, shorter and
are less likely to be updated, which are not good things).
|
|
|
|
|
|
|
|
| |
replacing with an updated constructor to Algorithm_Factory taking a
vector of Engine*. The semantics of adding engines at runtime were not
defined nor very clear, it seems best to prohibit this unless and
until it is explicitly thought through (and until a need for it
presents itself).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
algo_factory and algorithm_factory. This is confusing
so for consistency/simplicity, remove algo_factory, making
algorithm_factory the function to call.
In 1.7.14, several functions in lookup.h, including
retrieve_block_cipher, retrieve_hash, etc were changed to accept
a Library_State& reference. However it turns out with the
modified design I've settled upon for 1.8 that it is not
necessary to change those interfaces; instead they always refer
to the global_state algorithm factory which is exactly the
semantics one would expect/desire 99% of the time (and is source
compatible with code written for 1.6, also a plus)
|
|
|
|
|
| |
of algo_factory() several times, I decided to rename the functions.
algorithm_factory() just forwards to algo_factory as an inline.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and reduce all the arguments to just a bool specifying threads.
selftests: off (if desired, run passes_self_test in selftest.h)
fips140: Just ran the self tests, totally bogus option.
use_engine: On by default (that is, if OpenSSL or asm code is compiled
in, it's used by default). One can get better control over this using
the provider feature of SCAN_Name (though this doesn't handle cases like
nested algorithms yet).
secure_memory: On by default.
|
|
|
|
| |
as an abstraction. Check #ifdef's for engines and such directly in libstate.cpp
|
|
|
|
| |
which will eventually encapsulate the lookup logic as well)
|
|
|
|
|
|
| |
It turned out many files were including base.h merely to get other
includes (like types.h, secmem.h, and exceptn.h). Those have been changed
to directly include the files containing the declarations that code needs.
|
|
|