references/kyber-submission-nist-round2/NIST-PQ-Submission-Kyber-20190330/Reference_Implementation/crypto_kem/kyber768/poly.c
/*************************************************
* Name:        poly_frommont
*
* Description: Inplace conversion of all coefficients of a polynomial 
*              from Montgomery domain to normal domain
*
* Arguments:   - poly *r:       pointer to input/output polynomial
**************************************************/
poly_frommont
Description: Inplace conversion of all coefficients of a polynomial
from Montgomery domain to normal domain

- poly *r:       pointer to input/output polynomial
poly_frommont Description : Inplace conversion of all coefficients of a polynomial from Montgomery domain to normal domain - poly * r : pointer to input / output polynomial
void poly_frommont(poly *r)
{
  int i;
  const int16_t f = (1ULL << 32) % KYBER_Q;
  for(i=0;i<KYBER_N;i++)
    r->coeffs[i] = montgomery_reduce((int32_t)r->coeffs[i]*f);
}
void poly_frommont ( poly * r ) { int i ; const int16_t f = ( 1ULL << 32 ) % KYBER_Q ; for ( i = 0 ; i < KYBER_N ; i ++ ) r -> coeffs [ i ] = montgomery_reduce ( ( int32_t ) r -> coeffs [ i ] * f ) ; }
Name:        poly_frommont
Description: Inplace conversion of all coefficients of a polynomial
from Montgomery domain to normal domain
Name : poly_frommont Description : Inplace conversion of all coefficients of a polynomial from Montgomery domain to normal domain