1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-12-02 12:21:23 +00:00
pqcrypto/crypto_sign/qtesla-p-III/clean/poly.h
Sebastian 56a0fcb135 qTESLA (#239)
* Copied qTESLA-p-I round2 (2019-08-19) code

* Code compiles, NIST-KAT works

* Included detached signature API

* Generated testvectors

* Fixed name in api.h

* code style

* Fixed error in Makefile

* Passing pytest

* Fixing types (uint8_t bytes and size_t indices)

* Replaced SHAKE with SHAKE128 where necessary

* Fixed bug: (signed) integer overflow

* Added qTESLA-p-III

* Code is now independent of machine endianness

* repaired Microsoft makefile
2019-10-21 14:26:27 +02:00

21 lines
980 B
C

#ifndef PQCLEAN_QTESLAPIII_CLEAN_POLY_H
#define PQCLEAN_QTESLAPIII_CLEAN_POLY_H
#include "config.h"
#include "params.h"
#include <stdint.h>
typedef int64_t poly[PARAM_N];
typedef int64_t poly_k[PARAM_N * PARAM_K];
void PQCLEAN_QTESLAPIII_CLEAN_poly_ntt(poly x_ntt, const poly x);
void PQCLEAN_QTESLAPIII_CLEAN_poly_mul(poly result, const poly x, const poly y);
void PQCLEAN_QTESLAPIII_CLEAN_poly_add(poly result, const poly x, const poly y);
void PQCLEAN_QTESLAPIII_CLEAN_poly_add_correct(poly result, const poly x, const poly y);
void PQCLEAN_QTESLAPIII_CLEAN_poly_sub(poly result, const poly x, const poly y);
void PQCLEAN_QTESLAPIII_CLEAN_sparse_mul8(poly prod, const uint8_t *s, const uint32_t pos_list[PARAM_H], const int16_t sign_list[PARAM_H]);
void PQCLEAN_QTESLAPIII_CLEAN_sparse_mul32(poly prod, const int32_t *pk, const uint32_t pos_list[PARAM_H], const int16_t sign_list[PARAM_H]);
void PQCLEAN_QTESLAPIII_CLEAN_poly_uniform(poly_k a, const uint8_t *seed);
#endif