references/NIST-PQ-Submission-Kyber-20201001/Additional_Implementations/avx2/crypto_kem/kyber768/indcpa.c
/*************************************************
* Name:        pack_ciphertext
*
* Description: Serialize the ciphertext as concatenation of the
*              compressed and serialized vector of polynomials b
*              and the compressed and serialized polynomial v
*
* Arguments:   uint8_t *r: pointer to the output serialized ciphertext
*              poly *pk:   pointer to the input vector of polynomials b
*              poly *v:    pointer to the input polynomial v
**************************************************/
pack_ciphertext
Description: Serialize the ciphertext as concatenation of the
compressed and serialized vector of polynomials b
and the compressed and serialized polynomial v

uint8_t *r: pointer to the output serialized ciphertext
poly *pk:   pointer to the input vector of polynomials b
poly *v:    pointer to the input polynomial v
pack_ciphertext Description : Serialize the ciphertext as concatenation of the compressed and serialized vector of polynomials b and the compressed and serialized polynomial v uint8_t * r : pointer to the output serialized ciphertext poly * pk : pointer to the input vector of polynomials b poly * v : pointer to the input polynomial v
static void pack_ciphertext(uint8_t r[KYBER_INDCPA_BYTES],
                            polyvec *b,
                            poly *v)
{
  polyvec_compress(r, b);
  poly_compress(r+KYBER_POLYVECCOMPRESSEDBYTES, v);
}
static void pack_ciphertext ( uint8_t r [ KYBER_INDCPA_BYTES ] , polyvec * b , poly * v ) { polyvec_compress ( r , b ) ; poly_compress ( r + KYBER_POLYVECCOMPRESSEDBYTES , v ) ; }
Name:        pack_ciphertext
Description: Serialize the ciphertext as concatenation of the
compressed and serialized vector of polynomials b
and the compressed and serialized polynomial v
Name : pack_ciphertext Description : Serialize the ciphertext as concatenation of the compressed and serialized vector of polynomials b and the compressed and serialized polynomial v