#ifndef OPENSSL_HEADER_HRSS_INTERNAL_H
#define OPENSSL_HEADER_HRSS_INTERNAL_H
#include <openssl/base.h>
#include "../internal.h"
#include "../fipsmodule/cpucap/internal.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define N 701
#define BITS_PER_WORD (sizeof(crypto_word_t) * 8)
#define WORDS_PER_POLY ((N + BITS_PER_WORD - 1) / BITS_PER_WORD)
#define BITS_IN_LAST_WORD (N % BITS_PER_WORD)
struct poly2 {
crypto_word_t v[WORDS_PER_POLY];
};
struct poly3 {
struct poly2 s, a;
};
OPENSSL_EXPORT void HRSS_poly3_mul(struct poly3 *out, const struct poly3 *x,
const struct poly3 *y);
OPENSSL_EXPORT void HRSS_poly3_invert(struct poly3 *out,
const struct poly3 *in);
#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_SMALL) && \
defined(OPENSSL_X86_64) && defined(OPENSSL_LINUX) && \
!defined(MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX)
#define POLY_RQ_MUL_ASM
#define POLY_MUL_RQ_SCRATCH_SPACE (6144 + 6144 + 12288 + 512 + 9408 + 32)
extern void poly_Rq_mul(
uint16_t r[N + 3], const uint16_t a[N + 3], const uint16_t b[N + 3],
uint8_t scratch[]);
#endif
#if defined(__cplusplus)
} #endif
#endif