fix some vs warnings
This commit is contained in:
parent
31f9ee52ce
commit
ef0ad8e752
@ -55,7 +55,7 @@ void PQCLEAN_SABER_CLEAN_cbd(uint16_t *r, const unsigned char *buf) {
|
|||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
for (i = 0; i < SABER_N / 4; i++) {
|
for (i = 0; i < SABER_N / 4; i++) {
|
||||||
t = load_littleendian(buf + 4 * i, 4);
|
t = (uint32_t) load_littleendian(buf + 4 * i, 4);
|
||||||
d = 0;
|
d = 0;
|
||||||
for (j = 0; j < 4; j++) {
|
for (j = 0; j < 4; j++) {
|
||||||
d += (t >> j) & 0x11111111;
|
d += (t >> j) & 0x11111111;
|
||||||
|
@ -47,7 +47,8 @@ int PQCLEAN_SABER_CLEAN_crypto_kem_enc(unsigned char *ct, unsigned char *ss, con
|
|||||||
|
|
||||||
|
|
||||||
int PQCLEAN_SABER_CLEAN_crypto_kem_dec(unsigned char *ss, const unsigned char *ct, const unsigned char *sk) {
|
int PQCLEAN_SABER_CLEAN_crypto_kem_dec(unsigned char *ss, const unsigned char *ct, const unsigned char *sk) {
|
||||||
int i, fail;
|
int i;
|
||||||
|
unsigned char fail;
|
||||||
unsigned char cmp[SABER_BYTES_CCA_DEC];
|
unsigned char cmp[SABER_BYTES_CCA_DEC];
|
||||||
unsigned char buf[64];
|
unsigned char buf[64];
|
||||||
unsigned char kr[64]; // Will contain key, coins
|
unsigned char kr[64]; // Will contain key, coins
|
||||||
|
@ -5,7 +5,7 @@ of "CRYSTALS – Kyber: a CCA-secure module-lattice-based KEM"
|
|||||||
by : Joppe Bos, Leo Ducas, Eike Kiltz, Tancrede Lepoint,
|
by : Joppe Bos, Leo Ducas, Eike Kiltz, Tancrede Lepoint,
|
||||||
Vadim Lyubashevsky, John M. Schanck, Peter Schwabe & Damien stehle
|
Vadim Lyubashevsky, John M. Schanck, Peter Schwabe & Damien stehle
|
||||||
----------------------------------------------------------------------*/
|
----------------------------------------------------------------------*/
|
||||||
#include "api.h"
|
#include "SABER_params.h"
|
||||||
#include "cbd.h"
|
#include "cbd.h"
|
||||||
#include "fips202.h"
|
#include "fips202.h"
|
||||||
#include "poly.h"
|
#include "poly.h"
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "poly_mul.h"
|
#include "poly_mul.h"
|
||||||
|
#include "SABER_params.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define SCHB_N 16
|
#define SCHB_N 16
|
||||||
|
Loading…
Reference in New Issue
Block a user