Commit Graph

2814 Commits (7d21cdd54e95a936c7b4a946a7d5739a2366769c)

Author SHA1 Message Date
Jeffrey Walton 7d21cdd54e
Convert GCM to use runtime blocksize checking (Issue 408)
GCM is still only defined for 16-byte ciphers, but this is where we need to be when we add the larger polynomials
2017-08-12 16:14:29 -04:00
Jeffrey Walton f5aa6f1f06
Cast enums to int for comparison 2017-08-11 17:15:13 -04:00
Jeffrey Walton 953252e44d
Move from 'static' to 'enum' for class constants
Enums don't take up space in class objects. Its should result in smaller objects and faster code
2017-08-11 17:13:15 -04:00
Jeffrey Walton 173dd0b530
Add AES for ARMv8 (Issue 458) 2017-08-11 07:31:09 -04:00
Jeffrey Walton e5b1be035e
Add iOS testing to Travis 2017-08-10 22:59:00 -04:00
Jeffrey Walton 24bc2b8567
Add HMAC(SHA256) benchmark 2017-08-07 19:04:14 -04:00
Jeffrey Walton 58b731c645
Fix "Integer constant is too large for 'long' type"
kalyna.cpp:432: error: integer constant is too large for 'long' type
kalyna.cpp:509: error: integer constant is too large for 'long' type
kalyna.cpp:608: error: integer constant is too large for 'long' type
kalyna.cpp:713: error: integer constant is too large for 'long' type
kalyna.cpp:833: error: integer constant is too large for 'long' type
...
2017-08-07 09:46:33 -04:00
Jeffrey Walton 086ad70feb
Update documentation 2017-08-05 07:53:52 -04:00
Jeffrey Walton 0357e508e4
Make nonce a class member rather than temporary
Effectively this creates a workspace for encrypting the nonce. The zeroizer will run when the class is destroyed, rather than each invocation of UncheckedSetKey.
Performance went from 3.6 cpb as a temporary to 2.9 cpb as a class member
2017-08-05 06:05:57 -04:00
Jeffrey Walton bf35d58ad7
Cleanup selft tests 2017-08-05 05:32:43 -04:00
Jeffrey Walton 326700f6ec
Fix library version numbers
They were inadvertently checked-in with the SHA doc updates
2017-08-05 01:08:25 -04:00
Jeffrey Walton d779462a38
Update documentation 2017-08-05 01:05:58 -04:00
Jeffrey Walton 8db50f25ad
Update documentation 2017-08-05 01:02:12 -04:00
Jeffrey Walton 20def29d33
Use MOVDQU for SSE2 in static transform (Issue 455)
Updated documentation
2017-08-05 00:24:02 -04:00
Jeffrey Walton a2cab93117
Add hash static transform test (Issue 455) 2017-08-04 23:35:38 -04:00
Jeffrey Walton 662cccce3b
Switch to reinterpret_cast in MDC 2017-08-04 19:11:53 -04:00
Jeffrey Walton 3fe6709ae7
Cleanup comments in AppVeyor config file 2017-08-04 19:11:16 -04:00
Jeffrey Walton 18a05659f3
Switch from -O2 to -O3 in the makefile (Issue 454)
Also see https://groups.google.com/d/msg/cryptopp-users/AEiGyjq15tw/GBAyDA6fBgAJ
2017-08-04 18:31:52 -04:00
Jeffrey Walton 860a9f4266
Use non-0 seed OldRandomPool test
This should tickle endianness issues
2017-08-04 16:57:45 -04:00
Jeffrey Walton 24db613a81
Switch to ConditionalByteReverse. Removed mutuable hash member 2017-08-04 16:02:32 -04:00
Jeffrey Walton e52be9ae84
Clear declaration hides previous local declaration 2017-08-04 07:28:35 -04:00
Jeffrey Walton 9a3f45cee6
Update VCXPROJ files for AppVeyor testing 2017-08-04 00:10:11 -04:00
Jeffrey Walton 64c098fbae Revert "Reinstate commit ac513c06f8c80"
This broke MSbuild, which can no longer build a static library. Attempting to build with 'msbuild /t:Build cryptlib.vcxproj' results in:

  ...
  X64\cryptlib\Debug\zinflate.obj
  X64\cryptlib\Debug\zlib.obj
  LINK : fatal error LNK1561: entry point must be defined [c:\Users\cryptopp\cryptlib.vcxproj]
  Done Building Project "c:\Users\Jeff\Desktop\cryptopp\cryptlib.vcxproj" (Build target(s)) -- FAILED.

