Browse Source

ntru: fix narrowing warning

tags/v0.0.1
John M. Schanck 4 years ago
committed by Kris Kwiatkowski
parent
commit
61e52f8004
16 changed files with 28 additions and 24 deletions
  1. +2
    -2
      crypto_kem/ntruhps2048509/META.yml
  2. +1
    -0
      crypto_kem/ntruhps2048509/clean/poly.h
  3. +2
    -2
      crypto_kem/ntruhps2048509/clean/poly_r2_inv.c
  4. +2
    -2
      crypto_kem/ntruhps2048509/clean/poly_s3_inv.c
  5. +2
    -2
      crypto_kem/ntruhps2048677/META.yml
  6. +1
    -0
      crypto_kem/ntruhps2048677/clean/poly.h
  7. +2
    -2
      crypto_kem/ntruhps2048677/clean/poly_r2_inv.c
  8. +2
    -2
      crypto_kem/ntruhps2048677/clean/poly_s3_inv.c
  9. +2
    -2
      crypto_kem/ntruhps4096821/META.yml
  10. +1
    -0
      crypto_kem/ntruhps4096821/clean/poly.h
  11. +2
    -2
      crypto_kem/ntruhps4096821/clean/poly_r2_inv.c
  12. +2
    -2
      crypto_kem/ntruhps4096821/clean/poly_s3_inv.c
  13. +2
    -2
      crypto_kem/ntruhrss701/META.yml
  14. +1
    -0
      crypto_kem/ntruhrss701/clean/poly.h
  15. +2
    -2
      crypto_kem/ntruhrss701/clean/poly_r2_inv.c
  16. +2
    -2
      crypto_kem/ntruhrss701/clean/poly_s3_inv.c

+ 2
- 2
crypto_kem/ntruhps2048509/META.yml View File

@@ -23,9 +23,9 @@ auxiliary-submitters:
- Zhenfei Zhang
implementations:
- name: clean
version: https://github.com/jschanck/ntru/tree/b4b08d67 reference implementation
version: https://github.com/jschanck/ntru/tree/a6b42aac reference implementation
- name: avx2
version: https://github.com/jschanck/ntru/tree/b4b08d67 avx2 implementation
version: https://github.com/jschanck/ntru/tree/a6b42aac avx2 implementation
supported_platforms:
- architecture: x86_64
operating_systems:


+ 1
- 0
crypto_kem/ntruhps2048509/clean/poly.h View File

@@ -4,6 +4,7 @@
#include "params.h"

#include <stdint.h>
#include <stddef.h>

#define MODQ(X) ((X) & (NTRU_Q-1))



+ 2
- 2
crypto_kem/ntruhps2048509/clean/poly_r2_inv.c View File

