1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 23:48:58 +00:00

remove unused function

This commit is contained in:
Matthias J. Kannwischer 2019-06-24 10:06:03 +02:00 committed by Douglas Stebila
parent 127cc83162
commit 143c34d930
9 changed files with 27 additions and 63 deletions

View File

@ -60,13 +60,6 @@ uint32_t PQCLEAN_RAINBOWIIICCLASSIC_CLEAN_gf16v_mul_u32(uint32_t a, uint8_t b) {
return axb0 ^ a0b1 ^ a1b1 ^ gf4v_mul_2_u32(a1b1_2);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
uint8_t PQCLEAN_RAINBOWIIICCLASSIC_CLEAN_gf256_is_nonzero(uint8_t a) {
unsigned a8 = a;

View File

@ -60,13 +60,6 @@ uint32_t PQCLEAN_RAINBOWIIICCYCLICCOMPRESSED_CLEAN_gf16v_mul_u32(uint32_t a, uin
return axb0 ^ a0b1 ^ a1b1 ^ gf4v_mul_2_u32(a1b1_2);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
uint8_t PQCLEAN_RAINBOWIIICCYCLICCOMPRESSED_CLEAN_gf256_is_nonzero(uint8_t a) {
unsigned a8 = a;

View File

@ -60,13 +60,6 @@ uint32_t PQCLEAN_RAINBOWIIICCYCLIC_CLEAN_gf16v_mul_u32(uint32_t a, uint8_t b) {
return axb0 ^ a0b1 ^ a1b1 ^ gf4v_mul_2_u32(a1b1_2);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
uint8_t PQCLEAN_RAINBOWIIICCYCLIC_CLEAN_gf256_is_nonzero(uint8_t a) {
unsigned a8 = a;

View File

@ -60,13 +60,6 @@ uint32_t PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf16v_mul_u32(uint32_t a, uint8_t b) {
return axb0 ^ a0b1 ^ a1b1 ^ gf4v_mul_2_u32(a1b1_2);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
@ -118,8 +111,17 @@ uint32_t PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf16v_mul_u32_u32(uint32_t a, uint32_t b
return _gf16v_mul_u32_u32(a0, a1, a2, a3, b0, b1, b2, b3);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
uint8_t PQCLEAN_RAINBOWIACLASSIC_CLEAN_gf16v_reduce_u32(uint32_t a) {
uint8_t r256 = gf256v_reduce_u32(a);
return (uint8_t)((r256 & 0xf) ^ (r256 >> 4));
}

View File

@ -60,13 +60,6 @@ uint32_t PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf16v_mul_u32(uint32_t a, uint8
return axb0 ^ a0b1 ^ a1b1 ^ gf4v_mul_2_u32(a1b1_2);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
@ -118,8 +111,17 @@ uint32_t PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf16v_mul_u32_u32(uint32_t a, u
return _gf16v_mul_u32_u32(a0, a1, a2, a3, b0, b1, b2, b3);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
uint8_t PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_gf16v_reduce_u32(uint32_t a) {
uint8_t r256 = gf256v_reduce_u32(a);
return (uint8_t)((r256 & 0xf) ^ (r256 >> 4));
}

View File

@ -60,13 +60,6 @@ uint32_t PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf16v_mul_u32(uint32_t a, uint8_t b) {
return axb0 ^ a0b1 ^ a1b1 ^ gf4v_mul_2_u32(a1b1_2);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
@ -118,8 +111,17 @@ uint32_t PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf16v_mul_u32_u32(uint32_t a, uint32_t b)
return _gf16v_mul_u32_u32(a0, a1, a2, a3, b0, b1, b2, b3);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
uint8_t PQCLEAN_RAINBOWIACYCLIC_CLEAN_gf16v_reduce_u32(uint32_t a) {
uint8_t r256 = gf256v_reduce_u32(a);
return (uint8_t)((r256 & 0xf) ^ (r256 >> 4));
}

View File

@ -60,13 +60,6 @@ uint32_t PQCLEAN_RAINBOWVCCLASSIC_CLEAN_gf16v_mul_u32(uint32_t a, uint8_t b) {
return axb0 ^ a0b1 ^ a1b1 ^ gf4v_mul_2_u32(a1b1_2);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
uint8_t PQCLEAN_RAINBOWVCCLASSIC_CLEAN_gf256_is_nonzero(uint8_t a) {
unsigned a8 = a;

View File

@ -60,13 +60,6 @@ uint32_t PQCLEAN_RAINBOWVCCYCLICCOMPRESSED_CLEAN_gf16v_mul_u32(uint32_t a, uint8
return axb0 ^ a0b1 ^ a1b1 ^ gf4v_mul_2_u32(a1b1_2);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
uint8_t PQCLEAN_RAINBOWVCCYCLICCOMPRESSED_CLEAN_gf256_is_nonzero(uint8_t a) {
unsigned a8 = a;

View File

@ -60,13 +60,6 @@ uint32_t PQCLEAN_RAINBOWVCCYCLIC_CLEAN_gf16v_mul_u32(uint32_t a, uint8_t b) {
return axb0 ^ a0b1 ^ a1b1 ^ gf4v_mul_2_u32(a1b1_2);
}
static inline uint8_t gf256v_reduce_u32(uint32_t a) {
// https://godbolt.org/z/7hirMb
uint16_t *aa = (uint16_t *) (&a);
uint16_t r = aa[0] ^ aa[1];
uint8_t *rr = (uint8_t *) (&r);
return rr[0] ^ rr[1];
}
uint8_t PQCLEAN_RAINBOWVCCYCLIC_CLEAN_gf256_is_nonzero(uint8_t a) {
unsigned a8 = a;