4e42aeadec
generic-poly1305: use the new buffer helpers
2013-11-30 06:41:05 +01:00
20e9e0920d
Move buffer-related functions to a new header and add some more utility functions
2013-11-30 06:33:17 +01:00
f4b53bd063
Move logging defines to a new header
2013-11-30 06:20:54 +01:00
216007f373
generic-poly1305: cleanup
2013-11-30 06:08:34 +01:00
aa1d894e10
Make the crypto implementations independent of fastd.h (and fix more minor bugs)
2013-11-30 05:35:18 +01:00
5f7258ade2
Make crypto implementation configurable (and update a few error messages)
2013-11-30 04:58:05 +01:00
f7e72b3584
config: update and sort keyword list
2013-11-30 04:40:08 +01:00
a18b49e7c6
Clean up some parts of the configuration handling (and fix a few little bugs)
2013-11-30 04:36:24 +01:00
d5a043a7c0
Rename methods to methods providers and method contexts to methods to reflect their function better
2013-11-30 03:44:06 +01:00
8088a82a2a
Perform string-based lookup of method-related information only once
2013-11-30 03:36:22 +01:00
1111dc8e5e
Remove cipher and MAC contexts
...
Not a single implementation was using them...
2013-11-30 00:42:35 +01:00
a09d04a022
Revert "crypto: separate cipher/MAC availability check from information request"
...
This reverts commit d0707b161d
.
2013-11-29 22:24:02 +01:00
d0707b161d
crypto: separate cipher/MAC availability check from information request
2013-11-29 22:15:58 +01:00
27c14deaed
Fix build without NaCl
2013-11-29 20:34:15 +01:00
6aca3d3504
Allow method init to fail
2013-11-29 08:16:14 +01:00
8d3c7196bb
Output an error message when the encrypt function fails
2013-11-29 07:27:09 +01:00
68f2197cf5
Use <cpuid.h>
...
fastd will segfault in valgrind otherwise (O_o)
2013-11-29 06:33:54 +01:00
3cd025bb17
generic-gmac: use HKDF expansion instead of the stream cipher to generate H
2013-11-29 06:18:26 +01:00
f04696e745
Reorder check: avoid undefined behaviour due to negative or to long shifts
2013-11-29 06:03:33 +01:00
30016f8c82
HKDF: add a forgotten const qualifier
2013-11-29 05:50:28 +01:00
61349d3d27
Compile with -std=c99 and restructure some code to ensure there is no invalid aliasing (hopefully)
2013-11-29 05:35:49 +01:00
c13fe36e4c
ghash-pclmulqdq: fix one left usage of a __builtin pclmulqdq instead of the _mm version
2013-11-28 22:39:26 +01:00
337d9e4787
ghash-pclmulqdq: rework implementation to allow both GCC and Clang to generate fast code
2013-11-28 22:36:41 +01:00
54c3e6adf0
ghash-pclmulqdq: make byteswap a macro
...
For some reason, this allows clang to optimize the code much better.
2013-11-28 19:58:58 +01:00
793c8db37c
ghash-pclmulqdq: speed up multiplication using the Karatsuba algorithm
2013-11-28 05:41:46 +01:00
ac55a91fe9
Add a pclmulqdq ghash implementation
2013-11-28 04:31:25 +01:00
ca49096f5d
Add CPUID function
2013-11-28 04:30:58 +01:00
7a08e6823e
Allow checking if a crypto algorithm is available at runtime
2013-11-27 20:53:00 +01:00
ba5abca808
Add OpenSSL-based aes128-ctr implementation
2013-11-27 20:28:16 +01:00
2f516f9cea
Correctly initialize OpenSSL
2013-11-27 19:55:54 +01:00
c62a0f592c
Move crypto algorithm information out of implementation
2013-11-25 23:18:11 +01:00
60c2c11de8
Move cipher and mac structures to a new header
2013-11-25 21:30:36 +01:00
c58ad42228
Add a new generic-gmac method
2013-11-25 17:06:41 +01:00
3fdec78db3
Rename generic-gmac method to composed-gmac
2013-11-25 16:53:29 +01:00
75e0885594
Add salsa20/12 cipher
2013-11-21 19:22:37 +01:00
08892cdc54
Add salsa20 cipher
2013-11-21 18:39:12 +01:00
c6cce0f5aa
Replace max_packet_size functions by a max_overhead field
2013-11-20 02:17:15 +01:00
b5112ff67f
Slightly simplify method/cipher/MAC definitions
2013-11-20 01:51:12 +01:00
9bb8a04e28
Add generic-poly1305 method
2013-11-20 01:26:04 +01:00
a97526d3d3
generic-gmac: some code simplifications
2013-11-18 21:16:40 +01:00
e29241e784
Add cipher-test method to measure the raw performance of a cipher
2013-11-18 21:09:09 +01:00
3fa0b84824
generic-gmac: don't access invalid pointer for the reorder check with null cipher
2013-11-18 21:08:46 +01:00
bfca35f657
blowfish-ctr: formatting fixes
2013-11-18 04:00:38 +01:00
33aa647d94
Remove OpenSSL-based blowfish implementation
...
It doesn't have any advantages over the builtin one.
2013-11-18 03:55:17 +01:00
7476dc0e9a
secure_memzero all cipher and MAC states
2013-11-18 03:53:37 +01:00
3e8e646b91
Some work towards a composable GMAC method
2013-11-18 03:49:25 +01:00
190878060d
generic-gcm: the method state itself doesn't hold any keys anymore, so we don't need to secure_memzero it
2013-11-18 03:49:18 +01:00
af90494cf1
generic-gcm: cipher_get returns a boolean
2013-11-18 03:49:18 +01:00
d646bd0332
Add null cipher
2013-11-17 21:13:55 +01:00
b4c9ab9a81
Revert bytewise ghash implementation
...
The performance gain is negligible, and OpenSSL avoids a bytewise implementation
to mitigate timing attacks.
This reverts commits d491654429
and
1b06460aa9
.
2013-11-17 11:43:06 +01:00