aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRené van Dorst <opensource@vdorst.com>2018-05-30 17:29:19 +0200
committerRené van Dorst <opensource@vdorst.com>2018-05-30 20:01:07 +0200
commit510d615053023827c7284e702c040486f8aee095 (patch)
tree168ac465df2639941ce6c5df32b2261cf67e2feb
parentpoly1305: mips64: Reduce opaque size. (diff)
downloadWireGuard-rvd/poly1305_opaque_length.tar.xz
WireGuard-rvd/poly1305_opaque_length.zip
poly1305: generic: Reduce opaque size.rvd/poly1305_opaque_length
Signed-off-by: René van Dorst <opensource@vdorst.com>
-rw-r--r--src/crypto/poly1305.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/crypto/poly1305.h b/src/crypto/poly1305.h
index f53c0ea..f821b74 100644
--- a/src/crypto/poly1305.h
+++ b/src/crypto/poly1305.h
@@ -18,6 +18,9 @@ enum poly1305_lengths {
#define POLY1305_OPAQUE_LEN (10 * sizeof(u32))
#elif defined(CONFIG_MIPS) && defined(CONFIG_64BIT)
#define POLY1305_OPAQUE_LEN (6 * sizeof(u64))
+#elif !(defined(CONFIG_X86_64) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || (defined(CONFIG_MIPS) && (defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2))))
+/* POLY1305 C version */
+#define POLY1305_OPAQUE_LEN (9 * sizeof(u32))
#else
/* Default POLY1305_OPAQUE_LEN, can be removed when all lengths are known. */
#define POLY1305_OPAQUE_LEN (24 * sizeof(u64))