2019-01-15 15:03:38 +00:00
|
|
|
#ifndef POLYVEC_H
|
|
|
|
#define POLYVEC_H
|
|
|
|
|
|
|
|
#include "params.h"
|
|
|
|
#include "poly.h"
|
|
|
|
|
2019-01-15 15:34:01 +00:00
|
|
|
typedef struct {
|
2019-01-16 10:02:32 +00:00
|
|
|
poly vec[KYBER_K];
|
2019-01-15 15:03:38 +00:00
|
|
|
} polyvec;
|
|
|
|
|
|
|
|
void polyvec_compress(unsigned char *r, const polyvec *a);
|
|
|
|
void polyvec_decompress(polyvec *r, const unsigned char *a);
|
|
|
|
|
|
|
|
void polyvec_tobytes(unsigned char *r, const polyvec *a);
|
|
|
|
void polyvec_frombytes(polyvec *r, const unsigned char *a);
|
|
|
|
|
|
|
|
void polyvec_ntt(polyvec *r);
|
|
|
|
void polyvec_invntt(polyvec *r);
|
2019-01-15 15:34:01 +00:00
|
|
|
|
2019-01-15 15:03:38 +00:00
|
|
|
void polyvec_pointwise_acc(poly *r, const polyvec *a, const polyvec *b);
|
|
|
|
|
|
|
|
void polyvec_add(polyvec *r, const polyvec *a, const polyvec *b);
|
|
|
|
|
|
|
|
#endif
|