aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream
Commit message (Collapse)AuthorAgeFilesLines
* Refactor: remove big-endian addition code duplicationRené Meusel2017-04-132-18/+27
|
* Refactor: use ::seek(0) in CTR_BE::set_iv()René Meusel2017-04-131-18/+1
|
* Add implementation of CTR_BE::seek()René Meusel2017-04-132-2/+31
|
* Content:Tomasz Frydrych2017-04-031-1/+1
| | | | | | | | | * fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations) * `default` specifier instead of `{}` in some places(probably all) * removal of unreachable code (for example `return` after `throw`) * removal of compilation unit only visible, but not used functions * fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT` * removed not needed semicolons
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-028-8/+24
|
* Support zero-length IV in ChaChaJack Lloyd2017-02-022-3/+17
| | | | Equivalent to an 8 byte all-zero IV, same handling as Salsa.
* Add BOTAN_UNUSED in creator functionsJack Lloyd2017-01-271-0/+3
| | | | | | If all (say) stream ciphers are disabled, avoid unused arg warning. [ci skip]
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-1814-120/+120
| | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
* Fix dead stores in chacha_sse2_x4Never2016-11-251-6/+3
|
* Add SHAKE-128 and SHAKE-256 as hash functionsJack Lloyd2016-11-103-11/+11
|
* Salsa20 accepts empty IVsJack Lloyd2016-10-302-4/+9
| | | | Treats it as an all-zero 64-bit IV. GH #697
* Merge GH #668: Remove Algo_Registry and associated global locksJack Lloyd2016-10-248-64/+99
|\
| * Remove alias logic from SCAN_NameJack Lloyd2016-10-212-4/+8
| | | | | | | | | | | | This required taking a global lock and doing a map lookup each time an algorithm was requested (and so many times during a TLS handshake).
| * Remove Algo_RegistryJack Lloyd2016-10-218-62/+93
| | | | | | | | | | | | | | I repent my use of global constructors. I repent my use of global locks. Hopefully I will never touch this code again. :)
* | Address some Coverity warningsJack Lloyd2016-10-221-1/+1
|/ | | | Nothing exciting.
* Merge GH #669 Add SHA-3, SHAKE-128, and BoringSSL-mode NewHopeJack Lloyd2016-10-205-1/+149
|\
| * Add SHAKE-128 as stream cipherJack Lloyd2016-10-195-1/+149
| | | | | | | | | | Updates NewHope to use that instead of the hard-coded SHAKE-128, and adds toggle for BoringSSL compat mode using AES-128/CTR + SHA-256.
* | Fix doxygen warnings [ci skip]René Korthaus2016-10-191-1/+1
| |
* | Minor doxygen fixes [ci skip]René Korthaus2016-10-192-2/+2
| |
* | Improve stream doxygen [ci skip]René Korthaus2016-10-192-5/+24
|/
* Add ISA annotations to functions using SIMD, AES, etcJack Lloyd2016-10-141-0/+1
| | | | | | | | Also emit `#pragma GCC target` in the ISA specific amalgamation files. This allows compiling without any special compiler flags, at least with GCC 6.2 and Clang 3.8. The ISA annotations are ignored in MSVC, which just emits whatever instruction the intrinsic requires.
* Maintainer mode fixes.Jack Lloyd2016-09-211-1/+1
| | | | | | Mostly unused args and missing override notations. Fix DH - load_check calls were commented out for debugging.
* Change T::provider to return std::stringJack Lloyd2016-09-153-4/+3
|
* Add T::provider() to allow user to inquire about implementation usedJack Lloyd2016-09-153-0/+21
| | | | | For block ciphers, stream ciphers, hashes, MACs, and cipher modes. Cipher_Mode already had it, with a slightly different usage.
* Remove bogus declJack Lloyd2016-09-051-2/+0
|
* Merge GH #613 NewHope R-LWE key exchangeJack Lloyd2016-09-051-1/+1
|\
| * Add NEWHOPE KEM schemeJack Lloyd2016-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | Provides conjectured 200-bit security against a quantum attacker. Based on the public domain reference implementation at https://github.com/tpoeppelmann/newhope and bit-for-bit compatible with that version. Test vectors generated by the reference testvector.c
* | Avoid _mm_set_epi64x which is missing on 32-bit MSVC 12Jack Lloyd2016-09-021-8/+8
| |
* | Correct macro checkJack Lloyd2016-09-012-2/+2
| |
* | Missing increment in SSE2 version, broke ChaCha20Poly1305 testsJack Lloyd2016-09-011-0/+3
| | | | | | | | But not any ChaCha20 tests due to no long test inputs. Add one.
* | 4x interleaved SSE2Jack Lloyd2016-09-011-67/+225
| |
* | ChaCha 4 waysJack Lloyd2016-09-013-129/+153
| |
* | SSE2 ChaChaJack Lloyd2016-09-014-6/+111
|/
* Make Stream_Cipher::set_iv() pure virtualRené Korthaus2016-07-204-7/+9
| | | | | | | | | | It provided a default implementation that only checked that the length was correct, but ignored the actual data and did not notify the caller, which seemed like a rather odd behaviour. The only implementation that used this default implementation, RC4, now throws an exception.
* Adding StreamCipher::seek interface, supporting seek in ChaCha, and also ↵SimCog2016-06-1811-4/+59
| | | | adding ChaCha8 support
* Fix GCM counter incrementJack Lloyd2016-05-232-2/+18
| | | | | | | | | GCM is defined as having a 32-bit counter, but CTR_BE incremented the counter across the entire block. This caused incorrect results if a very large message (2**39 bits) was processed, or if the GHASH derived nonce ended up having a counter field near to 2**32 Thanks to Juraj Somorovsky for the bug report and repro.
* Add explicit static_cast operations to eliminate implicit cast compiler ↵Dan Brown2016-04-271-1/+1
| | | | warnings.
* Remove Transform base classJack Lloyd2016-04-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | With sufficient squinting, Transform provided an abstract base interface that covered both cipher modes and compression algorithms. However it mapped on neither of them particularly well. In addition this API had the same problem that has made me dislike the Pipe/Filter API: given a Transform&, what does it do when you put bits in? Maybe it encrypts. Maybe it compresses. It's a floor wax and a dessert topping! Currently the Cipher_Mode interface is left mostly unchanged, with the APIs previously on Transform just moved down the type hierarchy. I think there are some definite improvements possible here, wrt handling of in-place encryption, but left for a later commit. The compression API is split into two types, Compression_Algorithm and Decompression_Algorithm. Compression_Algorithm's start() call takes the compression level, allowing varying compressions with a single object. And flushing the compression state is moved to a bool param on `Compression_Algorithm::update`. All the nonsense WRT compression algorithms having zero length nonces, input granularity rules, etc as a result of using the Transform interface goes away.
* Add support for ChaCha(12)Jack Lloyd2016-04-093-9/+33
|
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-054-4/+4
| | | | explicit.
* Add final attribute to many classesJack Lloyd2016-01-105-5/+5
| | | | | | | In some cases this can offer better optimization, via devirtualization. And it lets the user know the class is not intended for derivation. Some discussion in GH #402
* Mass-prefix member vars with m_René Korthaus2016-01-082-47/+47
|
* initialize private members in rc4 headerDaniel Neus2015-12-232-5/+4
|
* some trivial compiler/PVS-Studio warning fixesDaniel Neus2015-12-221-1/+1
|
* Merge the openssl code together.Jack Lloyd2015-12-191-73/+0
| | | | | | | Having the code diffused all over the place was ugly and would not scale well to multiple alternative providers. GH #368
* Update and consolidate the test framework.Jack Lloyd2015-11-111-1/+13
| | | | | | | | | | | The tests previously had used 4 to 6 different schemes internally (the vec file reader framework, Catch, the old InSiTo Boost.Test tests, the PK/BigInt tests which escaped the rewrite in 1.11.7, plus a number of one-offs). Converge on a design that works everywhere, and update all the things. Fix also a few bugs found by the test changes: SHA-512-256 name incorrect, OpenSSL RC4 name incorrect, signature of FFI function botan_pubkey_destroy was wrong.
* Break up openssl providerJack Lloyd2015-10-191-0/+61
| | | | | | For RSA, RC4, and ECDSA put the openssl versions in the same directory as the base version. They just rely on a macro check for the openssl module to test for the desire to use OpenSSL.
* Remove use of lookup.h in favor of new T::create API.Jack Lloyd2015-09-212-6/+4
|
* Address some review comments by Simon. GH #279Jack Lloyd2015-09-212-6/+6
|
* Internal header cleanupsJack Lloyd2015-09-198-43/+5
| | | | Only user-visible change is the removal of get_byte.h