@@ -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) {
poly f, g, v, w;
int16_t i, loop, delta;
int16_t sign, swap, t;
size_t i, loop;
int16_t delta, sign, swap, t;

for (i = 0; i < NTRU_N; ++i) {
v.coeffs[i] = 0;


+ 2
- 2
crypto_kem/ntruhps2048509/clean/poly_s3_inv.c View File

@@ -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) {
poly f, g, v, w;
int16_t i, loop, delta;
int16_t sign, swap, t;
size_t i, loop;
int16_t delta, sign, swap, t;

for (i = 0; i < NTRU_N; ++i) {
v.coeffs[i] = 0;


+ 2
- 2
crypto_kem/ntruhps2048677/META.yml View File

@@ -23,9 +23,9 @@ auxiliary-submitters:
- Zhenfei Zhang
implementations:
- name: clean
version: https://github.com/jschanck/ntru/tree/b4b08d67 reference implementation
version: https://github.com/jschanck/ntru/tree/a6b42aac reference implementation
- name: avx2
version: https://github.com/jschanck/ntru/tree/b4b08d67 avx2 implementation
version: https://github.com/jschanck/ntru/tree/a6b42aac avx2 implementation
supported_platforms:
- architecture: x86_64
operating_systems:


+ 1
- 0
crypto_kem/ntruhps2048677/clean/poly.h View File

@@ -4,6 +4,7 @@
#include "params.h"

#include <stdint.h>
#include <stddef.h>

#define MODQ(X) ((X) & (NTRU_Q-1))



+ 2
- 2
crypto_kem/ntruhps2048677/clean/poly_r2_inv.c View File

@@ -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) {
poly f, g, v, w;
int16_t i, loop, delta;
int16_t sign, swap, t;
size_t i, loop;
int16_t delta, sign, swap, t;

for (i = 0; i < NTRU_N; ++i) {
v.coeffs[i] = 0;


+ 2
- 2
crypto_kem/ntruhps2048677/clean/poly_s3_inv.c View File

@@ -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) {
poly f, g, v, w;
int16_t i, loop, delta;
int16_t sign, swap, t;
size_t i, loop;
int16_t delta, sign, swap, t;

for (i = 0; i < NTRU_N; ++i) {
v.coeffs[i] = 0;


+ 2
- 2
crypto_kem/ntruhps4096821/META.yml View File

@@ -23,9 +23,9 @@ auxiliary-submitters:
- Zhenfei Zhang
implementations:
- name: clean
version: https://github.com/jschanck/ntru/tree/b4b08d67 reference implementation
version: https://github.com/jschanck/ntru/tree/a6b42aac reference implementation
- name: avx2
version: https://github.com/jschanck/ntru/tree/b4b08d67 avx2 implementation
version: https://github.com/jschanck/ntru/tree/a6b42aac avx2 implementation
supported_platforms:
- architecture: x86_64
operating_systems:


+ 1
- 0
crypto_kem/ntruhps4096821/clean/poly.h View File

@@ -4,6 +4,7 @@
#include "params.h"

#include <stdint.h>
#include <stddef.h>

#define MODQ(X) ((X) & (NTRU_Q-1))



+ 2
- 2
crypto_kem/ntruhps4096821/clean/poly_r2_inv.c View File

@@ -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) {
poly f, g, v, w;
int16_t i, loop, delta;
int16_t sign, swap, t;
size_t i, loop;
int16_t delta, sign, swap, t;

for (i = 0; i < NTRU_N; ++i) {
v.coeffs[i] = 0;


+ 2
- 2
crypto_kem/ntruhps4096821/clean/poly_s3_inv.c View File

@@ -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) {
poly f, g, v, w;
int16_t i, loop, delta;
int16_t sign, swap, t;
size_t i, loop;
int16_t delta, sign, swap, t;

for (i = 0; i < NTRU_N; ++i) {
v.coeffs[i] = 0;


+ 2
- 2
crypto_kem/ntruhrss701/META.yml View File

@@ -23,9 +23,9 @@ auxiliary-submitters:
- Zhenfei Zhang
implementations:
- name: clean
version: https://github.com/jschanck/ntru/tree/b4b08d67 reference implementation
version: https://github.com/jschanck/ntru/tree/a6b42aac reference implementation
- name: avx2
version: https://github.com/jschanck/ntru/tree/b4b08d67 avx2 implementation
version: https://github.com/jschanck/ntru/tree/a6b42aac avx2 implementation
supported_platforms:
- architecture: x86_64
operating_systems:


+ 1
- 0
crypto_kem/ntruhrss701/clean/poly.h View File

@@ -4,6 +4,7 @@
#include "params.h"

#include <stdint.h>
#include <stddef.h>

#define MODQ(X) ((X) & (NTRU_Q-1))



+ 2
- 2
crypto_kem/ntruhrss701/clean/poly_r2_inv.c View File

@@ -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) {
poly f, g, v, w;
int16_t i, loop, delta;
int16_t sign, swap, t;
size_t i, loop;
int16_t delta, sign, swap, t;

for (i = 0; i < NTRU_N; ++i) {
v.coeffs[i] = 0;


+ 2
- 2
crypto_kem/ntruhrss701/clean/poly_s3_inv.c View File

@@ -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) {
poly f, g, v, w;
int16_t i, loop, delta;
int16_t sign, swap, t;
size_t i, loop;
int16_t delta, sign, swap, t;

for (i = 0; i < NTRU_N; ++i) {
v.coeffs[i] = 0;


Loading…
Cancel
Save