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

remove another unused function

This commit is contained in:
Matthias J. Kannwischer 2019-06-18 14:27:10 +02:00 committed by Douglas Stebila
parent 9d8d7d9bee
commit a94d7dc76e
2 changed files with 0 additions and 22 deletions

View File

@ -16,11 +16,6 @@ static inline uint8_t gf4_mul_2(uint8_t a) {
return r;
}
static inline uint8_t gf4_mul_3(uint8_t a) {
uint8_t msk = (uint8_t) (a - 2) >> 1;
return (uint8_t)((msk & (a * 3)) | ((~msk) & (a - 1)));
}
static inline uint8_t gf4_mul(uint8_t a, uint8_t b) {
uint8_t r = (uint8_t) (a * (b & 1));
return r ^ (uint8_t)(gf4_mul_2(a) * (b >> 1));
@ -36,12 +31,6 @@ static inline uint32_t gf4v_mul_2_u32(uint32_t a) {
return (bit0 << 1) ^ bit1 ^ (bit1 >> 1);
}
static inline uint32_t gf4v_mul_3_u32(uint32_t a) {
uint32_t bit0 = a & 0x55555555;
uint32_t bit1 = a & 0xaaaaaaaa;
return (bit0 << 1) ^ bit0 ^ (bit1 >> 1);
}
static inline uint32_t gf4v_mul_u32(uint32_t a, uint8_t b) {
uint32_t bit0_b = ((uint32_t) 0) - ((uint32_t)(b & 1));
uint32_t bit1_b = ((uint32_t) 0) - ((uint32_t)((b >> 1) & 1));

View File

@ -16,11 +16,6 @@ static inline uint8_t gf4_mul_2(uint8_t a) {
return r;
}
static inline uint8_t gf4_mul_3(uint8_t a) {
uint8_t msk = (uint8_t) (a - 2) >> 1;
return (uint8_t)((msk & (a * 3)) | ((~msk) & (a - 1)));
}
static inline uint8_t gf4_mul(uint8_t a, uint8_t b) {
uint8_t r = (uint8_t) (a * (b & 1));
return r ^ (uint8_t)(gf4_mul_2(a) * (b >> 1));
@ -36,12 +31,6 @@ static inline uint32_t gf4v_mul_2_u32(uint32_t a) {
return (bit0 << 1) ^ bit1 ^ (bit1 >> 1);
}
static inline uint32_t gf4v_mul_3_u32(uint32_t a) {
uint32_t bit0 = a & 0x55555555;
uint32_t bit1 = a & 0xaaaaaaaa;
return (bit0 << 1) ^ bit0 ^ (bit1 >> 1);
}
static inline uint32_t gf4v_mul_u32(uint32_t a, uint8_t b) {
uint32_t bit0_b = ((uint32_t) 0) - ((uint32_t)(b & 1));
uint32_t bit1_b = ((uint32_t) 0) - ((uint32_t)((b >> 1) & 1));