1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-23 07:59:01 +00:00
pqcrypto/common/fips202.h

30 lines
818 B
C
Raw Normal View History

2019-01-15 14:35:25 +00:00
#ifndef FIPS202_H
#define FIPS202_H
2019-02-17 10:54:38 +00:00
#include <stddef.h>
2019-01-15 14:35:25 +00:00
#include <stdint.h>
#define SHAKE128_RATE 168
#define SHAKE256_RATE 136
#define SHA3_256_RATE 136
#define SHA3_512_RATE 72
2019-01-15 14:35:25 +00:00
2019-02-17 10:54:38 +00:00
void shake128_absorb(uint64_t *s, const uint8_t *input, size_t inlen);
2019-01-16 09:15:18 +00:00
2019-02-17 10:54:38 +00:00
void shake128_squeezeblocks(uint8_t *output, size_t nblocks, uint64_t *s);
2019-01-16 09:15:18 +00:00
2019-02-17 10:54:38 +00:00
void shake256_absorb(uint64_t *s, const uint8_t *input, size_t inlen);
2019-01-16 09:15:18 +00:00
2019-02-17 10:54:38 +00:00
void shake256_squeezeblocks(uint8_t *output, size_t nblocks, uint64_t *s);
2019-01-15 14:35:25 +00:00
2019-02-17 10:54:38 +00:00
void shake128(uint8_t *output, size_t outlen,
const uint8_t *input, size_t inlen);
2019-01-16 09:15:18 +00:00
2019-02-17 10:54:38 +00:00
void shake256(uint8_t *output, size_t outlen,
const uint8_t *input, size_t inlen);
2019-01-16 09:15:18 +00:00
2019-02-17 10:54:38 +00:00
void sha3_256(uint8_t *output, const uint8_t *input, size_t inlen);
void sha3_512(uint8_t *output, const uint8_t *input, size_t inlen);
2019-01-15 14:35:25 +00:00
#endif