summaryrefslogtreecommitdiff
path: root/cryptlib.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace check-inJeffrey Walton2021-03-041-1/+1
|
* Fix typos in documentation and comments (PR #1012)Tobias Nießen2021-03-041-1/+1
|
* Update commentsJeffrey Walton2020-09-121-1/+6
|
* Fix bad allocation size due to BufferedTransformation::TransferMessagesTo2 ↵Jeffrey Walton2020-09-111-1/+1
| | | | (GH #962)
* Clear sign conversion warningsJeffrey Walton2019-09-281-6/+6
|
* Fix .Net 2002 compileJeffrey Walton2019-08-271-1/+0
| | | | This testing occurs on Windows XP. We are still rockin it
* Fix use of MaxDerivedKeyLength (GH #874)Jeffrey Walton2019-08-161-2/+2
|
* Fix use of MaxDerivedKeyLength (GH #874)Jeffrey Walton2019-08-161-2/+2
| | | | Also fix memcpy with NULL buffer
* Avoid preprocessor error in SIZE_MAX (GH #864)Jeffrey Walton2019-07-141-1/+2
|
* Increase m_buf size (GH #862)Jeffrey Walton2019-07-101-16/+6
|
* Add BufferedTransformation GetWord64 and PutWord64 (GH #862)Jeffrey Walton2019-07-101-2/+35
|
* Clear asserts under DEBUG buildsJeffrey Walton2019-07-061-1/+2
|
* Whitespace check-inJeffrey Walton2018-12-041-22/+20
|
* Move DEFAULT_CHANNEL and AAD_CHANNEL defs into cryptlib.cpp (GH #751)Jeffrey Walton2018-12-031-0/+36
| | | | | | | | The library used to provide DEFAULT_CHANNEL and AAD_CHANNEL this way. We experienced Static Initialization Order Fiasco crashes on occassion, so we moved them into cryptlib.h with internal linkage. The cost was, each translation unit got a copy of the strings which contributed to bloat. Issue 751 shows Clang compiles the global constructors for DEFAULT_CHANNEL and AAD_CHANNEL above the base ISA so we caught crashes on OS X with down-level hardware. We are now at a "pick your poison" point. We selected Static Initialization Order Fiasco because it seems to be less prevalent. Hat tip to the C++ Committee for allowing this problem to fester for three decades.
* Remove Thread and Socket classes (GH #208, PR #703)Jeffrey Walton2018-08-171-6/+0
| | | Also see https://groups.google.com/forum/#!topic/cryptopp-users/5btwLoxXXD4.
* Add PtrAdd and PtrSub helper functionsJeffrey Walton2018-07-101-10/+10
| | | | This helps contain UB on pointer subtraction by ensuring a ptrdiff_t is used. The code is a little uglier but it is also more portable.
* Increase use of ptrdiff_t when performing pointer mathJeffrey Walton2018-07-091-4/+4
| | | | | | Increase use of ptrdiff_t when performing pointer math Reduce AlgorithmProvider overrides Fix CPU_ProbeARMv7 on Aarch64
* Make AuthenticatedSymmetricCipher::AlgorithmName non-pureJeffrey Walton2018-04-051-0/+6
| | | | Also see https://stackoverflow.com/q/49658309/608639
* Cutover PBKDF to KeyDerivationFunction interface (GH #610, PR #612)Jeffrey Walton2018-03-291-5/+0
|
* Add KeyDerivationFunction interface (GH #610, PR #611)Jeffrey Walton2018-03-291-0/+25
|
* Clear clang-tidy warningsJeffrey Walton2018-01-241-63/+98
|
* Remove unneeded Doxygen directiveJeffrey Walton2018-01-191-1/+0
|
* Fix failed self test under Clang (GH #533)Jeffrey Walton2017-12-251-1/+1
| | | | This may cause GH #300, "Clang 3.9 and missing member definitions for template classes" or GH #294, "Fix clang warnings about undefined variable templates in pkcspad.h" to resurface. Man I hope not...
* Use ptrdiff_t cast in BlockTransformation (GH #549)Jeffrey Walton2017-12-171-4/+4
|
* Fix Clang 5.0 "runtime error: addition of unsigned offset to 0xXXXX ↵Jeffrey Walton2017-12-161-6/+7
| | | | overflowed to 0xYYYY" (GH #549)
* Change Doxygen comment style from //! to ///Jeffrey Walton2017-11-291-16/+16
| | | | Also see https://groups.google.com/forum/#!topic/cryptopp-users/A7-Xt5Knlzw
* Update documentationJeffrey Walton2017-11-121-25/+0
| | | | Removed defined-out code
* Reduce C++ file scope class objectsJeffrey Walton2017-11-121-20/+8
| | | | Update comments and documentation
* Update documentationJeffrey Walton2017-10-011-1/+2
|
* Update StreamTransformation and ProcessLastBlockJeffrey Walton2017-09-291-0/+17
| | | | | | 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.
* Backed off assert.Jeffrey Walton2017-08-151-2/+1
| | | | Its too noisy
* Clear coverity finding FORWARD_NULL (CID 147865)Jeffrey Walton2017-05-201-4/+5
|
* Revert "Clear coverity finding FORWARD_NULL (CID 147865)"Jeffrey Walton2017-05-201-4/+5
| | | | This broke some self tests.
* Clear coverity finding FORWARD_NULL (CID 147865)Jeffrey Walton2017-05-201-5/+4
|
* Add tests for Information Dispersal and Secret SharingJeffrey Walton2017-05-091-3/+0
|
* Add variable block size support for block ciphersJeffrey Walton2017-05-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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);
* Simplify C++ dynamic object initializationJeffrey Walton2017-03-201-22/+27
| | | | | | | | | | | Wrap DetectArmFeatures and DetectX86Features in InitializeCpu class Use init_priority for InitializeCpu Remove HAVE_GCC_CONSTRUCTOR1 and HAVE_GCC_CONSTRUCTOR0 Use init_seg(<name>) on Windows and explicitly insert at XCU segment Simplify logic for HAVE_GAS Remove special recipies for MACPORTS_GCC_COMPILER Move C++ static initializers into anonymous namespace when possible Add default NullNameValuePairs ctor for Clang
* Updated static initializersJeffrey Walton2017-03-171-18/+15
| | | | | When MSVC init_seg or GCC init_priority is available, we don't need to use the Singleton. We only need to create a file scope class variable and place it in the segment for MSVC or provide the attribute for GCC. An additional upside is we cleared all the memory leaks that used to be reported by MSVC for debug builds.
* Avoid inlining LibraryVersion (Issue 371)Jeffrey Walton2017-03-141-1/+1
|
* Add C++ nullptr support (Issue 383)Jeffrey Walton2017-03-011-2/+2
|
* Remove NULL_CHANNEL and CW8 workaround (Issue 382)Jeffrey Walton2017-03-011-3/+0
|
* Change to more intuitive names LibraryVersion and HeaderVersion (Issue 371)Jeffrey Walton2017-01-281-1/+1
|
* Add BuildVersion and RuntimeVersion functions (Issue 371)Jeffrey Walton2017-01-281-1/+10
| | | | These function are intended to catch mining and matching of library versions. BuildVersion provides CRYPTOPP_VERSION when the shared object was built. RuntimeVersion provides CRYPTOPP_VERSION the app compiled against, which could be different than the shared object's version
* 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
* spelling fixesklemens2016-12-271-2/+2
|
* Silence select conversion warnings (Issue 340)Jeffrey Walton2016-12-021-3/+15
|
* Fix Solaris GCC and "constructor priorities are not supported"Jeffrey Walton2016-09-191-4/+0
|
* Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420)Jeffrey Walton2016-09-161-15/+15
| | | | 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
* Updated documentation (Issue 248)Jeffrey Walton2016-08-271-9/+9
|
* Cleared most "Conditional jump or move depends on uninitialised value" ↵Jeffrey Walton2016-07-131-4/+5
| | | | (Issue 223)