| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This reduces friction to writing an assert, so hopefully there will be
more of them as a result. And we can use asserts in public headers
now, very useful for templates.
|
| |
|
|
|
|
|
|
| |
X is true" and "assertion X is false". Convert all of them to the form
"assertion X is true" thus making it clear what it is that we are
attempting to assert by testing the expression provided.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
and unique_ptr.
|
|
|
|
|
| |
happens it'll be reproductible, etc, might as well have the
information immediately.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
run into trouble in the TLS PRF with large pre-master secrets. This
especially crops up in TLS 1.2 as there the entire pre master secret
is fed to a single PRF (in earlier verions it is split in half). A
limit of 512 bytes allows a DH group up to 4096 bits which seems good
enough for now.
Also catch Invalid_Key_Length in the TLS PRF and throw an exception
that makes more sense - initially I was completely thrown off by the
HMAC key length exception, and it took me a while to figure it
out. Someone else looking at this the first time a server sends a 8192
bit DH group would be even more confused.
|
|
|
|
|
|
|
|
| |
basic connection with a GnuTLS server does work. Currently we don't
respect the signature_algorithms extension at all, and using SHA-256
with a 12-byte finished value is hardcoded though the spec is that it
can depend on the ciphersuite (likely relevant for GOST ciphersuites
in particular).
|
|
|
|
| |
coalesce the dir and file name if identical.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
query, clearing, and cloning. Applies to ciphers, hashes, MACs, and
PBKDFs. May extend to KDFs later as well.
A single combined hierarchy in particular will make the algo_factory
much simpler.
|
| |
|
|
|
|
|
| |
and writes the bytes to the stream in big-endian order. Use it in
KDF2, MGF1, and FPE.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
representation (rather than in an interator context), instead use &buf[0],
which works for both MemoryRegion and std::vector
|
| |
|
| |
|
| |
|
|
|
|
| |
including loadstor.h actually just needed get_byte and nothing else.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bswap.h); too many external apps rely on loadstor.h existing.
Define 64-bit generic bswap in terms of 32-bit bswap, since it's
not much slower if 32-bit is also generic, and much faster if
it's not. This may be quite helpful on 32-bit x86 in particular.
Change formulation of generic 32-bit bswap. It may be faster or
slower depending on the CPU, especially the latency and throuput
of rotate instructions, but should be faster on an ideally
superscalar processor with rotate instructions (ie, what I expect
future CPUs to look more like).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
the info.txt files with the right module dependencies.
Apply it across the codebase.
|
|
|
|
|
|
|
|
|
| |
Useful for tracking where the big balls of mud are.
Fix dependencies in gost_3411 (depends on the gost block cipher), and
the TLS PRF (depends on HMAC). Also hide TLS_PRF::P_hash in an anonymous
namespace instead of making it a private static function. I don't think
this will affect binary compat, since it was statically linked.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
|
|
|
| |
(from base.h)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Update dependencies as needed.
|
| |
|
| |
|
| |
|
| |
|