aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ext/include.am11
-rw-r--r--src/ext/keccak-tiny/keccak-tiny-unrolled.c8
-rw-r--r--src/ext/keccak-tiny/keccak-tiny.h6
3 files changed, 17 insertions, 8 deletions
diff --git a/src/ext/include.am b/src/ext/include.am
index 47d4c03d0b..b8e59ff3ad 100644
--- a/src/ext/include.am
+++ b/src/ext/include.am
@@ -135,3 +135,14 @@ noinst_HEADERS += $(ED25519_DONNA_HDRS)
LIBED25519_DONNA=src/ext/ed25519/donna/libed25519_donna.a
noinst_LIBRARIES += $(LIBED25519_DONNA)
+src_ext_keccak_tiny_libkeccak_tiny_a_CFLAGS=
+
+src_ext_keccak_tiny_libkeccak_tiny_a_SOURCES= \
+ src/ext/keccak-tiny/keccak-tiny-unrolled.c
+
+LIBKECCAK_TINY_HDRS = \
+ src/ext/keccak-tiny/keccak-tiny.h
+
+LIBKECCAK_TINY=src/ext/keccak-tiny/libkeccak-tiny.a
+noinst_LIBRARIES += $(LIBKECCAK_TINY)
+
diff --git a/src/ext/keccak-tiny/keccak-tiny-unrolled.c b/src/ext/keccak-tiny/keccak-tiny-unrolled.c
index 9ad818603c..4b4f51c7cf 100644
--- a/src/ext/keccak-tiny/keccak-tiny-unrolled.c
+++ b/src/ext/keccak-tiny/keccak-tiny-unrolled.c
@@ -8,10 +8,8 @@
*/
#include "keccak-tiny.h"
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
+#include "crypto.h"
/******** The Keccak-f[1600] permutation ********/
@@ -168,7 +166,7 @@ keccak_finalize(keccak_state *s)
// Xor in the last block.
xorin(s->a, s->block, s->offset);
- memset_s(s->block, sizeof(s->block), 0, sizeof(s->block));
+ memwipe(s->block, 0, sizeof(s->block));
s->finalized = 1;
s->offset = s->rate;
}
@@ -310,7 +308,7 @@ keccak_clone(keccak_state *out, const keccak_state *in)
void
keccak_cleanse(keccak_state *s)
{
- memset_s(s, sizeof(keccak_state), 0, sizeof(keccak_state));
+ memwipe(s, 0, sizeof(keccak_state));
}
/** The sponge-based hash construction. **/
diff --git a/src/ext/keccak-tiny/keccak-tiny.h b/src/ext/keccak-tiny/keccak-tiny.h
index 04044cdc64..7efea2319e 100644
--- a/src/ext/keccak-tiny/keccak-tiny.h
+++ b/src/ext/keccak-tiny/keccak-tiny.h
@@ -1,8 +1,8 @@
#ifndef KECCAK_FIPS202_H
#define KECCAK_FIPS202_H
-#define __STDC_WANT_LIB_EXT1__ 1
-#include <stdint.h>
-#include <stdlib.h>
+
+#include <stddef.h>
+#include "torint.h"
#define KECCAK_MAX_RATE 200