Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | openssl: Support setting private Diffie-Hellman values | Martin Willi | 2015-04-15 | 1 | -0/+13 | |
| | | ||||||
| * | gmp: Support setting Diffie-Hellman private values | Martin Willi | 2015-04-15 | 1 | -0/+10 | |
| | | ||||||
| * | test-vectors: Add DH vectors for Brainpool groups | Martin Willi | 2015-04-15 | 3 | -0/+118 | |
| | | ||||||
| * | test-vectors: Add DH vectors for ECDH groups | Martin Willi | 2015-04-15 | 3 | -0/+140 | |
| | | ||||||
| * | test-vectors: Add DH vectors for subgroup MODP groups | Martin Willi | 2015-04-15 | 3 | -0/+168 | |
| | | ||||||
| * | test-vectors: Add DH vectors for normal MODP groups | Martin Willi | 2015-04-15 | 3 | -0/+741 | |
| | | ||||||
| * | test-vectors: Support testing DH groups | Martin Willi | 2015-04-15 | 1 | -1/+16 | |
| | | ||||||
| * | crypto-tester: Support testing DH groups using DH test vectors | Martin Willi | 2015-04-15 | 3 | -2/+224 | |
| | | ||||||
| * | diffie-hellman: Introduce an optional setter for the private value | Martin Willi | 2015-04-15 | 1 | -0/+12 | |
|/ | | | | This allows us to work with deterministic values for testing purposes. | |||||
* | Merge branch 'aesni' | Martin Willi | 2015-04-15 | 32 | -104/+5891 | |
|\ | | | | | | | | | Add an aesni plugin providing CBC, CTR, XCBC, CMAC, CCM and GCM modes for for AES-128/192/256 based on AES-NI/PCLMULQDQ intrinsics. | |||||
| * | NEWS: Add aesni plugin news | Martin Willi | 2015-04-15 | 1 | -0/+6 | |
| | | ||||||
| * | aesni: Avoid loading AES/GHASH round keys into local variables | Martin Willi | 2015-04-15 | 6 | -1568/+1244 | |
| | | | | | | | | | | | | | | | | | | | | The performance impact is not measurable, as the compiler loads these variables in xmm registers in unrolled loops anyway. However, we avoid loading these sensitive keys onto the stack. This happens for larger key schedules, where the register count is insufficient. If that key material is not on the stack, we can avoid to wipe it explicitly after crypto operations. | |||||
| * | aesni: Align all class instances to 16 byte boundaries | Martin Willi | 2015-04-15 | 7 | -14/+14 | |
| | | | | | | | | | | | | While the required members are aligned in the struct as required, on 32-bit platforms the allocator aligns the structures itself to 8 bytes only. This results in non-aligned struct members, and invalid memory accesses. | |||||
| * | utils: Provide aligning variants of INIT/INIT_EXTRA macros | Martin Willi | 2015-04-15 | 1 | -0/+29 | |
| | | ||||||
| * | unit-tests: Pass stringyfied assertion statement as non-format string argument | Martin Willi | 2015-04-15 | 1 | -3/+3 | |
| | | | | | | | | | | | | If the assertion contains a modulo (%) operation, test_fail_msg() handles this as printf() format specifier. Pass the assertion string as argument for an explicit "%s" in the format string, instead. | |||||
| * | utils: Add malloc/free wrappers returning aligned data | Martin Willi | 2015-04-15 | 3 | -0/+101 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | While we could use posix_memalign(3), that is not fully portable. Further, it might be difficult on some platforms to properly catch it in leak-detective, which results in invalid free()s when releasing such memory. We instead use a simple wrapper, which allocates larger data, and saves the padding size in the allocated header. This requires that memory is released using a dedicated function. To reduce the risk of invalid free() when working on corrupted data, we fill up all the padding with the padding length, and verify it during free_align(). | |||||
| * | aesni: Calculate GHASH for 4 blocks of associated data in parallel | Martin Willi | 2015-04-15 | 1 | -2/+18 | |
| | | | | | | | | | | While associated data is usually not that large, in some specific cases this can bring a significant performance boost. | |||||
| * | aesni: Calculate GHASH for 4 blocks of encryption data in parallel | Martin Willi | 2015-04-15 | 1 | -40/+180 | |
| | | | | | | | | Increases performance by another ~30%. | |||||
| * | aesni: Use 4-way parallel en/decryption in GCM | Martin Willi | 2015-04-15 | 1 | -132/+635 | |
| | | | | | | | | Increases overall performance by ~25%. | |||||
| * | aesni: Use dedicated key size specific en-/decryption functions in GCM | Martin Willi | 2015-04-15 | 1 | -24/+353 | |
| | | | | | | | | | | This gives not much more than ~5% increase in performance, but allows us to improve further. | |||||
| * | aesni: Add a GCM AEAD based on the AES-NI key schedule | Martin Willi | 2015-04-15 | 4 | -1/+627 | |
| | | ||||||
| * | aesni: Implement CMAC mode to provide a signer/prf | Martin Willi | 2015-04-15 | 4 | -0/+441 | |
| | | | | | | | | | | Compared to the cmac plugin using AESNI-CBC as backend, this improves performance of AES-CMAC by ~45%. | |||||
| * | aesni: Implement XCBC mode to provide a signer/prf | Martin Willi | 2015-04-15 | 4 | -0/+436 | |
| | | | | | | | | | | Compared to the xcbc plugin using AESNI-CBC as backend, this improves performance of AES-XCBC by ~45%. | |||||
| * | aesni: Partially use separate code paths for different key sizes in CCM | Martin Willi | 2015-04-15 | 1 | -33/+438 | |
| | | | | | | | | Due to the serial nature of the CBC mac, this brings only a marginal speedup. | |||||
| * | aesni: Add a CCM AEAD reusing the key schedule | Martin Willi | 2015-04-15 | 4 | -0/+645 | |
| | | ||||||
| * | aesni: Use 4-way parallel AES-NI instructions for CTR en/decryption | Martin Willi | 2015-04-15 | 1 | -115/+354 | |
| | | | | | | | | | | | | | | CTR can be parallelized, and we do so by queueing instructions to the processor pipeline. While we have enough registers for 128-bit decryption, the register count is insufficient to hold all variables with larger key sizes. Nonetheless is 4-way parallelism faster, depending on key size between ~10% and ~25%. | |||||
| * | aesni: Use dedicated round count specific encryption functions in CTR mode | Martin Willi | 2015-04-15 | 1 | -23/+243 | |
| | | | | | | | | | | This allows us to unroll loops and hold the key schedule in local (register) variables. This brings an impressive speedup of ~45%. | |||||
| * | aesni: Implement a AES-NI based CTR crypter using the key schedule | Martin Willi | 2015-04-15 | 4 | -0/+278 | |
| | | ||||||
| * | aesni: Use 4-way parallel AES-NI instructions for CBC decryption | Martin Willi | 2015-04-15 | 1 | -66/+314 | |
| | | | | | | | | | | | | | | CBC decryption can be parallelized, and we do so by queueing instructions to the processor pipeline. While we have enough registers for 128-bit decryption, the register count is insufficient to hold all variables with larger key sizes. Nonetheless is 4-way parallelism faster, roughly by ~8%. | |||||
| * | aesni: Use separate en-/decryption CBC code paths for different key sizes | Martin Willi | 2015-04-15 | 1 | -22/+290 | |
| | | | | | | | | | | | | This allows us to unroll loops, and use local (register) variables for the key schedule. This improves performance slightly for encryption, but a lot for reorderable decryption (>30%). | |||||
| * | aesni: Implement a AES-NI based CBC crypter using the key schedule | Martin Willi | 2015-04-15 | 4 | -0/+293 | |
| | | ||||||
| * | aesni: Implement 256-bit key schedule | Martin Willi | 2015-04-15 | 1 | -0/+77 | |
| | | ||||||
| * | aesni: Implement 192-bit key schedule | Martin Willi | 2015-04-15 | 1 | -0/+81 | |
| | | ||||||
| * | aesni: Implement 128-bit key schedule | Martin Willi | 2015-04-15 | 1 | -0/+45 | |
| | | ||||||
| * | aesni: Add a common key schedule class for AES | Martin Willi | 2015-04-15 | 3 | -0/+165 | |
| | | ||||||
| * | aesni: Provide a plugin stub for AES-NI instruction based crypto primitives | Martin Willi | 2015-04-15 | 5 | -0/+152 | |
| | | ||||||
| * | utils: Provide an INIT_EXTRA() macro, that allocates extra data to INIT() | Martin Willi | 2015-04-15 | 1 | -0/+15 | |
| | | ||||||
| * | test-vectors: Add some self-made additional AES-GCM test vectors | Martin Willi | 2015-04-15 | 2 | -0/+157 | |
| | | | | | | | | | | We missed test vectors for 192/256-bit key vectors for ICV8/12, and should also have some for larger associated data chunk. | |||||
| * | test-vectors: Define some additional CCM test vectors | Martin Willi | 2015-04-15 | 2 | -1/+84 | |
| | | | | | | | | | | | | We don't have any where plain or associated data is not a multiple of the block size, but it is likely to find bugs here. Also, we miss some ICV12 test vectors using 128- and 192-bit key sizes. | |||||
| * | crypto-tester: Use the plugin feature key size to benchmark crypters/aeads | Martin Willi | 2015-04-15 | 4 | -21/+29 | |
| | | | | | | | | | | | | We previously didn't pass the key size during algorithm registration, but this resulted in benchmarking with the "default" key size the crypter uses when passing 0 as key size. | |||||
| * | crypt-burn: Support burning signers | Martin Willi | 2015-04-15 | 1 | -0/+53 | |
| | | ||||||
| * | crypt-burn: Add a encryption buffer command line argument | Martin Willi | 2015-04-15 | 1 | -9/+14 | |
| | | ||||||
| * | crypt-burn: Set a defined key, as some backends require that | Martin Willi | 2015-04-15 | 1 | -4/+10 | |
| | | ||||||
| * | crypt-burn: Refactor to separate burn methods | Martin Willi | 2015-04-15 | 1 | -74/+116 | |
| | | ||||||
| * | crypt-burn: Accept a PLUGINS env var to configure plugins to load | Martin Willi | 2015-04-15 | 1 | -3/+2 | |
|/ | ||||||
* | vici: Relicense libvici.h under MIT | Martin Willi | 2015-04-14 | 1 | -9/+20 | |
| | | | | | | libvici currently relies on libstrongswan, and therefore is bound to the GPLv2. But to allow alternatively licensed reimplementations without copyleft based on the same interface, we liberate the header. | |||||
* | utils: Define MAX_(U)INT_TYPE to the maximum size integer type available | Martin Willi | 2015-04-14 | 1 | -0/+6 | |
| | ||||||
* | utils: Typedef int128_t and u_int128_t types if supported | Martin Willi | 2015-04-14 | 1 | -0/+11 | |
| | ||||||
* | configure: Check for __int128 type support | Martin Willi | 2015-04-14 | 1 | -0/+11 | |
| | ||||||
* | Merge branch 'const-memeq' | Martin Willi | 2015-04-14 | 42 | -61/+580 | |
|\ | | | | | | | | | Introduce constant time memory comparing functions for cryptographic purposes, and a tool to test such functions or crypto transforms relying on them. |