aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data/buildh.in
Commit message (Collapse)AuthorAgeFilesLines
* New reseed_with_sources call on RNGsJack Lloyd2015-11-241-2/+35
| | | | | | | | | | | | | Provides an easier way for an application to configure a list of entropy sources they'd like to use, or add a custom entropy source to their seeding. Exposes some toggles for the global/default entropy sources to build.h Adds basic entropy tests which runs the polls and does sanity checking on the results, including compression tests if available. These are less useful for the CSPRNG outputs but a good check for the ones producing plain ASCII like the /proc reader.
* Remove --build-mode and add individual toggles for optimization, debug,Jack Lloyd2015-10-261-1/+1
| | | | | | sanitizers and coverage as all 4 are usefully set independently. Use GCC 4.9 on CircleCI as it seems to be supported. Add ASan + UBSan test.
* Remove the strange conjoining of debug and optimization flags.Jack Lloyd2015-10-261-1/+1
| | | | | | | | | | | | | | | | | | | Previously a build had optimizations disabled completely when debug info was emitted. But there are many reasons to use optimized builds with debug symbols (running under valgrind, against afl, with Asan/Ubsan, in prod, etc). And personally I find even debugging at -O2 or -O3 is fine most of the time and worth it for the speed. Use the (now documented!) --no-optimizations flag if no optimization is desired while debugging. This also removes the distinction between library and application compile flags; there is a single optimization level that is probably good enough for everything. On Win32 it removes definding _CONSOLE for the application. This seems to be some mythical value that may have been required at some point, but is not documented anywhere I can find. Who knows what VC thinks, hoping I don't have to add this back. It also drops defining `EBUG` which is what happens when you tell cl.exe to '/DEBUG'. LOL.
* Make PKCS #1 and OAEP decoding constant time to avoid oracle attacksJack Lloyd2015-10-161-0/+6
| | | | | | | | via timing channels. Add annotations for checking constant-time code using ctgrind to PKCS #1 and OAEP, as well as IDEA and Curve25519 which were already written as constant time code.
* Periodically reinitialize the blinding sequence instead of alwaysJack Lloyd2015-10-151-2/+13
| | | | deriving it by squaring the previous value.
* Move GF(p) side channel countermeasure toggles to build.hJack Lloyd2015-08-281-0/+16
| | | | Some tweaks for point multiplication using fixed windows.
* Rename template variable cc -> cxxSimon Warta2015-07-211-2/+1
|
* Avoid 0-defining BOTAN_USE_GCC_INLINE_ASMsimon2015-05-311-4/+0
| | | | GH #103
* Avoid putting very small values in mlock memorylloyd2015-03-231-2/+6
|
* Add timeouts to HMAC_RNG entropy pollinglloyd2015-03-181-4/+6
|
* Add BOTAN_NOEXCEPT macro to work around missing noexcept in VS 2013.rcdailey2015-03-081-0/+8
| | | | Based on github pull req 23 by Robert Daily.
* Add specialized reducers for P-192, P-224, P-256 and P-384lloyd2015-02-261-0/+6
|
* Remove memset_s, not implemented on any machine I can test on andlloyd2015-01-231-0/+6
| | | | | | | | problematic for requiring a special define before the first include of string.h. Instead optionally call memset via a volatile function pointer as a faster alternative to byte at a time writes. Github 42, 45
* VC2013 doesn't support __func__. Github #22lloyd2014-05-151-0/+6
|
* NetBSD portability fix and some performance tweaks in locking allocatorlloyd2014-04-051-1/+1
|
* Add config and version subcommandslloyd2014-02-131-0/+5
|
* Only service small allocations out of the mlock poollloyd2013-11-201-0/+3
|
* Add to build.h templatelloyd2013-11-091-0/+7
|
* Always include modules requiring ISA extensions as long as thelloyd2013-04-171-1/+1
| | | | | | | | | | | compiler and target platform might support it. For instance the AES SSSE3 code is now always in any x86 build, with just that specific file being compiled with -mssse3. Since we'll only call that code if cpuid confirms it works at runtime, we don't have portability issues, and it can be safely included in generic builds (eg for distributions). Tweak how machine specific compiler flags are generated to be a bit easier to maintain.
* Set the release type (unreleased, released, snapshot) inlloyd2013-03-041-0/+2
| | | | | botan_version.py via the release script, and propagate it to version.cpp via build.h
* Remove BOTAN_MEM_POOL_CHUNK_SIZE macro from build.h, no longer used.lloyd2012-06-191-5/+4
| | | | | Move Karatsuba cutoffs to mp_karat.cpp as that is the only place that uses them and I doubt these get tweaked much (ever).
* Properly align return values of mlock_allocator. Be more careful aboutlloyd2012-05-221-1/+1
| | | | | | | | | | | pointer checks as a sufficiently smart compiler might optimize way pointer comparisons otherwise. Avoid using an iterator value after we have released it from the map. Reduce the default buffer size to 1K to reduce pressure on mlock memory. Drop the old mlock wrapper code.
* Tick to 1.10.1 unreleased.lloyd2011-06-301-0/+2
| | | | | Try to detect the mtn revision (by shelling out to mtn automate), and including it in build.h as BOTAN_VERSION_VC_REVISION.
* When building for GCC, always get the version number, and turn off TR1lloyd2011-05-031-1/+1
| | | | | | | | | | | and -fvisibility support if the version is too old. You can also turn them off explicitly with the (hidden) option --without-visibility. We get the version number from the binary specified with --cc-bin, if the user set that, rather than from plain 'g++'. Fix Solaris install - apparently 'install' cmd is broken/dumb. Fix Ekopath flags for submodels.
* Disable the by default strong key checking on loading a privatelloyd2011-03-211-1/+1
| | | | | | key. This slowed down loading private keys somewhat dramatically. Most people don't care, but both groups using botan for DNSSEC has performance problems due to it.
* Add a new configure.py option --distribution-info which sets a macrolloyd2011-02-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | in build.h named BOTAN_DISTRIBUTION_INFO. The default value is 'unspecified'. People packaging botan could set this to another value, for instance 'Gentoo 1.9.13-r3' or 'Debian 1.9.13-1', or 'pristine' to indicate a completely unmodified/stock version. This was suggested by Zooko for Crypto++ in http://sourceforge.net/apps/trac/cryptopp/ticket/11 and seemed like an idea worth stealing. Don't default the version datestmap to the current day if unset, instead set to zero. This allows applications to detect unreleased versions. Document that version_datestamp will return zero for unreleased versions. Change the version_string function to return more information about the current version, including the release date and distribution information. It will now return strings like: Botan 1.9.13 (released 20110207, distribution Gentoo 1.9.13-r3) or for an unreleased version: Botan 1.9.13 (unreleased version, distribution unspecified)
* Clang's deprecated doesn't support a message at alllloyd2010-11-031-1/+1
|
* Fix macroslloyd2010-11-031-3/+3
|
* Modify definition of BOTAN_DEPRECATED macro to deal with Clang (whichlloyd2010-11-031-2/+12
| | | | | pretends to be GCC but doesn't understand the warning attribute), and older GCC (which also has issues with it)
* Make it possible to disable deprecation warnings by defininglloyd2010-11-021-21/+25
| | | | | | | the macro BOTAN_NO_DEPRECATED_WARNINGS Remove the full modules list; not that useful/informative. Put the remaining build information at the top of the file.
* Add a BOTAN_DEPRECATED macro which can provide compile-timelloyd2010-11-021-1/+12
| | | | deprecation warnings (at least for GCC and VC++). Use in some places.
* Typo fixlloyd2010-06-281-1/+1
|
* Expose a datestamp in build.h, provide function in version.h forlloyd2010-06-141-0/+2
| | | | getting runtime value.
* Change BlockCipher::parallelism() to return the native parallelism oflloyd2010-05-251-0/+1
| | | | | | | | | | | | | | | | | | | | the implementation rather than the preferred one. Update all implementations. Add a new function parallel_bytes() which returns parallelism() * BLOCK_SIZE * BUILD_TIME_CONSTANT This is because i noticed all current calls of parallelism() just multiplied the result by the block size already, so this simplified that code. The build time constant is set to 4, which was the previous default return value of parallelism(). However the SIMD versions returned 2*native paralellism rather than 4*, so this increases the buffer sizes used for those algorithms. The constant multiple lives in buildh.in and build.h, and is named BOTAN_BLOCK_CIPHER_PAR_MULT.
* Add a build.h macro BOTAN_GCC_VERSION which is set to major*100+minor*10+patchlloyd2010-05-131-0/+7
| | | | | | | | if we are compiling under GCC, or 0 otherwise. Use it in cpuid.cpp for use of GCC's cpuid.h header file. If we don't have a method of calling cpuid, print a warning.
* Add back in blinding to RSA, RW, ElGamal, and DH.lloyd2010-03-081-1/+0
| | | | | | | | | | | | | | | | There are multiple unsatisfactory elements to the current solution, as compared to how blinding was previously done: Firstly, blinding is only used in the baseline implementations; the code using OpenSSL and GMP is not protected by blinding at all. Secondly, at the point we need to set up blinding, there is no access to a PRNG. Currently I am going with a quite nasty solution, of using a private key parameter to seed a simple PRNG constructed as: SHA-512(TS1 || private_key_param || public_key_param || TS2) I really want to fix both of these elements but I'm not sure how to do so easily.
* Instead of the mode parallelism being specified via macros, have itlloyd2010-02-251-11/+0
| | | | | | | | | depend on the particular implementation. Add a new virtual function to BlockCipher named parallelism that returns the number of blocks the cipher object could or might want to process in parallel. Currently set to 1 by default but may make sense to increase this for even scalar implementations since it seems like better caching behavior makes it a win.
* Make all parallel block modes 16 blocks widelloyd2010-01-041-4/+4
|
* Define EAX in terms of CTR mode instead of implementing it within EAX_Base.lloyd2009-12-231-2/+1
| | | | | | | | | This is somewhat faster, especially with SIMD-ed ciphers. The ceiling on performance looks to be CMAC, which is iterative and thus can't take advantage of them. Remove BOTAN_PARALLEL_BLOCKS_EAX, since it implicitly is whatever CTR is doing. Bump CTR's default parallel blocks to 16.
* Fix compiler macro for MSVC warningslloyd2009-12-231-1/+1
|
* Use /W3 with VC++ (/W4 is really noisy, but it seems mostly useless stuff).lloyd2009-12-231-0/+6
| | | | | | But, disable warnings 4250 and 4251 in build.h with a pragma. Both seem impossible to work around without very major code changes, and both seem harmless AFAICT.
* Define BOTAN_TARGET_CPU_HAS_KNOWN_ENDIANNESS if the target CPU is known tolloyd2009-12-221-0/+5
| | | | be either fixed little or big endian. Unset if mixed endian or unknown.
* Un-internal loadstor.h (and its header deps, rotate.h andlloyd2009-12-211-1/+1
| | | | | | | | | | | | | | 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).
* Most compilers had empty dll_*_flags; remove them since the default islloyd2009-11-191-1/+1
| | | | | | | empty anyway. For VC++ (only user) set BOTAN_DLL to dllimport by default (for apps), and then redefine as dllexport when building the library.
* Add parallel block toggles for CBC and CFB (decrypt direction only)lloyd2009-09-101-1/+7
|
* Modify Keyed_Filter so it is a pure interfacelloyd2009-08-111-0/+6
| | | | | | | | | | Modify ECB to use parallel encryption/decryption where possible Add toggles in build.h specifying how many blocks to process in parallel. Defaults to 8 blocks for all modes, which is sufficient that any likely parallelism can be extracted (via SIMD or concurrent execution) but not so much as to seem likely to cause cache problems (8*128 bits = 128 bytes, or two x86 cache lines)
* Macro defines are split up in the build.h template nowlloyd2009-07-021-1/+9
|
* Change the makefile template language somewhat. Previously variableslloyd2009-07-011-13/+13
| | | | | | | | | | | | | | | | | had been denoted with @{var:NAME}, this has changed to %{NAME}. This is pretty much a wash for configure.pl but it makes it much easier to process the templates using Python's string.Template. The logic being the 'var:' prefix had been to support conditional statements in the templates (using an 'if:' prefix), but this functionality was not being used and support for it is removed from configure.pl in this revision. For a similiar reason, rename a number of template variables with hyphens in their name to use underscores instead. This is slightly more consistent anyway (since many variable names had already used _ instead of -) but more importantly makes them much easier to deal with using aforementioned Python template code. This should not result in any user-visible change (unless I messed up).
* Make the level of key consistency checking performed be a build constantlloyd2008-11-111-0/+5
| | | | instead of runtime configurable.
* Add a new switch to configure.pl --with-tr1-implementation whichlloyd2008-10-121-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | accepts options 'boost' and 'system'. Now GF(p) math (and indirectly, ECDSA) will be enabled if --with-tr1=boost or --with-tr1=system is passed at build time to enable a shared_ptr implementation. Modules can now specify that they require TR1, in which case they will only be autoloaded if a TR1 implementation was set (they can choose which one to use by checking the feature macros from build.h) The gfpmath module was set to load only on request. That has changed to load automatically (but will only do so if a TR1 impl is set as described above). CVC has also been marked as requiring TR1. (ECDSA/ECDH are not, since they do not use tr1 shared_ptr directly) Update and cleanup help output. Do not print the list of modules in --help anymore (too long); you can still get the list (in an easier to parse format) --module-info. Reorganize the help text so the more useful options are described closer to the top. Fix the --with-endian and --with-unaligned-mem options: they were being accepted but ignored.