Cortex-M_Implementation_KEM/Cortex-M0/saber-ref-mem/src/fips202.c
void keccak_squeezeblocks(unsigned char *h, unsigned long long int nblocks,
                                 uint64_t *s,
                                 unsigned int r)
{
  unsigned int i;
  while(nblocks > 0)
  {
    KeccakF1600_StatePermute(s);
    for(i=0;i<(r>>3);i++)
    {
      store64(h+8*i, s[i]);
    }
    h += r;
    nblocks--;
  }
}
/*************************************************
* Name:        keccak_squeezeblocks
*
* Description: Squeeze step of Keccak. Squeezes full blocks of r bytes each.
*              Modifies the state. Can be called multiple times to keep squeezing,
*              i.e., is incremental.
*
* Arguments:   - unsigned char *h:               pointer to output blocks
*              - unsigned long long int nblocks: number of blocks to be squeezed (written to h)
*              - uint64_t *s:                    pointer to in/output Keccak state
*              - unsigned int r:                 rate in bytes (e.g., 168 for SHAKE128)
**************************************************/
keccak_squeezeblocks
Description: Squeeze step of Keccak. Squeezes full blocks of r bytes each.
Modifies the state. Can be called multiple times to keep squeezing,
i.e., is incremental.

- unsigned char *h:               pointer to output blocks
unsigned long long int nblocks: number of blocks to be squeezed (written to h)
uint64_t *s:                    pointer to in/output Keccak state
unsigned int r:                 rate in bytes
keccak_squeezeblocks Description : Squeeze step of Keccak . Squeezes full blocks of r bytes each . Modifies the state . Can be called multiple times to keep squeezing i . e . is incremental . - unsigned char * h : pointer to output blocks unsigned long long int nblocks : number of blocks to be squeezed ( written to h ) uint64_t * s : pointer to in / output Keccak state unsigned int r : rate in bytes
void keccak_squeezeblocks(unsigned char *h, unsigned long long int nblocks,
                                 uint64_t *s,
                                 unsigned int r)
{
  unsigned int i;
  while(nblocks > 0)
  {
    KeccakF1600_StatePermute(s);
    for(i=0;i<(r>>3);i++)
    {
      store64(h+8*i, s[i]);
    }
    h += r;
    nblocks--;
  }
}
void keccak_squeezeblocks ( unsigned char * h , unsigned long long int nblocks , uint64_t * s , unsigned int r ) { unsigned int i ; while ( nblocks > 0 ) { KeccakF1600_StatePermute ( s ) ; for ( i = 0 ; i < ( r >> 3 ) ; i ++ ) { store64 ( h + 8 * i , s [ i ] ) ; } h += r ; nblocks -- ; } }
Name:        keccak_squeezeblocks
Description: Squeeze step of Keccak.
Name : keccak_squeezeblocks Description : Squeeze step of Keccak .