Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | status: Move status_t type and functions to separate files | Martin Willi | 2015-04-16 | 6 | -116/+125 | |
| | ||||||
* | path: Move path related utility functions to separate files | Martin Willi | 2015-04-16 | 6 | -201/+249 | |
| | ||||||
* | tty: Move tty related functions to separate files | Martin Willi | 2015-04-16 | 6 | -110/+157 | |
| | ||||||
* | memory: Move memory manipulation related functions to separate files | Martin Willi | 2015-04-16 | 6 | -380/+424 | |
| | ||||||
* | string: Move string related utility functions to separate files | Martin Willi | 2015-04-16 | 6 | -155/+199 | |
| | ||||||
* | byteorder: Move byte order related functions to separate header file | Martin Willi | 2015-04-16 | 3 | -137/+163 | |
| | ||||||
* | types: Use generic type definitions to separate header file | Martin Willi | 2015-04-16 | 3 | -63/+89 | |
| | ||||||
* | atomics: Move atomics/recounting support to separate files | Martin Willi | 2015-04-16 | 6 | -183/+251 | |
| | ||||||
* | unit-tests: Further increase the test vector testing timeout | Martin Willi | 2015-04-16 | 1 | -1/+1 | |
| | | | | Some build bots running make check seem to have longer for the DH testing. | |||||
* | test-vectors: Define test vector symbols as extern | Martin Willi | 2015-04-16 | 1 | -7/+7 | |
| | | | | | | We don't actually define a vector, but only prototype the test vector implemented in a different file. GCC uses the correct symbol during testing, but clang correctly complains about duplicated symbols during linking. | |||||
* | Fix years in some copyright statements | Tobias Brunner | 2015-04-16 | 4 | -4/+4 | |
| | ||||||
* | aesni: Fix doxygen groups | Martin Willi | 2015-04-15 | 1 | -2/+2 | |
| | ||||||
* | kernel-netlink: Don't mangle verbosity during test initialization | Martin Willi | 2015-04-15 | 1 | -2/+0 | |
| | | | | | We now properly manage thread verbosity in the test framework, and don't need to silence thread spawning messages. | |||||
* | unit-tests: Set test verbosity just after test suite loading | Martin Willi | 2015-04-15 | 1 | -10/+9 | |
| | | | | | | We see any plugin startup messages during suite configuration, where initialization is called once to query plugin features. No need to be verbose and show these messages once again in the first test. | |||||
* | crypto-factory: Remove obsolete transform testing functions | Martin Willi | 2015-04-15 | 2 | -54/+0 | |
| | ||||||
* | unit-tests: Use progressive testing of transforms with test vectors | Martin Willi | 2015-04-15 | 1 | -7/+26 | |
| | | | | | | This allows us to show which transform from which plugin failed. Also, we use the new cleanup handler functionality that allows proper deinitialization on failure or timeout. | |||||
* | transform: Add a getter for the enum_names for a specific transform type | Martin Willi | 2015-04-15 | 2 | -0/+40 | |
| | ||||||
* | enum-names: Fail gracefully when passing a NULL value as enum names | Martin Willi | 2015-04-15 | 2 | -1/+15 | |
| | ||||||
* | crypto-factory: Add enumerator method to support individual transform testing | Martin Willi | 2015-04-15 | 2 | -0/+127 | |
| | ||||||
* | unit-tests: Invoke all registered thread cleanup handlers on test failure | Martin Willi | 2015-04-15 | 1 | -0/+3 | |
| | | | | | | | | | | | If a test fails in a timeout or a test failure, longjmp() is used to restore the thread context and handle test failure. However, there might be unreleased resources, namely locks, which prevent the library to clean up properly after finishing the test. By using thread cleanup handlers, we can release any test subject internal or test specific external resources on test failure. We do so by calling all registered cleanup handlers. | |||||
* | thread: Add a function to pop and call all registered cleanup handlers | Martin Willi | 2015-04-15 | 4 | -0/+78 | |
| | ||||||
* | thread: Don't acquire lock for thread_cleanup_push/pop | Martin Willi | 2015-04-15 | 1 | -5/+0 | |
| | | | | | This is called only by the thread for its own thread_t, and does not need synchronization. | |||||
* | gcrypt: Explicitly initialize RNG backend to allocate static data | Martin Willi | 2015-04-15 | 1 | -0/+3 | |
| | | | | | | The libgcrypt RNG implementation uses static buffer allocation which it does not free. There is no symbol we can catch in leak-detective, hence we explicitly initialize the RNG during the whitelisted gcrypt_plugin_create() function. | |||||
* | leak-detective: Whitelist gcrypt_plugin_create() | Martin Willi | 2015-04-15 | 1 | -0/+1 | |
| | | | | | | gcry_check_version() does not free statically allocated resources. However, we can't whitelist it in some versions, as it is not a resolvable symbol name. Instead, whitelist our own plugin constructor function. | |||||
* | unit-tests: Add a TESTS_PLUGINS environment variable | Martin Willi | 2015-04-15 | 2 | -1/+6 | |
| | | | | This is often more convenient than specifying plugins in a configuration file. | |||||
* | unit-tests: Use a larger timeout for test vector testing | Martin Willi | 2015-04-15 | 1 | -0/+1 | |
| | | | | | As we test DH calculations this now takes more time. If multiple DH backends are enabled, we likely hit the default test timeout. | |||||
* | gcrypt: Support setting private value and testing of DH backend | Martin Willi | 2015-04-15 | 1 | -0/+19 | |
| | ||||||
* | openssl: Support setting ECDH private values | Martin Willi | 2015-04-15 | 1 | -0/+44 | |
| | ||||||
* | 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. | |||||
* | 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. |