| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Blowfish Sboxes into one 1024 word array and index into them at
offsets. On my x86-64 machine there is no real difference between the
two, but on register constrained processor like x86 it may make a large
difference, since the x86 has a much easier time indexing off a single
address held in a register rather than 4 distinct ones.
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations to class declarations that do not support copying (for
instance because of const members). Apparently at /W4 Visual C++ warns
unless this is the case, and it seems reasonably good practice to
disable copying on most of these objects anyway due to pointer and
reference aliasing.
Instead of adding an operator= to User_Interface, I made the member
preset_passphrase non-const. This seemed like a cleaner solution to me.
(It may also be the cleaner solution in the pubkey code)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
however now instead it takes a HashFunction pointer, which it deletes
in its destructor.
Why the change? For one, lookup.h, while seemingly a bunch of standalone
functions, actually calls into a large mass of global state (in short, it
is icky). I have a plan in mind for removing much of this while still
providing a high level interface (actually hopefully better than now),
here is just the start.
Now, calling clone() on a LubyRackoff object will now return a new object
with a clone() of the HashFunction. Previously we called get_hash on
the name, which goes through the whole global lookup bit. This is also
good since if you construct one with (say) an OpenSSL provided hash,
clones of it will now also use that implementation.
|
|
|
|
|
|
|
| |
on x86, x86-64, and m68k and not other platforms. Something about the
memory model I'm hitting? Valgrind shows nothing. Rather than struggle with
it further, for minimal gain, I'm reverting. If someone ever does
figure it out, this will be easy to reapply.
|
| |
|
| |
|
| |
|
|
|
|
| |
pointer used over and over again in MGF1::mask.
|
|
|
|
|
| |
move in there. Make it a subclass of std::bad_alloc instead of
Botan::Exception (this may prove to be a design mistake).
|
| |
|
| |
|
|
|
|
|
|
|
| |
bigint_simple_mul and bigint_simple_sqr. Examining these
functions made it clear inlining would be beneficial, so these two
functions have been moved from an anonymous namespace into mp_mulop.cpp
(to allow assembly versions).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
can easily perform the operation manually using get_reg), and InSiTo
wants to access it, so go ahead and make it public.
|
| |
|
| |
|
|
|
|
|
| |
words. BigInt::sig_words() was showing up very hot on valgrind runs, this
seems to reduce the usage substantially.
|
|
|
|
|
| |
pretty opaque; now use the easier to remember DL_Group::DSA_PARAMETERS
and DL_Group::DH_PARAMETERS
|
|
|
|
| |
of always converting to u64bit and passing to a non-inlined function.
|
|
|
|
|
|
| |
xor_buf.h. The optimization using reinterpret_cast previously
used in the amd64 module is now used directly in the stock header, as
long as BOTAN_TARGET_UNALIGNED_LOADSTOR_OK is set.
|
| |
|
|
|
|
|
|
|
| |
implementation wishes to make this operation a no-op it has to explicitly
declare it as such, rather than just letting the no-op default in from
the base class. (Falko Strenzke was the one who pointed out this was
potentially problematic.)
|
|
|
|
| |
Did I mention I hate C++ sometimes?
|
|
|
|
| |
RandomNumberGenerator (really hate C++ sometimes...)
|
|
|
|
| |
keying is supported (see section 2.3 of the specification for details)
|
|
|
|
| |
find square roots modulo a prime. Contributed by FlexSecure GmbH
|
| |
|
|
|
|
|
|
| |
for the implementation in Library_State. Instead explicitly call deref_alias
on global_state() wherever the old freestanding version was used. This serves
to make (more) uses of the global state explicit rather than implicit.
|
| |
|
|
|
|
|
|
|
|
|
| |
config state: how long successful validations should be cached, and the
amount of slack to allow on time boundary checks. Now these are passed
as arguments to the constructor, as a pair of 32-bit integers representing
the number of seconds to allow as slack and the number of seconds to cache
validations for. They default to the same compiled in defaults as before,
24 hours (86400 seconds) and 30 minutes (1800 seconds), respectively.
|
|
|
|
|
|
|
|
| |
In reality, Config was a singleton, with the only owner being the
Library_State object. Theoretically one could create and use another Config
instance, but in practice it was never done. Reflect the reality and inline
the members and public functions of Config in Library_State, removing Config
entirely.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
RandomNumberGenerator, and make ANSI_X931_PRNG's implementations just
forward the arguments to the underlying RNG. This allows seeding the RNG
even if no entropy modules are loaded into the library. Also it allows
actually adding user-specified data; to do it otherwise would require
creating the RNG objects yourself and retaining a pointer to the Randpool,
which is pretty bogus.
Move Null_RNG to rng.h
|
| |
|
| |
|
|
|
|
|
|
|
| |
Randpool, it will query them as needed (or if asked to do so). New function
make_rng() that creates an RNG (X9.31 backed by a Randpool) and seeds it.
Remove the entropy source related code from the Modules/Builtin_Modules
classes.
|
| |
|
|
|
|
|
|
| |
They were probably not a good idea. If nothing else, these functions might
throw bad_alloc, and possibly other errors. Something broad like std::exception
might be applicable, but that seems pointlessly broad.
|
|
|
|
| |
key or IV; it does not reference the global RNG.
|
|
|
|
| |
in the library ccode.
|
|
|
|
|
|
|
|
|
| |
Probably some variation of it will be added back in later, at least
to do basic checks like that primes are really odd (and we can do
basic primality checks, etc, even with an RNG).
Alternative: call check_key() manually on public keys you load with an
RNG object.
|
|
|
|
| |
Public version doesn't need an RNG argument.
|
|
|
|
|
|
|
|
|
| |
a) I am sure we really want to include this (proprietary, unanalyzed?)
PRNG in Botan
b) I have a chance to add test cases and clean up the code.
Also note a few more changes in the changelog, and set a provisial release
date for sometime in July.
|
|
|
|
| |
constructors.
|
|
|
|
|
| |
a RNG reference, a group, and an (optional) private key. The public key
is now always rederived from the private.
|
| |
|