aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/poly1305.h
diff options
context:
space:
mode:
authorRené van Dorst <opensource@vdorst.com>2018-05-30 12:05:20 +0200
committerRené van Dorst <opensource@vdorst.com>2018-05-30 17:32:29 +0200
commitf3f6c5367022ff8343e243e8e3f4ebaad5729c90 (patch)
tree38ca2ff54d43d737b4b289c2fcc53f7556e1721f /src/crypto/poly1305.h
parentchacha20poly1305: test for authtag failure (diff)
downloadwireguard-monolithic-historical-rvd/poly1305_padding.tar.xz
wireguard-monolithic-historical-rvd/poly1305_padding.zip
poly1305: Add a helper function which will padded the input to full poly1305 block when needed.rvd/poly1305_padding
In the current code, every poly1305 input is a multiple of POLY1305_BLOCK_SIZE or will padded with zero's. Put it in one function makes it more efficient. Signed-off-by: René van Dorst <opensource@vdorst.com>
Diffstat (limited to 'src/crypto/poly1305.h')
-rw-r--r--src/crypto/poly1305.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/crypto/poly1305.h b/src/crypto/poly1305.h
index 876234c..3cff282 100644
--- a/src/crypto/poly1305.h
+++ b/src/crypto/poly1305.h
@@ -25,6 +25,7 @@ void poly1305_fpu_init(void);
void poly1305_init(struct poly1305_ctx *ctx, const u8 key[POLY1305_KEY_SIZE], bool have_simd);
void poly1305_update(struct poly1305_ctx *ctx, const u8 *inp, const size_t len, bool have_simd);
+void poly1305_update_pad_fb(struct poly1305_ctx *ctx, const u8 *inp, const size_t len, bool have_simd);
void poly1305_finish(struct poly1305_ctx *ctx, u8 mac[POLY1305_MAC_SIZE], bool have_simd);
#ifdef DEBUG