File: sha3.h

package info (click to toggle)
fwknop 2.6.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,420 kB
  • sloc: ansic: 30,106; perl: 20,346; sh: 5,560; makefile: 955; xml: 937; python: 797; java: 444; objc: 292; erlang: 128
file content (52 lines) | stat: -rw-r--r-- 1,938 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
 * \file lib/sha3.h
 *
 * \brief header file for SHA3 routines
 */



#define SHA3_256_DIGEST_LEN 32
#define SHA3_512_DIGEST_LEN 64
#define SHA3_256_BLOCK_LEN 136
#define SHA3_512_BLOCK_LEN 72
#define SHA3_256_B64_LEN      43
#define SHA3_512_B64_LEN      86
#define SHA3_256_DIGEST_STR_LEN   (SHA3_256_DIGEST_LEN * 2 + 1)
#define SHA3_512_DIGEST_STR_LEN   (SHA3_512_DIGEST_LEN * 2 + 1)

void Keccak(unsigned int rate, unsigned int capacity, const unsigned char *input, unsigned long long int inputByteLen, unsigned char delimitedSuffix, unsigned char *output, unsigned long long int outputByteLen);

/**
  * \brief Function to compute SHAKE128 on the input message with any output length.
  *
  *  Not currently in use
void FIPS202_SHAKE128(const unsigned char *input, unsigned int inputByteLen, unsigned char *output, int outputByteLen);
*/

/**
  * \brief Function to compute SHAKE256 on the input message with any output length.
  *
  *  Not currently in use
void FIPS202_SHAKE256(const unsigned char *input, unsigned int inputByteLen, unsigned char *output, int outputByteLen);
*/

/**
  * \brief Function to compute SHA3-224 on the input message. The output length is fixed to 28 bytes.
void FIPS202_SHA3_224(const unsigned char *input, unsigned int inputByteLen, unsigned char *output);
*/

/**
  * \brief Function to compute SHA3-256 on the input message. The output length is fixed to 32 bytes.
  */
void FIPS202_SHA3_256(const unsigned char *input, unsigned int inputByteLen, unsigned char *output);

/**
  * \brief Function to compute SHA3-384 on the input message. The output length is fixed to 48 bytes.
void FIPS202_SHA3_384(const unsigned char *input, unsigned int inputByteLen, unsigned char *output);
*/

/**
  * \brief Function to compute SHA3-512 on the input message. The output length is fixed to 64 bytes.
  */
void FIPS202_SHA3_512(const unsigned char *input, unsigned int inputByteLen, unsigned char *output);