references/kyber-submission-nist-round2/NIST-PQ-Submission-Kyber-20190330/Reference_Implementation/crypto_kem/kyber768/aes256ctr.c
/*************************************************
* Name:        aes256xof_squeezeblocks
*
* Description: AES256 CTR used as a replacement for a XOF; this function
*              generates 4 blocks out AES256-CTR output
*
* Arguments:   - unsigned char *out:         pointer to output
*              - unsigned long long nblocks: number of reqested 64-byte output blocks
*              - aes256xof_ctx *s:           AES "state", i.e. expanded key and IV
**************************************************/
aes256xof_squeezeblocks
Description: AES256 CTR used as a replacement for a XOF; this function
generates 4 blocks out AES256-CTR output

- unsigned char *out:         pointer to output
unsigned long long nblocks: number of reqested 64-byte output blocks
aes256xof_ctx *s:           AES "state", i.e. expanded key and IV
aes256xof_squeezeblocks Description : AES256 CTR used as a replacement for a XOF ; this function generates 4 blocks out AES256 - CTR output - unsigned char * out : pointer to output unsigned long long nblocks : number of reqested 64 - byte output blocks aes256xof_ctx * s : AES " state " i . e . expanded key and IV
void aes256xof_squeezeblocks(unsigned char *out, unsigned long long nblocks, aes256xof_ctx *s)
{
	while (nblocks > 0) {
    aes_ctr4x(out, s->ivw, s->sk_exp);
    out += 64;
    nblocks--;
  }
}
void aes256xof_squeezeblocks ( unsigned char * out , unsigned long long nblocks , aes256xof_ctx * s ) { while ( nblocks > 0 ) { aes_ctr4x ( out , s -> ivw , s -> sk_exp ) ; out += 64 ; nblocks -- ; } }
Name:        aes256xof_squeezeblocks
Description: AES256 CTR used as a replacement for a XOF; this function
generates 4 blocks out AES256-CTR output
Name : aes256xof_squeezeblocks Description : AES256 CTR used as a replacement for a XOF ; this function generates 4 blocks out AES256 - CTR output