From 143c34d930c658f0f2f59bf68bfb0e41ff62878f Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Mon, 24 Jun 2019 10:06:03 +0200 Subject: [PATCH] remove unused function --- crypto_sign/rainbowIIIc-classic/clean/gf.c | 7 ------- .../rainbowIIIc-cyclic-compressed/clean/gf.c | 7 ------- crypto_sign/rainbowIIIc-cyclic/clean/gf.c | 7 ------- crypto_sign/rainbowIa-classic/clean/gf.c | 16 +++++++++------- .../rainbowIa-cyclic-compressed/clean/gf.c | 16 +++++++++------- crypto_sign/rainbowIa-cyclic/clean/gf.c | 16 +++++++++------- crypto_sign/rainbowVc-classic/clean/gf.c | 7 ------- .../rainbowVc-cyclic-compressed/clean/gf.c | 7 ------- crypto_sign/rainbowVc-cyclic/clean/gf.c | 7 ------- 9 files changed, 27 insertions(+), 63 deletions(-) diff --git a/crypto_sign/rainbowIIIc-classic/clean/gf.c b/crypto_sign/rainbowIIIc-classic/clean/gf.c index 3b034f5d..47ceaa97 100644 --- a/crypto_sign/rainbowIIIc-classic/clean/gf.c +++ b/crypto_sign/rainbowIIIc-classic/clean/gf.c @@ -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; diff --git a/crypto_sign/rainbowIIIc-cyclic-compressed/clean/gf.c b/crypto_sign/rainbowIIIc-cyclic-compressed/clean/gf.c index 91fb0a75..f9ffae4b 100644 --- a/crypto_sign/rainbowIIIc-cyclic-compressed/clean/gf.c +++ b/crypto_sign/rainbowIIIc-cyclic-compressed/clean/gf.c @@ -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; diff --git a/crypto_sign/rainbowIIIc-cyclic/clean/gf.c b/crypto_sign/rainbowIIIc-cyclic/clean/gf.c index c3c3a595..7c686b9c 100644 --- a/crypto_sign/rainbowIIIc-cyclic/clean/gf.c +++ b/crypto_sign/rainbowIIIc-cyclic/clean/gf.c @@ -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; diff --git a/crypto_sign/rainbowIa-classic/clean/gf.c b/crypto_sign/rainbowIa-classic/clean/gf.c index 24c9cc7f..cbd5950a 100644 --- a/crypto_sign/rainbowIa-classic/clean/gf.c +++ b/crypto_sign/rainbowIa-classic/clean/gf.c @@ -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)); } + diff --git a/crypto_sign/rainbowIa-cyclic-compressed/clean/gf.c b/crypto_sign/rainbowIa-cyclic-compressed/clean/gf.c index b1f15e0c..d6566523 100644 --- a/crypto_sign/rainbowIa-cyclic-compressed/clean/gf.c +++ b/crypto_sign/rainbowIa-cyclic-compressed/clean/gf.c @@ -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)); } + diff --git a/crypto_sign/rainbowIa-cyclic/clean/gf.c b/crypto_sign/rainbowIa-cyclic/clean/gf.c index 9ce30191..0fa8ec8a 100644 --- a/crypto_sign/rainbowIa-cyclic/clean/gf.c +++ b/crypto_sign/rainbowIa-cyclic/clean/gf.c @@ -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)); } + diff --git a/crypto_sign/rainbowVc-classic/clean/gf.c b/crypto_sign/rainbowVc-classic/clean/gf.c index 2af61837..77683b0a 100644 --- a/crypto_sign/rainbowVc-classic/clean/gf.c +++ b/crypto_sign/rainbowVc-classic/clean/gf.c @@ -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; diff --git a/crypto_sign/rainbowVc-cyclic-compressed/clean/gf.c b/crypto_sign/rainbowVc-cyclic-compressed/clean/gf.c index c61b7bd8..a650eacf 100644 --- a/crypto_sign/rainbowVc-cyclic-compressed/clean/gf.c +++ b/crypto_sign/rainbowVc-cyclic-compressed/clean/gf.c @@ -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; diff --git a/crypto_sign/rainbowVc-cyclic/clean/gf.c b/crypto_sign/rainbowVc-cyclic/clean/gf.c index 8fb20255..2ad46a98 100644 --- a/crypto_sign/rainbowVc-cyclic/clean/gf.c +++ b/crypto_sign/rainbowVc-cyclic/clean/gf.c @@ -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;