summaryrefslogtreecommitdiff
path: root/integer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use std namespace for memset, memcpy, memcmp (#1204)Jeffrey Walton2023-04-151-7/+7
|
* Fix typos (PR# 1099)Dimitris Apostolou2022-01-041-3/+3
|
* Avoid word ops for Integer And, Or, XorJeffrey Walton2021-10-101-6/+18
|
* Optimize Integer bit operations fix (GH #1072)Jeffrey Walton2021-10-081-24/+30
| | | | This fix uses IntegerSecBlock directly. It avoids the potential second allocation during Grow at the expense of a potential slightly larger SecBlock
* Fix undersized SecBlock buffer in Integer bit operations (GH #1072)Jeffrey Walton2021-10-081-0/+18
|
* Add octal and decimal literal prefix to Integer classJeffrey Walton2021-09-191-3/+19
|
* Tighten assert on Integer::OpenPGPEncodeJeffrey Walton2020-12-081-2/+2
|
* Use define CRYPTOPP_CXX11_STATIC_INIT nameJeffrey Walton2020-08-071-3/+3
|
* Update commentsJeffrey Walton2019-10-191-40/+15
|
* Use umulh for Aarch64 multiplyJeffrey Walton2019-10-181-1/+3
| | | | This saves about 30% on the Integer multiply operations. For example, RSA 1024 encryption goes from 0.068 to 0.044 ms/op. RSA 2048 goes from 0.170 to 0.100 ms/op. We should have taken this sooner. Ugh...
* Update commentsJeffrey Walton2019-06-091-7/+7
|
* Disable BMI2 code paths in Integer class (GH #850)Jeffrey Walton2019-06-011-1/+7
|
* Use BMI2 when available for MultiplyWordsLoHi, MulAcc and friendsJeffrey Walton2019-05-311-5/+6
| | | | Using BMI2 saves about 0.03 ms on a Core i5 6400 @ 2.7 GHz. It is small but measurable. It also gives GCC more freedom in selecting memory or register operands
* Use BMI2 when available for MultiplyWordsLoHi, MulAcc and friendsJeffrey Walton2019-05-311-0/+7
| | | | Using BMI2 saves about 0.03 ms on a Core i5 6400 @ 2.7 GHz. It is small but measurable. It also gives GCC more freedom in selecting memory or register operands
* Clear UBsan warning -Wstringop-overflowJeffrey Walton2019-04-271-2/+11
|
* Use IsPowerOf2 in Integer::DivideJeffrey Walton2019-02-051-1/+3
|
* Update commentsJeffrey Walton2019-02-051-24/+36
|
* Fix _M_IX86 typoJeffrey Walton2019-01-041-1/+1
|
* Use Microsoft x86-beased defined for __emuluJeffrey Walton2019-01-041-1/+1
|
* Fix Integer ARM64 compile with MSVC compiler (GH #776)Jeffrey Walton2019-01-031-1/+1
|
* Add CRYPTOPP_DISABLE_MIXED_ASM define and feature test (GH #756, PR #757)Jeffrey Walton2018-12-051-1/+1
|
* Add IBM XLC init priority supportJeffrey Walton2018-11-301-3/+10
|
* Sync CRYPTOPP_{BIG|LITTLE}_ENDIAN with AutotoolsJeffrey Walton2018-10-281-2/+2
| | | | Autotools sets up its config.h file with the '#define XXX 0' or '#define XXX 1' pattern. This check-in makes the sources Autotools aware. We need to verify CMake does the same
* Revert "Sync CRYPTOPP_{BIG|LITTLE}_ENDIAN with Autotools"Jeffrey Walton2018-10-281-1/+1
| | | | This reverts commit 04306f86ac36. It broke GCC 4.8 on PowerPC.
* Sync CRYPTOPP_{BIG|LITTLE}_ENDIAN with AutotoolsJeffrey Walton2018-10-271-1/+1
|
* Avoid Singleton when possible (GH #708)Jeffrey Walton2018-08-221-4/+4
| | | | Also clear several sign conversion warnings
* Update commentsJeffrey Walton2018-08-221-7/+5
|
* Update comments in integer.cppJeffrey Walton2018-08-211-0/+5
|
* Update comments in integer.cppJeffrey Walton2018-08-211-19/+31
|
* Avoid std::call_once (GH #707)Jeffrey Walton2018-08-211-66/+74
| | | | | This commit also favors init priorities over C++ dynamic initialization. After the std::call_once problems on Sparc and PowerPC I'm worried about problems with Dynamic Initialization and Destruction with Concurrency. We also do away with supressing warnings and use CRYPTOPP_UNUSED instead.
* Fix compile on Visual Studio 2005 without serve packsJeffrey Walton2018-08-201-1/+1
|
* Use IsZero()/NotZero() for 0 denominator testJeffrey Walton2018-07-031-4/+4
|
* Use '*this >= m' for InverseMod reductionJeffrey Walton2018-03-261-3/+3
| | | | The previous test used '*this > m', which did not capture 'm'
* Fix a_exp_b_mod_c and divide by 0 (GH #604)Jeffrey Walton2018-03-251-0/+6
|
* Add additional Integer class testsJeffrey Walton2018-03-251-1/+6
|
* Fix incorrect InverseMod (GH #602)Jeffrey Walton2018-03-251-2/+1
| | | | | | | | cryptest.sh revealed a corner case still producing an incorrect result. We need to check for '*this > m', not '*this > 2m-1'. The corner case looks obscure. The failure surfaced as 1 failed self test for about every 2048 tests. It was also in a code path where 'a' was explicitly set to '2m-1', with 'm' random. The test result can be duplicated with 'cryptest.exe v 9996 1521969687'. The value '1521969687' is a seed for the random number generator to reproduce.
* Fix incorrect InverseMod (GH #602) (#603)Jeffrey Walton2018-03-251-3/+17
|
* Clear clang-tidy warningsJeffrey Walton2018-01-241-25/+15
|
* Add CRYPTOPP_TABLE, remove CRYPTOPP_SECTIONJeffrey Walton2018-01-211-1/+5
|
* Clear clang-tidy warningsJeffrey Walton2018-01-021-8/+12
| | | | This commit also tweaks the way Integer parses byte arrays. The modified routines are slightly faster. On a Core-i5 6400 the self tests are 0.1 to 0.2 seconds faster
* Provide virtual destructor for Threefish_BaseJeffrey Walton2017-11-191-34/+50
|
* Fix SunCC 12.2 compileJeffrey Walton2017-11-131-5/+6
|
* Reduce C++ file scope class objectsJeffrey Walton2017-11-121-70/+62
| | | | Update comments and documentation
* Prefix IS_LITTLE_ENDIAN and IS_BIG_ENDIAN with CRYPTOPPJeffrey Walton2017-11-101-2/+2
|
* Revert "Bump Visual Studio version number for checked iterators (GH #496)"Jeffrey Walton2017-09-131-1/+1
| | | | This reverts commit 3b6e17b1. The version in Master was correct. The version the OP was using was incorrect.
* Bump Visual Studio version number for checked iterators (GH #496)Jeffrey Walton2017-09-131-1/+1
|
* Remove BOOL macro value (GH #462)Jeffrey Walton2017-08-201-6/+4
| | | | Currently the CRYPTOPP_BOOL_XXX macros set the macro value to 0 or 1. If we remove setting the 0 value (the #else part of the expression), then the self tests speed up by about 0.3 seconds. I can't explain it, but I have observed it repeatedly. This check-in prepares for the removal in Upstream master
* Fix Windows compilation issues (by RaptorFactor) (#444)Marcel Raad2017-07-171-0/+2
| | | | | | | | | | | | * Fix compilation on Windows with /DUNICODE * Fix linking of fipstest for MSVC targeting ARM (__crt_debugger_hook is not available). * Fix build for Clang on Windows with optimizations on. * Fix a warning about a non-existant warning under Clang. * Fix compilation under Intel C++ 18.0 on Windows
* Clear coverity finding CONSTANT_EXPRESSION_RESULT (CID 147833)Jeffrey Walton2017-05-201-1/+1
|
* Switch to _MSC_FULL_VER for SP1 releasesJeffrey Walton2017-05-111-1/+1
|