summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/chacha20poly1305.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-11-06 00:49:34 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-11-10 15:49:28 +0900
commit5845655942116f9561a10a75d18a6c59f03ebfd0 (patch)
tree925db18fe9d8dfe186154b449fc1c3848a23a6ad /src/crypto/chacha20poly1305.h
parentc4e6f58b9e4f8a163c87a2bf34a19819f0b15ca4 (diff)
receive: hoist fpu outside of receive loop
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/chacha20poly1305.h')
-rw-r--r--src/crypto/chacha20poly1305.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/crypto/chacha20poly1305.h b/src/crypto/chacha20poly1305.h
index c8885e0..991755d 100644
--- a/src/crypto/chacha20poly1305.h
+++ b/src/crypto/chacha20poly1305.h
@@ -20,17 +20,18 @@ void chacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len,
const u64 nonce, const u8 key[CHACHA20POLY1305_KEYLEN]);
bool __must_check chacha20poly1305_encrypt_sg(struct scatterlist *dst, struct scatterlist *src, const size_t src_len,
- const u8 *ad, const size_t ad_len,
- const u64 nonce, const u8 key[CHACHA20POLY1305_KEYLEN],
- bool have_simd);
+ const u8 *ad, const size_t ad_len,
+ const u64 nonce, const u8 key[CHACHA20POLY1305_KEYLEN],
+ bool have_simd);
bool __must_check chacha20poly1305_decrypt(u8 *dst, const u8 *src, const size_t src_len,
- const u8 *ad, const size_t ad_len,
- const u64 nonce, const u8 key[CHACHA20POLY1305_KEYLEN]);
+ const u8 *ad, const size_t ad_len,
+ const u64 nonce, const u8 key[CHACHA20POLY1305_KEYLEN]);
bool __must_check chacha20poly1305_decrypt_sg(struct scatterlist *dst, struct scatterlist *src, const size_t src_len,
- const u8 *ad, const size_t ad_len,
- const u64 nonce, const u8 key[CHACHA20POLY1305_KEYLEN]);
+ const u8 *ad, const size_t ad_len,
+ const u64 nonce, const u8 key[CHACHA20POLY1305_KEYLEN],
+ bool have_simd);
void xchacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len,
const u8 *ad, const size_t ad_len,
@@ -38,9 +39,9 @@ void xchacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len,
const u8 key[CHACHA20POLY1305_KEYLEN]);
bool __must_check xchacha20poly1305_decrypt(u8 *dst, const u8 *src, const size_t src_len,
- const u8 *ad, const size_t ad_len,
- const u8 nonce[XCHACHA20POLY1305_NONCELEN],
- const u8 key[CHACHA20POLY1305_KEYLEN]);
+ const u8 *ad, const size_t ad_len,
+ const u8 nonce[XCHACHA20POLY1305_NONCELEN],
+ const u8 key[CHACHA20POLY1305_KEYLEN]);
#if defined(CONFIG_X86_64)
#include <linux/version.h>