summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update StreamTransformation and ProcessLastBlockJeffrey Walton2017-09-295-40/+88
| | | | | | 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.
* Add second ctor to StreamTransformationFilter for authenticated encryption modesJeffrey Walton2017-09-292-6/+46
| | | | | | | | 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.
* Update documentationJeffrey Walton2017-09-291-3/+6
|
* Update documentationJeffrey Walton2017-09-281-4/+4
|
* Update documentation linksJeffrey Walton2017-09-2826-34/+33
|
* Update documentationJeffrey Walton2017-09-282-3/+14
|
* Update documentationJeffrey Walton2017-09-281-12/+49
|
* Update documentationJeffrey Walton2017-09-271-4/+17
|
* Update documentationJeffrey Walton2017-09-273-5/+43
|
* Fix GNUmakefile-cross distclean recipe (GH #514)Jeffrey Walton2017-09-261-3/+3
|
* Move Rijndael_AdvancedProcessBlocks_ARMV8 into anonymous namespaceJeffrey Walton2017-09-231-2/+2
|
* Move to anonymous namespaces in rijndael-simd.cppJeffrey Walton2017-09-232-133/+136
|
* Update documentationJeffrey Walton2017-09-221-41/+62
|
* Add IncrementPointerAndStoreJeffrey Walton2017-09-221-3/+10
| | | | This speeds up XL C/C++ by 0.1 to 0.2 cpb
* Provide body for VectorStoreJeffrey Walton2017-09-221-7/+29
| | | | | Calling VectorStoreBE inside VectorStore slowed us down by up to 0.5 cpb on LE systems. Update documentation for VectorShiftLeft
* Update documentationJeffrey Walton2017-09-222-30/+70
|
* Update documentationJeffrey Walton2017-09-221-2/+32
|
* Add Power8 SHA256 and SHA512 support (GH #513)Jeffrey Walton2017-09-223-15/+42
|
* Add Power8 SHA256 and SHA512 support (GH #513)Jeffrey Walton2017-09-226-84/+101
|
* Clear Doxygen warningsJeffrey Walton2017-09-221-9/+10
|
* Add Power8 SHA supportJeffrey Walton2017-09-221-3/+104
| | | | | | This provides the functions needed for an implementation. It does not provide the implementation itself Signed-off-by: Jeffrey Walton <noloader@gmail.com>
* Remove static from functionsJeffrey Walton2017-09-221-22/+23
| | | | Static was an artifact from being in rijndael-simd.cpp
* Fix Power8 compile error on AIX with XL C/C++Jeffrey Walton2017-09-221-19/+81
| | | | Add documentation
* Move Power8 crypto functions into ppc-crypto.hJeffrey Walton2017-09-224-196/+221
|
* Add C++ templates for additional Vector opsJeffrey Walton2017-09-221-93/+48
| | | | Removed lower-level C-like functions such as Store8x16 and Store64x2
* Switch to vec_vsx_ld, remove unaligned loadsJeffrey Walton2017-09-221-31/+18
| | | | Partially unroll loop Rijndael_UncheckedSetKey_POWER8 loop. It saves about another 60 cycles
* Updated commentsJeffrey Walton2017-09-211-16/+15
|
* Cleanup asserts and castsJeffrey Walton2017-09-211-18/+18
|
* Vectorize tail of Rijndael_UncheckedSetKey_POWER8Jeffrey Walton2017-09-211-9/+6
|
* Fold ConditionalByteReverse for non-Power8 pathsJeffrey Walton2017-09-211-3/+1
|
* Updated commentsJeffrey Walton2017-09-211-1/+6
|
* Enable little endian Rijndael_UncheckedSetKey_POWER8 using built-insJeffrey Walton2017-09-212-94/+59
| | | | The problem was vec_sld is endian sensitive. The built-in required more than us setting up arguments to ensure the vsx load resulted in a big endian value. Thanks to Paul R on Stack Overflow for sharing the information that IBM did not provide. Also see http://stackoverflow.com/q/46341923/608639
* Guard compile assert for Borland/Embarcadero (GH #512)Jeffrey Walton2017-09-211-0/+2
|
* Move Rijndael_UncheckedSetKey_POWER8 prior to GetUserKey callJeffrey Walton2017-09-212-9/+25
| | | | Arg... GetUserKey was performing a 32-bit word reverse. It was part of the problem on little endian machines
* Load r5 mask once for key expansionJeffrey Walton2017-09-201-8/+10
|
* Use ::time() and ::log() instead of std::time() and std::log() (GH #512)Jeffrey Walton2017-09-204-13/+13
| | | | The 35c0fa82fd4c change broke GCC 4.8
* Use 'static const int' for constant Borland/Embarcadero (GH #512)Jeffrey Walton2017-09-201-1/+1
|
* Use <time.h> for Borland/Embarcadero (GH #512)Jeffrey Walton2017-09-203-5/+5
|
* Add PowerPC VectorLoadKeyUnaligned for AES-192Jeffrey Walton2017-09-201-42/+91
| | | | | Make internal functions static. We get better optimizations depsice using unnamed namespaces Add PowerPC uint32x4 functions for handling 32-bit rcon and mask
* Move r1 write to caller; remove from Rijndael_Subkey_POWER8Jeffrey Walton2017-09-201-13/+18
| | | | Signed-off-by: Jeffrey Walton <noloader@gmail.com>
* Add Power8 key expansion for big endianJeffrey Walton2017-09-201-48/+140
| | | | This is AES-128 key expansion for big endian. Little endian has a bug in it so it can't be enabled at the moment. GDB is acting up on GCC112, so I've had trouble investigating it
* Add CRYPTOPP_NO_CPU_FEATURE_PROBES (GH #511)Jeffrey Walton2017-09-1910-34/+168
| | | | We determine machine capabilities by performing an os/platform *query* first, like getauxv(). If the *query* fails, we move onto a cpu *probe*. The cpu *probe* tries to exeute an instruction and then catches a SIGILL on Linux or the exception EXCEPTION_ILLEGAL_INSTRUCTION on Windows. Some OSes fail to hangle a SIGILL gracefully, like Apple OSes. Apple machines corrupt memory and variables around the probe.
* Add Rijndael_UncheckedSetKey_POWER8Jeffrey Walton2017-09-192-22/+66
| | | | We are going to attempt to perform key setup using Power8 in-core vector instructions
* Clear duplicate symbol warning from AIX linkerJeffrey Walton2017-09-181-2/+2
|
* ByteReverseArray → ReverseByteArrayLEJeffrey Walton2017-09-182-4/+4
|
* Refactor LoadT() and StoreT(). Add separate ReverseT() for little endian ↵Jeffrey Walton2017-09-182-38/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | machines The refactoring has no effect on little endian machines. However, on big endian GCC119 using GCC 7.1 the performance improved by 2.5x for ECB and CTR modes: BEFORE: <TR><TH>AES/CTR (128-bit key)<TD>2723<TD>1.4<TD>0.163<TD>670 <TR><TH>AES/CTR (192-bit key)<TD>2560<TD>1.5<TD>0.175<TD>719 <TR><TH>AES/CTR (256-bit key)<TD>2728<TD>1.4<TD>0.183<TD>749 <TR><TH>AES/CBC (128-bit key)<TD>1204<TD>3.2<TD>0.135<TD>554 <TR><TH>AES/CBC (192-bit key)<TD>1066<TD>3.7<TD>0.148<TD>605 <TR><TH>AES/CBC (256-bit key)<TD>948<TD>4.1<TD>0.155<TD>635 <TR><TH>AES/OFB (128-bit key)<TD>1019<TD>3.8<TD>0.158<TD>648 <TR><TH>AES/CFB (128-bit key)<TD>949<TD>4.1<TD>0.192<TD>787 <TR><TH>AES/ECB (128-bit key)<TD>3564<TD>1.1<TD>0.082<TD>337 AFTER: <TR><TH>AES/CTR (128-bit key)<TD>6484<TD>0.6<TD>0.163<TD>677 <TR><TH>AES/CTR (192-bit key)<TD>5641<TD>0.7<TD>0.176<TD>728 <TR><TH>AES/CTR (256-bit key)<TD>5005<TD>0.8<TD>0.183<TD>761 <TR><TH>AES/CBC (128-bit key)<TD>1223<TD>3.2<TD>0.135<TD>559 <TR><TH>AES/CBC (192-bit key)<TD>1080<TD>3.7<TD>0.147<TD>611 <TR><TH>AES/CBC (256-bit key)<TD>966<TD>4.1<TD>0.155<TD>642 <TR><TH>AES/OFB (128-bit key)<TD>1057<TD>3.7<TD>0.158<TD>656 <TR><TH>AES/CFB (128-bit key)<TD>1217<TD>3.3<TD>0.186<TD>774 <TR><TH>AES/ECB (128-bit key)<TD>7289<TD>0.5<TD>0.082<TD>342
* Fix dead code strip test on AIXJeffrey Walton2017-09-182-2/+4
|
* Update cryptest-android.sh file with LLVMJeffrey Walton2017-09-181-2/+2
|
* Fix armeabi and armv7-a for Android (GH #509)Jeffrey Walton2017-09-1711-27/+90
|
* Add i686 and x86_64 specific flags (GH #508)Jeffrey Walton2017-09-171-2/+30
|