references/kyber-submission-nist-round2/NIST-PQ-Submission-Kyber-20190330/Reference_Implementation/crypto_kem/kyber768/poly.c
/*************************************************
* Name:        poly_getnoise
*
* Description: Sample a polynomial deterministically from a seed and a nonce,
*              with output polynomial close to centered binomial distribution
*              with parameter KYBER_ETA
*
* Arguments:   - poly *r:                   pointer to output polynomial
*              - const unsigned char *seed: pointer to input seed (pointing to array of length KYBER_SYMBYTES bytes)
*              - unsigned char nonce:       one-byte input nonce
**************************************************/
poly_getnoise
Description: Sample a polynomial deterministically from a seed and a nonce,
with output polynomial close to centered binomial distribution
with parameter KYBER_ETA

- poly *r:                   pointer to output polynomial
const unsigned char *seed: pointer to input seed (pointing to array of length KYBER_SYMBYTES bytes)
unsigned char nonce:       one-byte input nonce
poly_getnoise Description : Sample a polynomial deterministically from a seed and a nonce with output polynomial close to centered binomial distribution with parameter KYBER_ETA - poly * r : pointer to output polynomial const unsigned char * seed : pointer to input seed ( pointing to array of length KYBER_SYMBYTES bytes ) unsigned char nonce : one - byte input nonce
void poly_getnoise(poly *r, const unsigned char *seed, unsigned char nonce)
{
  unsigned char buf[KYBER_ETA*KYBER_N/4];
  prf(buf, KYBER_ETA*KYBER_N/4, seed, nonce);
  cbd(r, buf);
}
void poly_getnoise ( poly * r , const unsigned char * seed , unsigned char nonce ) { unsigned char buf [ KYBER_ETA * KYBER_N / 4 ] ; prf ( buf , KYBER_ETA * KYBER_N / 4 , seed , nonce ) ; cbd ( r , buf ) ; }
Name:        poly_getnoise
Description: Sample a polynomial deterministically from a seed and a nonce,
with output polynomial close to centered binomial distribution
with parameter KYBER_ETA
Name : poly_getnoise Description : Sample a polynomial deterministically from a seed and a nonce with output polynomial close to centered binomial distribution with parameter KYBER_ETA