Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | 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 | 4 | -0/+148 | |
| | ||||||
* | 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. | |||||
* | 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 | |
| | ||||||
* | utils: Use chunk_equals_const() for all cryptographic purposes | Martin Willi | 2015-04-14 | 23 | -38/+33 | |
| | ||||||
* | utils: Add a constant time chunk_equals() variant for cryptographic purposes | Martin Willi | 2015-04-14 | 2 | -0/+40 | |
| | ||||||
* | utils: Use memeq_const() for all cryptographic purposes | Martin Willi | 2015-04-14 | 12 | -22/+14 | |
| | ||||||
* | utils: Add a constant time memeq() variant for cryptographic purposes | Martin Willi | 2015-04-14 | 3 | -0/+71 | |
| | ||||||
* | rdrand: Reuse CPU feature detection to check for RDRAND instructions | Martin Willi | 2015-04-13 | 1 | -51/+4 | |
| | ||||||
* | padlock: Reuse common CPU feature detection to check for Padlock features | Martin Willi | 2015-04-13 | 1 | -80/+17 | |
| | ||||||
* | cpu-feature: Support Via Padlock security features | Martin Willi | 2015-04-13 | 2 | -0/+56 | |
| | ||||||
* | cpu-feature: Add a common class to query available CPU features | Martin Willi | 2015-04-13 | 4 | -3/+167 | |
| | | | | Currently supported is x86/x64 via cpuid() for some common features. | |||||
* | sqlite: Use our locking mechanism also when sqlite3_threadsafe() returns 0 | Martin Willi | 2015-04-13 | 1 | -7/+20 | |
| | | | | | | We previously checked for older library versions without locking support at all. But newer libraries can be built in single-threading mode as well, where we have to care about the locking. | |||||
* | sqlite: Show SQLite library version and thread safety flag during startup | Martin Willi | 2015-04-13 | 1 | -1/+8 | |
| | ||||||
* | vici: Defer read/write error reporting after connection entry has been released | Martin Willi | 2015-04-13 | 1 | -12/+34 | |
| | | | | | | | | | | | | | | | | If a vici client registered for (control-)log events, but a vici read/write operation fails, this may result in a deadlock. The attempt to write to the bus results in a vici log message, which in turn tries to acquire the lock for the entry currently held. While a recursive lock could help as well for a single thread, there is still a risk of inter-thread races if there is more than one thread listening for events and/or having read/write errors. We instead log to a local buffer, and write to the bus not before the connection entry has been released. Additionally, we mark the connection entry as unusable to avoid writing to the failed socket again, potentially triggering an error loop. | |||||
* | aead: Create AEAD using traditional transforms with an explicit IV generator | Martin Willi | 2015-04-13 | 5 | -12/+34 | |
| | | | | | | Real AEADs directly provide a suitable IV generator, but traditional crypters do not. For some (stream) ciphers, we should use sequential IVs, for which we pass an appropriate generator to the AEAD wrapper. | |||||
* | iv-gen: Add a generic constructor to create an IV gen from an algorithm | Martin Willi | 2015-04-13 | 4 | -2/+71 | |
| | ||||||
* | openssl: Don't pre-initialize OpenSSL HMAC with an empty key | Martin Willi | 2015-04-13 | 1 | -6/+16 | |
| | | | | | | | | | | With OpenSSL commit 929b0d70c19f60227f89fac63f22a21f21950823 setting an empty key fails if no previous key has been set on that HMAC. In 9138f49e we explicitly added the check we remove now, as HMAC_Update() might crash if HMAC_Init_ex() has not been called yet. To avoid that, we set and check a flag locally to let any get_mac() call fail if set_key() has not yet been called. | |||||
* | thread: Remove unneeded thread startup synchronization | Martin Willi | 2015-04-13 | 1 | -13/+4 | |
| | | | | | | | | | | | sem_init() is deprecated on OS X, and it actually fails with ENOSYS. Using our wrapped semaphore object is not an option, as it relies on the thread cleanup that we can't rely on at this stage. It is unclear why startup synchronization is required, as we can allocate the thread ID just before creating the pthread. There is a chance that we allocate a thread ID for a thread that fails to create, but the risk and consequences are negligible. | |||||
* | libsimaka: Link against Winsock2 on Windows | Martin Willi | 2015-04-13 | 1 | -0/+4 | |
| | | | | The library makes use of htons/ntohs(). | |||||
* | fips-prf: Remove superfluous <arpa/inet.h> include | Martin Willi | 2015-04-13 | 1 | -2/+0 | |
| | | | | | As we make no use of htonl() and friends, this is unneeded, but actually prevents a Windows build. | |||||
* | kernel-netlink: Fix GCC error about uninitialized variable use | Martin Willi | 2015-04-08 | 1 | -1/+1 | |
| | | | | | get_replay_state() always returns a replay_state_len when returning a replay state, but GCC doesn't know about that. | |||||
* | asn1: Undefine TIME_UTC, which is used by C11 | Martin Willi | 2015-04-08 | 1 | -0/+4 | |
| | | | | | When building with C11 support, TIME_UTC is used for timespec_get() and defined in <time.h>. Undefine TIME_UTC for our own internal use in asn1.c. | |||||
* | Wipe auxiliary key store5.3.0 | Andreas Steffen | 2015-03-28 | 1 | -1/+1 | |
| | ||||||
* | crypto-tester: Explicitly exclude FIPS-PRF from append mode tests | Martin Willi | 2015-03-28 | 1 | -8/+11 | |
| | | | | | This was implicitly done by the seed length check before 58dda5d6, but we now require an explicit check to avoid that unsupported use. | |||||
* | fips-prf: Fail when trying to use append mode on FIPS-PRF | Martin Willi | 2015-03-28 | 1 | -1/+6 | |
| | | | | | Append mode hardly makes sense for the special stateful FIPS-PRF, which is different to other PRFs. | |||||
* | Added tnc/tnccs-20-fail-init and tnc/tnccs-20-fail-resp scenarios | Andreas Steffen | 2015-03-27 | 8 | -8/+178 | |
| | ||||||
* | Fixed PB-TNC error handling | Andreas Steffen | 2015-03-27 | 4 | -35/+32 | |
| | ||||||
* | cmac: Reset state before doing set_key() | Martin Willi | 2015-03-27 | 1 | -0/+3 | |
| | ||||||
* | af-alg: Reset hmac/xcbc state before doing set_key() | Martin Willi | 2015-03-27 | 2 | -0/+2 | |
| | ||||||
* | xcbc: Reset XCBC state in set_key() | Martin Willi | 2015-03-27 | 1 | -0/+4 | |
| | | | | | If some partial data has been appended, a truncated key gets invalid if it is calculated from the pending state. | |||||
* | hmac: Reset the underlying hasher before doing set_key() with longer keys | Martin Willi | 2015-03-27 | 1 | -1/+2 | |
| | | | | | | | The user might have done a non-complete append, having some state in the hasher. Fixes #909. | |||||
* | crypto-tester: Test set_key() after a doing a partial append on prf/signers | Martin Willi | 2015-03-27 | 1 | -2/+20 | |
| | | | | | While that use is uncommon in real-world use, nonetheless should HMAC set a correct key and reset any underlying hasher. | |||||
* | stroke: Properly parse bliss key strength in public key constraint | Tobias Brunner | 2015-03-25 | 1 | -1/+1 | |
| | ||||||
* | eap-tnc: Free eap-tnc object if IKE_SA not found to get IPs | Tobias Brunner | 2015-03-25 | 1 | -0/+1 | |
| | ||||||
* | tnccs-20: Fix error handling in build() | Tobias Brunner | 2015-03-25 | 1 | -9/+5 | |
| | ||||||
* | android: Add messages/ita directory to tnccs-20 plugin | Tobias Brunner | 2015-03-25 | 1 | -1/+1 | |
| | ||||||
* | android: Sync libstrongswan Makefile.am and Android.mk | Tobias Brunner | 2015-03-25 | 1 | -0/+1 | |
| |