mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-26 09:21:28 +00:00
remove unused functions
This commit is contained in:
parent
98e643e5c7
commit
26dad0211d
@ -3,22 +3,6 @@
|
||||
#include <assert.h>
|
||||
#include <string.h> // memset(...)
|
||||
|
||||
/* allows the second operand to be shorter than the first */
|
||||
/* the result should be as large as the first operand*/
|
||||
static inline void gf2x_add_asymm(const size_t nr, DIGIT Res[],
|
||||
const size_t na, const DIGIT A[],
|
||||
const size_t nb, const DIGIT B[]) {
|
||||
assert(nr >= na && na >= nb);
|
||||
size_t i;
|
||||
size_t delta = na - nb;
|
||||
for (i = 0; i < delta; i++) {
|
||||
Res[i] = A[i];
|
||||
}
|
||||
for (i = 0; i < nb; i++) {
|
||||
Res[i + delta] = A[i + delta] ^ B[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* PRE: MAX ALLOWED ROTATION AMOUNT : DIGIT_SIZE_b */
|
||||
void PQCLEAN_LEDAKEMLT12_CLEAN_right_bit_shift_n(int length, DIGIT in[], unsigned int amount) {
|
||||
assert(amount < DIGIT_SIZE_b);
|
||||
@ -84,17 +68,3 @@ void PQCLEAN_LEDAKEMLT12_CLEAN_gf2x_mul_comb(int nr, DIGIT Res[],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void gf2x_exact_div_x_plus_one(const int na, DIGIT A[]) {
|
||||
DIGIT t = 0;
|
||||
for (int i = na - 1; i >= 0; i--) {
|
||||
|
||||
t ^= A[i];
|
||||
|
||||
for (int j = 1; j <= DIGIT_SIZE_b / 2; j = j * 2) {
|
||||
t ^= t << (unsigned) j;
|
||||
}
|
||||
A[i] = t;
|
||||
t >>= DIGIT_SIZE_b - 1;
|
||||
}
|
||||
}
|
||||
|
@ -3,22 +3,6 @@
|
||||
#include <assert.h>
|
||||
#include <string.h> // memset(...)
|
||||
|
||||
/* allows the second operand to be shorter than the first */
|
||||
/* the result should be as large as the first operand*/
|
||||
static inline void gf2x_add_asymm(const int nr, DIGIT Res[],
|
||||
const int na, const DIGIT A[],
|
||||
const int nb, const DIGIT B[]) {
|
||||
assert(nr >= na && na >= nb);
|
||||
int i;
|
||||
int delta = na - nb;
|
||||
for (i = 0; i < delta; i++) {
|
||||
Res[i] = A[i];
|
||||
}
|
||||
for (i = 0; i < nb; i++) {
|
||||
Res[i + delta] = A[i + delta] ^ B[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* PRE: MAX ALLOWED ROTATION AMOUNT : DIGIT_SIZE_b */
|
||||
void PQCLEAN_LEDAKEMLT32_CLEAN_right_bit_shift_n(int length, DIGIT in[], unsigned int amount) {
|
||||
assert(amount < DIGIT_SIZE_b);
|
||||
@ -84,17 +68,3 @@ void PQCLEAN_LEDAKEMLT32_CLEAN_gf2x_mul_comb(int nr, DIGIT Res[],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void gf2x_exact_div_x_plus_one(const int na, DIGIT A[]) {
|
||||
DIGIT t = 0;
|
||||
for (int i = na - 1; i >= 0; i--) {
|
||||
|
||||
t ^= A[i];
|
||||
|
||||
for (int j = 1; j <= DIGIT_SIZE_b / 2; j = j * 2) {
|
||||
t ^= t << (unsigned) j;
|
||||
}
|
||||
A[i] = t;
|
||||
t >>= DIGIT_SIZE_b - 1;
|
||||
}
|
||||
}
|
||||
|
@ -3,22 +3,6 @@
|
||||
#include <assert.h>
|
||||
#include <string.h> // memset(...)
|
||||
|
||||
/* allows the second operand to be shorter than the first */
|
||||
/* the result should be as large as the first operand*/
|
||||
static inline void gf2x_add_asymm(const size_t nr, DIGIT Res[],
|
||||
const size_t na, const DIGIT A[],
|
||||
const size_t nb, const DIGIT B[]) {
|
||||
assert(nr >= na && na >= nb);
|
||||
size_t i;
|
||||
size_t delta = na - nb;
|
||||
for (i = 0; i < delta; i++) {
|
||||
Res[i] = A[i];
|
||||
}
|
||||
for (i = 0; i < nb; i++) {
|
||||
Res[i + delta] = A[i + delta] ^ B[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* PRE: MAX ALLOWED ROTATION AMOUNT : DIGIT_SIZE_b */
|
||||
void PQCLEAN_LEDAKEMLT52_CLEAN_right_bit_shift_n(int length, DIGIT in[], unsigned int amount) {
|
||||
assert(amount < DIGIT_SIZE_b);
|
||||
@ -84,17 +68,3 @@ void PQCLEAN_LEDAKEMLT52_CLEAN_gf2x_mul_comb(int nr, DIGIT Res[],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void gf2x_exact_div_x_plus_one(const int na, DIGIT A[]) {
|
||||
DIGIT t = 0;
|
||||
for (int i = na - 1; i >= 0; i--) {
|
||||
|
||||
t ^= A[i];
|
||||
|
||||
for (int j = 1; j <= DIGIT_SIZE_b / 2; j = j * 2) {
|
||||
t ^= t << (unsigned) j;
|
||||
}
|
||||
A[i] = t;
|
||||
t >>= DIGIT_SIZE_b - 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user