Commit Graph

28 Commits

Author SHA1 Message Date
Jeffrey Walton
247418eec0 Use Bash arithmetic operators 2019-08-11 14:54:14 -04:00
Jeffrey Walton
11c5d14f85
Whitespace check-in 2019-08-10 03:24:52 -04:00
Jeffrey Walton
04b2a20c5d
Restore ECP ABI (GH #869)
Placing AdditionFunction as an inner class of ECP broke the ABI. We need to maintain the ABI so distros can patch Crypto++ 8.2.
2019-08-09 17:34:14 -04:00
Jeffrey Walton
242df465e8
Update comments 2019-08-07 23:30:48 -04:00
Jeffrey Walton
c4700ae0b9
Avoid bitwise operation on boolean values 2019-08-07 23:27:33 -04:00
Jeffrey Walton
f3dd3d2559
Avoid temporary ECP::Point in ECP Addition and Double
This regains a lot of performance lost to the const-timeness (GH #869)
2019-08-07 02:43:13 -04:00
Jeffrey Walton
b5fe6ab383
Clear parenthesis warning with GCC 2019-08-07 01:57:59 -04:00
Jeffrey Walton
e5ab7919f9
Remove unneeded T in ECP Add()
Switch to 'R' variable in AdditionFunction to avoid shadow warnings
2019-08-06 03:28:53 -04:00
Jeffrey Walton
0ded32192e
Avoid branches in Montgomery Add() (GH #869) 2019-08-06 03:14:03 -04:00
Jeffrey Walton
5ae70e22b9
Avoid branches in Montgomery Double() (GH #869) 2019-08-06 01:23:37 -04:00
Jeffrey Walton
c9ef9420e7
Fix ECP leakage in Add() and Double() (GH #869, PR #871)
This check-in provides the fix for leaks in ECP's Add() and Double(). The fixes were taken from Joost Renes, Craig Costello, and Lejla Batina's [Complete addition formulas for prime order elliptic curves](https://eprint.iacr.org/2015/1060.pdf).

The Pull Request includes two additional changes that were related to testing the primary fix. First, an `AuthenticatedKeyAgreementWithRolesValidate` interface was added. It allows us to test key agreement when roles are involved. Roles are "client", "server", "initiator", "recipient", etc.

Second, `SetGlobalSeed` was added to `test.cpp` to help with reproducible results. We had code in two different places that set the seed value for the random number generator. But it was sloppy and doing a poor job since results could not be reproduced under some circumstances.
2019-08-05 03:51:58 -04:00
Jeffrey Walton
800dd99c60
Add init priorities for XLC compilers 2018-12-04 04:13:58 -05:00
Jeffrey Walton
099883777d
Use ANONYMOUS_NAMESPACE_END 2018-08-23 01:11:45 -04:00
Jeffrey Walton
8c450a9f7a
Avoid Singleton when possible (GH #708)
Also clear several sign conversion warnings
2018-08-22 16:36:05 -04:00
Jeffrey Walton
81b1a18063
Change file preamble to include "originally written by Wei Dai"
We have made a fair number of changes, and we don't want WD to receive credit for issues he was not part of
2017-01-27 07:05:45 -05:00
Jeffrey Walton
399a1546de Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420)
trap.h and CRYPTOPP_ASSERT has existed for over a year in Master. We deferred on the cut-over waiting for a minor version bump (5.7). We have to use it now due to CVE-2016-7420
2016-09-16 11:27:15 -04:00
Jeffrey Walton
d67d32dab0 Cleared warning 'Warning: mr hides CryptoPP::ProjectiveDoubling::mr' 2016-06-08 23:41:03 -04:00
Jeffrey Walton
6ac1e46a1f Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 (Coverity rollup) 2015-11-18 15:32:28 -05:00
Jeffrey Walton
48809d4e85 CRYPTOPP 5.6.3 RC6 checkin 2015-11-05 01:59:46 -05:00
Jeffrey Walton
b7de164d62 Cut-in CRYPTOPP_ASSERT in all remaining header and source files 2015-07-26 16:03:14 -04:00
Jeffrey Walton
7b64ca489a Added "trap.h" include for header and source files that assert 2015-07-26 15:51:16 -04:00
Jeffrey Walton
e78b8fe1df Cleared warnings on WindowSlider struct 2015-07-13 21:40:42 -04:00
weidai
922fdeb150 fix MSVC 2005 warnings 2006-03-13 13:26:41 +00:00
weidai
bff781df0c fix ECP curve BER decode 2005-09-02 22:23:53 +00:00
weidai
1db8ea5084 port to MSVC .NET 2005 beta 2 2005-07-12 04:23:32 +00:00
weidai
9c5c4769a9 fix potential threading problem with initialization of static objects 2003-07-29 01:18:33 +00:00
weidai
f278895908 create DLL version, fix GetNextIV() bug in CTR and OFB modes 2003-07-04 00:17:37 +00:00
weidai
a3b6ece7ab Initial revision 2002-10-04 17:31:41 +00:00