ntru: fix narrowing warning
This commit is contained in:
parent
0f148a6991
commit
4e1314d338
@ -23,9 +23,9 @@ auxiliary-submitters:
|
|||||||
- Zhenfei Zhang
|
- Zhenfei Zhang
|
||||||
implementations:
|
implementations:
|
||||||
- name: clean
|
- name: clean
|
||||||
version: https://github.com/jschanck/ntru/tree/b4b08d67 reference implementation
|
version: https://github.com/jschanck/ntru/tree/a6b42aac reference implementation
|
||||||
- name: avx2
|
- name: avx2
|
||||||
version: https://github.com/jschanck/ntru/tree/b4b08d67 avx2 implementation
|
version: https://github.com/jschanck/ntru/tree/a6b42aac avx2 implementation
|
||||||
supported_platforms:
|
supported_platforms:
|
||||||
- architecture: x86_64
|
- architecture: x86_64
|
||||||
operating_systems:
|
operating_systems:
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "params.h"
|
#include "params.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#define MODQ(X) ((X) & (NTRU_Q-1))
|
#define MODQ(X) ((X) & (NTRU_Q-1))
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ static inline int16_t both_negative_mask(int16_t x, int16_t y) {
|
|||||||
|
|
||||||
void PQCLEAN_NTRUHPS2048509_CLEAN_poly_R2_inv(poly *r, const poly *a) {
|
void PQCLEAN_NTRUHPS2048509_CLEAN_poly_R2_inv(poly *r, const poly *a) {
|
||||||
poly f, g, v, w;
|
poly f, g, v, w;
|
||||||
int16_t i, loop, delta;
|
size_t i, loop;
|
||||||
int16_t sign, swap, t;
|
int16_t delta, sign, swap, t;
|
||||||
|
|
||||||
for (i = 0; i < NTRU_N; ++i) {
|
for (i = 0; i < NTRU_N; ++i) {
|
||||||
v.coeffs[i] = 0;
|
v.coeffs[i] = 0;
|
||||||
|
@ -17,8 +17,8 @@ static inline int16_t both_negative_mask(int16_t x, int16_t y) {
|
|||||||
|
|
||||||
void PQCLEAN_NTRUHPS2048509_CLEAN_poly_S3_inv(poly *r, const poly *a) {
|
void PQCLEAN_NTRUHPS2048509_CLEAN_poly_S3_inv(poly *r, const poly *a) {
|
||||||
poly f, g, v, w;
|
poly f, g, v, w;
|
||||||
int16_t i, loop, delta;
|
size_t i, loop;
|
||||||
int16_t sign, swap, t;
|
int16_t delta, sign, swap, t;
|
||||||
|
|
||||||
for (i = 0; i < NTRU_N; ++i) {
|
for (i = 0; i < NTRU_N; ++i) {
|
||||||
v.coeffs[i] = 0;
|
v.coeffs[i] = 0;
|
||||||
|
@ -23,9 +23,9 @@ auxiliary-submitters:
|
|||||||
- Zhenfei Zhang
|
- Zhenfei Zhang
|
||||||
implementations:
|
implementations:
|
||||||
- name: clean
|
- name: clean
|
||||||
version: https://github.com/jschanck/ntru/tree/b4b08d67 reference implementation
|
version: https://github.com/jschanck/ntru/tree/a6b42aac reference implementation
|
||||||
- name: avx2
|
- name: avx2
|
||||||
version: https://github.com/jschanck/ntru/tree/b4b08d67 avx2 implementation
|
version: https://github.com/jschanck/ntru/tree/a6b42aac avx2 implementation
|
||||||
supported_platforms:
|
supported_platforms:
|
||||||
- architecture: x86_64
|
- architecture: x86_64
|
||||||
operating_systems:
|
operating_systems:
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "params.h"
|
#include "params.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#define MODQ(X) ((X) & (NTRU_Q-1))
|
#define MODQ(X) ((X) & (NTRU_Q-1))
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ static inline int16_t both_negative_mask(int16_t x, int16_t y) {
|
|||||||
|
|
||||||
void PQCLEAN_NTRUHPS2048677_CLEAN_poly_R2_inv(poly *r, const poly *a) {
|
void PQCLEAN_NTRUHPS2048677_CLEAN_poly_R2_inv(poly *r, const poly *a) {
|
||||||
poly f, g, v, w;
|
poly f, g, v, w;
|
||||||
int16_t i, loop, delta;
|
size_t i, loop;
|
||||||
int16_t sign, swap, t;
|
int16_t delta, sign, swap, t;
|
||||||
|
|
||||||
for (i = 0; i < NTRU_N; ++i) {
|
for (i = 0; i < NTRU_N; ++i) {
|
||||||
v.coeffs[i] = 0;
|
v.coeffs[i] = 0;
|
||||||
|
@ -17,8 +17,8 @@ static inline int16_t both_negative_mask(int16_t x, int16_t y) {
|
|||||||
|
|
||||||
void PQCLEAN_NTRUHPS2048677_CLEAN_poly_S3_inv(poly *r, const poly *a) {
|
void PQCLEAN_NTRUHPS2048677_CLEAN_poly_S3_inv(poly *r, const poly *a) {
|
||||||
poly f, g, v, w;
|
poly f, g, v, w;
|
||||||
int16_t i, loop, delta;
|
size_t i, loop;
|
||||||
int16_t sign, swap, t;
|
int16_t delta, sign, swap, t;
|
||||||
|
|
||||||
for (i = 0; i < NTRU_N; ++i) {
|
for (i = 0; i < NTRU_N; ++i) {
|
||||||
v.coeffs[i] = 0;
|
v.coeffs[i] = 0;
|
||||||
|
@ -23,9 +23,9 @@ auxiliary-submitters:
|
|||||||
- Zhenfei Zhang
|
- Zhenfei Zhang
|
||||||
implementations:
|
implementations:
|
||||||
- name: clean
|
- name: clean
|
||||||
version: https://github.com/jschanck/ntru/tree/b4b08d67 reference implementation
|
version: https://github.com/jschanck/ntru/tree/a6b42aac reference implementation
|
||||||
- name: avx2
|
- name: avx2
|
||||||
version: https://github.com/jschanck/ntru/tree/b4b08d67 avx2 implementation
|
version: https://github.com/jschanck/ntru/tree/a6b42aac avx2 implementation
|
||||||
supported_platforms:
|
supported_platforms:
|
||||||
- architecture: x86_64
|
- architecture: x86_64
|
||||||
operating_systems:
|
operating_systems:
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "params.h"
|
#include "params.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#define MODQ(X) ((X) & (NTRU_Q-1))
|
#define MODQ(X) ((X) & (NTRU_Q-1))
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ static inline int16_t both_negative_mask(int16_t x, int16_t y) {
|
|||||||
|
|
||||||
void PQCLEAN_NTRUHPS4096821_CLEAN_poly_R2_inv(poly *r, const poly *a) {
|
void PQCLEAN_NTRUHPS4096821_CLEAN_poly_R2_inv(poly *r, const poly *a) {
|
||||||
poly f, g, v, w;
|
poly f, g, v, w;
|
||||||
int16_t i, loop, delta;
|
size_t i, loop;
|
||||||
int16_t sign, swap, t;
|
int16_t delta, sign, swap, t;
|
||||||
|
|
||||||
for (i = 0; i < NTRU_N; ++i) {
|
for (i = 0; i < NTRU_N; ++i) {
|
||||||
v.coeffs[i] = 0;
|
v.coeffs[i] = 0;
|
||||||
|
@ -17,8 +17,8 @@ static inline int16_t both_negative_mask(int16_t x, int16_t y) {
|
|||||||
|
|
||||||
void PQCLEAN_NTRUHPS4096821_CLEAN_poly_S3_inv(poly *r, const poly *a) {
|
void PQCLEAN_NTRUHPS4096821_CLEAN_poly_S3_inv(poly *r, const poly *a) {
|
||||||
poly f, g, v, w;
|
poly f, g, v, w;
|
||||||
int16_t i, loop, delta;
|
size_t i, loop;
|
||||||
int16_t sign, swap, t;
|
int16_t delta, sign, swap, t;
|
||||||
|
|
||||||
for (i = 0; i < NTRU_N; ++i) {
|
for (i = 0; i < NTRU_N; ++i) {
|
||||||
v.coeffs[i] = 0;
|
v.coeffs[i] = 0;
|
||||||
|
@ -23,9 +23,9 @@ auxiliary-submitters:
|
|||||||
- Zhenfei Zhang
|
- Zhenfei Zhang
|
||||||
implementations:
|
implementations:
|
||||||
- name: clean
|
- name: clean
|
||||||
version: https://github.com/jschanck/ntru/tree/b4b08d67 reference implementation
|
version: https://github.com/jschanck/ntru/tree/a6b42aac reference implementation
|
||||||
- name: avx2
|
- name: avx2
|
||||||
version: https://github.com/jschanck/ntru/tree/b4b08d67 avx2 implementation
|
version: https://github.com/jschanck/ntru/tree/a6b42aac avx2 implementation
|
||||||
supported_platforms:
|
supported_platforms:
|
||||||
- architecture: x86_64
|
- architecture: x86_64
|
||||||
operating_systems:
|
operating_systems:
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "params.h"
|
#include "params.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#define MODQ(X) ((X) & (NTRU_Q-1))
|
#define MODQ(X) ((X) & (NTRU_Q-1))
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ static inline int16_t both_negative_mask(int16_t x, int16_t y) {
|
|||||||
|
|
||||||
void PQCLEAN_NTRUHRSS701_CLEAN_poly_R2_inv(poly *r, const poly *a) {
|
void PQCLEAN_NTRUHRSS701_CLEAN_poly_R2_inv(poly *r, const poly *a) {
|
||||||
poly f, g, v, w;
|
poly f, g, v, w;
|
||||||
int16_t i, loop, delta;
|
size_t i, loop;
|
||||||
int16_t sign, swap, t;
|
int16_t delta, sign, swap, t;
|
||||||
|
|
||||||
for (i = 0; i < NTRU_N; ++i) {
|
for (i = 0; i < NTRU_N; ++i) {
|
||||||
v.coeffs[i] = 0;
|
v.coeffs[i] = 0;
|
||||||
|
@ -17,8 +17,8 @@ static inline int16_t both_negative_mask(int16_t x, int16_t y) {
|
|||||||
|
|
||||||
void PQCLEAN_NTRUHRSS701_CLEAN_poly_S3_inv(poly *r, const poly *a) {
|
void PQCLEAN_NTRUHRSS701_CLEAN_poly_S3_inv(poly *r, const poly *a) {
|
||||||
poly f, g, v, w;
|
poly f, g, v, w;
|
||||||
int16_t i, loop, delta;
|
size_t i, loop;
|
||||||
int16_t sign, swap, t;
|
int16_t delta, sign, swap, t;
|
||||||
|
|
||||||
for (i = 0; i < NTRU_N; ++i) {
|
for (i = 0; i < NTRU_N; ++i) {
|
||||||
v.coeffs[i] = 0;
|
v.coeffs[i] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user