2789 Commits

Author SHA1 Message Date
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 4630a5dab66a0e18ec8dfc0998ac223e40b3dc13 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
Jeffrey Walton
ed4c345ce8
Clear Clang -Wsequence-point warning (Issue 449) 2017-07-28 00:33:45 -04:00
Jeffrey Walton
d0cd32f405
Make SecBlock<T,A> data members protected
Also see http://github.com/weidai11/cryptopp/issues/448
2017-07-27 20:28:23 -04:00
Jeffrey Walton
2c9a3039e8
Update documentation
This cleanup was performed using Clang and -Wdocumentation -Wno-documentation-deprecated-sync
2017-07-27 19:15:21 -04:00
Jeffrey Walton
fec712491e
Add /dev/random usage note on Linux 2017-07-26 22:33:37 -04:00
Jeffrey Walton
9242b7c918
Add UnkeyedRNG, UnkeyedHash and UnkeyedOther
Some RNGs are keyed, like AES/OFB. However, for classification, we treat them as unkeyed.
2017-07-23 23:52:34 -04:00
Jeffrey Walton
030de2e457
Fix multiple output of shared key benchmarks
Benchmark2 is used to benchmark shared key algorithms. At the moment Benchmark2 is all or nothing. It does not understand SharedKeyMAC, SharedKeyStream, SharedKeyBlock. It will be fixed in the future.
2017-07-23 23:25:39 -04:00
Jeffrey Walton
34c4c9f1bd
Move 'main' into CryptoPP::Test, proxy an empty main into Test::main (Issue 447)
This seems to be a little cleaner than the triage at 00e133745663 commit.
2017-07-23 16:20:52 -04:00
Jeffrey Walton
00e1337456
Fix "C2872: 'byte': ambiguous symbol" with Windows Kit (Issue 442, 447)
AppVeyor detected the break but we did not receive the email about it. It looks like we have an AppVeyor configuration problem
2017-07-23 11:22:42 -04:00
Jeffrey Walton
5103f6dd41
Remove gyrations around CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
CRYPTOPP_NO_UNALIGNED_DATA_ACCESS was required in Crypto++ 5.6 and earlier because unaligned data access was the norm. It caused problems at -O3 and on ARM NEON.
At Crypto++ 6.0 no unaligned data access became a first class citizen. Folks who want to allow it must now define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
2017-07-23 11:14:02 -04:00
Jeffrey Walton
00f9818b5d
Move byte to Crypto++ namespace (Issue 442)
Also see http://www.cryptopp.com/wiki/std::byte and http://github.com/weidai11/cryptopp/issues/442
2017-07-20 09:55:29 -04:00
Marcel Raad
3485d2180d Fix Visual Studio project file issues (#446)
- don't enable SSE2 explicitly for x64, it's always enabled and causes
  warnings (issue #445)
- remove newlines in project files that Visual Studio doesn't like and
  removes on every change to project options
2017-07-19 07:17:55 -04:00
Marcel Raad
d9de314e86 Fix Windows compilation issues (by RaptorFactor) (#444)
* 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
2017-07-17 12:10:38 -04:00
Jeffrey Walton
50d1ea8314
Cleared fall through warnings under GCC 7 (Issue 441) 2017-07-17 04:48:28 -04:00
Jeffrey Walton
fe63795638
Add byte typedef in Kalyna's anonymous namespace to avoid issues with globally scoped byte
This check-in supports Romain Geissler's work on cleaning up our use of ::byte when it collides with std::byte. Regardless of what happens, such as removing ::byte and adding CryptoPP::byte, providing the typedef here makes Kalyna immune to the outside changes. Also see Pull Request 437 and 438.
2017-07-16 11:11:41 -04:00
Marcel Raad
32f715f1d7 Fix Windows XP support on Visual Studio 2015+ (#439)
When compiling with Visual Studio 2015+, Crypto++ uses CryptoNG by
default. CryptoNG is only available on Windows Vista and later and
Crypto++ currently ignores if the user explicitly wants to target
Windows XP. Unlike with other Windows SDK features, everything
compiles, but the application doesn't start on Windows XP because
bcrypt.dll is missing. That is an issue when updating Visual Studio
because the root cause is hard to find.
Making use of CryptoNG when targeting Windows 8+ instead by default,
regardless of the Visual Studio version, to fix this.
2017-06-24 17:41:20 -04:00
Romain Geissler @ Amadeus
aaf62695fc Fix C++17 build (PR 437) 2017-06-18 15:22:32 -04:00
Jeffrey Walton
1565020bfd
Guard use of X86 ASM for ARM, MIPS and other platforms
In the bigger picture, the code to use inline ASM when intrinsics are not available still needs to be checked-in. Its a big change since we moved into SSE4, AVX and SHA. Design changes are still being evaluated, and its still being tested.
2017-06-06 09:39:46 -04:00
Jeffrey Walton
429047a8e9
Clear Visual Studio warnings (Issue 412) 2017-06-02 07:13:43 -04:00
Jeffrey Walton
7ac77ca9ac Revert "Revert "Clear Visual Studio warnings (Issue 412)""
This reverts commit c3871aec948013c1a4d5613050c659520f59e2e4.
2017-06-02 05:18:52 -04:00
Jeffrey Walton
c3871aec94 Revert "Clear Visual Studio warnings (Issue 412)"
This reverts commit eb3b27a6a543. The change broke GCC 4.8 and unknown version of Clang on OS X. UB reported the OS X break, and JW found duplicated the break on a ARM CubieTruck with GCC 4.8.
2017-06-02 05:06:56 -04:00
Jeffrey Walton
dd42fa3ef6
Add notification address of cryptopp-build@googlegroups.com (Take 2) 2017-05-31 07:22:04 -04:00
Jeffrey Walton
a33504c8f8
Add notification address of cryptopp-build@googlegroups.com
Its a new Google Group created at https://groups.google.com/forum/#!forum/cryptopp-build. The list should allow us to run services on unprivileged forks and other unrelated accounts while making it easy to find results.
2017-05-31 04:36:31 -04:00
Jeffrey Walton
8988e36a48
Re-add CRYPTOPP_DLL to AssignIntToInteger
It looks like it was accidentally blown out at commit eb3b27a6a543
2017-05-30 16:59:29 -04:00
Jeffrey Walton
eb3b27a6a5
Clear Visual Studio warnings (Issue 412) 2017-05-30 16:37:41 -04:00
Jeffrey Walton
23448050c0
Export AssignIntToInteger for FIPS DLL builds (Issue 389) 2017-05-30 05:50:57 -04:00