Microsoft tools are so fucked up. It should be illegal to sell them.
2017-08-03 05:22:03 -04:00
Jeffrey Walton 1702c93b30
Reinstate commit ac513c06f8
Even though it breaks AppVeyor worse, its needed that way. Also see https://stackoverflow.com/a/45458443/608639.
2017-08-03 04:34:56 -04:00
Jeffrey Walton 08b68c2718
Fix "Error parsing appveyor.yml: "exclude" value must be a sequence of mappings." 2017-08-03 03:58:17 -04:00
Jeffrey Walton 4310388148
Remove VS2017 from exclude: recipe. Remove unneeded comments 2017-08-03 03:48:16 -04:00
Jeffrey Walton a8084ae440
Add script to change library version numbers 2017-08-03 02:00:09 -04:00
Jeffrey Walton ab989a6ddf Sync with Upstream master 2017-08-02 23:26:33 -04:00
Jeffrey Walton fe9eb75dd2
Suppress warnings C4231, C4355 and C4505 (Issue 412)
This should not cross-pollinate like when they were present in config.h
2017-08-02 23:25:54 -04:00
Jeffrey Walton 8afd01d18d
Fix AppVeyor *.vcxproj file copy 2017-08-02 22:31:14 -04:00
Jeffrey Walton e162a67231
Copy converted *.vcxproj files from TestScripts before testing 2017-08-02 22:07:41 -04:00
Jeffrey Walton 77d2e4eaf5
Add AppVeyor rule to makefile
This should sidestep some problems we are experiencing with AppVeyor during x64 builds. Specifically, the missing VCUpgrade.exe and the poor job it does when upgrading our project for the platform\'s tools.
This recipe takes cryptlib.vcxproj and cryptest.vcxproj, and copies it into TestScripts. This ensures TestScripts always has the latest Visual Studio project files. Then, the recipe changes PlatformToolset to the undocumented $\(DefaultPlatformToolset\). Finally, our AppVeyor test script will copy TestScripts/*.vcxproj into PWD before executing MSbuild.
Also see http://stackoverflow.com/questions/43423761/cant-perform-64-bit-testing-under-appveyor, http://stackoverflow.com/questions/45452145/how-to-set-platformtoolset-property-from-msbuild and  http://stackoverflow.com/questions/43441273/how-to-run-vcupgrade-before-appveyor-build
2017-08-02 22:01:16 -04:00
Jeffrey Walton 76ff3fc03b
Remove pre-Crypto++ 5.5 interface
Users of OldRandomPool must use the new interface. All that means is they must call IncorporateEntropy instead of Put, and GenerateBlock instead of Get
2017-08-02 19:43:56 -04:00
Jeffrey Walton 4da4ece5a5
Cut-in RandomNumberGenerator interface to OldRandPool
The existing interface still exists. The new interface is routed into the old methods. Without the new interface, using OldRandPool could result in:
    $ ./cryptest.exe v
    terminate called after throwing an instance of CryptoPP::NotImplemented
      what():  RandomNumberGenerator: IncorporateEntropy not implemented
    Aborted (core dumped)
2017-08-02 18:55:10 -04:00
Jeffrey Walton 2578bccf08
Reconfigure AppVeyor email notifications
Hopefully they will get through, soon
2017-08-02 05:42:24 -04:00
Jeffrey Walton 49515c3a73
Whitespace check-in 2017-08-02 04:59:42 -04:00
Jeffrey Walton 820d62f978
Partially fix AppVeyor build
AppVeyor still has problems, like not being able to run a x64 test
2017-08-02 04:32:18 -04:00
Jeffrey Walton 6b200c80cf
Fix x64 builds
Take 3
2017-08-02 04:02:32 -04:00
Jeffrey Walton b9e5cd2f90
Enable 64-bit builds under AppVeyor
Take 2
2017-08-02 00:19:59 -04:00
Jeffrey Walton 9b9b9994c2
Increase minimum size for DefaultEncryptor test. Decrease minimum size fir Inflator tests 2017-08-01 23:23:51 -04:00
Jeffrey Walton 6ab1a729ef
Cleared unused variable warnings 2017-08-01 20:42:55 -04:00
Jeffrey Walton 05bf4fd54b
Whitespace check-in 2017-08-01 19:58:08 -04:00
Jeffrey Walton 5fbbc5311c
Add self tests for OldRandomPool
We still need to get the test result cross-validated
2017-08-01 18:57:23 -04:00
Jeffrey Walton 02e3a79444
Add OldRandomPool class (Issue 452)
RandomPool used to be a PGP-style deterministic generator and folks used it as a key generation function. At Crypto++ 5.5 the design changed to harden it agianst rollback attacks. The design change resulted in an upgrade barrier. That is, some folks are stuck at Crypto++ 4.2 or Crypto++ 5.2 because they must interoperate with existing software.

Below is the test program we used for the test vector. It was run against Crypto++ 5.4.

    RandomPool prng;
    SecByteBlock seed(0x00, 384), result(64);
    prng.Put(seed, seed.size());

    prng.GenerateBlock(result, result.size());
    HexEncoder encoder(new FileSink(std::cout));

    std::cout << "RandomPool: ";
    encoder.Put(result, sizeof(result));
    std::cout << std::endl;
2017-08-01 18:53:31 -04:00
Jeffrey Walton 2171a3a379
Update DLL_SRCS list
Also see http://groups.google.com/forum/#!topic/cryptopp-users/Q8_6mSS5ZSw on the mailing list
2017-07-31 19:04:48 -04:00
Marcel Raad b5191dde6f sockets: fix Windows 2000 build (#450)
Commit 4630a5dab6 broke compilation for
Windows 2000 and earlier as getaddrinfo was introduced in Windows XP.
Fix this by including <wspiapi.h> when targeting Windows 2000 and
earlier, which falls back to an inline implementation of getaddrinfo
when necessary.
Some MinGW flavors still target Windows 2000 by default.

Ref:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738520.aspx,
section "Support for getaddrinfo on Windows 2000 and older versions"
2017-07-28 15:14:59 -04:00
Marcel Raad d44a81f91c Enforce LF line endings for shell scripts (#451)
This tells git to check out *.sh files with LF line endings. Otherwise,
Cygwin and Windows 10's Bash cannot run them.
2017-07-28 15:14:29 -04:00
Jeffrey Walton 3fc7b104e6
Update documentation 2017-07-28 12:35:25 -04:00
Jeffrey Walton 46993f10f4
Update documentation 2017-07-28 11:50:11 -04:00
Jeffrey Walton ade3b319a9
Assign t and v together in Sosemanuk (Issue 449)
This saved about 0.1 cpb, and increased throughput to 1536 MiB/s
2017-07-28 01:34:53 -04:00