Skip to content

Commit

Permalink
hashes:sha3: Remove unused functions from Keccak code
Browse files Browse the repository at this point in the history
Remove unused SHAKE functions
Removed unused SHA3-224
  • Loading branch information
Mathias Tausig committed Mar 6, 2018
1 parent 91a473a commit ce099c6
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions sys/hashes/sha3.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,6 @@ static void Keccak(unsigned int rate, unsigned int capacity, const unsigned char
unsigned long long int inputByteLen, unsigned char delimitedSuffix, unsigned char *output,
unsigned long long int outputByteLen);

/**
* Function to compute SHAKE128 on the input message with any output length.
*/
void FIPS202_SHAKE128(const unsigned char *input, unsigned int inputByteLen, unsigned char *output, int outputByteLen)
{
Keccak(1344, 256, input, inputByteLen, 0x1F, output, outputByteLen);
}

/**
* Function to compute SHAKE256 on the input message with any output length.
*/
void FIPS202_SHAKE256(const unsigned char *input, unsigned int inputByteLen, unsigned char *output, int outputByteLen)
{
Keccak(1088, 512, input, inputByteLen, 0x1F, output, outputByteLen);
}

/**
* 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)
{
Keccak(1152, 448, input, inputByteLen, 0x06, output, 28);
}


/**
* Function to compute SHA3-256 on the input message. The output length is fixed to 32 bytes.
*/
Expand Down

0 comments on commit ce099c6

Please sign in to comment.