diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-09-15 08:55:50 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-09-15 08:55:50 +0200 |
commit | b2d02587fcd86f0c3910441d58c94dd0c9fea5b5 (patch) | |
tree | dda86f59664bf4265733816ef90df912d50fcd5e /src/linux_alg.h | |
parent | 541ee8295e0fe1b7c51fa4aee74aaa12f696860b (diff) | |
download | fastd-b2d02587fcd86f0c3910441d58c94dd0c9fea5b5.tar fastd-b2d02587fcd86f0c3910441d58c94dd0c9fea5b5.zip |
Add support for kernel AES implementations
This gives AES128 a slight boost on my system, but it is still slower than
XSalsa20... I should probably write userspace code that can make use of AES-NI
and CLMUL. Or directly jump to the kernel space with the whole forwarding code.
Nevertheless, this might run nicely on Geode CPUs and similar hardware with AES
acceleration, at least if the context switches aren't too expensive...
Diffstat (limited to 'src/linux_alg.h')
-rw-r--r-- | src/linux_alg.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/linux_alg.h b/src/linux_alg.h index e10f23a..0099474 100644 --- a/src/linux_alg.h +++ b/src/linux_alg.h @@ -36,4 +36,7 @@ void fastd_linux_alg_close(fastd_context *ctx); int fastd_linux_alg_ghash_init(fastd_context *ctx, uint8_t key[16]); bool fastd_linux_alg_ghash(fastd_context *ctx, int fd, uint8_t out[16], const void *data, size_t len); +int fastd_linux_alg_aesctr_init(fastd_context *ctx, uint8_t *key, size_t keylen); +bool fastd_linux_alg_aesctr(fastd_context *ctx, int fd, void *out, const void *in, size_t len, const uint8_t iv[16]); + #endif /* _FASTD_LINUX_ALG_H_ */ |