references/kyber-submission-nist-round2/NIST-PQ-Submission-Kyber-20190330/Reference_Implementation/crypto_kem/kyber768/poly.c
/*************************************************
* Name:        poly_basemul
*
* Description: Multiplication of two polynomials in NTT domain
*
* Arguments:   - poly *r:       pointer to output polynomial
*              - const poly *a: pointer to first input polynomial
*              - const poly *b: pointer to second input polynomial
**************************************************/
poly_basemul
Description: Multiplication of two polynomials in NTT domain

- poly *r:       pointer to output polynomial
const poly *a: pointer to first input polynomial
const poly *b: pointer to second input polynomial
poly_basemul Description : Multiplication of two polynomials in NTT domain - poly * r : pointer to output polynomial const poly * a : pointer to first input polynomial const poly * b : pointer to second input polynomial
void poly_basemul(poly *r, const poly *a, const poly *b)
{
  unsigned int i;
  for(i = 0; i < KYBER_N/4; ++i) {
    basemul(r->coeffs + 4*i, a->coeffs + 4*i, b->coeffs + 4*i, zetas[64 + i]);
    basemul(r->coeffs + 4*i + 2, a->coeffs + 4*i + 2, b->coeffs + 4*i + 2, -zetas[64 + i]);
  }
}
void poly_basemul ( poly * r , const poly * a , const poly * b ) { unsigned int i ; for ( i = 0 ; i < KYBER_N / 4 ; ++ i ) { basemul ( r -> coeffs + 4 * i , a -> coeffs + 4 * i , b -> coeffs + 4 * i , zetas [ 64 + i ] ) ; basemul ( r -> coeffs + 4 * i + 2 , a -> coeffs + 4 * i + 2 , b -> coeffs + 4 * i + 2 , - zetas [ 64 + i ] ) ; } }
Name:        poly_basemul
Description: Multiplication of two polynomials in NTT domain
Name : poly_basemul Description : Multiplication of two polynomials in NTT domain