summaryrefslogtreecommitdiff
path: root/modes.h
Commit message (Collapse)AuthorAgeFilesLines
* Update documentationJeffrey Walton2018-11-151-0/+3
|
* Rename files with dashes to underscores (GH #736)Jeffrey Walton2018-11-101-1/+1
| | | | Also see https://groups.google.com/forum/#!topic/cryptopp-users/HBz-6gZZFOA on the mailing list
* Clear IBM XLC warnings on PowerPCJeffrey Walton2018-08-121-1/+2
|
* Avoid cast in PtrDiffJeffrey Walton2018-07-101-1/+2
| | | | ptrdiff_t is the return type
* Increase use of ptrdiff_t when performing pointer mathJeffrey Walton2018-07-091-22/+38
| | | | | | Increase use of ptrdiff_t when performing pointer math Reduce AlgorithmProvider overrides Fix CPU_ProbeARMv7 on Aarch64
* Add algorithm provider member function to Algorithm classJeffrey Walton2018-07-061-0/+10
|
* Update documentationJeffrey Walton2018-07-061-0/+24
|
* Update documentationJeffrey Walton2018-07-061-2/+61
|
* Fix clang warnings in headers (#655)Marcel Raad2018-05-101-2/+2
| | | | | | | | | | * 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.
* Update documentationJeffrey Walton2018-01-221-0/+4
|
* Remove unneeded Doxygen directiveJeffrey Walton2018-01-191-29/+0
|
* Change Doxygen comment style from //! to ///Jeffrey Walton2017-11-291-102/+102
| | | | Also see https://groups.google.com/forum/#!topic/cryptopp-users/A7-Xt5Knlzw
* Update documentationJeffrey Walton2017-11-181-7/+35
|
* Update StreamTransformation and ProcessLastBlockJeffrey Walton2017-09-291-9/+2
| | | | | | Some authenticated encryption modes have needs that are not expressed well with MandatoryBlockSize() and MinLastBlockSize(). When IsLastBlockSpecial() returns true three things happen. First, standard block cipher padding is not applied. Second, the ProcessLastBlock() is used that provides inString and outString lengths. Third, outString is larger than inString by 2*MandatoryBlockSize(). That is, there's a reserve available when processing the last block. The return value of ProcessLastBlock() indicates how many bytes were written to outString. A filter driving data will send outString and returned length to an AttachedTransformation() for additional processing.
* Update documentationJeffrey Walton2017-09-291-3/+6
|
* Revert AltiVec and Power8 commitsJeffrey Walton2017-09-051-9/+13
| | | | | 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
* Fixup under-aligned buffers for AltiVec and Power8Jeffrey Walton2017-09-041-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update documentationJeffrey Walton2017-07-271-1/+1
| | | | This cleanup was performed using Clang and -Wdocumentation -Wno-documentation-deprecated-sync
* Revert "Revert "Clear Visual Studio warnings (Issue 412)""Jeffrey Walton2017-06-021-0/+12
| | | | This reverts commit c3871aec948013c1a4d5613050c659520f59e2e4.
* Revert "Clear Visual Studio warnings (Issue 412)"Jeffrey Walton2017-06-021-12/+0
| | | | 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.
* Clear Visual Studio warnings (Issue 412)Jeffrey Walton2017-05-301-0/+12
|
* Add variable block size support for block ciphersJeffrey Walton2017-05-011-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should lead the way for more modern block ciphers like Threefish and Kalyna. It tested well with both regular cipher modes (the mode has an instance of the cipher) and external cipher modes (the cipher and mode are distinct objects, and the mode holds a reference to the cipher). We still have to work out the details of naming a cipher. For example, Kalyna with a 128-bit key can use a 128-bit or 256-bit block size. Kalyna-128 is not enough to describe the algorithm and locate it in the object registry. Kalyna-128-128 looks kind of weird; maybe Kalyna-128(128) or Kalyna-128(256) would be better. Here are the initial test cases to verify functionality: byte key[64] = {}, iv[32] = {}; ECB_Mode<Kalyna>::Encryption enc1; enc1.SetKey(key, 16); CBC_Mode<Kalyna>::Encryption enc2; enc2.SetKeyWithIV(key, 16, iv); AlgorithmParameters params = MakeParameters (Name::BlockSize(), 32) (Name::IV(), ConstByteArrayParameter(iv, 32)); CTR_Mode<Kalyna>::Encryption enc3; enc3.SetKey(key, 16, params); CBC_Mode<Kalyna>::Encryption enc4; enc4.SetKey(key, 32, params); Kalyna::Encryption enc5; ECB_Mode_ExternalCipher::Encryption ecb(enc5); ecb.SetKey(key, 16, params); Kalyna::Encryption enc6; ECB_Mode_ExternalCipher::Encryption cbc(enc6); cbc.SetKey(key, 32, params);
* Add C++ nullptr support (Issue 383)Jeffrey Walton2017-03-011-3/+3
|
* Change file preamble to include "originally written by Wei Dai"Jeffrey Walton2017-01-271-1/+1
| | | | We have made a fair number of changes, and we don't want WD to receive credit for issues he was not part of
* Removed VC++ 5.0 and 6.0 workarounds (Issue 342)Jeffrey Walton2016-12-031-12/+12
|
* Commented typedef guarded by CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITYJeffrey Walton2016-12-031-2/+2
| | | | | The typedefs were only commented so folks could search for a missing symbol, like Crypto++ 4.0 PK_FixedLengthEncryptor or PK_FixedLengthDecryptor This is a distinct change from CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
* Removed MAINTAIN_BACKWARDS_COMPATIBILITY_562 (Issue 70)Jeffrey Walton2016-12-031-44/+26
|
* Silence select conversion warnings (Issue 340)Jeffrey Walton2016-12-021-0/+12
|
* Fix: GCC warning "type qualifiers ignored on function return type".Ralph Tandetzky2016-12-011-6/+6
| | | | This pedantic message appeared all over the code. Also removed one warning about an unused variable in release build.
* Add CRYPTOPP_STATIC_CONSTEXPR macroJeffrey Walton2016-11-131-6/+6
|
* Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420)Jeffrey Walton2016-09-161-1/+1
| | | | 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
* Add constexpr-ness to StaticAlgorithmName member functionJeffrey Walton2016-09-071-6/+6
|
* Backed out use of "static const" to declare constant; switch to "enum" ↵Jeffrey Walton2016-09-061-9/+35
| | | | (Issue 255)
* Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 ↵Jeffrey Walton2015-11-181-26/+44
| | | | (Coverity rollup)
* CRYPTOPP 5.6.3 RC6 checkinJeffrey Walton2015-11-051-415/+441
|
* Remove implementation of ResizeBuffer() from headersZireael2015-10-261-10/+2
| | | | Fixes issue #45
* Cut-in CRYPTOPP_ASSERT in all remaining header and source filesJeffrey Walton2015-07-261-1/+1
|
* Added "trap.h" include for header and source files that assertJeffrey Walton2015-07-261-0/+1
|
* add support for AES-NI and CLMUL instruction sets in AES and GMAC/GCMweidai2010-07-241-0/+1
|
* - add EAX mode, XSalsa20weidai2009-03-121-26/+8
| | | | | | - speed up GCM key setup - wipe stack in AES assembly code - speed up CFB mode
* changes for 5.6: weidai2009-03-021-32/+22
| | | | | | - added AuthenticatedSymmetricCipher interface class and Filter wrappers - added CCM, GCM (with SSE2 assembly), CMAC, and SEED - improved AES speed on x86 and x64 - removed WORD64_AVAILABLE; compiler 64-bit int support is now required
* fixes for GCC 4.3.2 (reports from Chris Morgan and DiegoT)weidai2008-11-211-3/+3
|
* fix infinite recursive call in IsRandomAccess (reported by ASBai)weidai2008-02-021-2/+2
|
* fix AlgorithmName() for ExternalCipher classes and move SetCipher() into ↵weidai2007-12-051-21/+19
| | | | CipherModeBase
* reduce risk of reusing random numbers after VM state rollbackweidai2007-05-041-4/+1
|
* rename STRUCTURED_IV to UNIQUE_IV. assert correct cipher directionweidai2007-04-161-2/+6
|
* port to Borland C++Builder 2006weidai2006-12-141-1/+2
|
* port to GCC 4, reorganize implementations of SetKeyweidai2006-12-101-6/+3
|
* fix StaticAlgorithmName() for CTR modeweidai2006-07-171-1/+1
|
* fix MSVC 2005 warningsweidai2006-03-131-6/+7
|