Commit Graph

17 Commits

Author SHA1 Message Date
Jeffrey Walton
76c29eadaf
Add XTS block cipher mode of operation (GH #891, PR #892) 2019-10-12 07:14:38 -04:00
Jeffrey Walton
fca8adc549
Fix CMAC 256-bit polynomial
Also see GH #423
2017-09-13 08:41:39 -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
a2223356b0
Use aligned buffer for CMAC 2017-09-04 19:49:45 -04:00
Jeffrey Walton
bc2678478c
Add polynomial for 1024-bit block cipher.
This will support Threefish and its 1024-bit block size. I believe this is correct, but it may be wrong. According to "Table of Low-Weight Binary Irreducible Polynomials" (http://www.hpl.hp.com/techreports/98/HPL-98-135.pdf), the polynomial is x^1024 + x^19 + x^6 + x + 1.
2017-05-13 19:23:24 -04:00
Jeffrey Walton
cea45eb024 Revert "Add polynomial for 1024-bit block cipher."
This reverts commit d654c893ef. The polinomial for 1024-bit block sizes had a typo.
2017-05-13 19:18:24 -04:00
Jeffrey Walton
d654c893ef
Add polynomial for 1024-bit block cipher.
This will support Threefish and its 1024-bit block size. I believe this is correct, but it may be wrong. According to "Table of Low-Weight Binary Irreducible Polynomials" (http://www.hpl.hp.com/techreports/98/HPL-98-135.pdf), the polynomial is x^1024 + x^19 + x^6 + x + 1.
2017-05-13 19:15:46 -04:00
Jeffrey Walton
7697857481
Add polynomial for 512-bit block ciphers
I believe this is correct, but it may be wrong. According to the Kalyna team, the polynomial for GCM mode is x^512 + x^8 + x^5 + x^2 + 1. It appears the polinomial applies to other block cipher modes of operations, like CMAC.Dropping the first term and evaluating the remaining terms at X=2 results in 293 (0x125)
2017-05-13 17:36:29 -04:00
Jeffrey Walton
e226523b05
Call cipher.SetKey() before cipher.BlockSize() (Issue 408)
Variable block size ciphers need the key set before they can return an accurate size for BlockSize(). This issue surfaced during Kalyna testing with authenticated encryption modes. In particular, EAX mode, which effectively uses CMAC:

    AlgorithmParameters params = MakeParameters(Name::BlockSize(), 64)
        (Name::IV(), ConstByteArrayParameter((const byte *)iv, 64));

    EAX<Kalyna>::Encryption kalyna;
    kalyna.SetKey(key, 64, params);
2017-05-13 16:28:05 -04: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
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
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
Jeffrey Walton
48809d4e85 CRYPTOPP 5.6.3 RC6 checkin 2015-11-05 01:59:46 -05:00
Jeffrey Walton
b7de164d62 Cut-in CRYPTOPP_ASSERT in all remaining header and source files 2015-07-26 16:03:14 -04:00
Jeffrey Walton
7b64ca489a Added "trap.h" include for header and source files that assert 2015-07-26 15:51:16 -04:00
weidai
d8a644fc4e changes for 5.6:
- 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
2009-03-02 02:39:17 +00:00