Cortex-M_Implementation_KEM/Cortex-M0/saber-ref-mem/src/fips202.c
void sha3_512(unsigned char *output, const unsigned char *input,  unsigned long long inlen)
{
  uint64_t s[25];
  unsigned char t[SHA3_512_RATE];
  size_t i;

  /* Absorb input */
  keccak_absorb(s, SHA3_512_RATE, input, inlen, 0x06);

  /* Squeeze output */
  keccak_squeezeblocks(t, 1, s, SHA3_512_RATE);

  for(i=0;i<64;i++)
      output[i] = t[i];
}
/*************************************************
* Name:        sha3_512
*
* Description: SHA3-512 with non-incremental API
*
* Arguments:   - unsigned char *output:      pointer to output
*              - const unsigned char *input: pointer to input
*              - unsigned long long inlen:   length of input in bytes
**************************************************/
sha3_512
Description: SHA3-512 with non-incremental API

- unsigned char *output:      pointer to output
const unsigned char *input: pointer to input
unsigned long long inlen:   length of input in bytes
sha3_512 Description : SHA3 - 512 with non - incremental API - unsigned char * output : pointer to output const unsigned char * input : pointer to input unsigned long long inlen : length of input in bytes
void sha3_512(unsigned char *output, const unsigned char *input,  unsigned long long inlen)
{
  uint64_t s[25];
  unsigned char t[SHA3_512_RATE];
  size_t i;
  keccak_absorb(s, SHA3_512_RATE, input, inlen, 0x06);
  keccak_squeezeblocks(t, 1, s, SHA3_512_RATE);
  for(i=0;i<64;i++)
      output[i] = t[i];
}
void sha3_512 ( unsigned char * output , const unsigned char * input , unsigned long long inlen ) { uint64_t s [ 25 ] ; unsigned char t [ SHA3_512_RATE ] ; size_t i ; keccak_absorb ( s , SHA3_512_RATE , input , inlen , 0x06 ) ; keccak_squeezeblocks ( t , 1 , s , SHA3_512_RATE ) ; for ( i = 0 ; i < 64 ; i ++ ) output [ i ] = t [ i ] ; }
Name:        sha3_512
Description: SHA3-512 with non-incremental API
Name : sha3_512 Description : SHA3 - 512 with non - incremental API
/* Absorb input */ /* Squeeze output */