aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-02-11 16:22:00 +0100
committerMattias Andrée <maandree@kth.se>2019-02-11 16:22:00 +0100
commit5ff4c5af715d098852d124de116d354ee10f4ea4 (patch)
tree5789ad5798f2dbf21d9406a2942e48b222f773ae /common.h
parentRemove old file (diff)
downloadlibkeccak-5ff4c5af715d098852d124de116d354ee10f4ea4.tar.gz
libkeccak-5ff4c5af715d098852d124de116d354ee10f4ea4.tar.bz2
libkeccak-5ff4c5af715d098852d124de116d354ee10f4ea4.tar.xz
Split most .c files into one per function and flatten file hierarchy
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r--common.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/common.h b/common.h
index 1245bf6..df8b53c 100644
--- a/common.h
+++ b/common.h
@@ -15,3 +15,22 @@
# define __builtin_memcpy(dest, src, n) memcpy(dest, src, n)
# define __builtin_memmove(dest, src, n) memmove(dest, src, n)
#endif
+
+
+/**
+ * The outer pad pattern for HMAC
+ */
+#define HMAC_OUTER_PAD 0x5C
+
+/**
+ * The inner pad pattern for HMAC
+ */
+#define HMAC_INNER_PAD 0x36
+
+
+static void *(*volatile my_explicit_memset)(void *, int, size_t) = memset;
+static __attribute__((__optimize__("-O0"))) void
+my_explicit_bzero(void *ptr, size_t size)
+{
+ (*my_explicit_memset)(ptr, 0, size);
+}