aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-15 07:46:36 -0400
committerJack Lloyd <[email protected]>2018-08-15 07:46:36 -0400
commitb3e15b49ad0946b141c78ac9bf25ef654b0eb017 (patch)
tree21bcda657a9dd59eb9eff0df989cf5da17813955 /src/lib/utils
parentd4ab524798edd7609f9db7db5b050459fa7ad238 (diff)
Remove support for 8 or 16 bit BigInt words
It turned out 8 bit was very broken (failed to compile, due to overload problems with functions taking uint8_t vs word). 16 bit words work aside from a test failure, but is really slow. Practically speaking we are not in a position to support 16-bit CPUs very well. And being able to assume sizeof(word) >= sizeof(uint32_t) allows simplifying some code.
Diffstat (limited to 'src/lib/utils')
-rw-r--r--src/lib/utils/types.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/utils/types.h b/src/lib/utils/types.h
index e25682a2f..476701a1f 100644
--- a/src/lib/utils/types.h
+++ b/src/lib/utils/types.h
@@ -92,16 +92,12 @@ using u32bit = std::uint32_t;
using u64bit = std::uint64_t;
using s32bit = std::int32_t;
-#if (BOTAN_MP_WORD_BITS == 8)
- typedef uint8_t word;
-#elif (BOTAN_MP_WORD_BITS == 16)
- typedef uint16_t word;
-#elif (BOTAN_MP_WORD_BITS == 32)
+#if (BOTAN_MP_WORD_BITS == 32)
typedef uint32_t word;
#elif (BOTAN_MP_WORD_BITS == 64)
typedef uint64_t word;
#else
- #error BOTAN_MP_WORD_BITS must be 8, 16, 32, or 64
+ #error BOTAN_MP_WORD_BITS must be 32 or 64
#endif
}