| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
decoding a message that was so large we decided it was invalid and
truncated it.
|
|
|
|
|
|
| |
so application code can check for the specific API it expects without
having to keep track of what versions APIs x,y,z changed. Arbitrarily
set all current API versions to 20131128.
|
| |
|
| |
|
|
|
|
| |
style cast in secmem.h
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| | |
6332543aa5a8a4cc13662008ff9ac0f0016d9a4d)
to branch 'net.randombit.botan.cxx11' (head 5517c9f8f6d1990f269afb94f569a97a80c5a5f4)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
was not the right size for a signature (following DSA). This would
silently convert to an empty vector which we would treat as a valid
message on the return. However the EMSA checks will always fail so not
a huge problem.
While checking this out I noticed that an empty value for EMSA4 would
result in us reading memory we didn't own.
|
|/
|
|
|
|
| |
with a custom allocator; remove the 3 argument version of
MemoryRegion::copy, replacing with freestanding buffer_insert
function.
|
|
|
|
|
|
|
| |
conditionals to help avoid timing anylsis. Unfortunately GCC is too
smart for us and compiles it to jumps anyway; probably would need to
put the delim search into its own function and pass variables by
volatile pointers to force the compiler to do what we want.
|
| |
|
|
|
|
|
|
| |
Phash is a vector we were keeping around which has an actual hash
output, so just access Phash.size() and avoid the need to carry an
extra size_t around.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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);
|
|
|
|
|
| |
representation (rather than in an interator context), instead use &buf[0],
which works for both MemoryRegion and std::vector
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
harmonising MemoryRegion with std::vector:
The MemoryRegion::clear() function would zeroise the buffer, but keep
the memory allocated and the size unchanged. This is very different
from STL's clear(), which is basically the equivalent to what is
called destroy() in MemoryRegion. So to be able to replace MemoryRegion
with a std::vector, we have to rename destroy() to clear() and we have
to expose the current functionality of clear() in some other way, since
vector doesn't support this operation. Do so by adding a global function
named zeroise() which takes a MemoryRegion which is zeroed. Remove clear()
to ensure all callers are updated.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
of this pointed out by Falko Strenzke. The timing differences between
different error conditions could lead to attacks even with the same
error message. Instead use a (mostly) straightline
implementation. However scanning for the delim byte is still
timing/input dependenant, so this is not a 100% fix.
|
| |
|
|
|
|
|
|
|
| |
Invalid_Argument just a typedef for std::invalid_argument. Make
Botan::Exception a typedef for std::runtime_error. Make Memory_Exhaustion
a public exception, and use it in other places where memory allocations
can fail.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes for the amalgamation generator for internal headers.
Remove BOTAN_DLL exporting macros from all internal-only headers;
the classes/functions there don't need to be exported, and
avoiding the PIC/GOT indirection can be a big win.
Add missing BOTAN_DLLs where necessary, mostly gfpmath and cvc
For GCC, use -fvisibility=hidden and set BOTAN_DLL to the
visibility __attribute__ to export those classes/functions.
|
| |
|
|
|
|
|
| |
Pretty much useless and unused, except for listing the module names in
build.h and the short versions totally suffice for that.
|
|
|
|
|
|
| |
just too fragile and not that useful. Something like Java's checked exceptions
might be nice, but simply killing the process entirely if an unexpected
exception is thrown is not exactly useful for something trying to be robust.
|
| |
|
|
|
|
|
|
| |
the info.txt files with the right module dependencies.
Apply it across the codebase.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
since it is relevant to the implementation.
|
| |
|
| |
|
|
|
|
|
|
|
| |
add a digest identifier. This was a feature requested on the mailing list.
Apparently this scheme is called CKM_RSA_PKCS in PKCS #11, and is supported
by a number of libraries, including QCA.
|
|
|
|
| |
signature padding schemes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a discrepency between OpenSSL and Botan when generating SHA-512/EMSA3
signatures. In fact it turns out that the EMSA3 identifier for SHA-512
contained a typo and was incorrect.
Unfortunately this means that SHA-512/EMSA3 signatures generated by
Botan up until now will not be accepted by other implementations, and
the signatures by other implementations would not be accepted by Botan.
Currently I am not making any provision for backwards compatability with
the old incorrect hash identifier, since I am assuming/guessing that
SHA-512/EMSA3 is not a very common combination.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
(from base.h)
|
| |
|
| |
|
|
|
|
| |
Update dependencies as needed.
|
| |
|