1
1
Mirror von https://github.com/henrydcase/pqc.git synchronisiert 2024-11-22 07:35:38 +00:00

Remove BITMASK macro

Dieser Commit ist enthalten in:
John M. Schanck 2020-09-09 16:52:51 -04:00 committet von Kris Kwiatkowski
Ursprung 1325ba6dff
Commit 6cf952a2ce
24 geänderte Dateien mit 24 neuen und 42 gelöschten Zeilen

Datei anzeigen

@ -10,8 +10,7 @@
#include "vector.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -116,7 +116,7 @@ void PQCLEAN_HQC128_AVX2_vect_set_random(AES_XOF_struct *ctx, uint64_t *v) {
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -10,8 +10,7 @@
#include "vector.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -148,7 +148,7 @@ void PQCLEAN_HQC128_CLEAN_vect_set_random(AES_XOF_struct *ctx, uint64_t *v) {
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -10,8 +10,7 @@
#include "vector.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -116,7 +116,7 @@ void PQCLEAN_HQC192_AVX2_vect_set_random(AES_XOF_struct *ctx, uint64_t *v) {
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -10,8 +10,7 @@
#include "vector.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -148,7 +148,7 @@ void PQCLEAN_HQC192_CLEAN_vect_set_random(AES_XOF_struct *ctx, uint64_t *v) {
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -10,8 +10,7 @@
#include "vector.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -116,7 +116,7 @@ void PQCLEAN_HQC256_AVX2_vect_set_random(AES_XOF_struct *ctx, uint64_t *v) {
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -10,8 +10,7 @@
#include "vector.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -148,7 +148,7 @@ void PQCLEAN_HQC256_CLEAN_vect_set_random(AES_XOF_struct *ctx, uint64_t *v) {
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -11,9 +11,7 @@
#include "api.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -116,7 +116,7 @@ void PQCLEAN_HQCRMRS128_AVX2_vect_set_random(AES_XOF_struct *ctx, uint64_t *v) {
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -11,9 +11,7 @@
#include "api.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -148,7 +148,7 @@ void PQCLEAN_HQCRMRS128_CLEAN_vect_set_random(AES_XOF_struct *ctx, uint64_t *v)
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -11,9 +11,7 @@
#include "api.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -116,7 +116,7 @@ void PQCLEAN_HQCRMRS192_AVX2_vect_set_random(AES_XOF_struct *ctx, uint64_t *v) {
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -11,9 +11,7 @@
#include "api.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -148,7 +148,7 @@ void PQCLEAN_HQCRMRS192_CLEAN_vect_set_random(AES_XOF_struct *ctx, uint64_t *v)
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -11,9 +11,7 @@
#include "api.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -116,7 +116,7 @@ void PQCLEAN_HQCRMRS256_AVX2_vect_set_random(AES_XOF_struct *ctx, uint64_t *v) {
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}

Datei anzeigen

@ -11,9 +11,7 @@
#include "api.h"
#define CEIL_DIVIDE(a, b) (((a)/(b)) + ((a) % (b) == 0 ? 0 : 1)) /*!< Divide a by b and ceil the result*/
#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1) /*!< Create a mask*/
#define CEIL_DIVIDE(a, b) (((a)+(b)-1)/(b)) /*!< Divide a by b and ceil the result*/
/*
#define PARAM_N Define the parameter n of the scheme

Datei anzeigen

@ -148,7 +148,7 @@ void PQCLEAN_HQCRMRS256_CLEAN_vect_set_random(AES_XOF_struct *ctx, uint64_t *v)
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);
memcpy(v, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}