aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils
Commit message (Collapse)AuthorAgeFilesLines
* Remove alloc module; move secmem.h to base and locking_allocator to utilsJack Lloyd2015-08-294-3/+358
|
* Refactor ./botan speedSimon Warta2015-08-211-0/+10
| | | | | | | * Add random_prime benchmark * Add is_prime benchmark * Respect runtime in benchmark_transform(). This sets default runtime from 2s to 0.5s per configuration
* Add stricter time parsing; Add more testsSimon Warta2015-08-111-0/+11
|
* Strict uint32 parsingSimon Warta2015-08-111-0/+10
|
* Avoid integer overlow in string->uint32 converterSimon Warta2015-08-101-3/+16
| | | | | | | On systems where unsigned long is uint64 (typically 64 bit systems), a string containing a number greater than 2^32-1 was sucessfully converted to a uint64 and than reduced to uint32, causing an overflow. E.g. to_u32bit("4294967296") was 0 and to_u32bit("4294967297") was 1.
* Merge pull request #232 from tiwoc/clang-cpuidSimon Warta2015-08-031-1/+1
|\ | | | | Enable use of cpuid.h with clang
| * Enable use of cpuid.h with clangDaniel Seither2015-07-301-1/+1
| |
* | utils: Add missing overridesDaniel Seither2015-07-301-1/+1
|/
* Add boost implementation of timegm()Simon Warta2015-07-271-0/+36
|
* Add mktime fallback for non-POSIX timegm()Simon Warta2015-07-271-5/+56
| | | | Closes #202
* Avoid 0 as nullpointer warning on MinGWSimon Warta2015-07-271-1/+1
|
* Remove the x86 asm versions of MD4, MD5, SHA-1 and SerpentJack Lloyd2015-07-254-305/+0
| | | | | | | With modern compilers, all are slower than the C++ and SSE2 versions of the same algos. GH #216
* Add Android OSDaniel Seither2015-07-173-0/+4
| | | | | | The android.txt is a copy of linux.txt minus the getsid feature (Android's libc, Bionic, doesn't support it) and the alias linux-gnu. It is supported anywhere where linux is supported.
* Add MSVC stl filesystem implementationSimon Warta2015-07-162-3/+31
| | | | Closes #199
* Refactor internal/filesystem.hSimon Warta2015-07-164-38/+61
| | | | Closes #198
* Add missing include <string> in calendar.hSimon Warta2015-07-161-0/+1
|
* Fix time range issue for 32 bit platformsSimon Warta2015-07-162-6/+39
|
* Fix round_upSimon Warta2015-07-153-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. src/lib/codec/base64/base64.cpp: : (round_up<size_t>(input_length, 3) / 3) * 4; 2. src/lib/codec/base64/base64.cpp: : (round_up<size_t>(input_length, 4) * 3) / 4; 3. src/lib/filters/transform_filter.cpp: return round_up(target_size, update_granularity); 4. src/lib/math/bigint/bigint.cpp: m_reg.resize(round_up<size_t>(size, 8)); 5. src/lib/math/bigint/bigint.cpp: m_reg.resize(round_up<size_t>((length / WORD_BYTES) + 1, 8)); 6. src/lib/math/numbertheory/mp_numth.cpp: BigInt z(BigInt::Positive, round_up<size_t>(2*x_sw, 16)); 7. src/lib/modes/cbc/cbc.cpp: return round_up(input_length, cipher().block_size()); 8. src/lib/modes/ecb/ecb.cpp: return round_up(input_length, cipher().block_size()); 9. src/lib/modes/xts/xts.cpp: return round_up(input_length, cipher().block_size()); 10. src/lib/pbkdf/pbkdf2/pbkdf2.cpp: const size_t blocks_needed = round_up(out_len, prf_sz) / prf_sz; 11. src/lib/tls/tls_record.cpp: const size_t buf_size = round_up( 12. src/lib/utils/rounding.h:inline T round_up(T n, T align_to) 1. Reason for change 2. Reason for change 3. first argument cannot be 0 (`target_size = 1024`) 4. Is a bug in the current implementation iff `size = 0` 5. first argument cannot be 0 6. round_up should return 0 if `x_sw = 0` 7. ? 8. ? 9. ? 10. first argument cannot be 0 (`if(out_len == 0) return 0;`) 11. first argument is unlikely to be 0 (`iv_size + msg_length + mac_size + (block_size ? 1 : 0)`) 12. Implementation
* Fix to_string for BER_Object when debug STL is usedSimon Warta2015-07-071-0/+7
|
* Use <cstdint>; Remove unused namespace Botan_typesSimon Warta2015-07-031-22/+14
|
* lib/utils: Convert &vec[0] to vec.data()Simon Warta2015-06-235-13/+12
|
* Add missing headers fixing GCC 4.7 buildlloyd2015-06-171-0/+1
|
* Avoid 0-defining BOTAN_USE_GCC_INLINE_ASMsimon2015-05-312-4/+4
| | | | GH #103
* Fix code that triggers a strange MSVC 'performance warning'git2015-04-081-1/+1
| | | | Github pull 74 from Chris Desjardins
* Comile fixes for VC 2013. Based on github pull 56neusdan2015-03-101-0/+4
|
* Add BOTAN_NOEXCEPT macro to work around missing noexcept in VS 2013.rcdailey2015-03-081-1/+1
| | | | Based on github pull req 23 by Robert Daily.
* Fix macro checks for zero_mem. Github 55lloyd2015-03-061-2/+2
|
* Add missing includes, broke clanglloyd2015-03-041-0/+2
|
* Add specialized reducers for P-192, P-224, P-256 and P-384lloyd2015-02-261-0/+1
|
* Hide all uses of boost filesystem in fs.cpp. Use readdir as anlloyd2015-02-213-0/+102
| | | | | alternate implementation for Unix and add some feature checks so a boost-free build of the tests and command line are possible again.
* Add version_cstr (returns const char*) and move tag_size from AEAD tolloyd2015-02-112-0/+7
| | | | Cipher_Mode. Add missing includes in entropy sources, noticed by clang.
* Move Cipher_Mode enum out of types.h, move stream cipher mode to new headerlloyd2015-02-051-6/+0
|
* Enable OpenSSL for providing ciphers and hashes again.lloyd2015-02-054-217/+0
|
* Remove algo factory, engines, global RNG, global state, etc.lloyd2015-02-0414-13/+668
| | | | | | | | | | | | | | | Convert all uses of Algorithm_Factory and the engines to using Algo_Registry The shared pool of entropy sources remains but is moved to EntropySource. With that and few remaining initializations (default OIDs and aliases) moved elsewhere, the global state is empty and init and shutdown are no-ops. Remove almost all of the headers and code for handling the global state, except LibraryInitializer which remains as a compatability stub. Update seeding for blinding so only one hacky almost-global RNG instance needs to be setup instead of across all pubkey uses (it uses either the system RNG or an AutoSeeded_RNG if the system RNG is not available).
* Convert PK operations to using Algo_Registry instead of Engine.lloyd2015-02-031-6/+6
| | | | Remove global PRNG.
* Add a runtime map of string->func() which when called returnlloyd2015-01-283-17/+34
| | | | | | | | | | | | | | | | | Transforms and BlockCiphers. Registration for all types is done at startup but is very cheap as just a std::function and a std::map entry are created, no actual objects are created until needed. This is a huge improvement over Algorithm_Factory which used T::clone() as the function and thus kept a prototype object of each type in memory. Replace existing lookup mechanisms for ciphers, AEADs, and compression to use the transform lookup. The existing Engine framework remains in place for BlockCipher, but the engines now just call to the registry instead of having hardcoded lookups. s/Transformation/Transform/ with typedefs for compatability. Remove lib/selftest code (for runtime selftesting): not the right approach.
* Reference memset via std namespacelloyd2015-01-271-1/+1
|
* Don't define overloads if there is no native uint128_t. Github 47lloyd2015-01-271-0/+2
|
* Add support for configuring a TLS::Policy by text filelloyd2015-01-233-103/+39
|
* Centralize where string.h/cstring is included to mem_ops.hlloyd2015-01-231-1/+1
| | | | See github 42 for background
* Amalgamation fixeslloyd2015-01-231-0/+11
|
* Remove memset_s, not implemented on any machine I can test on andlloyd2015-01-231-7/+5
| | | | | | | | 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
* Ensure all files have copyright and license info.lloyd2015-01-1043-45/+47
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Add missing includelloyd2015-01-081-0/+1
|
* Add SHA-512/256lloyd2015-01-081-0/+42
| | | | | Define some new functions for copying out arrays of words and use them across hashes.
* Use RtlSecureZeroMemory or memset_s if availablelloyd2015-01-071-0/+13
|
* Add Poly1305, based on poly1305-donna by Andrew Moon.lloyd2014-12-292-0/+117
|
* Add abstract database interface so applications can easily store infolloyd2014-12-205-67/+122
| | | | | | in places other than sqlite3, though sqlite3 remains the only implementation. The interface is currently limited to precisely the functionality the TLS session manager needs and will likely expand.
* Add MinGW support for the CryptoAPI RNG. Also disable the dependencieslloyd2014-12-171-0/+1
| | | | | | | | in auto_rng for a working entropy source as in situations where it doesn't work almost none of the library builds. Disable boost by default from the library. Github issue 34. Unrelated - remove long dead Tru64 as a target.
* Add an implementation of McEliece encryption based on HyMESfstrenzke2014-11-263-13/+56
| | | | | | | (https://www.rocq.inria.fr/secret/CBCrypto/index.php?pg=hymes). The original version is LGPL but cryptsource GmbH has secured permission to release it under a BSD license. Also includes the Overbeck CCA2 message encoding scheme.