2014-03-03 22:07:58 +00:00
|
|
|
// 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"
|
2017-11-11 11:20:48 +00:00
|
|
|
void keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen);
|
2014-03-03 22:07:58 +00:00
|
|
|
|
|
|
|
// update the state
|
|
|
|
void keccakf(uint64_t st[25], int norounds);
|
|
|
|
|
2016-05-13 19:45:20 +00:00
|
|
|
void keccak1600(const uint8_t *in, size_t inlen, uint8_t *md);
|
2014-03-03 22:07:58 +00:00
|
|
|
|
|
|
|
#endif
|