Commit Graph

81 Commits

Author SHA1 Message Date
bobsayshilol
7f8d3e8882 Miscellaneos warning fixes (GH #739)
* Fix -pedantic warning in GCC.

* Fix -Wunused-private-field warning.

* Fix -Wkeyword-macro warning.
2018-11-13 22:04:03 -05:00
orangefour
20f82c067e Add VectorSource (GH #730) 2018-11-01 06:49:04 -04:00
Jeffrey Walton
5d1de662bb
Spelling 2018-10-27 03:33:29 -04:00
Jeffrey Walton
55bb2c8b03
Update documentation 2018-10-27 02:05:49 -04:00
Jeffrey Walton
2b4911abee
Update documentation 2018-10-27 00:48:10 -04:00
Jeffrey Walton
16768df2e5
Update documentation 2018-10-26 19:29:15 -04:00
orangefour
9b81a545fc Add VectorSink 2018-09-05 09:25:09 +02:00
Marcel Raad
7c1d296283 Fix clang warnings in headers (#655)
* remove superfluous semicolon

* Remove C-style casts from public headers

clang warns about them with -Wold-style-cast. It also warns about
implicitly casting away const with -Wcast-qual. Fix both by removing
unnecessary casts and converting the remaining ones to C++ casts.
2018-05-10 19:59:21 -04:00
Jeffrey Walton
befd04312d
Remove unneeded Doxygen directive 2018-01-19 14:31:20 -05:00
Jeffrey Walton
61ec50dabe
Change Doxygen comment style from //! to ///
Also see https://groups.google.com/forum/#!topic/cryptopp-users/A7-Xt5Knlzw
2017-11-29 10:54:33 -05:00
Jeffrey Walton
32154a150f
Clear GCC pedantic warnings (GH #537) 2017-11-19 21:41:13 -05:00
Jeffrey Walton
73928489f9
Removed m_authenticated member variable
Add m_isSpecial, m_mandatoryBlockSize and m_optimalBufferSize members. The additional members stabilize running times and avoid some unnecessary calculations. Previously we were calculating some values in each call to Put and LastPut.
2017-10-03 21:49:59 -04:00
Jeffrey Walton
bebdc8b917
Add second ctor to StreamTransformationFilter for authenticated encryption modes
StreamTransformationFilter had a small hack to accomodate AuthenticatedEncryptionFilter and AuthenticatedDecryptionFilter. The hack was enough to support CCM, EAX and GCM modes, which looks a lot like a regular stream cipher from the filter framework point of view.

OCB is slightly different. To the filter framework it looks like a block cipher with an unusual last block size and padding scheme. OCB uses MandatoryBlockSize() == BlockSize() and  MinLastBlockSize() == 1 with custom padding of the last block (see the handling of P_* and A_* in the RFC). The unusual config causes the original StreamTransformationFilter assert to fire even though OCB is in a normal configuration.

For the time being, we are trying to retain the assert becuase it is a useful diagnostic. Its possible another authenticated encryption mode, like AEZ or NORX, will cause the assert to incorrectly fire (yet again). We will cross that bridge when we come to it.
2017-09-29 17:36:04 -04:00
Jeffrey Walton
37e02f9e0e
Revert AltiVec and Power8 commits
The strategy of "cleanup under-aligned buffers" is not scaling well. Corner cases are still turing up. The library has some corner-case breaks, like old 32-bit Intels. And it still has not solved the AltiVec and Power8 alignment problems.
For now we are backing out the changes and investigating other strategies
2017-09-05 16:28:00 -04:00
Jeffrey Walton
9c2a1c74fe
Fixup under-aligned buffers for AltiVec and Power8
This commit supports the upcoming AltiVec and Power8 processor support. The commit favors AlignedSecByteBlock over SecByteBlock in places where messages are handled on the AltiVec and Power8 processor data paths. The data paths include all block cipher modes of operation, and some filters like

Intel and ARM processors are tolerant of under-aligned buffers when using crypto intstructions. AltiVec and Power8 are less tolerant, and they simply ignore the three low-order bits to ensure an address is aligned. The AltiVec and Power8 have caused a fair number of wild writes on the stack and in the heap.

Testing on a 64-bit Intel Skylake show a marked improvement in performance. We suspect GCC is generating better code since it knows the alignment of the pointers, and does not have to emit fixup code for under-aligned and mis-aligned data. Here are some data points:

  SecByteBlock
    - Poly1305: 3.4 cpb
    - Blake2s: 6.7 cpb
    - Blake2b: 4.5 cpb
    - SipHash-2-4: 3.1 cpb
    - SipHash-4-8: 3.5 cpb
    - ChaCha20: 7.4 cpb
    - ChaCha12: 4.6 cpb
    - ChaCha8: 3.5 cpb

  AlignedSecByteBlock
    - Poly1305: 2.9 cpb
    - Blake2s: 5.5. cpb
    - Blake2b: 3.9 cpb
    - SipHash-2-4: 1.9 cpb
    - SipHash-4-8: 3.3 cpb
    - ChaCha20: 6.0 cpb
    - ChaCha12: 4.0 cpb
    - ChaCha8: 2.9 cpb

Testing on an mid-2000's 32-bit VIA C7-D with SSE2+SSSE3 showed no improvement, and no performance was lost.
2017-09-04 10:24:24 -04:00
Jeffrey Walton
46993f10f4
Update documentation 2017-07-28 11:50:11 -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
7ac77ca9ac Revert "Revert "Clear Visual Studio warnings (Issue 412)""
This reverts commit c3871aec94.
2017-06-02 05:18:52 -04:00
Jeffrey Walton
c3871aec94 Revert "Clear Visual Studio warnings (Issue 412)"
This reverts commit eb3b27a6a5. 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
eb3b27a6a5
Clear Visual Studio warnings (Issue 412) 2017-05-30 16:37:41 -04:00
Jeffrey Walton
5efb019d8b
Add C++ nullptr support (Issue 383) 2017-03-01 06:10:06 -05:00
Jeffrey Walton
62f92dd592
Change next version from 5.7 to 6.0
Crypto++ 5.7 was the increment after the 5.6.5 release. Crypto++ 6.0 accurately reflects compatibility
2017-02-21 12:59:20 -05:00
Jeffrey Walton
9d7c5fce55
Remove old VerifierFilter, switch to SignatureVerificationFilter
VerifierFilter was a typedef for SignatureVerificationFilter. The name changed at Crypto++ 5.0
Updated documentation
2017-02-07 18:51:44 -05:00
Jeffrey Walton
a25fa00a3f
Updated documentation 2017-02-07 13:23:36 -05:00
Jeffrey Walton
8e088b4865
Add W3C_PADDING to encryption path 2017-02-06 08:09:09 -05:00
Jeffrey Walton
061f272da3 Merge pull request #368 from edrlab/aes256cbc-w3c-padding-scheme
Support for AES-256-CBC with W3C padding scheme ( http://www.w3.org/2001/04/xmlenc#aes256-cbc )
2017-02-06 03:53:25 -05: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
danielweck
46a9323d19 patched CryptoPP Crypto++ to add support for AES-256-CBC with W3C padding scheme (based on https://github.com/readium/readium-lcp-client/pull/26 ) 2017-01-24 16:43:10 +00:00
klemens
5a5c633073 spelling fixes 2016-12-27 18:34:57 +01:00
Jeffrey Walton
3475a235bf
Cleared 'warning: field 'm_attachment' will be initialized after field' 2016-12-22 23:45:33 -05:00
Jeffrey Walton
40230dd3bf
Removed MAINTAIN_BACKWARDS_COMPATIBILITY_562 (Issue 70) 2016-12-03 00:32:07 -05:00
Jeffrey Walton
10c96e5a95
Updated documentation 2016-11-12 08:45:13 -05:00
Jeffrey Walton
2a8670c0c1
Updated documentation 2016-11-12 08:38:50 -05:00
Jeffrey Walton
b5f04e5ed5
Updated documentation 2016-10-18 14:42:48 -04:00
Jeffrey Walton
93a6758fd9
Updated documentation 2016-10-12 02:57:28 -04:00
Jeffrey Walton
22400b2ad1
Updated documentation 2016-10-11 19:13:36 -04:00
Jeffrey Walton
62ca476e9e Updated documentation 2016-09-26 11:37:21 -04:00
Jeffrey Walton
62de6c8e3b Updated documentation 2016-09-26 04:49:24 -04:00
Jeffrey Walton
50f1f5fc8b Updated documentation 2016-09-26 04:08:26 -04: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
894874fe75 Whitespace checkin 2016-09-10 04:57:48 -04:00
Marcel Raad
a10d3c17ba Fix clang warning
In 64-bit mode, clang 3.8 warns:
cast to 'unsigned char *' from smaller integer type 'int' [-Wint-to-pointer-cast]
Fix this by directly returning NULL in these functions.
2016-05-31 12:55:03 +02:00
Jeffrey Walton
4d7cb70ea8 Cleared unused function warning under Visual Studio with /Wall 2016-05-02 13:32:39 -04:00
Jeffrey Walton
8db0e7da6d Cleared compile errors under Visual Studio .Net compilers 2016-04-29 11:25:51 -04:00
Jeffrey Walton
1743b976f7 Update documentation 2016-02-29 11:39:20 -05:00
Steven Green
9033451abd Made MeterFilter Get*() functions const 2016-01-15 22:31:05 +00:00
Jeffrey Walton
17ead160bf Updated documentation 2015-12-16 19:39:29 -05:00
Jeffrey Walton
49de6e2012 Updated documentation 2015-12-16 03:22:22 -05:00
Jeffrey Walton
b3e49d8c96 Additional documentation; fixed issues with Clang integrated assembler and different versions numbers for LLVM Clang and Apple Clang; fixed missing header in DSA class 2015-11-19 13:09:33 -05: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