aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/keccak.h
diff options
context:
space:
mode:
authorAntonio Juarez <antonio.maria.juarez@live.com>2014-03-03 22:07:58 +0000
committerAntonio Juarez <antonio.maria.juarez@live.com>2014-03-03 22:07:58 +0000
commit296ae46ed8f8f6e5f986f978febad302e3df231a (patch)
tree1629164454a239308f33c9e12afb22e7f3cd8eeb /src/crypto/keccak.h
parentchanged name (diff)
downloadmonero-296ae46ed8f8f6e5f986f978febad302e3df231a.tar.xz
moved all stuff to github
Diffstat (limited to 'src/crypto/keccak.h')
-rw-r--r--src/crypto/keccak.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/crypto/keccak.h b/src/crypto/keccak.h
new file mode 100644
index 000000000..4f7f85729
--- /dev/null
+++ b/src/crypto/keccak.h
@@ -0,0 +1,26 @@
+// keccak.h
+// 19-Nov-11 Markku-Juhani O. Saarinen <mjos@iki.fi>
+
+#ifndef KECCAK_H
+#define KECCAK_H
+
+#include <stdint.h>
+#include <string.h>
+
+#ifndef KECCAK_ROUNDS
+#define KECCAK_ROUNDS 24
+#endif
+
+#ifndef ROTL64
+#define ROTL64(x, y) (((x) << (y)) | ((x) >> (64 - (y))))
+#endif
+
+// compute a keccak hash (md) of given byte length from "in"
+int keccak(const uint8_t *in, int inlen, uint8_t *md, int mdlen);
+
+// update the state
+void keccakf(uint64_t st[25], int norounds);
+
+void keccak1600(const uint8_t *in, int inlen, uint8_t *md);
+
+#endif