Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix a bug in bigint_sub_abs | Jack Lloyd | 2018-12-02 | 2 | -0/+10 |
| | | | | | | | If one of the values had leading zero words, this could end up calling bigint_sub with x_size < y_size. OSS-Fuzz 11664 and 11656 | ||||
* | One variable per line | Jack Lloyd | 2018-12-02 | 1 | -1/+2 |
| | |||||
* | Better debugging output when a test fails | Jack Lloyd | 2018-12-02 | 1 | -7/+15 |
| | | | | Printing the output key makes it easier to find the offending test. | ||||
* | Update news | Jack Lloyd | 2018-12-01 | 2 | -0/+26 |
| | |||||
* | Merge GH #1755 Various BigInt improvements | Jack Lloyd | 2018-12-01 | 13 | -108/+178 |
|\ | |||||
| * | Correct a bug in BigInt::operator%(word) | Jack Lloyd | 2018-12-01 | 4 | -23/+43 |
| | | | | | | | | | | | | If reducing a negative number modulo a power of 2, an incorrect result would be returned. This only affected the versions taking a single word as the modulo. | ||||
| * | No need to check x when checking if a point is at infinity | Jack Lloyd | 2018-12-01 | 1 | -2/+1 |
| | | | | | | | | I'm not sure why this was here. | ||||
| * | Unroll mod_sub for 6 words also, helps P-384 quite a bit | Jack Lloyd | 2018-12-01 | 1 | -0/+2 |
| | | |||||
| * | Avoid conditional operations in P-521 reduction | Jack Lloyd | 2018-12-01 | 1 | -30/+31 |
| | | |||||
| * | Add BigInt::mod_mul | Jack Lloyd | 2018-12-01 | 9 | -56/+104 |
|/ | |||||
* | Merge GH #1754 Simplify BigInt add/subtract | Jack Lloyd | 2018-12-01 | 6 | -187/+175 |
|\ | |||||
| * | Simplify BigInt addition and subtraction | Jack Lloyd | 2018-11-30 | 6 | -187/+175 |
|/ | | | | | Addition already has to handle negative numbers so make it do double duty for subtraction. | ||||
* | Fix a bug in OneAndZeros unpadding | Jack Lloyd | 2018-11-30 | 4 | -24/+54 |
| | | | | | | | Introduced in b13c0cc8590199d, it could only trigger if the block size was more than 256 bytes. In that case an invalid padding could be accepted. OSS-Fuzz 11608 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11608) | ||||
* | Fix debug asserts, and add it to CI | Jack Lloyd | 2018-11-29 | 2 | -2/+4 |
| | |||||
* | Merge GH #1751 Add CT::Mask<T> | Jack Lloyd | 2018-11-29 | 20 | -317/+519 |
|\ | |||||
| * | Add CT::Mask type | Jack Lloyd | 2018-11-28 | 20 | -317/+519 |
|/ | |||||
* | Fix typo [ci skip] | Jack Lloyd | 2018-11-27 | 1 | -1/+1 |
| | |||||
* | Merge GH #1750 Improve BigInt const time behavior | Jack Lloyd | 2018-11-27 | 8 | -157/+349 |
|\ | |||||
| * | Need to ensure minimum size here | Jack Lloyd | 2018-11-27 | 1 | -0/+1 |
| | | | | | | | | Previously handled by the early exit | ||||
| * | Optimizations for NIST reduction | Jack Lloyd | 2018-11-26 | 1 | -22/+20 |
| | | | | | | | | Also avoid an early exit in P-521 | ||||
| * | Make more BigInt functions const-time | Jack Lloyd | 2018-11-26 | 7 | -135/+328 |
|/ | | | | In particular comparisons, calc sig words, and mod_sub are const time now. | ||||
* | Deprecate SRP suites [ci skip] | Jack Lloyd | 2018-11-26 | 1 | -0/+4 |
| | | | | | This is kind of implicit by the deprecation of CBC ciphersuites but should be called out more clearly. | ||||
* | Merge GH #1744 Make exception throws easier to debug | Jack Lloyd | 2018-11-23 | 81 | -359/+655 |
|\ | |||||
| * | Make exceptions easier to translate to error codes | Jack Lloyd | 2018-11-23 | 81 | -359/+655 |
| | | | | | | | | | | | | | | | | | | | | | | Avoid throwing base Botan::Exception type, as it is difficult to determine what the error is in that case. Add Exception::error_code and Exception::error_type which allows (for error code) more information about the error and (for error type) allows knowing the error type without requiring a sequence of catches. See GH #1742 | ||||
* | | Implement const time select based on xor-swap | Jack Lloyd | 2018-11-23 | 1 | -1/+2 |
| | | | | | | | | | | For some compilers this may make the difference between compiling using bitmasks as intendeded, and compiling with a conditional jump. | ||||
* | | In operator>> avoid testing for zero unless required | Jack Lloyd | 2018-11-23 | 1 | -1/+1 |
|/ | |||||
* | Simplify Salsa20 xor loop | Jack Lloyd | 2018-11-21 | 1 | -4/+7 |
| | |||||
* | Build docs last in makefile target | Jack Lloyd | 2018-11-21 | 1 | -1/+1 |
| | | | | Closes #1746 | ||||
* | Fix type error | Jack Lloyd | 2018-11-21 | 1 | -1/+1 |
| | | | | Closes #1747 | ||||
* | Slight simplification to ChaCha loop | Jack Lloyd | 2018-11-21 | 1 | -7/+13 |
| | |||||
* | When available use RDRAND for Stateful_RNG additional data | Jack Lloyd | 2018-11-21 | 1 | -4/+19 |
| | |||||
* | Use builtin_bswap16 when available | Jack Lloyd | 2018-11-20 | 1 | -0/+4 |
| | |||||
* | Merge GH #1743 Avoid memset/memcpy in library code | Jack Lloyd | 2018-11-19 | 20 | -58/+84 |
|\ | |||||
| * | Add typecast_copy | Jack Lloyd | 2018-11-17 | 3 | -30/+48 |
| | | | | | | | | | | Wraps memcpy in the cases where we really are doing a type conversion using memcpy | ||||
| * | Avoid calling memset, memcpy within library code | Jack Lloyd | 2018-11-17 | 17 | -27/+36 |
| | | | | | | | | | | | | | | | | | | Prefer using wrappers in mem_utils for this. Current exception is where memcpy is being used to convert between two different types, since copy_mem requires input and output pointers have the same type. There should be a new function to handle conversion-via-memcpy operation. | ||||
| * | Remove needless memset operation | Jack Lloyd | 2018-11-17 | 1 | -1/+0 |
| | | |||||
* | | Avoid a crank from Sonar [ci skip] | Jack Lloyd | 2018-11-17 | 1 | -1/+1 |
|/ | |||||
* | Disable Sonar build | Jack Lloyd | 2018-11-17 | 1 | -5/+5 |
| | | | | | | | | | | | | It is suddenly 5x slower for an unknown reason https://community.sonarsource.com/t/sonar-analysis-step-suddenly-much-5x-slower-on-travis-ci/4364 Now it either times out or else completely dominates the runtime for Travis, either is not acceptable. Leave the framework for using Sonar in CI for now so it is easy to test if things have improved later. If things are still broken in a month or two I'll probably just drop support for Sonar. | ||||
* | Fix Sonar warning | Jack Lloyd | 2018-11-17 | 1 | -1/+1 |
| | |||||
* | Attempt to fix Sonar build problem | Jack Lloyd | 2018-11-17 | 2 | -1/+8 |
| | | | | | | The build is timing out. Use -Os instead of -O3 in an attempt to speed up the build step, and enable multithreaded analysis as that step is also quite slow. | ||||
* | Use vzeroupper/vzeroall to transition between AVX and SSE states. | Jack Lloyd | 2018-11-10 | 4 | -0/+32 |
| | | | | | | | | Otherwise some CPUs suffer serious stalls. Using vzeroall on exit also has the nice effect that we don't have to worry about register contents leaking. HT to @noloader for doing the background research on this. | ||||
* | Avoid an implausible integer overflow flagged by Coverity [ci skip] | Jack Lloyd | 2018-11-10 | 1 | -1/+6 |
| | |||||
* | Merge GH #1738 Avoid conditional branches during NIST reductions | Jack Lloyd | 2018-11-10 | 2 | -59/+58 |
|\ | |||||
| * | Avoid branching in the NIST prime reduction code | Jack Lloyd | 2018-11-09 | 2 | -59/+58 |
|/ | | | | | This is still vulnerable to a cache-based side channel since the multiple chosen leaks the final carry. | ||||
* | Merge GH #1737 Inline mp_core | Jack Lloyd | 2018-11-09 | 4 | -604/+439 |
|\ | |||||
| * | Use resize instead of shrink_to_fit | Jack Lloyd | 2018-11-09 | 2 | -3/+10 |
| | | | | | | | | Avoid recalculating significant words which slows down reduction | ||||
| * | Inline the contents of mp_core.cpp | Jack Lloyd | 2018-11-09 | 2 | -601/+429 |
| | | |||||
* | | Bump ABI version | Jack Lloyd | 2018-11-09 | 1 | -1/+1 |
| | | | | | | | | BigInt has changed size | ||||
* | | Cleanups in Poly1305 | Jack Lloyd | 2018-11-09 | 1 | -23/+23 |
| | | |||||
* | | Document the problem of old binutils | Jack Lloyd | 2018-11-09 | 1 | -0/+14 |
| | | | | | | | | See GH #1721 and #1718 |