| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
to. Helps more than I would have thought.
|
|
|
|
|
|
|
| |
Modify it to avoid a timing condition during the compare at the end;
this is done by always doing the subtraction, and then copying to the
output either the pre-subtraction or post-subtraction value depending
on if the final borrow was set or not.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
depending on the value of the final carry out for anything
control-flow related.
|
|
|
|
|
|
| |
compute the inverses mod 65537 exposed a timing vulnerability. Avoid
this by instead using exponentiation, which takes constant time (up to
variability in the multiplication operation, at least).
|
| |
|
| |
|
|
|
|
|
| |
range of single bit errors in DES (though really this method is more
useful for a hardware implementation than table based software).
|
|
|
|
|
|
|
| |
the requested bitsize, simply repeat instead of failing
immediately. The condition could actually occur in practice if a prime
that was on the very low end of the specified range was chosen (eg q
happened to be chosen as 10000...001).
|
| |
|
| |
|
|
|
|
| |
tests on Nehalem indicate a small but measurable win there (about 3%).
|
|
|
|
| |
alternative methods of getting pieces of the expanded message.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
returns the hash function that was used to create the
signature. Useful for a future X509 path validator that inform the
user which hash(es) they are relying on and/or allowing the ability to
reject hashes which are undesirable (MD2, MD5, etc)
|
|
|
|
|
| |
particular is precious. Really these could probably just as easily be
std::vectors since even zeroizing the memory isn't relevant here.
|
| |
|
|
|
|
|
| |
easier to implement without requiring in-memory linear searching (eg a
flatfile store or SQL database with indexes).
|
| |
|
| |
|
|
|
|
| |
dependent right now.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
compatability with 1.8, but actually the signature is completely
different anyway because that version took a Timer object, which
doesn't exist at all anymore.
I suppose I could add an empty Timer class plus subclasses, let
someone instantiate it and pass it in, ignoring it, but I'm not
feeling this is worth the effort. It would make more sense to add a
version with this signature to 1.8, which creates a
Default_Benchmark_Timer and uses it.
|
| |
|
| |
|
| |
|
|
|
|
| |
see too much but better than before.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Add a push_back that takes a single argument ala std::vector
For appending, provide some namespace level += operators - we can use
this technique with either MemoryRegion or a std::vector.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the initial/default length of the array, update all users to instead
pass the value to the constructor.
This is a old vestigal thing from a class (SecureBuffer) that used
this compile-time constant in order to store the values in an
array. However this was changed way back in 2002 to use the same
allocator hooks as the rest of the containers, so the only advantage
to using the length field was that the initial length was set and
didn't have to be set in the constructor which was midly convenient.
However this directly conflicts with the desire to be able to
(eventually) use std::vector with a custom allocator, since of course
vector doesn't support this.
Fortunately almost all of the uses are in classes which have only a
single constructor, so there is little to no duplication by instead
initializing the size in the constructor.
|
| |
|
|
|
|
|
|
| |
Avoid using using directives in MemoryVector and SecureVector to bring
things into scope; it brings them into public scope even if they are
protected which is not desirable. Instead disambiguate using this->func()
|
| |
|
|
|
|
| |
MemoryRegions and concatenated them.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add RandomNumberGenerator::random_vec, which takes an length n and
returns a new SecureVector with randomized contents of that size. This
nicely covers most of the cases where randomize was being called on a
vector, and is a little cleaner in the code as well, instead of
vec.resize(length);
rng.randomize(&vec[0], vec.size());
we just write
vec = rng.random_vec(length);
|